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

Unified Diff: pkg/compiler/lib/src/js_emitter/code_emitter_task.dart

Issue 2972523002: Implement JsKernelToElementMap through KernelToElementMapBase (Closed)
Patch Set: Updated cf. comments Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
diff --git a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
index e3bd0f43c5a8a6a97ea73683c12319ad6fece7db..549d49b2f4ec55aea364c64d165a5d4604b9681f 100644
--- a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
+++ b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
@@ -43,9 +43,6 @@ class CodeEmitterTask extends CompilerTask {
Emitter _emitter;
final Compiler compiler;
- /// The [Sorter] use for ordering elements in the generated JavaScript.
- final Sorter sorter;
-
JavaScriptBackend get backend => compiler.backend;
@deprecated
@@ -58,7 +55,6 @@ class CodeEmitterTask extends CompilerTask {
CodeEmitterTask(
Compiler compiler, bool generateSourceMap, bool useStartupEmitter)
: compiler = compiler,
- sorter = compiler.backendStrategy.sorter,
super(compiler.measurer) {
if (USE_LAZY_EMITTER) {
_emitterFactory = new lazy_js_emitter.EmitterFactory();
@@ -168,11 +164,12 @@ class CodeEmitterTask extends CompilerTask {
/// Creates the [Emitter] for this task.
void createEmitter(Namer namer, ClosedWorld closedWorld,
- CodegenWorldBuilder codegenWorldBuilder) {
+ CodegenWorldBuilder codegenWorldBuilder, Sorter sorter) {
measure(() {
_nativeEmitter = new NativeEmitter(this, closedWorld, codegenWorldBuilder,
backend.nativeCodegenEnqueuer);
- _emitter = _emitterFactory.createEmitter(this, namer, closedWorld);
+ _emitter =
+ _emitterFactory.createEmitter(this, namer, closedWorld, sorter);
metadataCollector = new MetadataCollector(
compiler.options,
compiler.reporter,
@@ -217,6 +214,7 @@ class CodeEmitterTask extends CompilerTask {
namer,
this,
closedWorld,
+ compiler.backendStrategy.sorter,
typeTestRegistry.rtiNeededClasses,
closedWorld.elementEnvironment.mainFunction,
isMockCompilation: compiler.isMockCompilation);
@@ -233,8 +231,8 @@ abstract class EmitterFactory {
bool get supportsReflection;
/// Create the [Emitter] for the emitter [task] that uses the given [namer].
- Emitter createEmitter(
- CodeEmitterTask task, Namer namer, ClosedWorld closedWorld);
+ Emitter createEmitter(CodeEmitterTask task, Namer namer,
+ ClosedWorld closedWorld, Sorter sorter);
}
abstract class Emitter {
« 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