Chromium Code Reviews| Index: frog/leg/ssa/codegen.dart |
| diff --git a/frog/leg/ssa/codegen.dart b/frog/leg/ssa/codegen.dart |
| index 0f58f29cd7a6ee9c84bf7f883acd856c5dddfdca..02bc40afe5d04a1a95bd641e552f865892d8d67d 100644 |
| --- a/frog/leg/ssa/codegen.dart |
| +++ b/frog/leg/ssa/codegen.dart |
| @@ -249,16 +249,21 @@ class SsaCodeGenerator implements HVisitor { |
| addIndentation(); |
| for (LabelElement label in labeledBlockInfo.labels) { |
| if (labeledBlockInfo.isContinue) { |
| - addContinueLabel(label); |
| + if (label.isContinueTarget) { |
| + addContinueLabel(label); |
| + buffer.add(':'); |
| + } |
| } else { |
| - addBreakLabel(label); |
| + if (label.isBreakTarget) { |
| + addBreakLabel(label); |
| + buffer.add(':'); |
| + } |
| } |
| - buffer.add(':'); |
| } |
| TargetElement target = labeledBlockInfo.target; |
| if (target.isSwitch) { |
| addImplicitBreakLabel(target); |
| - buffer.add(@':'); |
| + buffer.add(':'); |
| } |
| if (labeledBlockInfo.isContinue) { |
| addImplicitContinueLabel(target); |
| @@ -296,12 +301,13 @@ class SsaCodeGenerator implements HVisitor { |
| return; |
| } |
| - currentBlock = node; |
| if (node.isLoopHeader()) { |
| // While loop will be closed by the conditional loop-branch. |
| // TODO(floitsch): HACK HACK HACK. |
| beginLoop(node); |
| } |
| + |
| + currentBlock = node; |
|
ngeoffray
2012/03/21 12:23:23
Why this change? I actually think we should get ri
Lasse Reichstein Nielsen
2012/03/21 12:33:26
Hmm, is it even safe?
I hadn't noticed that curren
|
| HInstruction instruction = node.first; |
| while (instruction != null) { |
| if (instruction is HGoto || instruction is HExit || instruction is HTry) { |