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.js_model.strategy; | 5 library dart2js.js_model.strategy; |
6 | 6 |
7 import '../closure.dart' show ClosureConversionTask; | 7 import '../closure.dart' show ClosureConversionTask; |
8 import '../common/tasks.dart'; | 8 import '../common/tasks.dart'; |
9 import '../common_elements.dart'; | 9 import '../common_elements.dart'; |
10 import '../compiler.dart'; | 10 import '../compiler.dart'; |
11 import '../elements/elements.dart' show TypedefElement; | 11 import '../elements/elements.dart' show TypedefElement; |
12 import '../elements/entities.dart'; | 12 import '../elements/entities.dart'; |
13 import '../enqueue.dart'; | 13 import '../enqueue.dart'; |
14 import '../io/source_information.dart'; | 14 import '../io/source_information.dart'; |
15 import '../js_emitter/sorter.dart'; | 15 import '../js_emitter/sorter.dart'; |
16 import '../js/js_source_mapping.dart'; | 16 import '../js/js_source_mapping.dart'; |
17 import '../js_backend/backend.dart'; | 17 import '../js_backend/backend.dart'; |
18 import '../js_backend/backend_usage.dart'; | 18 import '../js_backend/backend_usage.dart'; |
19 import '../js_backend/constant_system_javascript.dart'; | 19 import '../js_backend/constant_system_javascript.dart'; |
20 import '../js_backend/interceptor_data.dart'; | 20 import '../js_backend/interceptor_data.dart'; |
21 import '../js_backend/native_data.dart'; | 21 import '../js_backend/native_data.dart'; |
22 import '../kernel/closure.dart'; | |
23 import '../kernel/element_map.dart'; | 22 import '../kernel/element_map.dart'; |
24 import '../kernel/element_map_impl.dart'; | 23 import '../kernel/element_map_impl.dart'; |
25 import '../kernel/kernel_backend_strategy.dart'; | 24 import '../kernel/kernel_backend_strategy.dart'; |
26 import '../kernel/kernel_strategy.dart'; | 25 import '../kernel/kernel_strategy.dart'; |
27 import '../ssa/ssa.dart'; | 26 import '../ssa/ssa.dart'; |
28 import '../universe/class_set.dart'; | 27 import '../universe/class_set.dart'; |
29 import '../universe/world_builder.dart'; | 28 import '../universe/world_builder.dart'; |
30 import '../util/emptyset.dart'; | 29 import '../util/emptyset.dart'; |
31 import '../world.dart'; | 30 import '../world.dart'; |
| 31 import 'closure.dart'; |
32 import 'elements.dart'; | 32 import 'elements.dart'; |
| 33 import 'locals.dart'; |
33 | 34 |
34 class JsBackendStrategy implements KernelBackendStrategy { | 35 class JsBackendStrategy implements KernelBackendStrategy { |
35 final Compiler _compiler; | 36 final Compiler _compiler; |
36 final JsToFrontendMap _map = new JsToFrontendMapImpl(); | 37 final JsToFrontendMap _map = new JsToFrontendMapImpl(); |
37 ElementEnvironment _elementEnvironment; | 38 ElementEnvironment _elementEnvironment; |
38 CommonElements _commonElements; | 39 CommonElements _commonElements; |
39 KernelToElementMapForBuilding _elementMap; | 40 KernelToElementMapForBuilding _elementMap; |
40 ClosureConversionTask _closureDataLookup; | 41 ClosureConversionTask _closureDataLookup; |
41 final GlobalLocalsMap _globalLocalsMap = new GlobalLocalsMap(); | 42 final GlobalLocalsMap _globalLocalsMap = new GlobalLocalsMap(); |
42 | 43 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 ClosedWorld closedWorld, | 158 ClosedWorld closedWorld, |
158 SelectorConstraintsStrategy selectorConstraintsStrategy) { | 159 SelectorConstraintsStrategy selectorConstraintsStrategy) { |
159 return new KernelCodegenWorldBuilder( | 160 return new KernelCodegenWorldBuilder( |
160 elementMap, | 161 elementMap, |
161 closedWorld.elementEnvironment, | 162 closedWorld.elementEnvironment, |
162 nativeBasicData, | 163 nativeBasicData, |
163 closedWorld, | 164 closedWorld, |
164 selectorConstraintsStrategy); | 165 selectorConstraintsStrategy); |
165 } | 166 } |
166 } | 167 } |
OLD | NEW |