| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 return new ElementResolutionWorldBuilder( | 120 return new ElementResolutionWorldBuilder( |
| 121 _compiler.backend, | 121 _compiler.backend, |
| 122 _compiler.resolution, | 122 _compiler.resolution, |
| 123 nativeBasicData, | 123 nativeBasicData, |
| 124 nativeDataBuilder, | 124 nativeDataBuilder, |
| 125 interceptorDataBuilder, | 125 interceptorDataBuilder, |
| 126 selectorConstraintsStrategy); | 126 selectorConstraintsStrategy); |
| 127 } | 127 } |
| 128 | 128 |
| 129 WorkItemBuilder createResolutionWorkItemBuilder( | 129 WorkItemBuilder createResolutionWorkItemBuilder( |
| 130 NativeBasicData nativeBasicData, |
| 131 NativeDataBuilder nativeDataBuilder, |
| 130 ImpactTransformer impactTransformer) { | 132 ImpactTransformer impactTransformer) { |
| 131 return new ResolutionWorkItemBuilder(_compiler.resolution); | 133 return new ResolutionWorkItemBuilder(_compiler.resolution); |
| 132 } | 134 } |
| 133 | 135 |
| 134 FunctionEntity computeMain( | 136 FunctionEntity computeMain( |
| 135 LibraryElement mainApp, WorldImpactBuilder impactBuilder) { | 137 LibraryElement mainApp, WorldImpactBuilder impactBuilder) { |
| 136 if (mainApp == null) return null; | 138 if (mainApp == null) return null; |
| 137 MethodElement mainFunction; | 139 MethodElement mainFunction; |
| 138 Element main = mainApp.findExported(Identifiers.main); | 140 Element main = mainApp.findExported(Identifiers.main); |
| 139 ErroneousElement errorElement = null; | 141 ErroneousElement errorElement = null; |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 @override | 665 @override |
| 664 WorkItem createWorkItem(MemberElement element) { | 666 WorkItem createWorkItem(MemberElement element) { |
| 665 assert(invariant(element, element.isDeclaration)); | 667 assert(invariant(element, element.isDeclaration)); |
| 666 if (element.isMalformed) return null; | 668 if (element.isMalformed) return null; |
| 667 | 669 |
| 668 assert(invariant(element, element is AnalyzableElement, | 670 assert(invariant(element, element is AnalyzableElement, |
| 669 message: 'Element $element is not analyzable.')); | 671 message: 'Element $element is not analyzable.')); |
| 670 return _resolution.createWorkItem(element); | 672 return _resolution.createWorkItem(element); |
| 671 } | 673 } |
| 672 } | 674 } |
| OLD | NEW |