| 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.kernel.frontend_strategy; | 5 library dart2js.kernel.frontend_strategy; |
| 6 | 6 |
| 7 import '../closure.dart'; | 7 import '../closure.dart'; |
| 8 import '../common.dart'; | 8 import '../common.dart'; |
| 9 import '../common_elements.dart'; | 9 import '../common_elements.dart'; |
| 10 import '../common/backend_api.dart'; | 10 import '../common/backend_api.dart'; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 WorkItemBuilder createResolutionWorkItemBuilder( | 122 WorkItemBuilder createResolutionWorkItemBuilder( |
| 123 NativeBasicData nativeBasicData, | 123 NativeBasicData nativeBasicData, |
| 124 NativeDataBuilder nativeDataBuilder, | 124 NativeDataBuilder nativeDataBuilder, |
| 125 ImpactTransformer impactTransformer) { | 125 ImpactTransformer impactTransformer) { |
| 126 return new KernelWorkItemBuilder( | 126 return new KernelWorkItemBuilder( |
| 127 elementMap, nativeBasicData, nativeDataBuilder, impactTransformer); | 127 elementMap, nativeBasicData, nativeDataBuilder, impactTransformer); |
| 128 } | 128 } |
| 129 | 129 |
| 130 @override | 130 @override |
| 131 SourceSpan spanFromSpannable(Spannable spannable, Entity currentElement) { | 131 SourceSpan spanFromSpannable(Spannable spannable, Entity currentElement) { |
| 132 // TODO(johnniwinther): Compute source spans from kernel elements. | 132 // TODO(redemption): Compute source spans from kernel elements. |
| 133 return new SourceSpan(null, null, null); | 133 return new SourceSpan(null, null, null); |
| 134 } | 134 } |
| 135 } | 135 } |
| 136 | 136 |
| 137 class KernelWorkItemBuilder implements WorkItemBuilder { | 137 class KernelWorkItemBuilder implements WorkItemBuilder { |
| 138 final KernelToElementMapImpl _elementMap; | 138 final KernelToElementMapImpl _elementMap; |
| 139 final ImpactTransformer _impactTransformer; | 139 final ImpactTransformer _impactTransformer; |
| 140 final NativeMemberResolver _nativeMemberResolver; | 140 final NativeMemberResolver _nativeMemberResolver; |
| 141 | 141 |
| 142 KernelWorkItemBuilder(this._elementMap, NativeBasicData nativeBasicData, | 142 KernelWorkItemBuilder(this._elementMap, NativeBasicData nativeBasicData, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 172 class MirrorsDataBuilderImpl extends MirrorsDataImpl { | 172 class MirrorsDataBuilderImpl extends MirrorsDataImpl { |
| 173 MirrorsDataBuilderImpl(CommonElements commonElements) | 173 MirrorsDataBuilderImpl(CommonElements commonElements) |
| 174 : super(null, null, commonElements); | 174 : super(null, null, commonElements); |
| 175 | 175 |
| 176 @override | 176 @override |
| 177 void registerUsedMember(MemberEntity member) {} | 177 void registerUsedMember(MemberEntity member) {} |
| 178 | 178 |
| 179 @override | 179 @override |
| 180 void computeMembersNeededForReflection( | 180 void computeMembersNeededForReflection( |
| 181 ResolutionWorldBuilder worldBuilder, ClosedWorld closedWorld) { | 181 ResolutionWorldBuilder worldBuilder, ClosedWorld closedWorld) { |
| 182 // TODO(johnniwinther): Support dart:mirrors. | 182 // TODO(redemption): Support dart:mirrors. |
| 183 createImmutableSets(); | 183 createImmutableSets(); |
| 184 } | 184 } |
| 185 | 185 |
| 186 @override | 186 @override |
| 187 void maybeMarkClosureAsNeededForReflection( | 187 void maybeMarkClosureAsNeededForReflection( |
| 188 ClosureClassElement globalizedElement, | 188 ClosureClassElement globalizedElement, |
| 189 FunctionElement callFunction, | 189 FunctionElement callFunction, |
| 190 FunctionElement function) {} | 190 FunctionElement function) {} |
| 191 | 191 |
| 192 @override | 192 @override |
| 193 void registerConstSymbol(String name) {} | 193 void registerConstSymbol(String name) {} |
| 194 | 194 |
| 195 @override | 195 @override |
| 196 void registerMirrorUsage( | 196 void registerMirrorUsage( |
| 197 Set<String> symbols, Set<Element> targets, Set<Element> metaTargets) {} | 197 Set<String> symbols, Set<Element> targets, Set<Element> metaTargets) {} |
| 198 } | 198 } |
| 199 | 199 |
| 200 /// Mock implementation of [MirrorsResolutionAnalysis]. | 200 /// Mock implementation of [MirrorsResolutionAnalysis]. |
| 201 class MirrorsResolutionAnalysisImpl implements MirrorsResolutionAnalysis { | 201 class MirrorsResolutionAnalysisImpl implements MirrorsResolutionAnalysis { |
| 202 @override | 202 @override |
| 203 void onQueueEmpty(Enqueuer enqueuer, Iterable<ClassEntity> recentClasses) {} | 203 void onQueueEmpty(Enqueuer enqueuer, Iterable<ClassEntity> recentClasses) {} |
| 204 | 204 |
| 205 @override | 205 @override |
| 206 MirrorsCodegenAnalysis close() { | 206 MirrorsCodegenAnalysis close() { |
| 207 // TODO(johnniwinther): Implement this. | 207 // TODO(redemption): Implement this. |
| 208 return new MirrorsCodegenAnalysisImpl(); | 208 return new MirrorsCodegenAnalysisImpl(); |
| 209 } | 209 } |
| 210 | 210 |
| 211 @override | 211 @override |
| 212 void onResolutionComplete() {} | 212 void onResolutionComplete() {} |
| 213 } | 213 } |
| 214 | 214 |
| 215 class MirrorsCodegenAnalysisImpl implements MirrorsCodegenAnalysis { | 215 class MirrorsCodegenAnalysisImpl implements MirrorsCodegenAnalysis { |
| 216 @override | 216 @override |
| 217 int get preMirrorsMethodCount { | 217 int get preMirrorsMethodCount { |
| 218 // TODO(johnniwinther): Implement this. | 218 // TODO(redemption): Implement this. |
| 219 return null; | 219 return null; |
| 220 } | 220 } |
| 221 | 221 |
| 222 @override | 222 @override |
| 223 void onQueueEmpty(Enqueuer enqueuer, Iterable<ClassEntity> recentClasses) { | 223 void onQueueEmpty(Enqueuer enqueuer, Iterable<ClassEntity> recentClasses) { |
| 224 // TODO(johnniwinther): Implement this. | 224 // TODO(redemption): Implement this. |
| 225 } | 225 } |
| 226 } | 226 } |
| OLD | NEW |