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

Unified Diff: pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart

Issue 2937203002: Add J-elements (Closed)
Patch Set: Updated cf. comments Created 3 years, 6 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
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map_impl.dart ('k') | pkg/compiler/lib/src/kernel/types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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),
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map_impl.dart ('k') | pkg/compiler/lib/src/kernel/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698