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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 2220993005: Split js_backend into multiple libraries (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend_serialization.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 part of js_backend; 5 library js_backend.backend;
6
7 import 'dart:async' show Future;
8
9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
10
11 import '../closure.dart';
12 import '../common.dart';
13 import '../common/backend_api.dart'
14 show Backend, ImpactTransformer, ForeignResolver, NativeRegistry;
15 import '../common/codegen.dart' show CodegenImpact, CodegenWorkItem;
16 import '../common/names.dart' show Identifiers, Names, Selectors, Uris;
17 import '../common/registry.dart' show EagerRegistry, Registry;
18 import '../common/resolution.dart'
19 show
20 Feature,
21 Frontend,
22 ListLiteralUse,
23 MapLiteralUse,
24 Resolution,
25 ResolutionImpact;
26 import '../common/tasks.dart' show CompilerTask;
27 import '../common/work.dart' show ItemCompilationContext;
28 import '../compiler.dart' show Compiler;
29 import '../constants/constant_system.dart';
30 import '../constants/expressions.dart';
31 import '../constants/values.dart';
32 import '../core_types.dart' show CoreClasses, CoreTypes;
33 import '../dart_types.dart';
34 import '../deferred_load.dart' show DeferredLoadTask;
35 import '../dump_info.dart' show DumpInfoTask;
36 import '../elements/elements.dart';
37 import '../enqueue.dart' show Enqueuer, ResolutionEnqueuer;
38 import '../io/position_information.dart' show PositionSourceInformationStrategy;
39 import '../io/source_information.dart' show SourceInformationStrategy;
40 import '../io/start_end_information.dart'
41 show StartEndSourceInformationStrategy;
42 import '../js/js.dart' as jsAst;
43 import '../js/js.dart' show js;
44 import '../js/js_source_mapping.dart' show JavaScriptSourceInformationStrategy;
45 import '../js/rewrite_async.dart';
46 import '../js_emitter/js_emitter.dart'
47 show CodeEmitterTask, MetadataCollector, Placeholder;
48 import '../library_loader.dart' show LibraryLoader, LoadedLibraries;
49 import '../native/native.dart' as native;
50 import '../ssa/builder.dart' show SsaFunctionCompiler;
51 import '../ssa/nodes.dart' show HTypeConversion, HInstruction;
52 import '../tree/tree.dart';
53 import '../types/types.dart';
54 import '../universe/call_structure.dart' show CallStructure;
55 import '../universe/selector.dart' show Selector, SelectorKind;
56 import '../universe/universe.dart';
57 import '../universe/use.dart'
58 show DynamicUse, StaticUse, StaticUseKind, TypeUse, TypeUseKind;
59 import '../universe/world_impact.dart'
60 show
61 ImpactStrategy,
62 ImpactUseCase,
63 TransformedWorldImpact,
64 WorldImpact,
65 WorldImpactVisitor;
66 import '../util/util.dart';
67 import '../world.dart' show ClassWorld;
68 import 'backend_helpers.dart';
69 import 'backend_impact.dart';
70 import 'backend_serialization.dart' show JavaScriptBackendSerialization;
71 import 'checked_mode_helpers.dart';
72 import 'codegen/task.dart';
73
74 import 'constant_handler_javascript.dart';
75 import 'custom_elements_analysis.dart';
76 import 'js_interop_analysis.dart' show JsInteropAnalysis;
77 import 'lookup_map_analysis.dart' show LookupMapAnalysis;
78 import 'namer.dart';
79 import 'native_data.dart' show NativeData;
80 import 'no_such_method_registry.dart';
81 import 'patch_resolver.dart';
82 import 'type_variable_handler.dart';
83
84 part 'runtime_types.dart';
6 85
7 const VERBOSE_OPTIMIZER_HINTS = false; 86 const VERBOSE_OPTIMIZER_HINTS = false;
8 87
9 class JavaScriptItemCompilationContext extends ItemCompilationContext { 88 class JavaScriptItemCompilationContext extends ItemCompilationContext {
10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); 89 final Set<HInstruction> boundsChecked = new Set<HInstruction>();
11 final Set<HInstruction> allocatedFixedLists = new Set<HInstruction>(); 90 final Set<HInstruction> allocatedFixedLists = new Set<HInstruction>();
12 } 91 }
13 92
14 abstract class FunctionCompiler { 93 abstract class FunctionCompiler {
15 /// Generates JavaScript code for `work.element`. 94 /// Generates JavaScript code for `work.element`.
(...skipping 3114 matching lines...) Expand 10 before | Expand all | Expand 10 after
3130 3209
3131 @override 3210 @override
3132 void onImpactUsed(ImpactUseCase impactUse) { 3211 void onImpactUsed(ImpactUseCase impactUse) {
3133 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { 3212 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) {
3134 // TODO(johnniwinther): Allow emptying when serialization has been 3213 // TODO(johnniwinther): Allow emptying when serialization has been
3135 // performed. 3214 // performed.
3136 resolution.emptyCache(); 3215 resolution.emptyCache();
3137 } 3216 }
3138 } 3217 }
3139 } 3218 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend_serialization.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698