OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 import '../common_elements.dart' show CommonElements, ElementEnvironment; | 5 import '../common_elements.dart' show CommonElements, ElementEnvironment; |
6 import '../elements/elements.dart'; | 6 import '../elements/elements.dart'; |
7 import '../elements/entities.dart'; | 7 import '../elements/entities.dart'; |
8 import '../elements/resolution_types.dart'; | 8 import '../elements/resolution_types.dart'; |
9 import '../elements/types.dart'; | 9 import '../elements/types.dart'; |
10 import '../js_backend/backend_usage.dart' show BackendUsageBuilder; | 10 import '../js_backend/backend_usage.dart' show BackendUsageBuilder; |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 NativeCodegenEnqueuer( | 239 NativeCodegenEnqueuer( |
240 CompilerOptions options, | 240 CompilerOptions options, |
241 ElementEnvironment elementEnvironment, | 241 ElementEnvironment elementEnvironment, |
242 CommonElements commonElements, | 242 CommonElements commonElements, |
243 DartTypes dartTypes, | 243 DartTypes dartTypes, |
244 this._emitter, | 244 this._emitter, |
245 this._resolutionEnqueuer, | 245 this._resolutionEnqueuer, |
246 this._nativeData) | 246 this._nativeData) |
247 : super(options, elementEnvironment, commonElements, dartTypes); | 247 : super(options, elementEnvironment, commonElements, dartTypes); |
248 | 248 |
249 WorldImpact processNativeClasses(Iterable<LibraryElement> libraries) { | 249 WorldImpact processNativeClasses(Iterable<LibraryEntity> libraries) { |
250 WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl(); | 250 WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl(); |
251 _unusedClasses.addAll(_resolutionEnqueuer._nativeClasses); | 251 _unusedClasses.addAll(_resolutionEnqueuer._nativeClasses); |
252 | 252 |
253 if (!enableLiveTypeAnalysis) { | 253 if (!enableLiveTypeAnalysis) { |
254 _registerTypeUses( | 254 _registerTypeUses( |
255 impactBuilder, _resolutionEnqueuer._nativeClasses, 'forced'); | 255 impactBuilder, _resolutionEnqueuer._nativeClasses, 'forced'); |
256 } | 256 } |
257 | 257 |
258 // HACK HACK - add all the resolved classes. | 258 // HACK HACK - add all the resolved classes. |
259 Set<ClassEntity> matchingClasses = new Set<ClassEntity>(); | 259 Set<ClassEntity> matchingClasses = new Set<ClassEntity>(); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 emitter.directSubtypes.putIfAbsent(superclass, () => <ClassEntity>[]); | 308 emitter.directSubtypes.putIfAbsent(superclass, () => <ClassEntity>[]); |
309 directSubtypes.add(cls); | 309 directSubtypes.add(cls); |
310 } | 310 } |
311 | 311 |
312 void logSummary(void log(String message)) { | 312 void logSummary(void log(String message)) { |
313 super.logSummary(log); | 313 super.logSummary(log); |
314 log('Compiled ${_registeredClasses.length} native classes, ' | 314 log('Compiled ${_registeredClasses.length} native classes, ' |
315 '${_unusedClasses.length} native classes omitted.'); | 315 '${_unusedClasses.length} native classes omitted.'); |
316 } | 316 } |
317 } | 317 } |
OLD | NEW |