summaryrefslogtreecommitdiff
path: root/sources/scalac/atree
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-11-05 18:02:04 +0000
committerpaltherr <paltherr@epfl.ch>2003-11-05 18:02:04 +0000
commitea5ed7d4b2aa151cdd5b3becb969889e9dcdc050 (patch)
tree887f1e3a182a0fc5fedef49f88cfbf5f4a9aaeab /sources/scalac/atree
parente3e27c87855aea7d0148724c7e0e3b855e3e5ae5 (diff)
downloadscala-ea5ed7d4b2aa151cdd5b3becb969889e9dcdc050.tar.gz
scala-ea5ed7d4b2aa151cdd5b3becb969889e9dcdc050.tar.bz2
scala-ea5ed7d4b2aa151cdd5b3becb969889e9dcdc050.zip
- Modified AFunction.Method to use InvokeStyle
Diffstat (limited to 'sources/scalac/atree')
-rw-r--r--sources/scalac/atree/AFunction.java2
-rw-r--r--sources/scalac/atree/ATreePrinter.java12
2 files changed, 8 insertions, 6 deletions
diff --git a/sources/scalac/atree/AFunction.java b/sources/scalac/atree/AFunction.java
index 55dee42179..ed5a4c5fba 100644
--- a/sources/scalac/atree/AFunction.java
+++ b/sources/scalac/atree/AFunction.java
@@ -16,7 +16,7 @@ public class AFunction {
//########################################################################
// Public Cases
- public case Method(ACode object, Symbol method, boolean isStatic);
+ public case Method(ACode object, Symbol method, AInvokeStyle style);
public case Primitive(APrimitive primitive);
//########################################################################
diff --git a/sources/scalac/atree/ATreePrinter.java b/sources/scalac/atree/ATreePrinter.java
index 6c831d6b9f..783af97c8d 100644
--- a/sources/scalac/atree/ATreePrinter.java
+++ b/sources/scalac/atree/ATreePrinter.java
@@ -443,14 +443,16 @@ public class ATreePrinter {
/** Prints the function. */
public ATreePrinter printFunction(AFunction function) {
switch (function) {
- case Method(This(Symbol clasz), Symbol method, true):
+ case Method(Void, Symbol method, InvokeStyle.New):
+ return print("new").space().printSymbol(method);
+ case Method(Void, Symbol method, InvokeStyle.Static):
+ return printSymbol(method.owner()).print('.').printSymbol(method);
+ case Method(This(Symbol clasz), Symbol method, InvokeStyle.Static):
printSymbol(clasz).print('.').print("super").print('.');
return printSymbol(method);
- case Method(Void, Symbol method, true):
- return printSymbol(method.owner()).print('.').printSymbol(method);
- case Method(ACode object, Symbol method, boolean isStatic):
+ case Method(ACode object, Symbol method, InvokeStyle style):
printCode(object).print('.');
- if (isStatic) print("<static>").space();
+ if (style != InvokeStyle.Dynamic) print("<" + style + ">").space();
return printSymbol(method);
case Primitive(APrimitive primitive):
return printPrimitive(primitive);