| 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 27 matching lines...) Expand all Loading... |
| 38 eqNullB(a) {}"""; | 38 eqNullB(a) {}"""; |
| 39 } else if (uri.path.endsWith('_patch.dart')) { | 39 } else if (uri.path.endsWith('_patch.dart')) { |
| 40 source = ''; | 40 source = ''; |
| 41 } else if (uri.path.endsWith('interceptors.dart')) { | 41 } else if (uri.path.endsWith('interceptors.dart')) { |
| 42 source = """class ObjectInterceptor {} | 42 source = """class ObjectInterceptor {} |
| 43 class JSArray { | 43 class JSArray { |
| 44 var length; | 44 var length; |
| 45 var removeLast; | 45 var removeLast; |
| 46 var add; | 46 var add; |
| 47 } | 47 } |
| 48 class JSFixedArray {} |
| 49 class JSExtendableArray {} |
| 48 class JSString { | 50 class JSString { |
| 49 var length; | 51 var length; |
| 50 var split; | 52 var split; |
| 51 var concat; | 53 var concat; |
| 52 var toString; | 54 var toString; |
| 53 } | 55 } |
| 54 class JSFunction {} | 56 class JSFunction {} |
| 55 class JSInt {} | 57 class JSInt {} |
| 56 class JSDouble {} | 58 class JSDouble {} |
| 57 class JSNumber {} | 59 class JSNumber {} |
| (...skipping 30 matching lines...) Expand all Loading... |
| 88 new Uri.fromComponents(scheme: 'package', path: '/'), | 90 new Uri.fromComponents(scheme: 'package', path: '/'), |
| 89 provider, handler); | 91 provider, handler); |
| 90 result.then((String code) { | 92 result.then((String code) { |
| 91 if (code == null) { | 93 if (code == null) { |
| 92 throw 'Compilation failed'; | 94 throw 'Compilation failed'; |
| 93 } | 95 } |
| 94 }, onError: (AsyncError e) { | 96 }, onError: (AsyncError e) { |
| 95 throw 'Compilation failed'; | 97 throw 'Compilation failed'; |
| 96 }); | 98 }); |
| 97 } | 99 } |
| OLD | NEW |