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

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

Issue 1086643003: cps-ir: Register IndexSet calls like other calls in JS codegen. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added two test cases (one currently disabled) 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
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/codegen.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 // VMOptions=-DUSE_CPS_IR=true 4 // VMOptions=-DUSE_CPS_IR=true
5 5
6 // Tests of operators. 6 // Tests of operators.
7 7
8 library operators_tests; 8 library operators_tests;
9 9
10 import 'js_backend_cps_ir.dart'; 10 import 'js_backend_cps_ir.dart';
(...skipping 25 matching lines...) Expand all
36 P.print(P.identical(V.foo(), true) && P.identical(V.foo(), true)); 36 P.print(P.identical(V.foo(), true) && P.identical(V.foo(), true));
37 return null; 37 return null;
38 }"""), 38 }"""),
39 const TestEntry(""" 39 const TestEntry("""
40 get foo => foo; 40 get foo => foo;
41 main() { print(foo || foo); }""", 41 main() { print(foo || foo); }""",
42 """function() { 42 """function() {
43 P.print(P.identical(V.foo(), true) || P.identical(V.foo(), true)); 43 P.print(P.identical(V.foo(), true) || P.identical(V.foo(), true));
44 return null; 44 return null;
45 }"""), 45 }"""),
46
47 // Needs interceptor calling convention
48 //const TestEntry("""
49 //class Foo {
50 // operator[]=(index, value) {
51 // print(value);
52 // }
53 //}
54 //main() {
55 // var foo = new Foo();
56 // foo[5] = 6;
57 //}""", r"""
58 //function() {
59 // V.Foo$().$indexSet(5, 6);
60 //}
61 //"""),
62
63 const TestEntry("""
64 main() {
65 var list = [1, 2, 3];
66 list[1] = 6;
67 print(list);
68 }""", r"""
69 function() {
70 var list = [1, 2, 3];
71 J.getInterceptor$a(list).$indexSet(list, 1, 6);
72 P.print(list);
73 return null;
74 }"""),
46 ]; 75 ];
47 76
48 void main() { 77 void main() {
49 runTests(tests); 78 runTests(tests);
50 } 79 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/codegen.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698