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

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

Issue 1012623003: Fix problems with async* and await for in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review Created 5 years, 9 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 | sdk/lib/_internal/compiler/js_lib/js_helper.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.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 31c2fddbf19cdf8c328fd5dc3de0e7dd5779d34d..aec065f58cc5d9d6bedf3590af50a0e8abeba2bc 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -6033,6 +6033,7 @@ class SsaBuilder extends ResolvedVisitor {
// body-block will be used, but for loops we will add (unnecessary) phis
// that will reference the body variables. This makes it look as if the
// variables were used in a non-dominated block.
+ LocalsHandler savedLocals = new LocalsHandler.from(localsHandler);
HBasicBlock enterBlock = openNewBlock();
HTry tryInstruction = new HTry();
close(tryInstruction);
@@ -6055,6 +6056,7 @@ class SsaBuilder extends ResolvedVisitor {
SubGraph finallyGraph = null;
+ localsHandler = new LocalsHandler.from(savedLocals);
startFinallyBlock = graph.addNewBlock();
open(startFinallyBlock);
buildFinally();
@@ -6098,6 +6100,11 @@ class SsaBuilder extends ResolvedVisitor {
// block and the finally block.
addExitTrySuccessor(startFinallyBlock);
+ // Use the locals handler not altered by the catch and finally
+ // blocks.
+ // TODO(sigurdm): We can probably do this, because try-variables are boxed.
+ // Need to verify.
+ localsHandler = savedLocals;
open(exitBlock);
enterBlock.setBlockFlow(
new HTryBlockInformation(
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/js_lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698