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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart

Issue 294163011: dart2dart: Fix fallthrough in while statements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: SVN rebase Created 6 years, 7 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 | tests/language/rewrite_while_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart
index c50c8d5d4aba326757cae2128a6880ed295256b8..2026ca8a956367298ef8ac6763569688831b3fc3 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart
@@ -190,12 +190,15 @@ class ASTEmitter extends tree.Visitor<dynamic, Expression> {
Expression condition = new Literal(new dart2js.BoolConstant(true));
List<Statement> savedBuffer = statementBuffer;
statementBuffer = <Statement>[];
+ tree.Statement savedFallthrough = fallthrough;
+ fallthrough = stmt.body;
visitStatement(stmt.body);
savedBuffer.add(
new LabeledStatement(
stmt.label.name,
new While(condition, new Block(statementBuffer))));
statementBuffer = savedBuffer;
+ fallthrough = savedFallthrough;
}
Expression visitConstant(tree.Constant exp) {
« no previous file with comments | « no previous file | tests/language/rewrite_while_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698