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

Unified Diff: pkg/compiler/lib/src/kernel/kernel_visitor.dart

Issue 2360673003: kernel->ssa: Implement for-loops and while-loops (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/kernel/kernel_visitor.dart
diff --git a/pkg/compiler/lib/src/kernel/kernel_visitor.dart b/pkg/compiler/lib/src/kernel/kernel_visitor.dart
index 415483f4c371f9fc985d87784e52833e0b56c13a..03b2a544751e8f4d1898ebb287e12125df74a77c 100644
--- a/pkg/compiler/lib/src/kernel/kernel_visitor.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_visitor.dart
@@ -774,8 +774,8 @@ class KernelVisitor extends Object
JumpTarget jumpTarget = elements.getTargetDefinition(node);
ir.Statement body =
buildContinueTarget(buildStatementInBlock(node.body), node, jumpTarget);
- ir.ForStatement forStatement =
- new ir.ForStatement(variables, condition, updates, body);
+ ir.ForStatement forStatement = associateNode(
+ new ir.ForStatement(variables, condition, updates, body), node);
ir.Statement result = buildBreakTarget(forStatement, node, jumpTarget);
if (initializer != null) {
result = new ir.Block(
@@ -1090,7 +1090,9 @@ class KernelVisitor extends Object
ir.Statement body =
buildContinueTarget(buildStatementInBlock(node.body), node, jumpTarget);
return buildBreakTarget(
- new ir.WhileStatement(condition, body), node, jumpTarget);
+ associateNode(new ir.WhileStatement(condition, body), node),
+ node,
+ jumpTarget);
}
@override
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698