| Index: lib/compiler/implementation/ssa/closure.dart
|
| diff --git a/lib/compiler/implementation/ssa/closure.dart b/lib/compiler/implementation/ssa/closure.dart
|
| index 09e025b3f8b8443de8f881e6a425bd70af186478..591cfb157b7a76dcf76d36c57099032a4498c434 100644
|
| --- a/lib/compiler/implementation/ssa/closure.dart
|
| +++ b/lib/compiler/implementation/ssa/closure.dart
|
| @@ -97,7 +97,7 @@ class ClosureData {
|
| }
|
|
|
| class ClosureTranslator extends AbstractVisitor {
|
| - final Compiler compiler;
|
| + final SsaBuilder builder;
|
| final TreeElements elements;
|
| int closureFieldCounter = 0;
|
| bool inTryCatchOrFinally = false;
|
| @@ -119,11 +119,14 @@ class ClosureTranslator extends AbstractVisitor {
|
|
|
| bool insideClosure = false;
|
|
|
| - ClosureTranslator(Compiler compiler, this.elements)
|
| - : capturedVariableMapping = new Map<Element, Element>(),
|
| + Compiler get compiler() => builder.compiler;
|
| +
|
| + ClosureTranslator(SsaBuilder builder)
|
| + : this.builder = builder,
|
| + this.elements = builder.elements,
|
| + capturedVariableMapping = new Map<Element, Element>(),
|
| closures = <FunctionExpression>[],
|
| - this.compiler = compiler,
|
| - this.closureDataCache = compiler.builder.closureDataCache;
|
| + this.closureDataCache = builder.builder.closureDataCache;
|
|
|
| ClosureData translate(Node node) {
|
| // Closures have already been analyzed when visiting the surrounding
|
|
|