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

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

Issue 1563983002: dart2js cps: Eliminate unary string concatenation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Also update the hint Created 4 years, 11 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 | « pkg/compiler/lib/src/cps_ir/type_propagation.dart ('k') | no next file » | 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 operators. 5 // Tests of operators.
6 6
7 library operators_tests; 7 library operators_tests;
8 8
9 import 'js_backend_cps_ir.dart'; 9 import 'js_backend_cps_ir.dart';
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 //} 123 //}
124 //"""), 124 //"""),
125 125
126 const TestEntry(""" 126 const TestEntry("""
127 main() { 127 main() {
128 var list = [1, 2, 3]; 128 var list = [1, 2, 3];
129 list[1] = 6; 129 list[1] = 6;
130 print(list); 130 print(list);
131 }""", r""" 131 }""", r"""
132 function() { 132 function() {
133 var list = [1, 2, 3], res, v0; 133 var list = [1, 2, 3], v0;
134 list[1] = 6; 134 list[1] = 6;
135 if (!(typeof (res = C.JSArray_methods.toString$0(list)) === "string")) 135 if (!(typeof (v0 = P.IterableBase_iterableToFullString(list, "[", "]")) === "s tring"))
136 throw H.wrapException(H.argumentErrorValue(list)); 136 throw H.wrapException(H.argumentErrorValue(list));
137 v0 = res;
138 if (typeof dartPrint == "function") 137 if (typeof dartPrint == "function")
139 dartPrint(v0); 138 dartPrint(v0);
140 else if (typeof console == "object" && typeof console.log != "undefined") 139 else if (typeof console == "object" && typeof console.log != "undefined")
141 console.log(v0); 140 console.log(v0);
142 else if (!(typeof window == "object")) { 141 else if (!(typeof window == "object")) {
143 if (!(typeof print == "function")) 142 if (!(typeof print == "function"))
144 throw "Unable to print message: " + String(v0); 143 throw "Unable to print message: " + String(v0);
145 print(v0); 144 print(v0);
146 } 145 }
147 }"""), 146 }"""),
148 ]; 147 ];
149 148
150 void main() { 149 void main() {
151 runTests(tests); 150 runTests(tests);
152 } 151 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_propagation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698