Chromium Code Reviews| Index: frog/leg/ssa/builder.dart |
| diff --git a/frog/leg/ssa/builder.dart b/frog/leg/ssa/builder.dart |
| index d3f29abb3bf7f4553a770a804cc4a63912a97548..316aa00492fc1b78af5902f876e2801536a3d66e 100644 |
| --- a/frog/leg/ssa/builder.dart |
| +++ b/frog/leg/ssa/builder.dart |
| @@ -2234,6 +2234,7 @@ class SsaBuilder implements Visitor { |
| goto(current, entryBlock); |
| open(entryBlock); |
| visit(body); |
| + SubGraph bodyGraph = new SubGraph(entryBlock, lastOpenedBlock); |
| if (isAborted()) { |
| compiler.unimplemented( |
| "SsaBuilder for labeled statement with aborting body", node: node); |
| @@ -2256,15 +2257,9 @@ class SsaBuilder implements Visitor { |
| if (hasBreak) { |
| // There was at least one reachable break, so the label is needed. |
| HLabeledBlockInformation blockInfo = |
| - new HLabeledBlockInformation(entryBlock, current, |
| - handler.labels()); |
| + new HLabeledBlockInformation(bodyGraph, joinBlock, handler.labels()); |
| handler.close(); |
|
ngeoffray
2012/03/05 14:12:48
Any reason why the close is between the creation a
Lasse Reichstein Nielsen
2012/03/05 14:16:49
No. It just needs to be after handler.labels() is
|
| - // Mark both entry and exit with the information. You can |
| - // tell which one is which by comparing with blockInfo.start/end. |
| - // It doesn't matter which merge block we use, they won't be generating |
| - // any code, so put the end-marker on the last join block. |
| entryBlock.labeledBlockInformation = blockInfo; |
| - current.labeledBlockInformation = blockInfo; |
| } |
| } |