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

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

Issue 2932023003: Refactor LoopHandler to avoid calling KernelAstAdapter.getNode (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 57aabba6381bd44df6869b672aa2e354317cf68a..911e2459b500d1fb66b415a76ccf6e5736b5eadd 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -1744,7 +1744,8 @@ class SsaBuilder extends ast.Visitor
visitDoWhile(ast.DoWhile node) {
assert(isReachable);
LocalsHandler savedLocals = new LocalsHandler.from(localsHandler);
- localsHandler.startLoop(node);
+ ClosureScope scopeData = localsHandler.closureData.capturingScopes[node];
+ localsHandler.startLoop(scopeData);
Emily Fortuna 2017/06/09 20:12:26 great minds think alike? I actually have a CL tha
Johnni Winther 2017/06/12 08:02:52 I'll wait for your CL to land
loopDepth++;
JumpHandler jumpHandler = loopHandler.beginLoopHeader(node);
HLoopInformation loopInfo = current.loopInformation;
@@ -1762,7 +1763,7 @@ class SsaBuilder extends ast.Visitor
// Using a separate block is just a simple workaround.
bodyEntryBlock = openNewBlock();
}
- localsHandler.enterLoopBody(node);
+ localsHandler.enterLoopBody(scopeData);
visit(node.body);
// If there are no continues we could avoid the creation of the condition

Powered by Google App Engine
This is Rietveld 408576698