| 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 '../compiler.dart' show | 9 import '../compiler.dart' show |
| 10 Compiler; | 10 Compiler; |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 void registerInstantiatedClass(ClassElement cls, | 152 void registerInstantiatedClass(ClassElement cls, |
| 153 Enqueuer enqueuer, | 153 Enqueuer enqueuer, |
| 154 Registry registry) {} | 154 Registry registry) {} |
| 155 | 155 |
| 156 /// Called to notify to the backend that a class is implemented by an | 156 /// Called to notify to the backend that a class is implemented by an |
| 157 /// instantiated class. | 157 /// instantiated class. |
| 158 void registerImplementedClass(ClassElement cls, | 158 void registerImplementedClass(ClassElement cls, |
| 159 Enqueuer enqueuer, | 159 Enqueuer enqueuer, |
| 160 Registry registry) {} | 160 Registry registry) {} |
| 161 | 161 |
| 162 /// Called to notify to the backend that an interface type has been | 162 /// Called to instruct to the backend register [type] as instantiated on |
| 163 /// instantiated. | 163 /// [enqueuer]. |
| 164 void registerInstantiatedType(InterfaceType type, Registry registry) {} | 164 void registerInstantiatedType(InterfaceType type, |
| 165 Enqueuer enqueuer, |
| 166 Registry registry, |
| 167 {bool mirrorUsage: false}) { |
| 168 registry.registerDependency(type.element); |
| 169 enqueuer.registerInstantiatedType(type, mirrorUsage: mirrorUsage); |
| 170 } |
| 165 | 171 |
| 166 /// Register an is check to the backend. | 172 /// Register an is check to the backend. |
| 167 void registerIsCheckForCodegen(DartType type, | 173 void registerIsCheckForCodegen(DartType type, |
| 168 Enqueuer enqueuer, | 174 Enqueuer enqueuer, |
| 169 Registry registry) {} | 175 Registry registry) {} |
| 170 | 176 |
| 171 /// Register a runtime type variable bound tests between [typeArgument] and | 177 /// Register a runtime type variable bound tests between [typeArgument] and |
| 172 /// [bound]. | 178 /// [bound]. |
| 173 void registerTypeVariableBoundsSubtypeCheck(DartType typeArgument, | 179 void registerTypeVariableBoundsSubtypeCheck(DartType typeArgument, |
| 174 DartType bound) {} | 180 DartType bound) {} |
| 175 | 181 |
| 176 /** | 182 /** |
| 177 * Call this to register that an instantiated generic class has a call | 183 * Call this to register that an instantiated generic class has a call |
| 178 * method. | 184 * method. |
| 179 */ | 185 */ |
| 180 void registerCallMethodWithFreeTypeVariables( | 186 void registerCallMethodWithFreeTypeVariables( |
| 181 Element callMethod, | 187 Element callMethod, |
| 182 Enqueuer enqueuer, | 188 Enqueuer enqueuer, |
| 183 Registry registry) {} | 189 Registry registry) {} |
| 184 | 190 |
| 185 /** | 191 /// Called to instruct the backend to register that a closure exists for a |
| 186 * Call this to register that a getter exists for a function on an | 192 /// function on an instantiated generic class. |
| 187 * instantiated generic class. | |
| 188 */ | |
| 189 void registerClosureWithFreeTypeVariables( | 193 void registerClosureWithFreeTypeVariables( |
| 190 Element closure, | 194 Element closure, |
| 191 Enqueuer enqueuer, | 195 Enqueuer enqueuer, |
| 192 Registry registry) {} | 196 Registry registry) { |
| 197 enqueuer.universe.closuresWithFreeTypeVariables.add(closure); |
| 198 } |
| 193 | 199 |
| 194 /// Call this to register that a member has been closurized. | 200 /// Call this to register that a member has been closurized. |
| 195 void registerBoundClosure(Enqueuer enqueuer) {} | 201 void registerBoundClosure(Enqueuer enqueuer) {} |
| 196 | 202 |
| 197 /// Call this to register that a static function has been closurized. | 203 /// Call this to register that a static function has been closurized. |
| 198 void registerGetOfStaticFunction(Enqueuer enqueuer) {} | 204 void registerGetOfStaticFunction(Enqueuer enqueuer) {} |
| 199 | 205 |
| 200 /** | 206 /** |
| 201 * Call this to register that the [:runtimeType:] property has been accessed. | 207 * Call this to register that the [:runtimeType:] property has been accessed. |
| 202 */ | 208 */ |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 | 370 |
| 365 void forgetElement(Element element) {} | 371 void forgetElement(Element element) {} |
| 366 | 372 |
| 367 void registerMainHasArguments(Enqueuer enqueuer) {} | 373 void registerMainHasArguments(Enqueuer enqueuer) {} |
| 368 | 374 |
| 369 void registerAsyncMarker(FunctionElement element, | 375 void registerAsyncMarker(FunctionElement element, |
| 370 Enqueuer enqueuer, | 376 Enqueuer enqueuer, |
| 371 Registry registry) {} | 377 Registry registry) {} |
| 372 } | 378 } |
| 373 | 379 |
| OLD | NEW |