Chromium Code Reviews| Index: pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart |
| diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart |
| index e720a110e5f26a0c419a883c4b7eff0ae265df24..dbaffee39e083b6833a86830a7bb8b6149391018 100644 |
| --- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart |
| +++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart |
| @@ -191,6 +191,12 @@ abstract class JumpCollector { |
| } |
| } |
| } |
| + |
| + /// True if a jump inserted now will escape from a try block. |
| + /// |
| + /// Concretely, this is try when [enterTry] has been called without |
|
floitsch
2015/07/06 18:18:35
-try-
asgerf
2015/07/07 08:42:04
-> true :)
|
| + /// its corresponding [leaveTry] call. |
| + bool get isEscapingTry => _boxedTryVariables.isNotEmpty; |
| } |
| /// A class to collect 'forward' jumps. |
| @@ -241,7 +247,8 @@ class ForwardJumpCollector extends JumpCollector { |
| void addJump(IrBuilder builder, [ir.Primitive value]) { |
| assert(_continuation == null); |
| _buildTryExit(builder); |
| - ir.InvokeContinuation invoke = new ir.InvokeContinuation.uninitialized(); |
| + ir.InvokeContinuation invoke = new ir.InvokeContinuation.uninitialized( |
| + isEscapingTry: isEscapingTry); |
|
floitsch
2015/07/06 18:18:35
indent +2
asgerf
2015/07/07 08:42:04
Done.
|
| builder.add(invoke); |
| _invocations.add(invoke); |
| // Truncate the environment at the invocation site so it only includes |
| @@ -360,7 +367,8 @@ class BackwardJumpCollector extends JumpCollector { |
| if (value != null) builder.environment.extend(null, value); |
| builder.add(new ir.InvokeContinuation(_continuation, |
| builder.environment.index2value, |
| - isRecursive: true)); |
| + isRecursive: true, |
| + isEscapingTry: isEscapingTry)); |
| builder._current = null; |
| } |
| } |