| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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_strategy; | 5 library dart2js.resolution_strategy; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common_elements.dart'; | 8 import '../common_elements.dart'; |
| 9 import '../common/backend_api.dart'; | 9 import '../common/backend_api.dart'; |
| 10 import '../common/names.dart'; | 10 import '../common/names.dart'; |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 return null; | 429 return null; |
| 430 } | 430 } |
| 431 if (library == null && required) { | 431 if (library == null && required) { |
| 432 throw new SpannableAssertionFailure( | 432 throw new SpannableAssertionFailure( |
| 433 NO_LOCATION_SPANNABLE, "The library '${uri}' was not found."); | 433 NO_LOCATION_SPANNABLE, "The library '${uri}' was not found."); |
| 434 } | 434 } |
| 435 return library; | 435 return library; |
| 436 } | 436 } |
| 437 | 437 |
| 438 @override | 438 @override |
| 439 CallStructure getCallStructure(MethodElement method) { | |
| 440 ResolutionFunctionType type = method.computeType(_resolution); | |
| 441 return new CallStructure( | |
| 442 type.parameterTypes.length + | |
| 443 type.optionalParameterTypes.length + | |
| 444 type.namedParameterTypes.length, | |
| 445 type.namedParameters); | |
| 446 } | |
| 447 | |
| 448 @override | |
| 449 bool isDeferredLoadLibraryGetter(MemberElement member) { | 439 bool isDeferredLoadLibraryGetter(MemberElement member) { |
| 450 return member.isDeferredLoaderGetter; | 440 return member.isDeferredLoaderGetter; |
| 451 } | 441 } |
| 452 | 442 |
| 453 @override | 443 @override |
| 454 ResolutionFunctionType getFunctionType(MethodElement method) { | 444 ResolutionFunctionType getFunctionType(MethodElement method) { |
| 455 method.computeType(_resolution); | 445 method.computeType(_resolution); |
| 456 return method.type; | 446 return method.type; |
| 457 } | 447 } |
| 458 | 448 |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 @override | 676 @override |
| 687 WorkItem createWorkItem(MemberElement element) { | 677 WorkItem createWorkItem(MemberElement element) { |
| 688 assert(invariant(element, element.isDeclaration)); | 678 assert(invariant(element, element.isDeclaration)); |
| 689 if (element.isMalformed) return null; | 679 if (element.isMalformed) return null; |
| 690 | 680 |
| 691 assert(invariant(element, element is AnalyzableElement, | 681 assert(invariant(element, element is AnalyzableElement, |
| 692 message: 'Element $element is not analyzable.')); | 682 message: 'Element $element is not analyzable.')); |
| 693 return _resolution.createWorkItem(element); | 683 return _resolution.createWorkItem(element); |
| 694 } | 684 } |
| 695 } | 685 } |
| OLD | NEW |