| 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' show | 8 import '../common/backend_api.dart' show |
| 9 Backend, | 9 Backend, |
| 10 ForeignResolver; | 10 ForeignResolver; |
| 11 import '../common/resolution.dart' show | 11 import '../common/resolution.dart' show |
| 12 Feature, | 12 Feature, |
| 13 ListLiteralUse, | 13 ListLiteralUse, |
| 14 MapLiteralUse, | 14 MapLiteralUse, |
| 15 ResolutionImpact; | 15 ResolutionImpact; |
| 16 import '../common/registry.dart' show | 16 import '../common/registry.dart' show |
| 17 Registry; | 17 Registry; |
| 18 import '../compiler.dart' show | 18 import '../compiler.dart' show |
| 19 Compiler; | 19 Compiler; |
| 20 import '../constants/expressions.dart'; | 20 import '../constants/expressions.dart'; |
| 21 import '../dart_types.dart'; | 21 import '../dart_types.dart'; |
| 22 import '../diagnostics/source_span.dart'; |
| 22 import '../enqueue.dart' show | 23 import '../enqueue.dart' show |
| 23 ResolutionEnqueuer; | 24 ResolutionEnqueuer; |
| 24 import '../elements/elements.dart'; | 25 import '../elements/elements.dart'; |
| 25 import '../tree/tree.dart'; | 26 import '../tree/tree.dart'; |
| 26 import '../util/util.dart' show | 27 import '../util/util.dart' show |
| 27 Setlet; | 28 Setlet; |
| 28 import '../universe/call_structure.dart' show | 29 import '../universe/call_structure.dart' show |
| 29 CallStructure; | 30 CallStructure; |
| 30 import '../universe/selector.dart' show | 31 import '../universe/selector.dart' show |
| 31 Selector; | 32 Selector; |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 | 308 |
| 308 void registerMetadataConstant(MetadataAnnotation metadata) { | 309 void registerMetadataConstant(MetadataAnnotation metadata) { |
| 309 backend.registerMetadataConstant(metadata, metadata.annotatedElement, this); | 310 backend.registerMetadataConstant(metadata, metadata.annotatedElement, this); |
| 310 } | 311 } |
| 311 | 312 |
| 312 /// Register the use of a type. | 313 /// Register the use of a type. |
| 313 void registerTypeUse(TypeUse typeUse) { | 314 void registerTypeUse(TypeUse typeUse) { |
| 314 worldImpact.registerTypeUse(typeUse); | 315 worldImpact.registerTypeUse(typeUse); |
| 315 } | 316 } |
| 316 | 317 |
| 317 void registerSuperUse(Node node) { | 318 void registerSuperUse(SourceSpan span) { |
| 318 mapping.addSuperUse(node); | 319 mapping.addSuperUse(span); |
| 319 } | 320 } |
| 320 | 321 |
| 321 void registerTypeLiteral(Send node, DartType type) { | 322 void registerTypeLiteral(Send node, DartType type) { |
| 322 mapping.setType(node, type); | 323 mapping.setType(node, type); |
| 323 worldImpact.registerTypeUse(new TypeUse.typeLiteral(type)); | 324 worldImpact.registerTypeUse(new TypeUse.typeLiteral(type)); |
| 324 } | 325 } |
| 325 | 326 |
| 326 void registerLiteralList(Node node, | 327 void registerLiteralList(Node node, |
| 327 InterfaceType type, | 328 InterfaceType type, |
| 328 {bool isConstant, | 329 {bool isConstant, |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 @override | 413 @override |
| 413 void registerInstantiatedType(InterfaceType type) { | 414 void registerInstantiatedType(InterfaceType type) { |
| 414 registry.registerInstantiation(type); | 415 registry.registerInstantiation(type); |
| 415 } | 416 } |
| 416 | 417 |
| 417 @override | 418 @override |
| 418 DartType resolveTypeFromString(Node node, String typeName) { | 419 DartType resolveTypeFromString(Node node, String typeName) { |
| 419 return visitor.resolveTypeFromString(node, typeName); | 420 return visitor.resolveTypeFromString(node, typeName); |
| 420 } | 421 } |
| 421 } | 422 } |
| OLD | NEW |