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

Unified Diff: pkg/compiler/lib/src/closure.dart

Issue 1077093002: Revert "Model 'await for' as an explicit node in tree and fix its handling." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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/compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/closure.dart
diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart
index ac68fbd45f8249a36219cbe57cbb9cb1ca9fbe2d..4aaa293a517a487019f9f1d0da5edbc01a2695fe 100644
--- a/pkg/compiler/lib/src/closure.dart
+++ b/pkg/compiler/lib/src/closure.dart
@@ -1069,12 +1069,16 @@ class ClosureTranslator extends Visitor {
inTryStatement = oldInTryStatement;
}
- visitAsyncForIn(AsyncForIn node) {
- // An `await for` loop is enclosed in an implicit try-finally.
- bool oldInTryStatement = inTryStatement;
- inTryStatement = true;
- visitLoop(node);
- inTryStatement = oldInTryStatement;
+ visitForIn(ForIn node) {
+ if (node.awaitToken != null) {
+ // An `await for` loop is enclosed in an implicit try-finally.
+ bool oldInTryStatement = inTryStatement;
+ inTryStatement = true;
+ visitLoop(node);
+ inTryStatement = oldInTryStatement;
+ } else {
+ visitLoop(node);
+ }
}
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698