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

Unified Diff: pkg/compiler/lib/src/closure.dart

Issue 2924693003: Entity-ify some portions of LocalsHandler and Closure. (Closed)
Patch Set: . 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 | « no previous file | pkg/compiler/lib/src/ssa/locals_handler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/closure.dart
diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart
index 6dacea63154b7b81b3c29e4ce148533d4e327ae1..7109d061df0e3754fe7fde885914f3280b845c96 100644
--- a/pkg/compiler/lib/src/closure.dart
+++ b/pkg/compiler/lib/src/closure.dart
@@ -422,7 +422,7 @@ class ClosureScope {
// If the scope is attached to a [For] contains the variables that are
// declared in the initializer of the [For] and that need to be boxed.
// Otherwise contains the empty List.
- List<VariableElement> boxedLoopVariables = const <VariableElement>[];
+ List<Local> boxedLoopVariables = const <Local>[];
ClosureScope(this.boxElement, this.capturedVariables);
@@ -482,8 +482,7 @@ class ClosureClassMap {
/// Maps free locals, arguments, function elements, and box locals to
/// their locations.
- final Map<Local, CapturedVariable> freeVariableMap =
- new Map<Local, CapturedVariable>();
+ final Map<Local, FieldEntity> freeVariableMap = new Map<Local, FieldEntity>();
/// Maps [Loop] and [FunctionExpression] nodes to their [ClosureScope] which
/// contains their box and the captured variables that are stored in the box.
@@ -513,7 +512,7 @@ class ClosureClassMap {
return freeVariableMap.containsKey(element);
}
- void forEachFreeVariable(f(Local variable, CapturedVariable field)) {
+ void forEachFreeVariable(f(Local variable, FieldEntity field)) {
freeVariableMap.forEach(f);
}
@@ -530,14 +529,14 @@ class ClosureClassMap {
}
bool isVariableBoxed(Local variable) {
- CapturedVariable copy = freeVariableMap[variable];
+ FieldEntity copy = freeVariableMap[variable];
if (copy is BoxFieldElement) {
return true;
}
return capturingScopesBox(variable);
}
- void forEachCapturedVariable(void f(Local variable, CapturedVariable field)) {
+ void forEachCapturedVariable(void f(Local variable, FieldEntity field)) {
freeVariableMap.forEach((variable, copy) {
if (variable is BoxLocal) return;
f(variable, copy);
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/locals_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698