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

Side by Side Diff: tests/compiler/dart2js/cps_ir/expected/control_flow_2.js

Issue 1584693003: dart2js cps: for(;;) is shorter than while(true) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Expectation for test: 1 // Expectation for test:
2 // foo(a) { print(a); return a; } 2 // foo(a) { print(a); return a; }
3 // 3 //
4 // main() { 4 // main() {
5 // while (true) { 5 // while (true) {
6 // l: while (true) { 6 // l: while (true) {
7 // while (foo(true)) { 7 // while (foo(true)) {
8 // if (foo(false)) break l; 8 // if (foo(false)) break l;
9 // } 9 // }
10 // print(1); 10 // print(1);
11 // } 11 // }
12 // print(2); 12 // print(2);
13 // } 13 // }
14 // } 14 // }
15 15
16 function() { 16 function() {
17 L1: 17 L1:
18 while (true) 18 for (;;)
19 L0: 19 L0:
20 while (true) 20 for (;;)
21 while (true) { 21 for (;;) {
22 P.print(true); 22 P.print(true);
23 if (false) { 23 if (false) {
24 P.print(1); 24 P.print(1);
25 continue L0; 25 continue L0;
26 } 26 }
27 P.print(false); 27 P.print(false);
28 if (false) { 28 if (false) {
29 P.print(2); 29 P.print(2);
30 continue L1; 30 continue L1;
31 } 31 }
32 } 32 }
33 } 33 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/cps_ir/expected/control_flow_1.js ('k') | tests/compiler/dart2js/cps_ir/expected/control_flow_3.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698