| 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 '../common_elements.dart' show CommonElements; | 10 import '../common_elements.dart' show CommonElements; |
| 11 import '../elements/elements.dart'; | 11 import '../elements/elements.dart'; |
| 12 import '../elements/entities.dart'; | 12 import '../elements/entities.dart'; |
| 13 import '../elements/modelx.dart' show FunctionElementX; | 13 import '../elements/modelx.dart' show FunctionElementX; |
| 14 import '../elements/resolution_types.dart'; | 14 import '../elements/resolution_types.dart'; |
| 15 import '../elements/types.dart'; |
| 15 import '../js_backend/backend_helpers.dart' show BackendHelpers; | 16 import '../js_backend/backend_helpers.dart' show BackendHelpers; |
| 16 import '../js_backend/backend_usage.dart' show BackendUsageBuilder; | 17 import '../js_backend/backend_usage.dart' show BackendUsageBuilder; |
| 17 import '../js_backend/js_backend.dart'; | 18 import '../js_backend/js_backend.dart'; |
| 18 import '../js_emitter/js_emitter.dart' show CodeEmitterTask, NativeEmitter; | 19 import '../js_emitter/js_emitter.dart' show CodeEmitterTask, NativeEmitter; |
| 19 import 'package:front_end/src/fasta/scanner.dart' show BeginGroupToken, Token; | 20 import 'package:front_end/src/fasta/scanner.dart' show BeginGroupToken, Token; |
| 20 import 'package:front_end/src/fasta/scanner.dart' as Tokens show EOF_TOKEN; | 21 import 'package:front_end/src/fasta/scanner.dart' as Tokens show EOF_TOKEN; |
| 21 import '../tree/tree.dart'; | 22 import '../tree/tree.dart'; |
| 22 import '../universe/use.dart' show StaticUse, TypeUse; | 23 import '../universe/use.dart' show StaticUse, TypeUse; |
| 23 import '../universe/world_impact.dart' | 24 import '../universe/world_impact.dart' |
| 24 show WorldImpact, WorldImpactBuilder, WorldImpactBuilderImpl; | 25 show WorldImpact, WorldImpactBuilder, WorldImpactBuilderImpl; |
| 25 import 'behavior.dart'; | 26 import 'behavior.dart'; |
| 26 | 27 |
| 27 /** | 28 /** |
| 28 * This could be an abstract class but we use it as a stub for the dart_backend. | 29 * This could be an abstract class but we use it as a stub for the dart_backend. |
| 29 */ | 30 */ |
| 30 class NativeEnqueuer { | 31 class NativeEnqueuer { |
| 31 /// Called when a [type] has been instantiated natively. | 32 /// Called when a [type] has been instantiated natively. |
| 32 void onInstantiatedType(ResolutionInterfaceType type) {} | 33 void onInstantiatedType(InterfaceType type) {} |
| 33 | 34 |
| 34 /// Initial entry point to native enqueuer. | 35 /// Initial entry point to native enqueuer. |
| 35 WorldImpact processNativeClasses(Iterable<LibraryElement> libraries) => | 36 WorldImpact processNativeClasses(Iterable<LibraryElement> libraries) => |
| 36 const WorldImpact(); | 37 const WorldImpact(); |
| 37 | 38 |
| 38 /// Registers the [nativeBehavior]. Adds the liveness of its instantiated | 39 /// Registers the [nativeBehavior]. Adds the liveness of its instantiated |
| 39 /// types to the world. | 40 /// types to the world. |
| 40 void registerNativeBehavior( | 41 void registerNativeBehavior( |
| 41 WorldImpactBuilder impactBuilder, NativeBehavior nativeBehavior, cause) {} | 42 WorldImpactBuilder impactBuilder, NativeBehavior nativeBehavior, cause) {} |
| 42 | 43 |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 List<ClassEntity> directSubtypes = | 617 List<ClassEntity> directSubtypes = |
| 617 emitter.directSubtypes.putIfAbsent(superclass, () => <ClassEntity>[]); | 618 emitter.directSubtypes.putIfAbsent(superclass, () => <ClassEntity>[]); |
| 618 directSubtypes.add(cls); | 619 directSubtypes.add(cls); |
| 619 } | 620 } |
| 620 | 621 |
| 621 void logSummary(log(message)) { | 622 void logSummary(log(message)) { |
| 622 log('Compiled ${_registeredClasses.length} native classes, ' | 623 log('Compiled ${_registeredClasses.length} native classes, ' |
| 623 '${_unusedClasses.length} native classes omitted.'); | 624 '${_unusedClasses.length} native classes omitted.'); |
| 624 } | 625 } |
| 625 } | 626 } |
| OLD | NEW |