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

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

Issue 1353443002: dart2js cps: Add a pass for eliminating bounds checks. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 //} 77 //}
78 //"""), 78 //"""),
79 79
80 const TestEntry(""" 80 const TestEntry("""
81 main() { 81 main() {
82 var list = [1, 2, 3]; 82 var list = [1, 2, 3];
83 list[1] = 6; 83 list[1] = 6;
84 print(list); 84 print(list);
85 }""", r""" 85 }""", r"""
86 function() { 86 function() {
87 var list = [1, 2, 3], v0 = 1; 87 var list = [1, 2, 3];
88 if (v0 < 0 || v0 >= list.length) 88 list[1] = 6;
89 H.ioore(list, v0);
90 list[v0] = 6;
91 P.print(list); 89 P.print(list);
92 }"""), 90 }"""),
93 ]; 91 ];
94 92
95 void main() { 93 void main() {
96 runTests(tests); 94 runTests(tests);
97 } 95 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698