Chromium Code Reviews| 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 isn't `dynamic`. | |
|
Harry Terkelsen
2016/10/31 20:33:37
if isn't -> if it isn't
Johnni Winther
2016/11/01 11:38:19
Done.
| |
| 335 void registerCheckedModeCheck(DartType type) { | |
| 336 if (!type.isDynamic) { | |
| 337 impactBuilder.registerTypeUse(new TypeUse.checkedModeCheck(type)); | |
| 338 } | |
| 339 } | |
| 340 | |
| 334 void registerSuperUse(SourceSpan span) { | 341 void registerSuperUse(SourceSpan span) { |
| 335 mapping.addSuperUse(span); | 342 mapping.addSuperUse(span); |
| 336 } | 343 } |
| 337 | 344 |
| 338 void registerTypeLiteral(Send node, DartType type) { | 345 void registerTypeLiteral(Send node, DartType type) { |
| 339 mapping.setType(node, type); | 346 mapping.setType(node, type); |
| 340 impactBuilder.registerTypeUse(new TypeUse.typeLiteral(type)); | 347 impactBuilder.registerTypeUse(new TypeUse.typeLiteral(type)); |
| 341 } | 348 } |
| 342 | 349 |
| 343 void registerLiteralList(Node node, InterfaceType type, | 350 void registerLiteralList(Node node, InterfaceType type, |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 422 @override | 429 @override |
| 423 void registerInstantiatedType(InterfaceType type) { | 430 void registerInstantiatedType(InterfaceType type) { |
| 424 registry.registerInstantiation(type); | 431 registry.registerInstantiation(type); |
| 425 } | 432 } |
| 426 | 433 |
| 427 @override | 434 @override |
| 428 DartType resolveTypeFromString(Node node, String typeName) { | 435 DartType resolveTypeFromString(Node node, String typeName) { |
| 429 return visitor.resolveTypeFromString(node, typeName); | 436 return visitor.resolveTypeFromString(node, typeName); |
| 430 } | 437 } |
| 431 } | 438 } |
| OLD | NEW |