diff options
author | paltherr <paltherr@epfl.ch> | 2004-02-12 15:10:40 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2004-02-12 15:10:40 +0000 |
commit | 2014d1feeefd1bc6bcfee0cee347c4a77db05253 (patch) | |
tree | deffe18f0bf6527171d655885445abc8bb17023b /sources/scalac/transformer/TailCallPhase.java | |
parent | b62de8dc4f94efa47bf6714865b8bbf4df700046 (diff) | |
download | scala-2014d1feeefd1bc6bcfee0cee347c4a77db05253.tar.gz scala-2014d1feeefd1bc6bcfee0cee347c4a77db05253.tar.bz2 scala-2014d1feeefd1bc6bcfee0cee347c4a77db05253.zip |
- Changed Tree.Block(Tree[]) to Tree.Block(Tree...
- Changed Tree.Block(Tree[]) to Tree.Block(Tree[],Tree)
Diffstat (limited to 'sources/scalac/transformer/TailCallPhase.java')
-rw-r--r-- | sources/scalac/transformer/TailCallPhase.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sources/scalac/transformer/TailCallPhase.java b/sources/scalac/transformer/TailCallPhase.java index 60574ad00c..a170671880 100644 --- a/sources/scalac/transformer/TailCallPhase.java +++ b/sources/scalac/transformer/TailCallPhase.java @@ -109,13 +109,8 @@ public class TailCallPhase extends Phase { method = null; return tree; - case Block(Tree[] stats): - if (stats.length == 0) return tree; - Tree expr = transform(stats[stats.length - 1]); - if (expr == stats[stats.length - 1]) return tree; - stats = Tree.cloneArray(stats); - stats[stats.length - 1] = expr; - return gen.Block(tree.pos, stats); + case Block(Tree[] stats, Tree value): + return gen.Block(tree.pos, stats, transform(value)); case If(Tree cond, Tree thenp, Tree elsep): Type type = tree.type(); |