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

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

Issue 2949293002: Add ScopeInfo class for variable information that doesn't actually involve closures. (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/kernel/closure.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 1411cde5d64c673b8c6e71bcfea960ebf49d508d..ccb29e5fbfbf27f4b49a53f1bbc4c25cf5f744b2 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -836,8 +836,7 @@ class SsaAstGraphBuilder extends ast.Visitor
assert(resolvedAst != null);
localsHandler = new LocalsHandler(this, function, function.memberContext,
function.contextClass, instanceType, nativeData, interceptorData);
- localsHandler.closureData =
- closureDataLookup.getClosureRepresentationInfo(function);
+ localsHandler.scopeInfo = closureDataLookup.getScopeInfo(function);
returnLocal =
new SyntheticLocal("result", function, function.memberContext);
localsHandler.updateLocal(returnLocal, graph.addConstantNull(closedWorld));
@@ -846,7 +845,7 @@ class SsaAstGraphBuilder extends ast.Visitor
int argumentIndex = 0;
if (function.isInstanceMember) {
- localsHandler.updateLocal(localsHandler.closureData.thisLocal,
+ localsHandler.updateLocal(localsHandler.scopeInfo.thisLocal,
compiledArguments[argumentIndex++]);
}
@@ -1005,17 +1004,16 @@ class SsaAstGraphBuilder extends ast.Visitor
resolvedAst = callee.resolvedAst;
final oldElementInferenceResults = elementInferenceResults;
elementInferenceResults = globalInferenceResults.resultOfMember(callee);
- ClosureRepresentationInfo oldClosureData = localsHandler.closureData;
- ClosureRepresentationInfo newClosureData =
- closureDataLookup.getClosureRepresentationInfo(callee);
- localsHandler.closureData = newClosureData;
+ ScopeInfo oldScopeInfo = localsHandler.scopeInfo;
+ ScopeInfo newScopeInfo = closureDataLookup.getScopeInfo(callee);
+ localsHandler.scopeInfo = newScopeInfo;
if (resolvedAst.kind == ResolvedAstKind.PARSED) {
localsHandler.enterScope(
closureDataLookup.getClosureAnalysisInfo(resolvedAst.node),
forGenerativeConstructorBody: callee.isGenerativeConstructorBody);
}
buildInitializers(callee, constructorResolvedAsts, fieldValues);
- localsHandler.closureData = oldClosureData;
+ localsHandler.scopeInfo = oldScopeInfo;
resolvedAst = oldResolvedAst;
elementInferenceResults = oldElementInferenceResults;
});
@@ -1426,10 +1424,11 @@ class SsaAstGraphBuilder extends ast.Visitor
});
}
- ClosureRepresentationInfo closureData =
- closureDataLookup.getClosureRepresentationInfo(element);
- localsHandler.startFunction(element, closureData,
- closureDataLookup.getClosureAnalysisInfo(node), parameters,
+ localsHandler.startFunction(
+ element,
+ closureDataLookup.getScopeInfo(element),
+ closureDataLookup.getClosureAnalysisInfo(node),
+ parameters,
isGenerativeConstructorBody: element.isGenerativeConstructorBody);
close(new HGoto()).addSuccessor(block);
« no previous file with comments | « pkg/compiler/lib/src/kernel/closure.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698