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

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

Issue 2937203002: Add J-elements (Closed)
Patch Set: Updated cf. comments Created 3 years, 6 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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.js_backend.element_strategy; 5 library dart2js.js_backend.element_strategy;
6 6
7 import '../backend_strategy.dart'; 7 import '../backend_strategy.dart';
8 import '../common.dart'; 8 import '../common.dart';
9 import '../common/codegen.dart'; 9 import '../common/codegen.dart';
10 import '../common/tasks.dart';
10 import '../common/work.dart'; 11 import '../common/work.dart';
11 import '../compiler.dart'; 12 import '../compiler.dart';
12 import '../elements/elements.dart'; 13 import '../elements/elements.dart';
13 import '../enqueue.dart'; 14 import '../enqueue.dart';
14 import '../io/multi_information.dart' show MultiSourceInformationStrategy; 15 import '../io/multi_information.dart' show MultiSourceInformationStrategy;
15 import '../io/position_information.dart' show PositionSourceInformationStrategy; 16 import '../io/position_information.dart' show PositionSourceInformationStrategy;
16 import '../io/source_information.dart'; 17 import '../io/source_information.dart';
17 import '../io/start_end_information.dart' 18 import '../io/start_end_information.dart'
18 show StartEndSourceInformationStrategy; 19 show StartEndSourceInformationStrategy;
19 import '../js/js_source_mapping.dart' show JavaScriptSourceInformationStrategy; 20 import '../js/js_source_mapping.dart' show JavaScriptSourceInformationStrategy;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 nativeBasicData, closedWorld, selectorConstraintsStrategy); 55 nativeBasicData, closedWorld, selectorConstraintsStrategy);
55 } 56 }
56 57
57 @override 58 @override
58 WorkItemBuilder createCodegenWorkItemBuilder(ClosedWorld closedWorld) { 59 WorkItemBuilder createCodegenWorkItemBuilder(ClosedWorld closedWorld) {
59 return new ElementCodegenWorkItemBuilder( 60 return new ElementCodegenWorkItemBuilder(
60 _compiler.backend, closedWorld, _compiler.options); 61 _compiler.backend, closedWorld, _compiler.options);
61 } 62 }
62 63
63 @override 64 @override
64 SsaBuilderTask createSsaBuilderTask(JavaScriptBackend backend, 65 SsaBuilder createSsaBuilder(CompilerTask task, JavaScriptBackend backend,
65 SourceInformationStrategy sourceInformationStrategy) { 66 SourceInformationStrategy sourceInformationStrategy) {
66 return _compiler.options.useKernel 67 return _compiler.options.useKernel
67 ? new RastaSsaBuilderTask(backend, sourceInformationStrategy) 68 ? new RastaSsaBuilder(task, backend, sourceInformationStrategy)
68 : new SsaAstBuilderTask(backend, sourceInformationStrategy); 69 : new SsaAstBuilder(task, backend, sourceInformationStrategy);
69 } 70 }
70 71
71 SourceInformationStrategy get sourceInformationStrategy { 72 SourceInformationStrategy get sourceInformationStrategy {
72 return _sourceInformationStrategy ??= createSourceInformationStrategy( 73 return _sourceInformationStrategy ??= createSourceInformationStrategy(
73 generateSourceMap: _compiler.options.generateSourceMap, 74 generateSourceMap: _compiler.options.generateSourceMap,
74 useMultiSourceInfo: _compiler.options.useMultiSourceInfo, 75 useMultiSourceInfo: _compiler.options.useMultiSourceInfo,
75 useNewSourceInfo: _compiler.options.useNewSourceInfo); 76 useNewSourceInfo: _compiler.options.useNewSourceInfo);
76 } 77 }
77 78
78 static SourceInformationStrategy createSourceInformationStrategy( 79 static SourceInformationStrategy createSourceInformationStrategy(
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 154
154 MemberElement get element => resolvedAst.element; 155 MemberElement get element => resolvedAst.element;
155 156
156 WorldImpact run() { 157 WorldImpact run() {
157 registry = new CodegenRegistry(element); 158 registry = new CodegenRegistry(element);
158 return _backend.codegen(this, _closedWorld); 159 return _backend.codegen(this, _closedWorld);
159 } 160 }
160 161
161 String toString() => 'CodegenWorkItem(${resolvedAst.element})'; 162 String toString() => 'CodegenWorkItem(${resolvedAst.element})';
162 } 163 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_model/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698