summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-12-15 15:39:31 +0000
committerpaltherr <paltherr@epfl.ch>2003-12-15 15:39:31 +0000
commit687adfac1185344fe9993a1fb2e7113682fbc260 (patch)
tree12b58792e12c878dfe7492636cbbc37a8c3cb1a8
parent7534129fe051480657cebfc0344421cd27eac48b (diff)
downloadscala-687adfac1185344fe9993a1fb2e7113682fbc260.tar.gz
scala-687adfac1185344fe9993a1fb2e7113682fbc260.tar.bz2
scala-687adfac1185344fe9993a1fb2e7113682fbc260.zip
- Removed some assertions (already in TreeChecker)
-rw-r--r--sources/scalac/atree/ATreeFromSTree.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/sources/scalac/atree/ATreeFromSTree.java b/sources/scalac/atree/ATreeFromSTree.java
index 042dab59fe..b3d309a7b5 100644
--- a/sources/scalac/atree/ATreeFromSTree.java
+++ b/sources/scalac/atree/ATreeFromSTree.java
@@ -243,12 +243,10 @@ public class ATreeFromSTree {
private ACode apply(Tree tree, Tree fun, Tree[] targs, Tree[] vargs) {
switch (fun) {
case Ident(_):
- if ("".equals("")) return ACode.Void; // !!!
- Symbol symbol = tree.symbol();
- assert symbol.isLabel() && targs.length == 0: tree; // !!!
- return make.Goto(tree, symbol, expression(vargs));
+ return make.Goto(tree, tree.symbol(), expression(vargs));
+ default:
+ return apply(tree, method(fun), targs, vargs);
}
- return apply(tree, method(fun), targs, vargs);
}
/** Translates the application. */
@@ -261,17 +259,18 @@ public class ATreeFromSTree {
/** Translates the method. */
private AFunction method(Tree tree) {
+ Symbol symbol = tree.symbol();
switch (tree) {
+
case Select(Tree qualifier, _):
- Symbol symbol = tree.symbol();
if (symbol.isJava() && symbol.owner().isModuleClass())
return AFunction.Method(make.Void, symbol, AInvokeStyle.Static); // !!! qualifier is ignored !
ACode object = expression(qualifier);
return AFunction.Method(object, symbol, invokeStyle(qualifier));
+
case Ident(_):
- Symbol symbol = tree.symbol();
- assert symbol.isInitializer(); // !!!
return AFunction.Method(make.Void, symbol, AInvokeStyle.New);
+
default:
throw Debug.abort("illegal case", tree);
}
@@ -292,10 +291,10 @@ public class ATreeFromSTree {
/** Translates the location. */
private ALocation location(Tree tree) {
+ Symbol symbol = tree.symbol();
switch (tree) {
case Select(Tree qualifier, _):
- Symbol symbol = tree.symbol();
if (symbol.isModule())
return ALocation.Module(symbol); // !!! qualifier is ignored !
if (symbol.isJava() && symbol.owner().isModuleClass())
@@ -303,7 +302,6 @@ public class ATreeFromSTree {
return ALocation.Field(expression(qualifier), symbol, false);
case Ident(_):
- Symbol symbol = tree.symbol();
if (symbol.isModule()) return ALocation.Module(symbol);
return ALocation.Local(symbol, symbol.isParameter());