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

Unified Diff: lib/transformations/async.dart

Issue 2502943002: Fix parent pointer issue in async rewriter. (Closed)
Patch Set: Created 4 years, 1 month 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 | « lib/ast.dart ('k') | lib/transformations/continuation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/transformations/async.dart
diff --git a/lib/transformations/async.dart b/lib/transformations/async.dart
index d69179ccc01d9fb0d927b9094d81dbc8ec5ee9d7..fb3483d81571b6735a562dd205595d37a6f1ff13 100644
--- a/lib/transformations/async.dart
+++ b/lib/transformations/async.dart
@@ -321,7 +321,7 @@ class ExpressionLifter extends Transformer {
// so they occur before in the corresponding block).
var rightBody = blockOf(rightStatements);
var result = allocateTemporary(nameIndex);
- rightBody.statements.add(new ExpressionStatement(
+ rightBody.addStatement(new ExpressionStatement(
new VariableSet(
result,
new MethodInvocation(
@@ -391,9 +391,9 @@ class ExpressionLifter extends Transformer {
var result = allocateTemporary(nameIndex);
var thenBody = blockOf(thenStatements);
var otherwiseBody = blockOf(otherwiseStatements);
- thenBody.statements.add(
+ thenBody.addStatement(
new ExpressionStatement(new VariableSet(result, expr.then)));
- otherwiseBody.statements.add(
+ otherwiseBody.addStatement(
new ExpressionStatement(new VariableSet(result, expr.otherwise)));
var branch = new IfStatement(expr.condition, thenBody, otherwiseBody);
statements.add(branch);
« no previous file with comments | « lib/ast.dart ('k') | lib/transformations/continuation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698