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

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

Issue 2387353002: Eagerly compute closure classes (Closed)
Patch Set: Add comments. Created 4 years, 2 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/compiler.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
index 85e5dbd8d967f7f688eb86d1c9b7136e7471d7ce..f56483d6ec0b1687ad8d0bc80afe4c9a6e0a986f 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -374,7 +374,7 @@ class SimpleTypeInferrerVisitor<T>
// each update, and reading them yields the type that was found in a
// previous analysis of [outermostElement].
ClosureClassMap closureData =
- compiler.closureToClassMapper.computeClosureToClassMapping(resolvedAst);
+ compiler.closureToClassMapper.getClosureToClassMapping(resolvedAst);
closureData.forEachCapturedVariable((variable, field) {
locals.setCaptured(variable, field);
});
@@ -558,8 +558,8 @@ class SimpleTypeInferrerVisitor<T>
// 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.getMappingForNestedFunction(node);
+ 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/compiler.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698