diff options
author | paltherr <paltherr@epfl.ch> | 2003-10-31 12:10:12 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-10-31 12:10:12 +0000 |
commit | 32512b86096beda6858b566fd6a78141dddc227f (patch) | |
tree | 9e2b9d785f881601e3d022fbe31c36473b3870cd | |
parent | 8c3432973c2a9519bdf8e2e74cf7f8a942414871 (diff) | |
download | scala-32512b86096beda6858b566fd6a78141dddc227f.tar.gz scala-32512b86096beda6858b566fd6a78141dddc227f.tar.bz2 scala-32512b86096beda6858b566fd6a78141dddc227f.zip |
- Removed condition on super call inlining.
-rw-r--r-- | sources/scalac/transformer/AddConstructors.java | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/sources/scalac/transformer/AddConstructors.java b/sources/scalac/transformer/AddConstructors.java index 639328a222..4dd36b1cf2 100644 --- a/sources/scalac/transformer/AddConstructors.java +++ b/sources/scalac/transformer/AddConstructors.java @@ -158,27 +158,23 @@ public class AddConstructors extends Transformer { } // inline the call to the super constructor - if ( !forINT || !treeSym.parents()[0].symbol().isJava()) { - switch (impl.parents[0]) { - case Apply(TypeApply(Tree fun, Tree[] targs), Tree[] args): - assert fun.symbol().isConstructor(): impl.parents[0]; - int pos = impl.parents[0].pos; - Tree superConstr = gen.Select - (gen.Super(pos, treeSym), fun.symbol()); - constrBody.add(gen.mkApplyTV(superConstr, targs, args)); - break; - case Apply(Tree fun, Tree[] args): - assert fun.symbol().isConstructor(): impl.parents[0]; - int pos = impl.parents[0].pos; - Tree superConstr = gen.Select - (gen.Super(pos, treeSym), fun.symbol()); - constrBody.add(gen.mkApply_V(superConstr, args)); - break; - default: - throw Debug.abort("illegal case", impl.parents[0]); - } - } else { - constrBody.add(gen.This(tree.pos, treeSym)); + switch (impl.parents[0]) { + case Apply(TypeApply(Tree fun, Tree[] targs), Tree[] args): + assert fun.symbol().isConstructor(): impl.parents[0]; + int pos = impl.parents[0].pos; + Tree superConstr = gen.Select + (gen.Super(pos, treeSym), fun.symbol()); + constrBody.add(gen.mkApplyTV(superConstr, targs, args)); + break; + case Apply(Tree fun, Tree[] args): + assert fun.symbol().isConstructor(): impl.parents[0]; + int pos = impl.parents[0].pos; + Tree superConstr = gen.Select + (gen.Super(pos, treeSym), fun.symbol()); + constrBody.add(gen.mkApply_V(superConstr, args)); + break; + default: + throw Debug.abort("illegal case", impl.parents[0]); } // inline initialization of module values |