| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 constructor_test; | 8 library constructor_test; |
| 9 | 9 |
| 10 import 'js_backend_cps_ir.dart'; | 10 import 'js_backend_cps_ir.dart'; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 print(x); | 92 print(x); |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 main() { | 95 main() { |
| 96 print(new Sub(1, 2).x); | 96 print(new Sub(1, 2).x); |
| 97 }""", | 97 }""", |
| 98 r""" | 98 r""" |
| 99 function(x, y) { | 99 function(x, y) { |
| 100 var _box_0 = {}, v0; | 100 var _box_0 = {}, v0; |
| 101 _box_0._captured_x1_0 = x; | 101 _box_0._captured_x1_0 = x; |
| 102 v0 = new V.Sub(y, new V.Base_closure(_box_0)); | 102 (v0 = new V.Sub(y, new V.Base_closure(_box_0))).Base0$0(); |
| 103 v0.Base0$0(); | |
| 104 v0.Base$1(_box_0); | 103 v0.Base$1(_box_0); |
| 105 v0.Sub$2(x, y); | 104 v0.Sub$2(x, y); |
| 106 return v0; | 105 return v0; |
| 107 }"""), | 106 }"""), |
| 108 | 107 |
| 109 const TestEntry.forMethod('generative_constructor(Sub#)', """ | 108 const TestEntry.forMethod('generative_constructor(Sub#)', """ |
| 110 foo(x) { | 109 foo(x) { |
| 111 print(x); | 110 print(x); |
| 112 } | 111 } |
| 113 class Base { | 112 class Base { |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 print(new C<int>().x.foo()); | 202 print(new C<int>().x.foo()); |
| 204 }""", r""" | 203 }""", r""" |
| 205 function($T) { | 204 function($T) { |
| 206 return H.setRuntimeTypeInfo(new V.C(V.D$($T)), [$T]); | 205 return H.setRuntimeTypeInfo(new V.C(V.D$($T)), [$T]); |
| 207 }"""), | 206 }"""), |
| 208 ]; | 207 ]; |
| 209 | 208 |
| 210 void main() { | 209 void main() { |
| 211 runTests(tests); | 210 runTests(tests); |
| 212 } | 211 } |
| OLD | NEW |