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

Side by Side Diff: tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart

Issue 1276843008: dart2js cps: Change rewriting of equality operators. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update test + minor improvement in logical rewriter 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Tests of control flow statements. 5 // Tests of control flow statements.
6 6
7 library control_flow_tests; 7 library control_flow_tests;
8 8
9 import 'js_backend_cps_ir.dart'; 9 import 'js_backend_cps_ir.dart';
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 main() { 51 main() {
52 for (int i = 0; foo(true); i = foo(i)) { 52 for (int i = 0; foo(true); i = foo(i)) {
53 print(1); 53 print(1);
54 if (foo(false)) break; 54 if (foo(false)) break;
55 } 55 }
56 print(2); 56 print(2);
57 }""", """ 57 }""", """
58 function() { 58 function() {
59 var i = 0; 59 var i = 0;
60 while (P.identical(V.foo(true), true)) { 60 while (V.foo(true) === true) {
61 P.print(1); 61 P.print(1);
62 if (P.identical(V.foo(false), true)) 62 if (V.foo(false) === true)
63 break; 63 break;
64 i = V.foo(i); 64 i = V.foo(i);
65 } 65 }
66 P.print(2); 66 P.print(2);
67 }"""), 67 }"""),
68 const TestEntry(""" 68 const TestEntry("""
69 foo(a) => a; 69 foo(a) => a;
70 70
71 main() { 71 main() {
72 if (foo(true)) { 72 if (foo(true)) {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 H.throwConcurrentModificationError(xs); 171 H.throwConcurrentModificationError(xs);
172 i = i + 1; 172 i = i + 1;
173 i1 = i1 + 1; 173 i1 = i1 + 1;
174 } 174 }
175 }"""), 175 }"""),
176 ]; 176 ];
177 177
178 void main() { 178 void main() {
179 runTests(tests); 179 runTests(tests);
180 } 180 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698