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

Unified Diff: pkg/compiler/lib/src/inferrer/builder.dart

Issue 2924663002: Revert "Make ClosureTask only accept Element-level APIs instead of resolvedAst." (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 | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/builder.dart
diff --git a/pkg/compiler/lib/src/inferrer/builder.dart b/pkg/compiler/lib/src/inferrer/builder.dart
index 9c8e6262c7342e6a7d72700560dd9fdecce1c711..d24d423c26e2a66594a190dd77224c83face4c13 100644
--- a/pkg/compiler/lib/src/inferrer/builder.dart
+++ b/pkg/compiler/lib/src/inferrer/builder.dart
@@ -915,7 +915,7 @@ class ElementGraphBuilder extends ast.Visitor<TypeInformation>
// each update, and reading them yields the type that was found in a
// previous analysis of [outermostElement].
ClosureClassMap closureData =
- compiler.closureToClassMapper.getClosureToClassMapping(analyzedElement);
+ compiler.closureToClassMapper.getClosureToClassMapping(resolvedAst);
closureData.forEachCapturedVariable((variable, field) {
locals.setCaptured(variable, field);
});
@@ -1098,8 +1098,8 @@ class ElementGraphBuilder extends ast.Visitor<TypeInformation>
// Record the types of captured non-boxed variables. Types of
// these variables may already be there, because of an analysis of
// a previous closure.
- ClosureClassMap nestedClosureData =
- compiler.closureToClassMapper.getClosureToClassMapping(element);
+ ClosureClassMap nestedClosureData = compiler.closureToClassMapper
+ .getClosureToClassMapping(element.resolvedAst);
nestedClosureData.forEachCapturedVariable((variable, field) {
if (!nestedClosureData.isVariableBoxed(variable)) {
if (variable == nestedClosureData.thisLocal) {
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698