| 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 '../common/codegen.dart' show CodegenImpact; | 10 import '../common/codegen.dart' show CodegenImpact; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 /// supported by the backend. | 124 /// supported by the backend. |
| 125 bool enableCodegenWithErrorsIfSupported(Spannable node); | 125 bool enableCodegenWithErrorsIfSupported(Spannable node); |
| 126 | 126 |
| 127 /// Enable deferred loading. Returns `true` if the backend supports deferred | 127 /// Enable deferred loading. Returns `true` if the backend supports deferred |
| 128 /// loading. | 128 /// loading. |
| 129 bool enableDeferredLoadingIfSupported(Spannable node, Registry registry); | 129 bool enableDeferredLoadingIfSupported(Spannable node, Registry registry); |
| 130 | 130 |
| 131 /// Called during codegen when [constant] has been used. | 131 /// Called during codegen when [constant] has been used. |
| 132 void registerCompileTimeConstant(ConstantValue constant, Registry registry) {} | 132 void registerCompileTimeConstant(ConstantValue constant, Registry registry) {} |
| 133 | 133 |
| 134 /// Called during resolution when a constant value for [metadata] on | |
| 135 /// [annotatedElement] has been evaluated. | |
| 136 void registerMetadataConstant(MetadataAnnotation metadata, | |
| 137 Element annotatedElement, Registry registry) {} | |
| 138 | |
| 139 /// Called to notify to the backend that a class is being instantiated. | 134 /// Called to notify to the backend that a class is being instantiated. |
| 140 // TODO(johnniwinther): Remove this. It's only called once for each [cls] and | 135 // TODO(johnniwinther): Remove this. It's only called once for each [cls] and |
| 141 // only with [Compiler.globalDependencies] as [registry]. | 136 // only with [Compiler.globalDependencies] as [registry]. |
| 142 void registerInstantiatedClass( | 137 void registerInstantiatedClass( |
| 143 ClassElement cls, Enqueuer enqueuer, Registry registry) {} | 138 ClassElement cls, Enqueuer enqueuer, Registry registry) {} |
| 144 | 139 |
| 145 /// Called to notify to the backend that a class is implemented by an | 140 /// Called to notify to the backend that a class is implemented by an |
| 146 /// instantiated class. | 141 /// instantiated class. |
| 147 void registerImplementedClass( | 142 void registerImplementedClass( |
| 148 ClassElement cls, Enqueuer enqueuer, Registry registry) {} | 143 ClassElement cls, Enqueuer enqueuer, Registry registry) {} |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 } | 433 } |
| 439 } | 434 } |
| 440 | 435 |
| 441 /// Interface for serialization of backend specific data. | 436 /// Interface for serialization of backend specific data. |
| 442 class BackendSerialization { | 437 class BackendSerialization { |
| 443 const BackendSerialization(); | 438 const BackendSerialization(); |
| 444 | 439 |
| 445 SerializerPlugin get serializer => const SerializerPlugin(); | 440 SerializerPlugin get serializer => const SerializerPlugin(); |
| 446 DeserializerPlugin get deserializer => const DeserializerPlugin(); | 441 DeserializerPlugin get deserializer => const DeserializerPlugin(); |
| 447 } | 442 } |
| OLD | NEW |