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

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
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/kernel_ast_adapter.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_kernel.dart
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index 2e49c12ec1a8c98354412e5270508be0136e9c98..a7f395e565213aeab939ae530f06f85b41022fc7 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);
+ ClosureScope scopeData = closureDataLookup
+ .getClosureScope(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.getClosureScope(resolvedAst.node),
forGenerativeConstructorBody:
astElement.isGenerativeConstructorBody);
}
@@ -706,7 +706,7 @@ class KernelSsaGraphBuilder extends ir.Visitor
localsHandler.startFunction(
targetElement,
closureDataLookup.getScopeInfo(targetElement),
- closureDataLookup.getClosureAnalysisInfo(functionNode),
+ closureDataLookup.getClosureScope(functionNode),
parameterMap,
isGenerativeConstructorBody: _targetIsConstructorBody);
close(new HGoto()).addSuccessor(block);
@@ -904,8 +904,7 @@ class KernelSsaGraphBuilder extends ir.Visitor
JumpTarget jumpTarget = localsMap.getJumpTargetForFor(forStatement);
loopHandler.handleLoop(
forStatement,
- localsMap.getClosureRepresentationInfoForLoop(
- closureDataLookup, forStatement),
+ localsMap.getLoopClosureScope(closureDataLookup, forStatement),
jumpTarget,
buildInitializer,
buildCondition,
@@ -1034,8 +1033,7 @@ class KernelSsaGraphBuilder extends ir.Visitor
loopHandler.handleLoop(
forInStatement,
- localsMap.getClosureRepresentationInfoForLoop(
- closureDataLookup, forInStatement),
+ localsMap.getLoopClosureScope(closureDataLookup, forInStatement),
localsMap.getJumpTargetForForIn(forInStatement),
buildInitializer,
buildCondition,
@@ -1086,8 +1084,7 @@ class KernelSsaGraphBuilder extends ir.Visitor
loopHandler.handleLoop(
forInStatement,
- localsMap.getClosureRepresentationInfoForLoop(
- closureDataLookup, forInStatement),
+ localsMap.getLoopClosureScope(closureDataLookup, forInStatement),
localsMap.getJumpTargetForForIn(forInStatement),
buildInitializer,
buildCondition,
@@ -1134,8 +1131,7 @@ class KernelSsaGraphBuilder extends ir.Visitor
// Build fake try body:
loopHandler.handleLoop(
forInStatement,
- localsMap.getClosureRepresentationInfoForLoop(
- closureDataLookup, forInStatement),
+ localsMap.getLoopClosureScope(closureDataLookup, forInStatement),
localsMap.getJumpTargetForForIn(forInStatement),
buildInitializer,
buildCondition,
@@ -1186,8 +1182,7 @@ class KernelSsaGraphBuilder extends ir.Visitor
loopHandler.handleLoop(
whileStatement,
- localsMap.getClosureRepresentationInfoForLoop(
- closureDataLookup, whileStatement),
+ localsMap.getLoopClosureScope(closureDataLookup, whileStatement),
localsMap.getJumpTargetForWhile(whileStatement),
() {},
buildCondition,
@@ -1201,8 +1196,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);
+ LoopClosureScope loopClosureInfo =
+ localsMap.getLoopClosureScope(closureDataLookup, doStatement);
localsHandler.startLoop(loopClosureInfo);
JumpTarget target = localsMap.getJumpTargetForDo(doStatement);
JumpHandler jumpHandler = loopHandler.beginLoopHeader(doStatement, target);
@@ -1740,8 +1735,7 @@ class KernelSsaGraphBuilder extends ir.Visitor
void buildLoop() {
loopHandler.handleLoop(
switchStatement,
- localsMap.getClosureRepresentationInfoForLoop(
- closureDataLookup, switchStatement),
+ localsMap.getLoopClosureScope(closureDataLookup, switchStatement),
switchTarget,
() {},
buildCondition,
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698