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

Side by Side Diff: tests/compiler/dart2js/cps_ir/expected/control_flow_3.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
« no previous file with comments | « tests/compiler/dart2js/cps_ir/expected/control_flow_2.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // for (int i = 0; foo(true); i = foo(i)) { 5 // for (int i = 0; foo(true); i = foo(i)) {
6 // print(1); 6 // print(1);
7 // if (foo(false)) break; 7 // if (foo(false)) break;
8 // } 8 // }
9 // print(2); 9 // print(2);
10 // } 10 // }
11 11
12 function() { 12 function() {
13 while (true) { 13 for (;;) {
14 P.print(true); 14 P.print(true);
15 if (true === true) { 15 if (true === true) {
16 P.print(1); 16 P.print(1);
17 P.print(false); 17 P.print(false);
18 if (false !== true) { 18 if (false !== true) {
19 P.print(0); 19 P.print(0);
20 continue; 20 continue;
21 } 21 }
22 } 22 }
23 P.print(2); 23 P.print(2);
24 return null; 24 return null;
25 } 25 }
26 } 26 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/cps_ir/expected/control_flow_2.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698