| 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 adf8db795e4c5e1608161a4f0f19bb9a454efaf2..e777044647acccb73e09770b0bb2c6d28a0c0b81 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
|
| @@ -127,6 +127,52 @@ function() {
|
| V.foo();
|
| P.print("good");
|
| }"""),
|
| + const TestEntry("""
|
| +main() {
|
| + var list = [1,2,3,4,5,6];
|
| + for (var x in list) {
|
| + print(x);
|
| + }
|
| +}""",r"""
|
| +function() {
|
| + var list = [1, 2, 3, 4, 5, 6], $length = list.length, i = 0;
|
| + while (i < list.length) {
|
| + P.print(list[i]);
|
| + if ($length !== list.length)
|
| + H.throwConcurrentModificationError(list);
|
| + i = i + 1;
|
| + }
|
| +}"""),
|
| + const TestEntry("""
|
| +main() {
|
| + var xs = ['x', 'y', 'z'], ys = ['A', 'B', 'C'];
|
| + var xit = xs.iterator, yit = ys.iterator;
|
| + while (xit.moveNext() && yit.moveNext()) {
|
| + print(xit.current);
|
| + print(yit.current);
|
| + }
|
| +}""",r"""
|
| +function() {
|
| + var xs = ["x", "y", "z"], ys = ["A", "B", "C"], $length = xs.length, length1 = ys.length, i, i1, current, current1;
|
| + if ($length !== xs.length)
|
| + H.throwConcurrentModificationError(xs);
|
| + i = 0;
|
| + i1 = 0;
|
| + while (i < xs.length) {
|
| + current = xs[i];
|
| + if (length1 !== ys.length)
|
| + H.throwConcurrentModificationError(ys);
|
| + if (!(i1 < ys.length))
|
| + break;
|
| + current1 = ys[i1];
|
| + P.print(current);
|
| + P.print(current1);
|
| + if ($length !== xs.length)
|
| + H.throwConcurrentModificationError(xs);
|
| + i = i + 1;
|
| + i1 = i1 + 1;
|
| + }
|
| +}"""),
|
| ];
|
|
|
| void main() {
|
|
|