| 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 'package:front_end/src/fasta/scanner.dart' show Token; | 7 import 'package:front_end/src/fasta/scanner.dart' show Token; |
| 8 | 8 |
| 9 import '../common.dart'; | 9 import '../common.dart'; |
| 10 import '../common_elements.dart'; | 10 import '../common_elements.dart'; |
| 11 import '../common/backend_api.dart'; | 11 import '../common/backend_api.dart'; |
| 12 import '../common/names.dart'; | 12 import '../common/names.dart'; |
| 13 import '../common/resolution.dart'; | 13 import '../common/resolution.dart'; |
| 14 import '../common/tasks.dart'; | 14 import '../common/tasks.dart'; |
| 15 import '../common/work.dart'; | 15 import '../common/work.dart'; |
| 16 import '../compiler.dart'; | 16 import '../compiler.dart'; |
| 17 import '../constants/values.dart'; | 17 import '../constants/values.dart'; |
| 18 import '../elements/elements.dart'; | 18 import '../elements/elements.dart'; |
| 19 import '../elements/entities.dart'; | 19 import '../elements/entities.dart'; |
| 20 import '../elements/modelx.dart'; | 20 import '../elements/modelx.dart'; |
| 21 import '../elements/resolution_types.dart'; | 21 import '../elements/resolution_types.dart'; |
| 22 import '../elements/types.dart'; | 22 import '../elements/types.dart'; |
| 23 import '../environment.dart'; | 23 import '../environment.dart'; |
| 24 import '../enqueue.dart'; | 24 import '../enqueue.dart'; |
| 25 import '../frontend_strategy.dart'; | 25 import '../frontend_strategy.dart'; |
| 26 import '../js_backend/backend.dart'; | 26 import '../js_backend/backend.dart'; |
| 27 import '../js_backend/backend_usage.dart'; | 27 import '../js_backend/backend_usage.dart'; |
| 28 import '../js_backend/custom_elements_analysis.dart'; | |
| 29 import '../js_backend/interceptor_data.dart'; | 28 import '../js_backend/interceptor_data.dart'; |
| 30 import '../js_backend/mirrors_analysis.dart'; | 29 import '../js_backend/mirrors_analysis.dart'; |
| 31 import '../js_backend/mirrors_data.dart'; | 30 import '../js_backend/mirrors_data.dart'; |
| 32 import '../js_backend/native_data.dart'; | 31 import '../js_backend/native_data.dart'; |
| 33 import '../js_backend/no_such_method_registry.dart'; | 32 import '../js_backend/no_such_method_registry.dart'; |
| 34 import '../js_backend/runtime_types.dart'; | 33 import '../js_backend/runtime_types.dart'; |
| 35 import '../library_loader.dart'; | 34 import '../library_loader.dart'; |
| 36 import '../native/resolver.dart'; | 35 import '../native/resolver.dart'; |
| 37 import '../tree/tree.dart' show Node; | 36 import '../tree/tree.dart' show Node; |
| 38 import '../serialization/task.dart'; | 37 import '../serialization/task.dart'; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 _compiler.resolution, | 86 _compiler.resolution, |
| 88 _compiler.reporter, | 87 _compiler.reporter, |
| 89 elementEnvironment, | 88 elementEnvironment, |
| 90 _compiler.commonElements, | 89 _compiler.commonElements, |
| 91 nativeBasicData); | 90 nativeBasicData); |
| 92 } | 91 } |
| 93 | 92 |
| 94 NoSuchMethodResolver createNoSuchMethodResolver() => | 93 NoSuchMethodResolver createNoSuchMethodResolver() => |
| 95 new ResolutionNoSuchMethodResolver(); | 94 new ResolutionNoSuchMethodResolver(); |
| 96 | 95 |
| 97 CustomElementsResolutionAnalysis createCustomElementsResolutionAnalysis( | |
| 98 NativeBasicData nativeBasicData, | |
| 99 BackendUsageBuilder backendUsageBuilder) { | |
| 100 return new CustomElementsResolutionAnalysis( | |
| 101 _compiler.resolution, | |
| 102 _compiler.backend.constantSystem, | |
| 103 _compiler.commonElements, | |
| 104 nativeBasicData, | |
| 105 backendUsageBuilder); | |
| 106 } | |
| 107 | |
| 108 MirrorsDataBuilder createMirrorsDataBuilder() { | 96 MirrorsDataBuilder createMirrorsDataBuilder() { |
| 109 return new MirrorsDataImpl( | 97 return new MirrorsDataImpl( |
| 110 _compiler, _compiler.options, _compiler.commonElements); | 98 _compiler, _compiler.options, _compiler.commonElements); |
| 111 } | 99 } |
| 112 | 100 |
| 113 MirrorsResolutionAnalysis createMirrorsResolutionAnalysis( | 101 MirrorsResolutionAnalysis createMirrorsResolutionAnalysis( |
| 114 JavaScriptBackend backend) => | 102 JavaScriptBackend backend) => |
| 115 new MirrorsResolutionAnalysisImpl(backend, _compiler.resolution); | 103 new MirrorsResolutionAnalysisImpl(backend, _compiler.resolution); |
| 116 | 104 |
| 117 RuntimeTypesNeedBuilder createRuntimeTypesNeedBuilder() { | 105 RuntimeTypesNeedBuilder createRuntimeTypesNeedBuilder() { |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 @override | 826 @override |
| 839 WorkItem createWorkItem(MemberElement element) { | 827 WorkItem createWorkItem(MemberElement element) { |
| 840 assert(element.isDeclaration, failedAt(element)); | 828 assert(element.isDeclaration, failedAt(element)); |
| 841 if (element.isMalformed) return null; | 829 if (element.isMalformed) return null; |
| 842 | 830 |
| 843 assert(element is AnalyzableElement, | 831 assert(element is AnalyzableElement, |
| 844 failedAt(element, 'Element $element is not analyzable.')); | 832 failedAt(element, 'Element $element is not analyzable.')); |
| 845 return _resolution.createWorkItem(element); | 833 return _resolution.createWorkItem(element); |
| 846 } | 834 } |
| 847 } | 835 } |
| OLD | NEW |