Index: pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart |
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart |
index 44f2f4e498da4c5cf72d334adaa8db80243c5872..a8e04792ad9068c8e88799fd94d7b7a1a38ecb65 100644 |
--- a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart |
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart |
@@ -101,6 +101,9 @@ class ProgramBuilder { |
final CodeEmitterTask _task; |
final ClosedWorld _closedWorld; |
+ /// The [Sorter] used for ordering elements in the generated JavaScript. |
+ final Sorter _sorter; |
+ |
/// Contains the collected information the program builder used to build |
/// the model. |
// The collector will be filled on the first call to `buildProgram`. |
@@ -143,6 +146,7 @@ class ProgramBuilder { |
this._namer, |
this._task, |
this._closedWorld, |
+ this._sorter, |
Set<ClassEntity> rtiNeededClasses, |
this._mainFunction, |
{bool isMockCompilation}) |
@@ -163,8 +167,8 @@ class ProgramBuilder { |
_closedWorld, |
rtiNeededClasses, |
_generatedCode, |
- _task.sorter), |
- this._registry = new Registry(_deferredLoadTask, _task.sorter); |
+ _sorter), |
+ this._registry = new Registry(_deferredLoadTask, _sorter); |
/// Mapping from [ClassEntity] to constructed [Class]. We need this to |
/// update the superclass in the [Class]. |
@@ -195,8 +199,6 @@ class ProgramBuilder { |
/// interceptors, ...). |
Set<ClassElement> _notSoftDeferred; |
- Sorter get _sorter => _task.sorter; |
- |
Program buildProgram({bool storeFunctionTypesInMetadata: false}) { |
collector.collect(); |
_initializeSoftDeferredMap(); |