Index: pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart |
diff --git a/pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart b/pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart |
index fd15e52a7b6e4e8b3dc920f9bc7ebecdc689eb25..bfe4de15683210df3f60616721c76b2a8549e2db 100644 |
--- a/pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart |
+++ b/pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart |
@@ -80,9 +80,11 @@ class KernelBackendStrategy implements BackendStrategy { |
} |
@override |
- SsaBuilderTask createSsaBuilderTask(JavaScriptBackend backend, |
+ SsaBuilder createSsaBuilder(CompilerTask task, JavaScriptBackend backend, |
SourceInformationStrategy sourceInformationStrategy) { |
- return new KernelSsaBuilderTask(backend.compiler); |
+ KernelFrontEndStrategy strategy = backend.compiler.frontendStrategy; |
+ KernelToElementMap elementMap = strategy.elementMap; |
+ return new KernelSsaBuilder(task, backend.compiler, elementMap); |
} |
@override |
@@ -128,19 +130,16 @@ class KernelCodegenWorkItem extends CodegenWorkItem { |
} |
/// Task for building SSA from kernel IR loaded from .dill. |
-class KernelSsaBuilderTask extends CompilerTask implements SsaBuilderTask { |
+class KernelSsaBuilder implements SsaBuilder { |
+ final CompilerTask task; |
final Compiler _compiler; |
+ final KernelToElementMap _elementMap; |
- KernelSsaBuilderTask(this._compiler) : super(_compiler.measurer); |
- |
- KernelToElementMapImpl get _elementMap { |
- KernelFrontEndStrategy frontendStrategy = _compiler.frontendStrategy; |
- return frontendStrategy.elementMap; |
- } |
+ KernelSsaBuilder(this.task, this._compiler, this._elementMap); |
@override |
HGraph build(CodegenWorkItem work, ClosedWorld closedWorld) { |
- KernelSsaBuilder builder = new KernelSsaBuilder( |
+ KernelSsaGraphBuilder builder = new KernelSsaGraphBuilder( |
work.element, |
work.element.enclosingClass, |
_elementMap.getMemberNode(work.element), |