| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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= | 4 // VMOptions= |
| 5 // VMOptions=--print-object-histogram | 5 // VMOptions=--print-object-histogram |
| 6 | 6 |
| 7 // Smoke test of the dart2js compiler API. | 7 // Smoke test of the dart2js compiler API. |
| 8 library dummy_compiler; | 8 library dummy_compiler; |
| 9 | 9 |
| 10 import 'dart:async'; | 10 import 'dart:async'; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 class Closure {} | 37 class Closure {} |
| 38 class BoundClosure {} | 38 class BoundClosure {} |
| 39 class Dynamic_ {} | 39 class Dynamic_ {} |
| 40 class Null {} | 40 class Null {} |
| 41 class StackTrace {} | 41 class StackTrace {} |
| 42 class LinkedHashMap {} | 42 class LinkedHashMap {} |
| 43 identical(a, b) => true; | 43 identical(a, b) => true; |
| 44 getRuntimeTypeInfo(o) {} | 44 getRuntimeTypeInfo(o) {} |
| 45 setRuntimeTypeInfo(o, i) {} | 45 setRuntimeTypeInfo(o, i) {} |
| 46 eqNull(a) {} | 46 eqNull(a) {} |
| 47 eqNullB(a) {}"""; | 47 eqNullB(a) {} |
| 48 const proxy = 0;"""; |
| 48 } else if (uri.path.endsWith('_patch.dart')) { | 49 } else if (uri.path.endsWith('_patch.dart')) { |
| 49 source = ''; | 50 source = ''; |
| 50 } else if (uri.path.endsWith('interceptors.dart')) { | 51 } else if (uri.path.endsWith('interceptors.dart')) { |
| 51 source = """ | 52 source = """ |
| 52 class Interceptor { | 53 class Interceptor { |
| 53 operator==(other) {} | 54 operator==(other) {} |
| 54 get hashCode => throw 'Interceptor.hashCode not implemented.'; | 55 get hashCode => throw 'Interceptor.hashCode not implemented.'; |
| 55 } | 56 } |
| 56 class JSIndexable { | 57 class JSIndexable { |
| 57 get length {} | 58 get length {} |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 new Uri(scheme: 'package', path: '/'), | 117 new Uri(scheme: 'package', path: '/'), |
| 117 provider, handler); | 118 provider, handler); |
| 118 result.then((String code) { | 119 result.then((String code) { |
| 119 if (code == null) { | 120 if (code == null) { |
| 120 throw 'Compilation failed'; | 121 throw 'Compilation failed'; |
| 121 } | 122 } |
| 122 }, onError: (e) { | 123 }, onError: (e) { |
| 123 throw 'Compilation failed'; | 124 throw 'Compilation failed'; |
| 124 }).then(asyncSuccess); | 125 }).then(asyncSuccess); |
| 125 } | 126 } |
| OLD | NEW |