Index: pkg/compiler/lib/src/js_model/js_strategy.dart |
diff --git a/pkg/compiler/lib/src/js_model/js_strategy.dart b/pkg/compiler/lib/src/js_model/js_strategy.dart |
index e2279f667207b8e029c3634e5b8f9665c8ca3302..ad2679edabdc73c53be5d70395a1d5785045a850 100644 |
--- a/pkg/compiler/lib/src/js_model/js_strategy.dart |
+++ b/pkg/compiler/lib/src/js_model/js_strategy.dart |
@@ -40,13 +40,14 @@ class JsBackendStrategy implements KernelBackendStrategy { |
KernelToElementMapForBuilding _elementMap; |
ClosureConversionTask _closureDataLookup; |
final GlobalLocalsMap _globalLocalsMap = new GlobalLocalsMap(); |
+ Sorter _sorter; |
JsBackendStrategy(this._compiler); |
KernelToElementMapForBuilding get elementMap { |
if (_elementMap == null) { |
KernelFrontEndStrategy strategy = _compiler.frontendStrategy; |
- KernelToElementMapForBuilding elementMap = strategy.elementMap; |
+ KernelToElementMapForImpact elementMap = strategy.elementMap; |
_elementMap = new JsKernelToElementMap( |
_compiler.reporter, |
_compiler.environment, |
@@ -133,7 +134,7 @@ class JsBackendStrategy implements KernelBackendStrategy { |
@override |
Sorter get sorter { |
- throw new UnimplementedError('JsBackendStrategy.sorter'); |
+ return _sorter ??= new KernelSorter(elementMap); |
} |
@override |