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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 var toString; | 69 var toString; |
70 } | 70 } |
71 class JSFunction {} | 71 class JSFunction {} |
72 class JSInt {} | 72 class JSInt {} |
73 class JSDouble {} | 73 class JSDouble {} |
74 class JSNumber {} | 74 class JSNumber {} |
75 class JSNull {} | 75 class JSNull {} |
76 class JSBool {} | 76 class JSBool {} |
77 getInterceptor(o){} | 77 getInterceptor(o){} |
78 getDispatchProperty(o) {} | 78 getDispatchProperty(o) {} |
79 setDispatchProperty(o, v) {}"""; | 79 setDispatchProperty(o, v) {} |
| 80 var mapTypeToInterceptor;"""; |
80 } else if (uri.path.endsWith('js_helper.dart')) { | 81 } else if (uri.path.endsWith('js_helper.dart')) { |
81 source = 'library jshelper; class JSInvocationMirror {} ' | 82 source = 'library jshelper; class JSInvocationMirror {} ' |
82 'class ConstantMap {} class TypeImpl {} ' | 83 'class ConstantMap {} class TypeImpl {} ' |
83 'createRuntimeType(String name) => null;'; | 84 'createRuntimeType(String name) => null;'; |
84 } else if (uri.path.endsWith('isolate_helper.dart')) { | 85 } else if (uri.path.endsWith('isolate_helper.dart')) { |
85 source = 'library isolatehelper; class _WorkerStub {}'; | 86 source = 'library isolatehelper; class _WorkerStub {}'; |
86 } else { | 87 } else { |
87 source = "library lib;"; | 88 source = "library lib;"; |
88 } | 89 } |
89 } else { | 90 } else { |
(...skipping 17 matching lines...) Expand all Loading... |
107 new Uri(scheme: 'package', path: '/'), | 108 new Uri(scheme: 'package', path: '/'), |
108 provider, handler); | 109 provider, handler); |
109 result.then((String code) { | 110 result.then((String code) { |
110 if (code == null) { | 111 if (code == null) { |
111 throw 'Compilation failed'; | 112 throw 'Compilation failed'; |
112 } | 113 } |
113 }, onError: (e) { | 114 }, onError: (e) { |
114 throw 'Compilation failed'; | 115 throw 'Compilation failed'; |
115 }); | 116 }); |
116 } | 117 } |
OLD | NEW |