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

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

Issue 1175973005: dart2js cps: Introduce some built-in operators in type propagation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Status files Created 5 years, 6 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
11 const List<TestEntry> tests = const [ 11 const List<TestEntry> tests = const [
12 const TestEntry.forMethod('function(Sub#m)', """ 12 const TestEntry.forMethod('function(Sub#m)', """
13 class Base { 13 class Base {
14 m(x) { 14 m(x) {
15 print(x+1); 15 print(x+1);
16 } 16 }
17 } 17 }
18 class Sub extends Base { 18 class Sub extends Base {
19 m(x) => super.m(x+10); 19 m(x) => super.m(x+10);
20 } 20 }
21 main() { 21 main() {
22 new Sub().m(100); 22 new Sub().m(100);
23 }""", 23 }""",
24 r""" 24 r"""
25 function(x) { 25 function(x) {
26 return V.Base.prototype.m$1.call(this, J.getInterceptor$ns(x).$add(x, 10)); 26 return V.Base.prototype.m$1.call(this, x + 10);
27 }"""), 27 }"""),
28 28
29 // Reenable when we support compiling functions that 29 // Reenable when we support compiling functions that
30 // need interceptor calling convention. 30 // need interceptor calling convention.
31 // const TestEntry.forMethod('function(Sub#+)', """ 31 // const TestEntry.forMethod('function(Sub#+)', """
32 // class Base { 32 // class Base {
33 // m(x) { 33 // m(x) {
34 // print(x+1000); 34 // print(x+1000);
35 // } 35 // }
36 // operator+(x) => m(x+10); 36 // operator+(x) => m(x+10);
(...skipping 28 matching lines...) Expand all
65 function(x) { 65 function(x) {
66 return J.getInterceptor$ns(x).$add(x, this.field); 66 return J.getInterceptor$ns(x).$add(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_interceptors_test.dart ('k') | tests/compiler/dart2js_extra/dart2js_extra.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698