| 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 Backend, ForeignResolver; | 8 import '../common/backend_api.dart' show Backend, ForeignResolver; |
| 9 import '../common/resolution.dart' | 9 import '../common/resolution.dart' |
| 10 show Feature, ListLiteralUse, MapLiteralUse, ResolutionImpact; | 10 show Feature, ListLiteralUse, MapLiteralUse, ResolutionImpact; |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 | 317 |
| 318 void registerMapLiteral(Node node, InterfaceType type, | 318 void registerMapLiteral(Node node, InterfaceType type, |
| 319 {bool isConstant, bool isEmpty}) { | 319 {bool isConstant, bool isEmpty}) { |
| 320 setType(node, type); | 320 setType(node, type); |
| 321 worldImpact.registerMapLiteral( | 321 worldImpact.registerMapLiteral( |
| 322 new MapLiteralUse(type, isConstant: isConstant, isEmpty: isEmpty)); | 322 new MapLiteralUse(type, isConstant: isConstant, isEmpty: isEmpty)); |
| 323 } | 323 } |
| 324 | 324 |
| 325 void registerForeignCall(Node node, Element element, | 325 void registerForeignCall(Node node, Element element, |
| 326 CallStructure callStructure, ResolverVisitor visitor) { | 326 CallStructure callStructure, ResolverVisitor visitor) { |
| 327 backend.registerForeignCall(node, element, callStructure, | 327 var nativeData = backend.resolveForeignCall(node, element, callStructure, |
| 328 new ForeignResolutionResolver(visitor, this)); | 328 new ForeignResolutionResolver(visitor, this)); |
| 329 if (nativeData != null) { |
| 330 mapping.registerNativeData(node, nativeData); |
| 331 } |
| 329 } | 332 } |
| 330 | 333 |
| 331 void registerDynamicUse(DynamicUse dynamicUse) { | 334 void registerDynamicUse(DynamicUse dynamicUse) { |
| 332 worldImpact.registerDynamicUse(dynamicUse); | 335 worldImpact.registerDynamicUse(dynamicUse); |
| 333 } | 336 } |
| 334 | 337 |
| 335 void registerFeature(Feature feature) { | 338 void registerFeature(Feature feature) { |
| 336 worldImpact.registerFeature(feature); | 339 worldImpact.registerFeature(feature); |
| 337 } | 340 } |
| 338 | 341 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 @override | 393 @override |
| 391 void registerInstantiatedType(InterfaceType type) { | 394 void registerInstantiatedType(InterfaceType type) { |
| 392 registry.registerInstantiation(type); | 395 registry.registerInstantiation(type); |
| 393 } | 396 } |
| 394 | 397 |
| 395 @override | 398 @override |
| 396 DartType resolveTypeFromString(Node node, String typeName) { | 399 DartType resolveTypeFromString(Node node, String typeName) { |
| 397 return visitor.resolveTypeFromString(node, typeName); | 400 return visitor.resolveTypeFromString(node, typeName); |
| 398 } | 401 } |
| 399 } | 402 } |
| OLD | NEW |