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 { |