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 js_backend; | 5 library js_backend; |
6 | 6 |
7 import 'dart:async' show EventSink, Future; | 7 import 'dart:async' show EventSink, Future; |
8 import 'dart:collection' show HashMap; | 8 import 'dart:collection' show HashMap; |
9 | 9 |
10 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; | 10 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; |
11 import 'package:js_runtime/shared/embedded_names.dart' show JsGetName; | 11 import 'package:js_runtime/shared/embedded_names.dart' show JsGetName; |
12 | 12 |
13 import '../closure.dart'; | 13 import '../closure.dart'; |
14 import '../common.dart'; | 14 import '../common.dart'; |
15 import '../common/backend_api.dart' show | 15 import '../common/backend_api.dart' |
16 Backend, | 16 show Backend, BackendSerialization, ImpactTransformer, ForeignResolver; |
17 BackendSerialization, | 17 import '../common/codegen.dart' |
18 ImpactTransformer, | 18 show CodegenImpact, CodegenRegistry, CodegenWorkItem; |
19 ForeignResolver; | 19 import '../common/names.dart' show Identifiers, Names, Selectors, Uris; |
20 import '../common/codegen.dart' show | 20 import '../common/registry.dart' show EagerRegistry, Registry; |
21 CodegenImpact, | 21 import '../common/tasks.dart' show CompilerTask; |
22 CodegenRegistry, | 22 import '../common/resolution.dart' |
23 CodegenWorkItem; | 23 show Feature, ListLiteralUse, MapLiteralUse, Resolution, ResolutionImpact; |
24 import '../common/names.dart' show | 24 import '../common/work.dart' show ItemCompilationContext; |
25 Identifiers, | 25 import '../compiler.dart' show Compiler; |
26 Names, | |
27 Selectors, | |
28 Uris; | |
29 import '../common/registry.dart' show | |
30 EagerRegistry, | |
31 Registry; | |
32 import '../common/tasks.dart' show | |
33 CompilerTask; | |
34 import '../common/resolution.dart' show | |
35 Feature, | |
36 ListLiteralUse, | |
37 MapLiteralUse, | |
38 Resolution, | |
39 ResolutionImpact; | |
40 import '../common/work.dart' show | |
41 ItemCompilationContext; | |
42 import '../compiler.dart' show | |
43 Compiler; | |
44 import '../compile_time_constants.dart'; | 26 import '../compile_time_constants.dart'; |
45 import '../constants/constant_system.dart'; | 27 import '../constants/constant_system.dart'; |
46 import '../constants/expressions.dart'; | 28 import '../constants/expressions.dart'; |
47 import '../constants/values.dart'; | 29 import '../constants/values.dart'; |
48 import '../core_types.dart' show | 30 import '../core_types.dart' show CoreClasses, CoreTypes; |
49 CoreClasses, | |
50 CoreTypes; | |
51 import '../dart_types.dart'; | 31 import '../dart_types.dart'; |
52 import '../deferred_load.dart' show | 32 import '../deferred_load.dart' show DeferredLoadTask; |
53 DeferredLoadTask; | 33 import '../diagnostics/invariant.dart' show DEBUG_MODE; |
54 import '../diagnostics/invariant.dart' show | 34 import '../dump_info.dart' show DumpInfoTask; |
55 DEBUG_MODE; | |
56 import '../dump_info.dart' show | |
57 DumpInfoTask; | |
58 import '../elements/elements.dart'; | 35 import '../elements/elements.dart'; |
59 import '../elements/visitor.dart' show | 36 import '../elements/visitor.dart' show BaseElementVisitor; |
60 BaseElementVisitor; | 37 import '../enqueue.dart' show Enqueuer, ResolutionEnqueuer; |
61 import '../enqueue.dart' show | |
62 Enqueuer, | |
63 ResolutionEnqueuer; | |
64 import '../io/code_output.dart'; | 38 import '../io/code_output.dart'; |
65 import '../io/source_information.dart' show | 39 import '../io/source_information.dart' show SourceInformationStrategy; |
66 SourceInformationStrategy; | 40 import '../io/position_information.dart' show PositionSourceInformationStrategy; |
67 import '../io/position_information.dart' show | 41 import '../io/start_end_information.dart' |
68 PositionSourceInformationStrategy; | 42 show StartEndSourceInformationStrategy; |
69 import '../io/start_end_information.dart' show | |
70 StartEndSourceInformationStrategy; | |
71 import '../js/js.dart' as jsAst; | 43 import '../js/js.dart' as jsAst; |
72 import '../js/js.dart' show js; | 44 import '../js/js.dart' show js; |
73 import '../js/js_source_mapping.dart' show | 45 import '../js/js_source_mapping.dart' show JavaScriptSourceInformationStrategy; |
74 JavaScriptSourceInformationStrategy; | |
75 import '../js/rewrite_async.dart'; | 46 import '../js/rewrite_async.dart'; |
76 import '../js_emitter/js_emitter.dart' show | 47 import '../js_emitter/js_emitter.dart' |
77 CodeEmitterTask, | 48 show |
78 Emitter, | 49 CodeEmitterTask, |
79 MetadataCollector, | 50 Emitter, |
80 Placeholder, | 51 MetadataCollector, |
81 USE_LAZY_EMITTER; | 52 Placeholder, |
| 53 USE_LAZY_EMITTER; |
82 import '../library_loader.dart' show LibraryLoader, LoadedLibraries; | 54 import '../library_loader.dart' show LibraryLoader, LoadedLibraries; |
83 import '../native/native.dart' as native; | 55 import '../native/native.dart' as native; |
84 import '../resolution/tree_elements.dart' show | 56 import '../resolution/tree_elements.dart' show TreeElements; |
85 TreeElements; | 57 import '../ssa/builder.dart' show SsaFunctionCompiler; |
86 import '../ssa/builder.dart' show | 58 import '../ssa/nodes.dart' show HTypeConversion, HInstruction; |
87 SsaFunctionCompiler; | 59 import '../ssa/codegen.dart' show SsaCodeGenerator; |
88 import '../ssa/nodes.dart' show | |
89 HTypeConversion, | |
90 HInstruction; | |
91 import '../ssa/codegen.dart' show | |
92 SsaCodeGenerator; | |
93 import '../tree/tree.dart'; | 60 import '../tree/tree.dart'; |
94 import '../types/types.dart'; | 61 import '../types/types.dart'; |
95 import '../universe/call_structure.dart' show | 62 import '../universe/call_structure.dart' show CallStructure; |
96 CallStructure; | 63 import '../universe/selector.dart' show Selector, SelectorKind; |
97 import '../universe/selector.dart' show | |
98 Selector, | |
99 SelectorKind; | |
100 import '../universe/universe.dart'; | 64 import '../universe/universe.dart'; |
101 import '../universe/use.dart' show | 65 import '../universe/use.dart' |
102 DynamicUse, | 66 show DynamicUse, StaticUse, StaticUseKind, TypeUse, TypeUseKind; |
103 StaticUse, | 67 import '../universe/world_impact.dart' |
104 StaticUseKind, | 68 show |
105 TypeUse, | 69 ImpactStrategy, |
106 TypeUseKind; | 70 ImpactUseCase, |
107 import '../universe/world_impact.dart' show | 71 TransformedWorldImpact, |
108 ImpactStrategy, | 72 WorldImpact, |
109 ImpactUseCase, | 73 WorldImpactVisitor; |
110 TransformedWorldImpact, | |
111 WorldImpact, | |
112 WorldImpactVisitor; | |
113 import '../util/characters.dart'; | 74 import '../util/characters.dart'; |
114 import '../util/util.dart'; | 75 import '../util/util.dart'; |
115 import '../world.dart' show | 76 import '../world.dart' show ClassWorld; |
116 ClassWorld; | |
117 | 77 |
118 import 'backend_helpers.dart'; | 78 import 'backend_helpers.dart'; |
119 import 'backend_impact.dart'; | 79 import 'backend_impact.dart'; |
120 import 'backend_serialization.dart' show | 80 import 'backend_serialization.dart' show JavaScriptBackendSerialization; |
121 JavaScriptBackendSerialization; | |
122 import 'codegen/task.dart'; | 81 import 'codegen/task.dart'; |
123 import 'constant_system_javascript.dart'; | 82 import 'constant_system_javascript.dart'; |
124 import 'native_data.dart' show | 83 import 'native_data.dart' show NativeData; |
125 NativeData; | |
126 import 'js_interop_analysis.dart' show JsInteropAnalysis; | 84 import 'js_interop_analysis.dart' show JsInteropAnalysis; |
127 import 'lookup_map_analysis.dart' show LookupMapAnalysis; | 85 import 'lookup_map_analysis.dart' show LookupMapAnalysis; |
128 import 'patch_resolver.dart'; | 86 import 'patch_resolver.dart'; |
129 | 87 |
130 part 'backend.dart'; | 88 part 'backend.dart'; |
131 part 'checked_mode_helpers.dart'; | 89 part 'checked_mode_helpers.dart'; |
132 part 'constant_emitter.dart'; | 90 part 'constant_emitter.dart'; |
133 part 'constant_handler_javascript.dart'; | 91 part 'constant_handler_javascript.dart'; |
134 part 'custom_elements_analysis.dart'; | 92 part 'custom_elements_analysis.dart'; |
135 part 'frequency_namer.dart'; | 93 part 'frequency_namer.dart'; |
136 part 'field_naming_mixin.dart'; | 94 part 'field_naming_mixin.dart'; |
137 part 'minify_namer.dart'; | 95 part 'minify_namer.dart'; |
138 part 'namer.dart'; | 96 part 'namer.dart'; |
139 part 'namer_names.dart'; | 97 part 'namer_names.dart'; |
140 part 'no_such_method_registry.dart'; | 98 part 'no_such_method_registry.dart'; |
141 part 'runtime_types.dart'; | 99 part 'runtime_types.dart'; |
142 part 'type_variable_handler.dart'; | 100 part 'type_variable_handler.dart'; |
OLD | NEW |