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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 class JSArray implements JSIndexable { | 60 class JSArray implements JSIndexable { |
61 var removeLast; | 61 var removeLast; |
62 var add; | 62 var add; |
63 } | 63 } |
64 class JSMutableArray extends JSArray {} | 64 class JSMutableArray extends JSArray {} |
65 class JSFixedArray extends JSMutableArray {} | 65 class JSFixedArray extends JSMutableArray {} |
66 class JSExtendableArray extends JSMutableArray {} | 66 class JSExtendableArray extends JSMutableArray {} |
67 class JSString implements JSIndexable { | 67 class JSString implements JSIndexable { |
68 var split; | 68 var split; |
69 var concat; | 69 var concat; |
| 70 operator+(other) {} |
70 var toString; | 71 var toString; |
71 } | 72 } |
72 class JSFunction {} | 73 class JSFunction {} |
73 class JSInt {} | 74 class JSInt {} |
74 class JSDouble {} | 75 class JSDouble {} |
75 class JSNumber {} | 76 class JSNumber {} |
76 class JSNull {} | 77 class JSNull {} |
77 class JSBool {} | 78 class JSBool {} |
78 getInterceptor(o){} | 79 getInterceptor(o){} |
79 getDispatchProperty(o) {} | 80 getDispatchProperty(o) {} |
(...skipping 30 matching lines...) Expand all Loading... |
110 new Uri(scheme: 'package', path: '/'), | 111 new Uri(scheme: 'package', path: '/'), |
111 provider, handler); | 112 provider, handler); |
112 result.then((String code) { | 113 result.then((String code) { |
113 if (code == null) { | 114 if (code == null) { |
114 throw 'Compilation failed'; | 115 throw 'Compilation failed'; |
115 } | 116 } |
116 }, onError: (e) { | 117 }, onError: (e) { |
117 throw 'Compilation failed'; | 118 throw 'Compilation failed'; |
118 }).whenComplete(() => asyncEnd()); | 119 }).whenComplete(() => asyncEnd()); |
119 } | 120 } |
OLD | NEW |