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/ssa/builder.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/native/ssa.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 39fd93bc7310142405631beae1aa0e9309b933e2..f51770f60413bffd869cf99c341ad3d60671c73c 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -54,11 +54,11 @@ import 'ssa_branch_builder.dart';
import 'type_builder.dart';
import 'types.dart';
-abstract class SsaAstBuilderBase extends CompilerTask
- implements SsaBuilderTask {
+abstract class SsaAstBuilderBase implements SsaBuilder {
+ final CompilerTask task;
final JavaScriptBackend backend;
- SsaAstBuilderBase(this.backend) : super(backend.compiler.measurer);
+ SsaAstBuilderBase(this.task, this.backend);
/// Handle field initializer of `work.element`. Returns `true` if no code
/// is needed for the field.
@@ -112,27 +112,26 @@ abstract class SsaAstBuilderBase extends CompilerTask
}
}
-class SsaAstBuilderTask extends SsaAstBuilderBase {
+class SsaAstBuilder extends SsaAstBuilderBase {
final CodeEmitterTask emitter;
final SourceInformationStrategy sourceInformationFactory;
- String get name => 'SSA builder';
-
- SsaAstBuilderTask(JavaScriptBackend backend, this.sourceInformationFactory)
+ SsaAstBuilder(CompilerTask task, JavaScriptBackend backend,
+ this.sourceInformationFactory)
: emitter = backend.emitter,
- super(backend);
+ super(task, backend);
DiagnosticReporter get reporter => backend.reporter;
HGraph build(ElementCodegenWorkItem work, ClosedWorld closedWorld) {
- return measure(() {
+ return task.measure(() {
if (handleConstantField(work, closedWorld)) {
// No code is generated for `work.element`.
return null;
}
MemberElement element = work.element.implementation;
return reporter.withCurrentElement(element, () {
- SsaBuilder builder = new SsaBuilder(
+ SsaAstGraphBuilder builder = new SsaAstGraphBuilder(
work.element.implementation,
work.resolvedAst,
work.registry,
@@ -179,7 +178,7 @@ class SsaAstBuilderTask extends SsaAstBuilderBase {
/**
* This class builds SSA nodes for functions represented in AST.
*/
-class SsaBuilder extends ast.Visitor
+class SsaAstGraphBuilder extends ast.Visitor
with
BaseImplementationOfCompoundsMixin,
BaseImplementationOfSetIfNullsMixin,
@@ -258,7 +257,7 @@ class SsaBuilder extends ast.Visitor
TypeBuilder typeBuilder;
// TODO(sigmund): make most args optional
- SsaBuilder(
+ SsaAstGraphBuilder(
this.target,
this.resolvedAst,
this.registry,
@@ -6597,7 +6596,7 @@ class SsaBuilder extends ast.Visitor
* non-literal subexpressions.
*/
class StringBuilderVisitor extends ast.Visitor {
- final SsaBuilder builder;
+ final SsaAstGraphBuilder builder;
final ast.Node diagnosticNode;
/**
« no previous file with comments | « pkg/compiler/lib/src/native/ssa.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698