| Index: pkg/compiler/lib/src/ssa/builder.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
|
| index 31c2fddbf19cdf8c328fd5dc3de0e7dd5779d34d..aec065f58cc5d9d6bedf3590af50a0e8abeba2bc 100644
|
| --- a/pkg/compiler/lib/src/ssa/builder.dart
|
| +++ b/pkg/compiler/lib/src/ssa/builder.dart
|
| @@ -6033,6 +6033,7 @@ class SsaBuilder extends ResolvedVisitor {
|
| // body-block will be used, but for loops we will add (unnecessary) phis
|
| // that will reference the body variables. This makes it look as if the
|
| // variables were used in a non-dominated block.
|
| + LocalsHandler savedLocals = new LocalsHandler.from(localsHandler);
|
| HBasicBlock enterBlock = openNewBlock();
|
| HTry tryInstruction = new HTry();
|
| close(tryInstruction);
|
| @@ -6055,6 +6056,7 @@ class SsaBuilder extends ResolvedVisitor {
|
|
|
| SubGraph finallyGraph = null;
|
|
|
| + localsHandler = new LocalsHandler.from(savedLocals);
|
| startFinallyBlock = graph.addNewBlock();
|
| open(startFinallyBlock);
|
| buildFinally();
|
| @@ -6098,6 +6100,11 @@ class SsaBuilder extends ResolvedVisitor {
|
| // block and the finally block.
|
| addExitTrySuccessor(startFinallyBlock);
|
|
|
| + // Use the locals handler not altered by the catch and finally
|
| + // blocks.
|
| + // TODO(sigurdm): We can probably do this, because try-variables are boxed.
|
| + // Need to verify.
|
| + localsHandler = savedLocals;
|
| open(exitBlock);
|
| enterBlock.setBlockFlow(
|
| new HTryBlockInformation(
|
|
|