Index: pkg/compiler/lib/src/ssa/locals_handler.dart |
diff --git a/pkg/compiler/lib/src/ssa/locals_handler.dart b/pkg/compiler/lib/src/ssa/locals_handler.dart |
index b55cdedfcb6464a7d73354dee58b91d715f1e5f9..d8d00258ca56d80b5d9e691bc0441ad2855fa72e 100644 |
--- a/pkg/compiler/lib/src/ssa/locals_handler.dart |
+++ b/pkg/compiler/lib/src/ssa/locals_handler.dart |
@@ -32,7 +32,7 @@ class LocalsHandler { |
Map<Local, HInstruction> directLocals = new Map<Local, HInstruction>(); |
Map<Local, FieldEntity> redirectionMapping = new Map<Local, FieldEntity>(); |
final GraphBuilder builder; |
- ClosureClassMap closureData; |
+ ClosureRepresentationInfo closureData; |
Map<TypeVariableType, TypeVariableLocal> typeVariableLocals = |
new Map<TypeVariableType, TypeVariableLocal>(); |
final Entity executableContext; |
@@ -196,11 +196,15 @@ class LocalsHandler { |
/// Documentation wanted -- johnniwinther |
/// |
/// Invariant: [function] must be an implementation element. |
- void startFunction(MemberEntity element, ClosureClassMap closureData, |
- ClosureScope scopeData, Map<Local, TypeMask> parameters, |
+ void startFunction( |
+ MemberEntity element, |
+ ClosureRepresentationInfo closureData, |
+ ClosureAnalysisInfo scopeData, |
+ Map<Local, TypeMask> parameters, |
{bool isGenerativeConstructorBody}) { |
assert(!(element is MemberElement && !element.isImplementation), |
failedAt(element)); |
+ |
this.closureData = closureData; |
parameters.forEach((Local local, TypeMask typeMask) { |
@@ -295,7 +299,7 @@ class LocalsHandler { |
bool isAccessedDirectly(Local local) { |
assert(local != null); |
return !redirectionMapping.containsKey(local) && |
- !closureData.variablesUsedInTryOrGenerator.contains(local); |
+ !closureData.isVariableUsedInTryOrSync(local); |
} |
bool isStoredInClosureField(Local local) { |
@@ -313,7 +317,7 @@ class LocalsHandler { |
} |
bool isUsedInTryOrGenerator(Local local) { |
- return closureData.variablesUsedInTryOrGenerator.contains(local); |
+ return closureData.isVariableUsedInTryOrSync(local); |
} |
/// Returns an [HInstruction] for the given element. If the element is |