Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(577)

Unified Diff: pkg/compiler/lib/src/ssa/locals_handler.dart

Issue 2915523003: Create new interface instead of ClosureClassMap for variable usage information that is not Element-…
Patch Set: merge with master Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698