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 library dart2js.backend_api; | 5 library dart2js.backend_api; |
6 | 6 |
7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
8 | 8 |
9 import '../common.dart'; | 9 import '../common.dart'; |
10 import '../compiler.dart' show | 10 import '../compiler.dart' show |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 223 |
224 /// Returns whether or not `noSuchMethod` support has been enabled. | 224 /// Returns whether or not `noSuchMethod` support has been enabled. |
225 bool get enabledNoSuchMethod => false; | 225 bool get enabledNoSuchMethod => false; |
226 | 226 |
227 /// Call this method to enable support for isolates. | 227 /// Call this method to enable support for isolates. |
228 void enableIsolateSupport(Enqueuer enqueuer) {} | 228 void enableIsolateSupport(Enqueuer enqueuer) {} |
229 | 229 |
230 void registerConstSymbol(String name) {} | 230 void registerConstSymbol(String name) {} |
231 | 231 |
232 bool isNullImplementation(ClassElement cls) { | 232 bool isNullImplementation(ClassElement cls) { |
233 return cls == compiler.nullClass; | 233 return cls == compiler.coreClasses.nullClass; |
234 } | 234 } |
235 | 235 |
236 ClassElement get intImplementation => compiler.intClass; | 236 ClassElement get intImplementation => compiler.coreClasses.intClass; |
237 ClassElement get doubleImplementation => compiler.doubleClass; | 237 ClassElement get doubleImplementation => compiler.coreClasses.doubleClass; |
238 ClassElement get numImplementation => compiler.numClass; | 238 ClassElement get numImplementation => compiler.coreClasses.numClass; |
239 ClassElement get stringImplementation => compiler.stringClass; | 239 ClassElement get stringImplementation => compiler.coreClasses.stringClass; |
240 ClassElement get listImplementation => compiler.listClass; | 240 ClassElement get listImplementation => compiler.coreClasses.listClass; |
241 ClassElement get growableListImplementation => compiler.listClass; | 241 ClassElement get growableListImplementation => compiler.coreClasses.listClass; |
242 ClassElement get fixedListImplementation => compiler.listClass; | 242 ClassElement get fixedListImplementation => compiler.coreClasses.listClass; |
243 ClassElement get constListImplementation => compiler.listClass; | 243 ClassElement get constListImplementation => compiler.coreClasses.listClass; |
244 ClassElement get mapImplementation => compiler.mapClass; | 244 ClassElement get mapImplementation => compiler.coreClasses.mapClass; |
245 ClassElement get constMapImplementation => compiler.mapClass; | 245 ClassElement get constMapImplementation => compiler.coreClasses.mapClass; |
246 ClassElement get functionImplementation => compiler.functionClass; | 246 ClassElement get functionImplementation => compiler.coreClasses.functionClass; |
247 ClassElement get typeImplementation => compiler.typeClass; | 247 ClassElement get typeImplementation => compiler.coreClasses.typeClass; |
248 ClassElement get boolImplementation => compiler.boolClass; | 248 ClassElement get boolImplementation => compiler.coreClasses.boolClass; |
249 ClassElement get nullImplementation => compiler.nullClass; | 249 ClassElement get nullImplementation => compiler.coreClasses.nullClass; |
250 ClassElement get uint32Implementation => compiler.intClass; | 250 ClassElement get uint32Implementation => compiler.coreClasses.intClass; |
251 ClassElement get uint31Implementation => compiler.intClass; | 251 ClassElement get uint31Implementation => compiler.coreClasses.intClass; |
252 ClassElement get positiveIntImplementation => compiler.intClass; | 252 ClassElement get positiveIntImplementation => compiler.coreClasses.intClass; |
253 | 253 |
254 ClassElement defaultSuperclass(ClassElement element) => compiler.objectClass; | 254 ClassElement defaultSuperclass(ClassElement element) { |
| 255 return compiler.coreClasses.objectClass; |
| 256 } |
255 | 257 |
256 bool isInterceptorClass(ClassElement element) => false; | 258 bool isInterceptorClass(ClassElement element) => false; |
257 | 259 |
258 /// Returns `true` if [element] is a foreign element, that is, that the | 260 /// Returns `true` if [element] is a foreign element, that is, that the |
259 /// backend has specialized handling for the element. | 261 /// backend has specialized handling for the element. |
260 bool isForeign(Element element) => false; | 262 bool isForeign(Element element) => false; |
261 | 263 |
262 /// Returns `true` if [element] is a native element, that is, that the | 264 /// Returns `true` if [element] is a native element, that is, that the |
263 /// corresponding entity already exists in the target language. | 265 /// corresponding entity already exists in the target language. |
264 bool isNative(Element element) => false; | 266 bool isNative(Element element) => false; |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 /// Returns the constant expression of [node], or `null` if [node] is not | 419 /// Returns the constant expression of [node], or `null` if [node] is not |
418 /// a constant expression. | 420 /// a constant expression. |
419 ConstantExpression getConstant(Node node); | 421 ConstantExpression getConstant(Node node); |
420 | 422 |
421 /// Registers [type] as instantiated. | 423 /// Registers [type] as instantiated. |
422 void registerInstantiatedType(InterfaceType type); | 424 void registerInstantiatedType(InterfaceType type); |
423 | 425 |
424 /// Resolves [typeName] to a type in the context of [node]. | 426 /// Resolves [typeName] to a type in the context of [node]. |
425 DartType resolveTypeFromString(Node node, String typeName); | 427 DartType resolveTypeFromString(Node node, String typeName); |
426 } | 428 } |
OLD | NEW |