Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
=================================================================== |
--- sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 21614) |
+++ sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy) |
@@ -4617,7 +4617,10 @@ |
startTryBlock = graph.addNewBlock(); |
open(startTryBlock); |
visit(node.tryBlock); |
- if (!isAborted()) endTryBlock = close(new HGoto()); |
+ // We use a [HExitTry] instead of a [HGoto] for the try block |
+ // because it will have multiple successors: the join block, and |
+ // the catch or finally block. |
+ if (!isAborted()) endTryBlock = close(new HExitTry()); |
SubGraph bodyGraph = new SubGraph(startTryBlock, lastOpenedBlock); |
SubGraph catchGraph = null; |
HLocalValue exception = null; |
@@ -4776,6 +4779,7 @@ |
assert(startCatchBlock != null || startFinallyBlock != null); |
endTryBlock.addSuccessor( |
startCatchBlock != null ? startCatchBlock : startFinallyBlock); |
+ endTryBlock.addSuccessor(exitBlock); |
} |
// The catch block has either the finally or the exit block as |