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

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

Issue 1214123003: dart2js cps: Ensure JSArray is emitted when we see a type cast. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update output in test Created 5 years, 5 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/co19/co19-dart2js.status ('k') | tests/compiler/dart2js_extra/dart2js_extra.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 L1: 60 L2:
61 while (P.identical(V.foo(true), true)) { 61 while (P.identical(V.foo(true), true)) {
62 P.print(1); 62 P.print(1);
63 if (P.identical(V.foo(false), true)) 63 if (P.identical(V.foo(false), true))
64 break L1; 64 break L2;
asgerf 2015/07/03 12:00:34 Reason for change: Labels are currently numbered
65 i = V.foo(i); 65 i = V.foo(i);
66 } 66 }
67 P.print(2); 67 P.print(2);
68 }"""), 68 }"""),
69 const TestEntry(""" 69 const TestEntry("""
70 foo(a) => a; 70 foo(a) => a;
71 71
72 main() { 72 main() {
73 if (foo(true)) { 73 if (foo(true)) {
74 print(1); 74 print(1);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 }""",""" 126 }""","""
127 function() { 127 function() {
128 V.foo(); 128 V.foo();
129 P.print("good"); 129 P.print("good");
130 }"""), 130 }"""),
131 ]; 131 ];
132 132
133 void main() { 133 void main() {
134 runTests(tests); 134 runTests(tests);
135 } 135 }
OLDNEW
« no previous file with comments | « tests/co19/co19-dart2js.status ('k') | tests/compiler/dart2js_extra/dart2js_extra.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698