| 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 14 matching lines...) Expand all Loading... |
| 25 operator==(other) {} | 25 operator==(other) {} |
| 26 get hashCode => throw 'Object.hashCode not implemented.'; | 26 get hashCode => throw 'Object.hashCode not implemented.'; |
| 27 } | 27 } |
| 28 class Type {} | 28 class Type {} |
| 29 class bool {} | 29 class bool {} |
| 30 class num {} | 30 class num {} |
| 31 class int {} | 31 class int {} |
| 32 class double{} | 32 class double{} |
| 33 class String{} | 33 class String{} |
| 34 class Function{} | 34 class Function{} |
| 35 class List<E> {} | 35 class List {} |
| 36 class Map {} | 36 class Map {} |
| 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 } else if (uri.path.endsWith('_patch.dart')) { | 48 } else if (uri.path.endsWith('_patch.dart')) { |
| 49 source = ''; | 49 source = ''; |
| 50 } else if (uri.path.endsWith('interceptors.dart')) { | 50 } else if (uri.path.endsWith('interceptors.dart')) { |
| 51 source = """ | 51 source = """ |
| 52 class Interceptor { | 52 class Interceptor { |
| 53 operator==(other) {} | 53 operator==(other) {} |
| 54 get hashCode => throw 'Interceptor.hashCode not implemented.'; | 54 get hashCode => throw 'Interceptor.hashCode not implemented.'; |
| 55 } | 55 } |
| 56 class JSIndexable { | 56 class JSIndexable { |
| 57 get length; | 57 get length; |
| 58 } | 58 } |
| 59 class JSMutableIndexable {} | 59 class JSMutableIndexable {} |
| 60 class JSArray<E> implements JSIndexable { | 60 class JSArray implements JSIndexable { |
| 61 JSArray() {} | |
| 62 factory JSArray.typed(a) => a; | |
| 63 var removeLast; | 61 var removeLast; |
| 64 var add; | 62 var add; |
| 65 } | 63 } |
| 66 class JSMutableArray extends JSArray {} | 64 class JSMutableArray extends JSArray {} |
| 67 class JSFixedArray extends JSMutableArray {} | 65 class JSFixedArray extends JSMutableArray {} |
| 68 class JSExtendableArray extends JSMutableArray {} | 66 class JSExtendableArray extends JSMutableArray {} |
| 69 class JSString implements JSIndexable { | 67 class JSString implements JSIndexable { |
| 70 var split; | 68 var split; |
| 71 var concat; | 69 var concat; |
| 72 operator+(other) {} | 70 operator+(other) {} |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 new Uri(scheme: 'package', path: '/'), | 111 new Uri(scheme: 'package', path: '/'), |
| 114 provider, handler); | 112 provider, handler); |
| 115 result.then((String code) { | 113 result.then((String code) { |
| 116 if (code == null) { | 114 if (code == null) { |
| 117 throw 'Compilation failed'; | 115 throw 'Compilation failed'; |
| 118 } | 116 } |
| 119 }, onError: (e) { | 117 }, onError: (e) { |
| 120 throw 'Compilation failed'; | 118 throw 'Compilation failed'; |
| 121 }).then(asyncSuccess); | 119 }).then(asyncSuccess); |
| 122 } | 120 } |
| OLD | NEW |