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

Unified Diff: pkg/compiler/lib/src/ssa/builder_kernel.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_kernel.dart
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index 535bdb478b65979e27e6e0309ec76b4e091b45ad..f9440ec0a05b6f1c45d0087c30dabf55ba5a9d88 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -349,8 +349,8 @@ class KernelSsaGraphBuilder extends ir.Visitor
// If there are locals that escape (i.e. mutated in closures), we pass the
// box to the constructor.
- ClosureAnalysisInfo scopeData = closureDataLookup
- .getClosureAnalysisInfo(constructorElement.resolvedAst.node);
+ ClosureBase scopeData =
+ closureDataLookup.getClosureBase(constructorElement.resolvedAst.node);
if (scopeData.requiresContextBox) {
bodyCallInputs.add(localsHandler.readLocal(scopeData.context));
}
@@ -614,7 +614,7 @@ class KernelSsaGraphBuilder extends ir.Visitor
localsHandler.scopeInfo = newScopeInfo;
if (resolvedAst.kind == ResolvedAstKind.PARSED) {
localsHandler.enterScope(
- closureDataLookup.getClosureAnalysisInfo(resolvedAst.node),
+ closureDataLookup.getClosureBase(resolvedAst.node),
forGenerativeConstructorBody:
astElement.isGenerativeConstructorBody);
}
@@ -706,7 +706,7 @@ class KernelSsaGraphBuilder extends ir.Visitor
localsHandler.startFunction(
targetElement,
closureDataLookup.getScopeInfo(targetElement),
- closureDataLookup.getClosureAnalysisInfo(functionNode),
+ closureDataLookup.getClosureBase(functionNode),
parameterMap,
isGenerativeConstructorBody: _targetIsConstructorBody);
close(new HGoto()).addSuccessor(block);
@@ -1201,8 +1201,8 @@ class KernelSsaGraphBuilder extends ir.Visitor
// TODO(efortuna): I think this can be rewritten using
// LoopHandler.handleLoop with some tricks about when the "update" happens.
LocalsHandler savedLocals = new LocalsHandler.from(localsHandler);
- LoopClosureRepresentationInfo loopClosureInfo = localsMap
- .getClosureRepresentationInfoForLoop(closureDataLookup, doStatement);
+ ClosureBase loopClosureInfo = localsMap.getClosureRepresentationInfoForLoop(
+ closureDataLookup, doStatement);
localsHandler.startLoop(loopClosureInfo);
JumpHandler jumpHandler = loopHandler.beginLoopHeader(doStatement);
HLoopInformation loopInfo = current.loopInformation;

Powered by Google App Engine
This is Rietveld 408576698