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 Iterable<MemberEntity> assignedInstanceMembers = |
| 127 closedWorld.assignedInstanceMembers.map(_map.toBackendMember).toList(); |
| 128 |
126 return new JsClosedWorld(_elementMap, | 129 return new JsClosedWorld(_elementMap, |
127 elementEnvironment: _elementEnvironment, | 130 elementEnvironment: _elementEnvironment, |
128 dartTypes: _elementMap.types, | 131 dartTypes: _elementMap.types, |
129 commonElements: _commonElements, | 132 commonElements: _commonElements, |
130 constantSystem: const JavaScriptConstantSystem(), | 133 constantSystem: const JavaScriptConstantSystem(), |
131 backendUsage: backendUsage, | 134 backendUsage: backendUsage, |
132 nativeData: nativeData, | 135 nativeData: nativeData, |
133 interceptorData: interceptorData, | 136 interceptorData: interceptorData, |
134 classHierarchyNodes: classHierarchyNodes, | 137 classHierarchyNodes: classHierarchyNodes, |
135 classSets: classSets, | 138 classSets: classSets, |
136 implementedClasses: implementedClasses, | 139 implementedClasses: implementedClasses, |
137 liveInstanceMembers: liveInstanceMembers, | 140 liveInstanceMembers: liveInstanceMembers, |
| 141 assignedInstanceMembers: assignedInstanceMembers, |
138 // TODO(johnniwinther): Support these. | 142 // TODO(johnniwinther): Support these. |
139 allTypedefs: new ImmutableEmptySet<TypedefElement>(), | 143 allTypedefs: new ImmutableEmptySet<TypedefElement>(), |
140 resolutionWorldBuilder: null, | |
141 mixinUses: mixinUses, | 144 mixinUses: mixinUses, |
142 typesImplementedBySubclasses: null); | 145 typesImplementedBySubclasses: null); |
143 } | 146 } |
144 | 147 |
145 @override | 148 @override |
146 Sorter get sorter { | 149 Sorter get sorter { |
147 return _sorter ??= new KernelSorter(elementMap); | 150 return _sorter ??= new KernelSorter(elementMap); |
148 } | 151 } |
149 | 152 |
150 @override | 153 @override |
(...skipping 23 matching lines...) Expand all Loading... |
174 ClosedWorld closedWorld, | 177 ClosedWorld closedWorld, |
175 SelectorConstraintsStrategy selectorConstraintsStrategy) { | 178 SelectorConstraintsStrategy selectorConstraintsStrategy) { |
176 return new KernelCodegenWorldBuilder( | 179 return new KernelCodegenWorldBuilder( |
177 elementMap, | 180 elementMap, |
178 closedWorld.elementEnvironment, | 181 closedWorld.elementEnvironment, |
179 nativeBasicData, | 182 nativeBasicData, |
180 closedWorld, | 183 closedWorld, |
181 selectorConstraintsStrategy); | 184 selectorConstraintsStrategy); |
182 } | 185 } |
183 } | 186 } |
OLD | NEW |