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

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

Issue 1084783004: tree-ir: Treat getInterceptor and identical as effectively constant. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update test cases Created 5 years, 8 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 | Annotate | Revision Log
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 // VMOptions=-DUSE_CPS_IR=true 4 // VMOptions=-DUSE_CPS_IR=true
5 5
6 // Tests of interceptors. 6 // Tests of interceptors.
7 7
8 library interceptors_tests; 8 library interceptors_tests;
9 9
10 import 'js_backend_cps_ir.dart'; 10 import 'js_backend_cps_ir.dart';
(...skipping 18 matching lines...) Expand all
29 print(l.length); 29 print(l.length);
30 for (int i = 0; i < l.length; i++) { 30 for (int i = 0; i < l.length; i++) {
31 var x = l[i]; 31 var x = l[i];
32 for (int j = 0; j < x.length; j++) { 32 for (int j = 0; j < x.length; j++) {
33 print(x[j]); 33 print(x[j]);
34 } 34 }
35 } 35 }
36 }""", 36 }""",
37 r""" 37 r"""
38 function() { 38 function() {
39 var l = ["hest", ["h", "e", "s", "t"]], i, v0, x, j; 39 var l = ["hest", ["h", "e", "s", "t"]], i, x, j;
40 P.print(J.getInterceptor$as(l).get$length(l)); 40 P.print(J.getInterceptor$as(l).get$length(l));
41 i = 0; 41 i = 0;
42 L0: 42 while (P.identical(J.getInterceptor$n(i).$lt(i, J.getInterceptor$as(l).get$len gth(l)), true)) {
43 while (true) { 43 x = J.getInterceptor$as(l).$index(l, i);
44 v0 = J.getInterceptor$as(l).get$length(l); 44 j = 0;
45 if (P.identical(J.getInterceptor$n(i).$lt(i, v0), true)) { 45 while (P.identical(J.getInterceptor$n(j).$lt(j, J.getInterceptor$as(x).get$l ength(x)), true)) {
46 x = J.getInterceptor$as(l).$index(l, i); 46 P.print(J.getInterceptor$as(x).$index(x, j));
47 j = 0; 47 j = J.getInterceptor$ns(j).$add(j, 1);
48 while (true) {
49 v0 = J.getInterceptor$as(x).get$length(x);
50 if (P.identical(J.getInterceptor$n(j).$lt(j, v0), true)) {
51 P.print(J.getInterceptor$as(x).$index(x, j));
52 j = J.getInterceptor$ns(j).$add(j, 1);
53 } else {
54 i = J.getInterceptor$ns(i).$add(i, 1);
55 continue L0;
56 }
57 }
58 } else
59 return null;
60 } 48 }
49 i = J.getInterceptor$ns(i).$add(i, 1);
50 }
51 return null;
61 }"""), 52 }"""),
62 ]; 53 ];
63 54
64 55
65 void main() { 56 void main() {
66 runTests(tests); 57 runTests(tests);
67 } 58 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart ('k') | tests/compiler/dart2js/js_backend_cps_ir_supercall_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698