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 '../backend_strategy.dart'; | 7 import '../backend_strategy.dart'; |
8 import '../common_elements.dart'; | 8 import '../common_elements.dart'; |
9 import '../compiler.dart'; | 9 import '../compiler.dart'; |
10 import '../elements/elements.dart' show TypedefElement; | 10 import '../elements/elements.dart' show TypedefElement; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 }); | 82 }); |
83 } | 83 } |
84 | 84 |
85 closedWorld | 85 closedWorld |
86 .getClassHierarchyNode(closedWorld.commonElements.objectClass) | 86 .getClassHierarchyNode(closedWorld.commonElements.objectClass) |
87 .forEachSubclass((ClassEntity cls) { | 87 .forEachSubclass((ClassEntity cls) { |
88 convertClassSet(closedWorld.getClassSet(cls)); | 88 convertClassSet(closedWorld.getClassSet(cls)); |
89 }, ClassHierarchyNode.ALL); | 89 }, ClassHierarchyNode.ALL); |
90 | 90 |
91 return new JsClosedWorld( | 91 return new JsClosedWorld( |
| 92 // TODO(johnniwinther): Create a JsElementEnvironment. |
| 93 elementEnvironment: closedWorld.elementEnvironment, |
92 commonElements: commonElements, | 94 commonElements: commonElements, |
93 constantSystem: const JavaScriptConstantSystem(), | 95 constantSystem: const JavaScriptConstantSystem(), |
94 backendUsage: backendUsage, | 96 backendUsage: backendUsage, |
95 nativeData: nativeData, | 97 nativeData: nativeData, |
96 interceptorData: interceptorData, | 98 interceptorData: interceptorData, |
97 classHierarchyNodes: classHierarchyNodes, | 99 classHierarchyNodes: classHierarchyNodes, |
98 classSets: classSets, | 100 classSets: classSets, |
99 implementedClasses: implementedClasses, | 101 implementedClasses: implementedClasses, |
100 // TODO(johnniwinther): Support this. | 102 // TODO(johnniwinther): Support this. |
101 allTypedefs: new ImmutableEmptySet<TypedefElement>()); | 103 allTypedefs: new ImmutableEmptySet<TypedefElement>()); |
(...skipping 20 matching lines...) Expand all Loading... |
122 @override | 124 @override |
123 WorkItemBuilder createCodegenWorkItemBuilder(ClosedWorld closedWorld) { | 125 WorkItemBuilder createCodegenWorkItemBuilder(ClosedWorld closedWorld) { |
124 return new KernelCodegenWorkItemBuilder(_compiler.backend, closedWorld); | 126 return new KernelCodegenWorkItemBuilder(_compiler.backend, closedWorld); |
125 } | 127 } |
126 | 128 |
127 @override | 129 @override |
128 CodegenWorldBuilder createCodegenWorldBuilder( | 130 CodegenWorldBuilder createCodegenWorldBuilder( |
129 NativeBasicData nativeBasicData, | 131 NativeBasicData nativeBasicData, |
130 ClosedWorld closedWorld, | 132 ClosedWorld closedWorld, |
131 SelectorConstraintsStrategy selectorConstraintsStrategy) { | 133 SelectorConstraintsStrategy selectorConstraintsStrategy) { |
132 return new KernelCodegenWorldBuilder(_compiler.elementEnvironment, | 134 return new KernelCodegenWorldBuilder(closedWorld.elementEnvironment, |
133 nativeBasicData, closedWorld, selectorConstraintsStrategy); | 135 nativeBasicData, closedWorld, selectorConstraintsStrategy); |
134 } | 136 } |
135 } | 137 } |
OLD | NEW |