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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/code_emitter_task.dart

Issue 2824823004: Remove Compiler and JavaScriptBackend from program_builder and collector. (Closed)
Patch Set: Created 3 years, 8 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) 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.js_emitter.code_emitter_task; 5 library dart2js.js_emitter.code_emitter_task;
6 6
7 import 'package:js_runtime/shared/embedded_names.dart' show JsBuiltin; 7 import 'package:js_runtime/shared/embedded_names.dart' show JsBuiltin;
8 8
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common/tasks.dart' show CompilerTask; 10 import '../common/tasks.dart' show CompilerTask;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 backend.rtiEncoder); 172 backend.rtiEncoder);
173 typeTestRegistry = new TypeTestRegistry( 173 typeTestRegistry = new TypeTestRegistry(
174 codegenWorldBuilder, compiler.backend, closedWorld); 174 codegenWorldBuilder, compiler.backend, closedWorld);
175 }); 175 });
176 } 176 }
177 177
178 int assembleProgram(Namer namer, ClosedWorld closedWorld) { 178 int assembleProgram(Namer namer, ClosedWorld closedWorld) {
179 return measure(() { 179 return measure(() {
180 Set<ClassEntity> rtiNeededClasses = _finalizeRti(); 180 Set<ClassEntity> rtiNeededClasses = _finalizeRti();
181 ProgramBuilder programBuilder = new ProgramBuilder( 181 ProgramBuilder programBuilder = new ProgramBuilder(
182 compiler, namer, this, emitter, closedWorld, rtiNeededClasses); 182 compiler.options,
183 compiler.commonElements,
184 compiler.types,
185 compiler.deferredLoadTask,
186 compiler.closureToClassMapper,
187 compiler.codegenWorldBuilder,
188 backend.nativeCodegenEnqueuer,
189 backend.backendUsage,
190 backend.constants,
191 backend.nativeData,
192 backend.rtiNeed,
193 backend.mirrorsData,
194 backend.interceptorData,
195 backend.superMemberData,
196 backend.rtiChecks,
197 backend.rtiEncoder,
198 backend.rtiSubstitutions,
199 backend.jsInteropAnalysis,
200 backend.oneShotInterceptorData,
201 backend.customElementsCodegenAnalysis,
202 backend.generatedCode,
203 namer,
204 this,
205 closedWorld,
206 rtiNeededClasses,
207 compiler.mainFunction,
208 isMockCompilation: compiler.isMockCompilation);
183 int size = emitter.emitProgram(programBuilder); 209 int size = emitter.emitProgram(programBuilder);
184 // TODO(floitsch): we shouldn't need the `neededClasses` anymore. 210 // TODO(floitsch): we shouldn't need the `neededClasses` anymore.
185 neededClasses = programBuilder.collector.neededClasses; 211 neededClasses = programBuilder.collector.neededClasses;
186 return size; 212 return size;
187 }); 213 });
188 } 214 }
189 } 215 }
190 216
191 abstract class EmitterFactory { 217 abstract class EmitterFactory {
192 /// Returns the string that is used to find library patches that are 218 /// Returns the string that is used to find library patches that are
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 271
246 /// Returns the JS code for accessing the given [constant]. 272 /// Returns the JS code for accessing the given [constant].
247 jsAst.Expression constantReference(ConstantValue constant); 273 jsAst.Expression constantReference(ConstantValue constant);
248 274
249 /// Returns the JS template for the given [builtin]. 275 /// Returns the JS template for the given [builtin].
250 jsAst.Template templateForBuiltin(JsBuiltin builtin); 276 jsAst.Template templateForBuiltin(JsBuiltin builtin);
251 277
252 /// Returns the size of the code generated for a given output [unit]. 278 /// Returns the size of the code generated for a given output [unit].
253 int generatedSize(OutputUnit unit); 279 int generatedSize(OutputUnit unit);
254 } 280 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698