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

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

Issue 2696483005: Move global dependencies to BackendUsage (Closed)
Patch Set: Created 3 years, 10 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
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.dart'; 5 import '../common.dart';
6 import '../common/backend_api.dart' show ForeignResolver; 6 import '../common/backend_api.dart' show ForeignResolver;
7 import '../common/resolution.dart' show Resolution; 7 import '../common/resolution.dart' show Resolution;
8 import '../compiler.dart' show Compiler; 8 import '../compiler.dart' show Compiler;
9 import '../constants/values.dart'; 9 import '../constants/values.dart';
10 import '../core_types.dart' show CommonElements; 10 import '../core_types.dart' show CommonElements;
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 438
439 Iterable<ClassElement> _findUnusedClassesMatching( 439 Iterable<ClassElement> _findUnusedClassesMatching(
440 bool predicate(classElement)) { 440 bool predicate(classElement)) {
441 return _unusedClasses.where(predicate); 441 return _unusedClasses.where(predicate);
442 } 442 }
443 443
444 Iterable<ClassElement> _onFirstNativeClass(WorldImpactBuilder impactBuilder) { 444 Iterable<ClassElement> _onFirstNativeClass(WorldImpactBuilder impactBuilder) {
445 void staticUse(element) { 445 void staticUse(element) {
446 impactBuilder.registerStaticUse(new StaticUse.foreignUse(element)); 446 impactBuilder.registerStaticUse(new StaticUse.foreignUse(element));
447 backend.backendUsage.registerBackendUse(element); 447 backend.backendUsage.registerBackendUse(element);
448 compiler.globalDependencies.registerDependency(element); 448 backend.backendUsage.registerGlobalDependency(element);
449 } 449 }
450 450
451 staticUse(helpers.defineProperty); 451 staticUse(helpers.defineProperty);
452 staticUse(helpers.toStringForNativeObject); 452 staticUse(helpers.toStringForNativeObject);
453 staticUse(helpers.hashCodeForNativeObject); 453 staticUse(helpers.hashCodeForNativeObject);
454 staticUse(helpers.closureConverter); 454 staticUse(helpers.closureConverter);
455 return _findNativeExceptions(); 455 return _findNativeExceptions();
456 } 456 }
457 457
458 Iterable<ClassElement> _findNativeExceptions() { 458 Iterable<ClassElement> _findNativeExceptions() {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 List<ClassEntity> directSubtypes = 605 List<ClassEntity> directSubtypes =
606 emitter.directSubtypes.putIfAbsent(superclass, () => <ClassEntity>[]); 606 emitter.directSubtypes.putIfAbsent(superclass, () => <ClassEntity>[]);
607 directSubtypes.add(cls); 607 directSubtypes.add(cls);
608 } 608 }
609 609
610 void logSummary(log(message)) { 610 void logSummary(log(message)) {
611 log('Compiled ${_registeredClasses.length} native classes, ' 611 log('Compiled ${_registeredClasses.length} native classes, '
612 '${_unusedClasses.length} native classes omitted.'); 612 '${_unusedClasses.length} native classes omitted.');
613 } 613 }
614 } 614 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart ('k') | tests/compiler/dart2js/kernel/closed_world_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698