Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(697)

Side by Side Diff: pkg/compiler/lib/src/native/enqueue.dart

Issue 2859133003: Find native classes with mixins in NativeClassFinder (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map.dart ('k') | pkg/compiler/lib/src/native/resolver.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 final Set<ClassEntity> _nativeClasses = new Set<ClassEntity>(); 192 final Set<ClassEntity> _nativeClasses = new Set<ClassEntity>();
193 193
194 NativeResolutionEnqueuer( 194 NativeResolutionEnqueuer(
195 CompilerOptions options, 195 CompilerOptions options,
196 ElementEnvironment elementEnvironment, 196 ElementEnvironment elementEnvironment,
197 CommonElements commonElements, 197 CommonElements commonElements,
198 this._backendUsageBuilder, 198 this._backendUsageBuilder,
199 this._nativeClassFinder) 199 this._nativeClassFinder)
200 : super(options, elementEnvironment, commonElements); 200 : super(options, elementEnvironment, commonElements);
201 201
202 Iterable<ClassEntity> get nativeClassesForTesting => _nativeClasses;
203
204 Iterable<ClassEntity> get registeredClassesForTesting => _registeredClasses;
205
202 void _registerBackendUse(FunctionEntity element) { 206 void _registerBackendUse(FunctionEntity element) {
203 _backendUsageBuilder.registerBackendFunctionUse(element); 207 _backendUsageBuilder.registerBackendFunctionUse(element);
204 _backendUsageBuilder.registerGlobalFunctionDependency(element); 208 _backendUsageBuilder.registerGlobalFunctionDependency(element);
205 } 209 }
206 210
207 WorldImpact processNativeClasses(Iterable<LibraryEntity> libraries) { 211 WorldImpact processNativeClasses(Iterable<LibraryEntity> libraries) {
208 WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl(); 212 WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
209 Iterable<ClassEntity> nativeClasses = 213 Iterable<ClassEntity> nativeClasses =
210 _nativeClassFinder.computeNativeClasses(libraries); 214 _nativeClassFinder.computeNativeClasses(libraries);
211 _nativeClasses.addAll(nativeClasses); 215 _nativeClasses.addAll(nativeClasses);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 emitter.directSubtypes.putIfAbsent(superclass, () => <ClassEntity>[]); 305 emitter.directSubtypes.putIfAbsent(superclass, () => <ClassEntity>[]);
302 directSubtypes.add(cls); 306 directSubtypes.add(cls);
303 } 307 }
304 308
305 void logSummary(void log(String message)) { 309 void logSummary(void log(String message)) {
306 super.logSummary(log); 310 super.logSummary(log);
307 log('Compiled ${_registeredClasses.length} native classes, ' 311 log('Compiled ${_registeredClasses.length} native classes, '
308 '${_unusedClasses.length} native classes omitted.'); 312 '${_unusedClasses.length} native classes omitted.');
309 } 313 }
310 } 314 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map.dart ('k') | pkg/compiler/lib/src/native/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698