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

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

Issue 2989453002: Add support for compiling Dart via the FE in dart2js. (Closed)
Patch Set: update status Created 3 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
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 '../closure.dart' show ClosureConversionTask, ClosureTask; 8 import '../closure.dart' show ClosureConversionTask, ClosureTask;
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common/codegen.dart'; 10 import '../common/codegen.dart';
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 @override 64 @override
65 WorkItemBuilder createCodegenWorkItemBuilder(ClosedWorld closedWorld) { 65 WorkItemBuilder createCodegenWorkItemBuilder(ClosedWorld closedWorld) {
66 return new ElementCodegenWorkItemBuilder( 66 return new ElementCodegenWorkItemBuilder(
67 _compiler.backend, closedWorld, _compiler.options); 67 _compiler.backend, closedWorld, _compiler.options);
68 } 68 }
69 69
70 @override 70 @override
71 SsaBuilder createSsaBuilder(CompilerTask task, JavaScriptBackend backend, 71 SsaBuilder createSsaBuilder(CompilerTask task, JavaScriptBackend backend,
72 SourceInformationStrategy sourceInformationStrategy) { 72 SourceInformationStrategy sourceInformationStrategy) {
73 return _compiler.options.useKernel 73 return _compiler.options.useKernelInSsa
74 ? new RastaSsaBuilder(task, backend, sourceInformationStrategy) 74 ? new RastaSsaBuilder(task, backend, sourceInformationStrategy)
75 : new SsaAstBuilder(task, backend, sourceInformationStrategy); 75 : new SsaAstBuilder(task, backend, sourceInformationStrategy);
76 } 76 }
77 77
78 SourceInformationStrategy get sourceInformationStrategy { 78 SourceInformationStrategy get sourceInformationStrategy {
79 return _sourceInformationStrategy ??= createSourceInformationStrategy( 79 return _sourceInformationStrategy ??= createSourceInformationStrategy(
80 generateSourceMap: _compiler.options.generateSourceMap, 80 generateSourceMap: _compiler.options.generateSourceMap,
81 useMultiSourceInfo: _compiler.options.useMultiSourceInfo, 81 useMultiSourceInfo: _compiler.options.useMultiSourceInfo,
82 useNewSourceInfo: _compiler.options.useNewSourceInfo); 82 useNewSourceInfo: _compiler.options.useNewSourceInfo);
83 } 83 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 MemberElement get element => resolvedAst.element; 161 MemberElement get element => resolvedAst.element;
162 162
163 WorldImpact run() { 163 WorldImpact run() {
164 registry = new CodegenRegistry(_closedWorld.elementEnvironment, element); 164 registry = new CodegenRegistry(_closedWorld.elementEnvironment, element);
165 return _backend.codegen(this, _closedWorld); 165 return _backend.codegen(this, _closedWorld);
166 } 166 }
167 167
168 String toString() => 'CodegenWorkItem(${resolvedAst.element})'; 168 String toString() => 'CodegenWorkItem(${resolvedAst.element})';
169 } 169 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698