| 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 | 4 |
| 5 // Smoke test of the dart2js compiler API. | 5 // Smoke test of the dart2js compiler API. |
| 6 library dummy_compiler; | 6 library dummy_compiler; |
| 7 | 7 |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 import 'dart:uri'; | 9 import 'dart:uri'; |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 class num {} | 24 class num {} |
| 25 class int {} | 25 class int {} |
| 26 class double{} | 26 class double{} |
| 27 class String{} | 27 class String{} |
| 28 class Function{} | 28 class Function{} |
| 29 class List {} | 29 class List {} |
| 30 class Map {} | 30 class Map {} |
| 31 class Closure {} | 31 class Closure {} |
| 32 class Dynamic_ {} | 32 class Dynamic_ {} |
| 33 class Null {} | 33 class Null {} |
| 34 class LinkedHashMap {} |
| 34 getRuntimeTypeInfo(o) {} | 35 getRuntimeTypeInfo(o) {} |
| 35 setRuntimeTypeInfo(o, i) {} | 36 setRuntimeTypeInfo(o, i) {} |
| 36 eqNull(a) {} | 37 eqNull(a) {} |
| 37 eqNullB(a) {}"""; | 38 eqNullB(a) {}"""; |
| 38 } else if (uri.path.endsWith('_patch.dart')) { | 39 } else if (uri.path.endsWith('_patch.dart')) { |
| 39 source = ''; | 40 source = ''; |
| 40 } else if (uri.path.endsWith('interceptors.dart')) { | 41 } else if (uri.path.endsWith('interceptors.dart')) { |
| 41 source = """class ObjectInterceptor {} | 42 source = """class ObjectInterceptor {} |
| 42 class JSArray { | 43 class JSArray { |
| 43 var length; | 44 var length; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 new Uri.fromComponents(scheme: 'package', path: '/'), | 87 new Uri.fromComponents(scheme: 'package', path: '/'), |
| 87 provider, handler); | 88 provider, handler); |
| 88 result.then((String code) { | 89 result.then((String code) { |
| 89 if (code == null) { | 90 if (code == null) { |
| 90 throw 'Compilation failed'; | 91 throw 'Compilation failed'; |
| 91 } | 92 } |
| 92 }, onError: (AsyncError e) { | 93 }, onError: (AsyncError e) { |
| 93 throw 'Compilation failed'; | 94 throw 'Compilation failed'; |
| 94 }); | 95 }); |
| 95 } | 96 } |
| OLD | NEW |