OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 library dart2js.backend_api; | 5 library dart2js.backend_api; |
6 | 6 |
7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
8 | 8 |
9 import '../common.dart'; | 9 import '../common.dart'; |
10 import '../common/codegen.dart' show CodegenImpact; | 10 import '../common/codegen.dart' show CodegenImpact; |
11 import '../common/resolution.dart' show ResolutionImpact, Frontend; | 11 import '../common/resolution.dart' show ResolutionImpact, Frontend; |
12 import '../compile_time_constants.dart' | 12 import '../compile_time_constants.dart' |
13 show BackendConstantEnvironment, ConstantCompilerTask; | 13 show BackendConstantEnvironment, ConstantCompilerTask; |
14 import '../compiler.dart' show Compiler; | 14 import '../compiler.dart' show Compiler; |
15 import '../constants/constant_system.dart' show ConstantSystem; | 15 import '../constants/constant_system.dart' show ConstantSystem; |
16 import '../constants/expressions.dart' show ConstantExpression; | 16 import '../constants/expressions.dart' show ConstantExpression; |
17 import '../constants/values.dart' show ConstantValue; | 17 import '../constants/values.dart' show ConstantValue; |
18 import '../dart_types.dart' show DartType, InterfaceType; | 18 import '../dart_types.dart' show DartType, InterfaceType; |
19 import '../elements/elements.dart' | 19 import '../elements/elements.dart' |
20 show | 20 show |
21 ClassElement, | 21 ClassElement, |
22 Element, | 22 Element, |
23 FunctionElement, | 23 FunctionElement, |
24 LibraryElement, | 24 LibraryElement, |
25 MetadataAnnotation, | 25 MetadataAnnotation, |
26 MethodElement; | 26 MethodElement; |
27 import '../enqueue.dart' show Enqueuer, EnqueueTask, CodegenEnqueuer, Resolution
Enqueuer; | 27 import '../enqueue.dart' |
| 28 show Enqueuer, EnqueueTask, CodegenEnqueuer, ResolutionEnqueuer; |
28 import '../io/code_output.dart' show CodeBuffer; | 29 import '../io/code_output.dart' show CodeBuffer; |
29 import '../io/source_information.dart' show SourceInformationStrategy; | 30 import '../io/source_information.dart' show SourceInformationStrategy; |
30 import '../js_backend/backend_helpers.dart' as js_backend show BackendHelpers; | 31 import '../js_backend/backend_helpers.dart' as js_backend show BackendHelpers; |
31 import '../js_backend/js_backend.dart' as js_backend; | 32 import '../js_backend/js_backend.dart' as js_backend; |
32 import '../library_loader.dart' show LibraryLoader, LoadedLibraries; | 33 import '../library_loader.dart' show LibraryLoader, LoadedLibraries; |
33 import '../native/native.dart' as native show NativeEnqueuer, maybeEnableNative; | 34 import '../native/native.dart' as native show NativeEnqueuer, maybeEnableNative; |
34 import '../patch_parser.dart' | 35 import '../patch_parser.dart' |
35 show checkNativeAnnotation, checkJsInteropAnnotation; | 36 show checkNativeAnnotation, checkJsInteropAnnotation; |
36 import '../serialization/serialization.dart' | 37 import '../serialization/serialization.dart' |
37 show DeserializerPlugin, SerializerPlugin; | 38 show DeserializerPlugin, SerializerPlugin; |
38 import '../tree/tree.dart' show Node, Send; | 39 import '../tree/tree.dart' show Node, Send; |
39 import '../universe/call_structure.dart' show CallStructure; | 40 import '../universe/call_structure.dart' show CallStructure; |
40 import '../universe/world_impact.dart' show ImpactStrategy, WorldImpact; | 41 import '../universe/world_impact.dart' show ImpactStrategy, WorldImpact; |
41 import 'codegen.dart' show | 42 import 'codegen.dart' show CodegenWorkItem; |
42 CodegenWorkItem; | 43 import 'registry.dart' show Registry; |
43 import 'registry.dart' show | 44 import 'tasks.dart' show CompilerTask; |
44 Registry; | 45 import 'work.dart' show ItemCompilationContext; |
45 import 'tasks.dart' show | |
46 CompilerTask; | |
47 import 'work.dart' show | |
48 ItemCompilationContext; | |
49 | 46 |
50 abstract class Backend { | 47 abstract class Backend { |
51 final Compiler compiler; | 48 final Compiler compiler; |
52 | 49 |
53 Backend(this.compiler); | 50 Backend(this.compiler); |
54 | 51 |
55 /// Returns true if the backend supports reflection. | 52 /// Returns true if the backend supports reflection. |
56 bool get supportsReflection; | 53 bool get supportsReflection; |
57 | 54 |
58 /// The [ConstantSystem] used to interpret compile-time constants for this | 55 /// The [ConstantSystem] used to interpret compile-time constants for this |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 } | 431 } |
435 } | 432 } |
436 | 433 |
437 /// Interface for serialization of backend specific data. | 434 /// Interface for serialization of backend specific data. |
438 class BackendSerialization { | 435 class BackendSerialization { |
439 const BackendSerialization(); | 436 const BackendSerialization(); |
440 | 437 |
441 SerializerPlugin get serializer => const SerializerPlugin(); | 438 SerializerPlugin get serializer => const SerializerPlugin(); |
442 DeserializerPlugin get deserializer => const DeserializerPlugin(); | 439 DeserializerPlugin get deserializer => const DeserializerPlugin(); |
443 } | 440 } |
OLD | NEW |