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'; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 List<MemberEntity> liveInstanceMembers = | 116 List<MemberEntity> liveInstanceMembers = |
117 closedWorld.liveInstanceMembers.map(_map.toBackendMember).toList(); | 117 closedWorld.liveInstanceMembers.map(_map.toBackendMember).toList(); |
118 | 118 |
119 Map<ClassEntity, Set<ClassEntity>> mixinUses = | 119 Map<ClassEntity, Set<ClassEntity>> mixinUses = |
120 <ClassEntity, Set<ClassEntity>>{}; | 120 <ClassEntity, Set<ClassEntity>>{}; |
121 closedWorld.mixinUses.forEach((ClassEntity cls, Set<ClassEntity> uses) { | 121 closedWorld.mixinUses.forEach((ClassEntity cls, Set<ClassEntity> uses) { |
122 mixinUses[_map.toBackendClass(cls)] = | 122 mixinUses[_map.toBackendClass(cls)] = |
123 uses.map(_map.toBackendClass).toSet(); | 123 uses.map(_map.toBackendClass).toSet(); |
124 }); | 124 }); |
125 | 125 |
126 return new JsClosedWorld( | 126 return new JsClosedWorld(_elementMap, |
127 elementEnvironment: _elementEnvironment, | 127 elementEnvironment: _elementEnvironment, |
128 dartTypes: _elementMap.types, | 128 dartTypes: _elementMap.types, |
129 commonElements: _commonElements, | 129 commonElements: _commonElements, |
130 constantSystem: const JavaScriptConstantSystem(), | 130 constantSystem: const JavaScriptConstantSystem(), |
131 backendUsage: backendUsage, | 131 backendUsage: backendUsage, |
132 nativeData: nativeData, | 132 nativeData: nativeData, |
133 interceptorData: interceptorData, | 133 interceptorData: interceptorData, |
134 classHierarchyNodes: classHierarchyNodes, | 134 classHierarchyNodes: classHierarchyNodes, |
135 classSets: classSets, | 135 classSets: classSets, |
136 implementedClasses: implementedClasses, | 136 implementedClasses: implementedClasses, |
137 liveInstanceMembers: liveInstanceMembers, | 137 liveInstanceMembers: liveInstanceMembers, |
| 138 mixinUses: mixinUses, |
138 // TODO(johnniwinther): Support these. | 139 // TODO(johnniwinther): Support these. |
139 allTypedefs: new ImmutableEmptySet<TypedefElement>(), | 140 allTypedefs: new ImmutableEmptySet<TypedefElement>(), |
140 resolutionWorldBuilder: null, | 141 resolutionWorldBuilder: null, |
141 mixinUses: mixinUses, | |
142 typesImplementedBySubclasses: null); | 142 typesImplementedBySubclasses: null); |
143 } | 143 } |
144 | 144 |
145 @override | 145 @override |
146 Sorter get sorter { | 146 Sorter get sorter { |
147 return _sorter ??= new KernelSorter(elementMap); | 147 return _sorter ??= new KernelSorter(elementMap); |
148 } | 148 } |
149 | 149 |
150 @override | 150 @override |
151 ClosureConversionTask get closureDataLookup => | 151 ClosureConversionTask get closureDataLookup => |
(...skipping 22 matching lines...) Expand all Loading... |
174 ClosedWorld closedWorld, | 174 ClosedWorld closedWorld, |
175 SelectorConstraintsStrategy selectorConstraintsStrategy) { | 175 SelectorConstraintsStrategy selectorConstraintsStrategy) { |
176 return new KernelCodegenWorldBuilder( | 176 return new KernelCodegenWorldBuilder( |
177 elementMap, | 177 elementMap, |
178 closedWorld.elementEnvironment, | 178 closedWorld.elementEnvironment, |
179 nativeBasicData, | 179 nativeBasicData, |
180 closedWorld, | 180 closedWorld, |
181 selectorConstraintsStrategy); | 181 selectorConstraintsStrategy); |
182 } | 182 } |
183 } | 183 } |
OLD | NEW |