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

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

Issue 2961563003: Hopefully the last bit of restructuring between closture classes and loop boxing, etc. (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
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 ccb29e5fbfbf27f4b49a53f1bbc4c25cf5f744b2..246769115326d67b8ee842f3208ac72a181a1485 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -1009,7 +1009,7 @@ class SsaAstGraphBuilder extends ast.Visitor
localsHandler.scopeInfo = newScopeInfo;
if (resolvedAst.kind == ResolvedAstKind.PARSED) {
localsHandler.enterScope(
- closureDataLookup.getClosureAnalysisInfo(resolvedAst.node),
+ closureDataLookup.getClosureBase(resolvedAst.node),
forGenerativeConstructorBody: callee.isGenerativeConstructorBody);
}
buildInitializers(callee, constructorResolvedAsts, fieldValues);
@@ -1365,8 +1365,7 @@ class SsaAstGraphBuilder extends ast.Visitor
// If there are locals that escape (ie mutated in closures), we
// pass the box to the constructor.
// The box must be passed before any type variable.
- ClosureAnalysisInfo scopeData =
- closureDataLookup.getClosureAnalysisInfo(node);
+ ClosureBase scopeData = closureDataLookup.getClosureBase(node);
if (scopeData.requiresContextBox) {
bodyCallInputs.add(localsHandler.readLocal(scopeData.context));
}
@@ -1427,7 +1426,7 @@ class SsaAstGraphBuilder extends ast.Visitor
localsHandler.startFunction(
element,
closureDataLookup.getScopeInfo(element),
- closureDataLookup.getClosureAnalysisInfo(node),
+ closureDataLookup.getClosureBase(node),
parameters,
isGenerativeConstructorBody: element.isGenerativeConstructorBody);
close(new HGoto()).addSuccessor(block);
@@ -1461,8 +1460,8 @@ class SsaAstGraphBuilder extends ast.Visitor
ParameterElement parameterElement = _parameterElement;
if (element.isGenerativeConstructorBody) {
if (closureDataLookup
- .getClosureAnalysisInfo(node)
- .isCaptured(parameterElement)) {
+ .getClosureBase(node)
+ .isBoxed(parameterElement)) {
// The parameter will be a field in the box passed as the
// last parameter. So no need to have it.
return;

Powered by Google App Engine
This is Rietveld 408576698