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

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

Issue 1416723008: dart2js cps: Propagate container types for lists. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove unreachable handling of list constructor in type propagation Created 5 years, 1 month 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/js_backend_cps_ir_control_flow_test.dart
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart
index 2365d4fe979df3c39789717bf2b4606ee0cbbecb..2d9e07e1802b3f33b1a66606e3bbd951920c171c 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart
@@ -138,12 +138,9 @@ main() {
}
}""",r"""
function() {
- var list = [1, 2, 3, 4, 5, 6], $length = list.length, i = 0;
- for (; i < list.length; i = i + 1) {
+ var list = [1, 2, 3, 4, 5, 6], i = 0;
+ for (; i < 6; i = i + 1)
P.print(list[i]);
- if ($length !== list.length)
- H.throwConcurrentModificationError(list);
- }
}"""),
const TestEntry("""
main() {
@@ -155,18 +152,14 @@ main() {
}
}""",r"""
function() {
- var xs = ["x", "y", "z"], ys = ["A", "B", "C"], $length = xs.length, length1 = ys.length, i = 0, i1 = 0, current, current1;
- for (; i < xs.length; i = i + 1, i1 = i1 + 1) {
+ var xs = ["x", "y", "z"], ys = ["A", "B", "C"], i = 0, i1 = 0, current, current1;
+ for (; i < 3; i = i + 1, i1 = i1 + 1) {
current = xs[i];
- if (length1 !== ys.length)
- H.throwConcurrentModificationError(ys);
- if (!(i1 < ys.length))
+ if (!(i1 < 3))
break;
current1 = ys[i1];
P.print(current);
P.print(current1);
- if ($length !== xs.length)
- H.throwConcurrentModificationError(xs);
}
}"""),
];
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_propagation.dart ('k') | tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698