| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 class JSFixedArray extends JSMutableArray {} | 67 class JSFixedArray extends JSMutableArray {} |
| 68 class JSExtendableArray extends JSMutableArray {} | 68 class JSExtendableArray extends JSMutableArray {} |
| 69 class JSString implements JSIndexable { | 69 class JSString implements JSIndexable { |
| 70 var split; | 70 var split; |
| 71 var concat; | 71 var concat; |
| 72 operator+(other) {} | 72 operator+(other) {} |
| 73 var toString; | 73 var toString; |
| 74 } | 74 } |
| 75 class JSFunction {} | 75 class JSFunction {} |
| 76 class JSInt {} | 76 class JSInt {} |
| 77 class JSUInt31 {} |
| 78 class JSUInt32 {} |
| 77 class JSDouble {} | 79 class JSDouble {} |
| 78 class JSNumber {} | 80 class JSNumber {} |
| 79 class JSNull {} | 81 class JSNull {} |
| 80 class JSBool {} | 82 class JSBool {} |
| 81 getInterceptor(o){} | 83 getInterceptor(o){} |
| 82 getDispatchProperty(o) {} | 84 getDispatchProperty(o) {} |
| 83 setDispatchProperty(o, v) {} | 85 setDispatchProperty(o, v) {} |
| 84 var mapTypeToInterceptor;"""; | 86 var mapTypeToInterceptor;"""; |
| 85 } else if (uri.path.endsWith('js_helper.dart')) { | 87 } else if (uri.path.endsWith('js_helper.dart')) { |
| 86 source = 'library jshelper; class JSInvocationMirror {} ' | 88 source = 'library jshelper; class JSInvocationMirror {} ' |
| (...skipping 26 matching lines...) Expand all Loading... |
| 113 new Uri(scheme: 'package', path: '/'), | 115 new Uri(scheme: 'package', path: '/'), |
| 114 provider, handler); | 116 provider, handler); |
| 115 result.then((String code) { | 117 result.then((String code) { |
| 116 if (code == null) { | 118 if (code == null) { |
| 117 throw 'Compilation failed'; | 119 throw 'Compilation failed'; |
| 118 } | 120 } |
| 119 }, onError: (e) { | 121 }, onError: (e) { |
| 120 throw 'Compilation failed'; | 122 throw 'Compilation failed'; |
| 121 }).then(asyncSuccess); | 123 }).then(asyncSuccess); |
| 122 } | 124 } |
| OLD | NEW |