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

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

Issue 1223813006: dart2js cps: Direct access on JS arrays. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update unit tests and remove unused functions 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
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 interceptors. 5 // Tests of interceptors.
6 6
7 library supercall_test; 7 library supercall_test;
8 8
9 import 'js_backend_cps_ir.dart'; 9 import 'js_backend_cps_ir.dart';
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // function(x) { 46 // function(x) {
47 // var v0, v1, v2; 47 // var v0, v1, v2;
48 // v0 = 1; 48 // v0 = 1;
49 // v1 = J.getInterceptor$ns(x).$add(x, v0); 49 // v1 = J.getInterceptor$ns(x).$add(x, v0);
50 // v2 = this; 50 // v2 = this;
51 // return V.Base.prototype.$add.call(null, v2, v1); 51 // return V.Base.prototype.$add.call(null, v2, v1);
52 // }"""), 52 // }"""),
53 53
54 const TestEntry.forMethod('function(Sub#m)', """ 54 const TestEntry.forMethod('function(Sub#m)', """
55 class Base { 55 class Base {
56 var field; 56 var field = 123;
57 } 57 }
58 class Sub extends Base { 58 class Sub extends Base {
59 m(x) => x + super.field; 59 m(x) => x + super.field;
60 } 60 }
61 main() { 61 main() {
62 print(new Sub().m(10)); 62 print(new Sub().m(10));
63 }""", 63 }""",
64 r""" 64 r"""
65 function(x) { 65 function(x) {
66 return J.getInterceptor$ns(x).$add(x, this.field); 66 return x + this.field;
67 }"""), 67 }"""),
68 68
69 69
70 ]; 70 ];
71 71
72 void main() { 72 void main() {
73 runTests(tests); 73 runTests(tests);
74 } 74 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698