| 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/registry.dart' show Registry; | 10 import '../common/registry.dart' show Registry; |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 | 324 |
| 325 void registerStaticUse(StaticUse staticUse) { | 325 void registerStaticUse(StaticUse staticUse) { |
| 326 impactBuilder.registerStaticUse(staticUse); | 326 impactBuilder.registerStaticUse(staticUse); |
| 327 } | 327 } |
| 328 | 328 |
| 329 /// Register the use of a type. | 329 /// Register the use of a type. |
| 330 void registerTypeUse(TypeUse typeUse) { | 330 void registerTypeUse(TypeUse typeUse) { |
| 331 impactBuilder.registerTypeUse(typeUse); | 331 impactBuilder.registerTypeUse(typeUse); |
| 332 } | 332 } |
| 333 | 333 |
| 334 /// Register checked mode check of [type] if it isn't `dynamic`. | |
| 335 void registerCheckedModeCheck(DartType type) { | |
| 336 if (!type.isDynamic) { | |
| 337 impactBuilder.registerTypeUse(new TypeUse.checkedModeCheck(type)); | |
| 338 } | |
| 339 } | |
| 340 | |
| 341 void registerSuperUse(SourceSpan span) { | 334 void registerSuperUse(SourceSpan span) { |
| 342 mapping.addSuperUse(span); | 335 mapping.addSuperUse(span); |
| 343 } | 336 } |
| 344 | 337 |
| 345 void registerTypeLiteral(Send node, DartType type) { | 338 void registerTypeLiteral(Send node, DartType type) { |
| 346 mapping.setType(node, type); | 339 mapping.setType(node, type); |
| 347 impactBuilder.registerTypeUse(new TypeUse.typeLiteral(type)); | 340 impactBuilder.registerTypeUse(new TypeUse.typeLiteral(type)); |
| 348 } | 341 } |
| 349 | 342 |
| 350 void registerLiteralList(Node node, InterfaceType type, | 343 void registerLiteralList(Node node, InterfaceType type, |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 @override | 422 @override |
| 430 void registerInstantiatedType(InterfaceType type) { | 423 void registerInstantiatedType(InterfaceType type) { |
| 431 registry.registerInstantiation(type); | 424 registry.registerInstantiation(type); |
| 432 } | 425 } |
| 433 | 426 |
| 434 @override | 427 @override |
| 435 DartType resolveTypeFromString(Node node, String typeName) { | 428 DartType resolveTypeFromString(Node node, String typeName) { |
| 436 return visitor.resolveTypeFromString(node, typeName); | 429 return visitor.resolveTypeFromString(node, typeName); |
| 437 } | 430 } |
| 438 } | 431 } |
| OLD | NEW |