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

Unified Diff: tests/compiler/dart2js/jumps/data/nested_loops.dart

Issue 3009463002: Handle labelled continue statements (Closed)
Patch Set: Updated cf. comments Created 3 years, 4 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
Index: tests/compiler/dart2js/jumps/data/nested_loops.dart
diff --git a/tests/compiler/dart2js/jumps/data/nested_loops.dart b/tests/compiler/dart2js/jumps/data/nested_loops.dart
index 5b69e35d04213c3e268821cac61ce90795ba0056..2b1783d9884895e083e6442410dcd7fcff561dfa 100644
--- a/tests/compiler/dart2js/jumps/data/nested_loops.dart
+++ b/tests/compiler/dart2js/jumps/data/nested_loops.dart
@@ -21,7 +21,30 @@ nestedForLoopWithLabelledBreak(count) {
}
}
+nestedForLoopWithLabelledContinue(count) {
+ outer:
+ /*0@continue*/
+ for (int i = 0; i < count; i = i + 1) {
+ for (int j = 0; j < count; j = j + 1) {
+ if (i % 2 == 0) /*target=0*/ continue outer;
+ }
+ }
+}
+
+nestedForLoopWithLabelledBreakAndContinue(count) {
+ outer:
+ /*0@break,continue*/
+ for (int i = 0; i < count; i = i + 1) {
+ for (int j = 0; j < count; j = j + 1) {
+ if (i % 2 == 0) /*target=0*/ break outer;
+ if (i % 3 == 0) /*target=0*/ continue outer;
+ }
+ }
+}
+
main() {
nestedForLoopWithBreakAndContinue(10);
nestedForLoopWithLabelledBreak(10);
+ nestedForLoopWithLabelledContinue(10);
+ nestedForLoopWithLabelledBreakAndContinue(10);
}
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698