Index: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart |
=================================================================== |
--- sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (revision 14518) |
+++ sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (working copy) |
@@ -19,6 +19,7 @@ |
R visitDivide(HDivide node); |
R visitEquals(HEquals node); |
R visitExit(HExit node); |
+ R visitExitTry(HExitTry node); |
R visitFieldGet(HFieldGet node); |
R visitFieldSet(HFieldSet node); |
R visitForeign(HForeign node); |
@@ -279,6 +280,7 @@ |
visitDivide(HDivide node) => visitBinaryArithmetic(node); |
visitEquals(HEquals node) => visitRelational(node); |
visitExit(HExit node) => visitControlFlow(node); |
+ visitExitTry(HExitTry node) => visitControlFlow(node); |
visitFieldGet(HFieldGet node) => visitFieldAccess(node); |
visitFieldSet(HFieldSet node) => visitFieldAccess(node); |
visitForeign(HForeign node) => visitInstruction(node); |
@@ -2033,6 +2035,18 @@ |
HBasicBlock get joinBlock => this.block.successors.last; |
} |
+// An [HExitTry] control flow node is used when the body of a try or |
+// the body of a catch contains a return, break or continue. To build |
+// the control flow graph, we explicitely mark the body that |
+// leads to one of this instruction a predecessor of catch and |
+// finally. |
+class HExitTry extends HControlFlow { |
+ HExitTry() : super(const <HInstruction>[]); |
+ toString() => 'exit try'; |
+ accept(HVisitor visitor) => visitor.visitExitTry(this); |
+ HBasicBlock get bodyTrySuccessor => block.successors[0]; |
+} |
+ |
class HIf extends HConditionalBranch { |
HBlockFlow blockInformation = null; |
HIf(HInstruction condition) : super(<HInstruction>[condition]); |