| 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.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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 } | 437 } |
| 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.registerBackendUse(element); | 447 backend.backendUsage.registerBackendUse(element); |
| 448 compiler.globalDependencies.registerDependency(element); | 448 compiler.globalDependencies.registerDependency(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 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |