OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.resolution.registry; | 5 library dart2js.resolution.registry; |
6 | 6 |
7 import '../common.dart'; | 7 import '../common.dart'; |
8 import '../common/backend_api.dart' | 8 import '../common/backend_api.dart' |
9 show Backend, ForeignResolver, NativeRegistry; | 9 show Backend, ForeignResolver, NativeRegistry; |
10 import '../common/resolution.dart' | 10 import '../common/resolution.dart' |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 } | 327 } |
328 | 328 |
329 ////////////////////////////////////////////////////////////////////////////// | 329 ////////////////////////////////////////////////////////////////////////////// |
330 // Various Backend/Enqueuer/World registration. | 330 // Various Backend/Enqueuer/World registration. |
331 ////////////////////////////////////////////////////////////////////////////// | 331 ////////////////////////////////////////////////////////////////////////////// |
332 | 332 |
333 void registerStaticUse(StaticUse staticUse) { | 333 void registerStaticUse(StaticUse staticUse) { |
334 worldImpact.registerStaticUse(staticUse); | 334 worldImpact.registerStaticUse(staticUse); |
335 } | 335 } |
336 | 336 |
| 337 void registerMetadataConstant(MetadataAnnotation metadata) { |
| 338 backend.registerMetadataConstant(metadata, metadata.annotatedElement, this); |
| 339 } |
| 340 |
337 /// Register the use of a type. | 341 /// Register the use of a type. |
338 void registerTypeUse(TypeUse typeUse) { | 342 void registerTypeUse(TypeUse typeUse) { |
339 worldImpact.registerTypeUse(typeUse); | 343 worldImpact.registerTypeUse(typeUse); |
340 } | 344 } |
341 | 345 |
342 void registerSuperUse(SourceSpan span) { | 346 void registerSuperUse(SourceSpan span) { |
343 mapping.addSuperUse(span); | 347 mapping.addSuperUse(span); |
344 } | 348 } |
345 | 349 |
346 void registerTypeLiteral(Send node, DartType type) { | 350 void registerTypeLiteral(Send node, DartType type) { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 @override | 434 @override |
431 void registerInstantiatedType(InterfaceType type) { | 435 void registerInstantiatedType(InterfaceType type) { |
432 registry.registerInstantiation(type); | 436 registry.registerInstantiation(type); |
433 } | 437 } |
434 | 438 |
435 @override | 439 @override |
436 DartType resolveTypeFromString(Node node, String typeName) { | 440 DartType resolveTypeFromString(Node node, String typeName) { |
437 return visitor.resolveTypeFromString(node, typeName); | 441 return visitor.resolveTypeFromString(node, typeName); |
438 } | 442 } |
439 } | 443 } |
OLD | NEW |