Chromium Code Reviews| 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 ccda86e8ef8687dc72a4806f244cac0dae8798ab..3aac57e3b4a0acd019861340d3a5f8e7cb130c6a 100644 |
| --- a/pkg/compiler/lib/src/ssa/builder.dart |
| +++ b/pkg/compiler/lib/src/ssa/builder.dart |
| @@ -6022,7 +6022,16 @@ class SsaBuilder extends ResolvedVisitor { |
| /// Calls [buildTry] inside a synthetic try block with [buildFinally] in the |
| /// finally block. |
| + /// |
| + /// Note that to get the right locals behavior, the code visited by [buildTry] |
| + /// and [buildFinally] must have been analyzed as if inside a try-statement by |
| + /// `../closure.dart`. |
|
karlklose
2015/03/03 10:00:50
Maybe use the class name in '[]' instead of the fi
sigurdm
2015/03/03 12:40:56
Done.
|
| void buildProtectedByFinally(void buildTry(), void buildFinally()) { |
| + // Save the current locals. The finally block must not reuse the existing |
| + // locals handler. None of the variables that have been defined in the |
| + // 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. |
| HBasicBlock enterBlock = openNewBlock(); |
| HTry tryInstruction = new HTry(); |
| close(tryInstruction); |