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

Unified Diff: tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart

Issue 1287253002: dart2js cps: Compile some loops as 'for' loops. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update test expectations Created 5 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
« no previous file with comments | « tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart
index 4e7b0cfdcdd8abf19ae8225e9395cce55a7a01e9..bb5e9020ab0b68387ee48a7408bb873701685809 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart
@@ -34,17 +34,12 @@ main() {
r"""
function() {
var l = ["hest", ["h", "e", "s", "t"]], i = 0, x_, x, j;
- P.print(l.length);
- while (i < l.length) {
+ for (P.print(l.length); i < l.length; i = i + 1) {
if (i < 0 || i >= l.length)
H.ioore(l, i);
x_ = J.getInterceptor$as(x = l[i]);
- j = 0;
- while (j < x_.get$length(x)) {
+ for (j = 0; j < x_.get$length(x); j = j + 1)
P.print(x_.$index(x, j));
- j = j + 1;
- }
- i = i + 1;
}
}"""),
];
« no previous file with comments | « tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698