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

Unified Diff: pkg/compiler/lib/src/ssa/ssa_tracer.dart

Issue 2575083002: Pass ClosedWorld directly to codegen tasks (Closed)
Patch Set: Updated cf. comment. Created 4 years 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/ssa/ssa.dart ('k') | pkg/compiler/lib/src/ssa/types_propagation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/ssa_tracer.dart
diff --git a/pkg/compiler/lib/src/ssa/ssa_tracer.dart b/pkg/compiler/lib/src/ssa/ssa_tracer.dart
index ce13448c4292431c069444aa22b8dcf039ccdabf..df84e84e296cf6464f7d08e633e50805b35206c9 100644
--- a/pkg/compiler/lib/src/ssa/ssa_tracer.dart
+++ b/pkg/compiler/lib/src/ssa/ssa_tracer.dart
@@ -6,9 +6,8 @@ library ssa.tracer;
import 'dart:async' show EventSink;
-import '../compiler.dart' show Compiler;
import '../diagnostics/invariant.dart' show DEBUG_MODE;
-import '../js_backend/js_backend.dart';
+import '../js_backend/namer.dart' show Namer;
import '../tracer.dart';
import '../world.dart' show ClosedWorld;
import 'nodes.dart';
@@ -19,10 +18,11 @@ import 'nodes.dart';
* to enable it.
*/
class HTracer extends HGraphVisitor with TracerUtil {
- Compiler compiler;
+ final ClosedWorld closedWorld;
+ final Namer namer;
final EventSink<String> output;
- HTracer(this.output, this.compiler);
+ HTracer(this.output, this.closedWorld, this.namer);
void traceGraph(String name, HGraph graph) {
DEBUG_MODE = true;
@@ -76,7 +76,7 @@ class HTracer extends HGraphVisitor with TracerUtil {
void visitBasicBlock(HBasicBlock block) {
HInstructionStringifier stringifier =
- new HInstructionStringifier(block, compiler);
+ new HInstructionStringifier(block, closedWorld, namer);
assert(block.id != null);
tag("block", () {
printProperty("name", "B${block.id}");
@@ -113,12 +113,11 @@ class HTracer extends HGraphVisitor with TracerUtil {
}
class HInstructionStringifier implements HVisitor<String> {
- final Compiler compiler;
+ final ClosedWorld closedWorld;
+ final Namer namer;
final HBasicBlock currentBlock;
- HInstructionStringifier(this.currentBlock, this.compiler);
-
- ClosedWorld get closedWorld => compiler.closedWorld;
+ HInstructionStringifier(this.currentBlock, this.closedWorld, this.namer);
visit(HInstruction node) => '${node.accept(this)} ${node.instructionType}';
@@ -295,9 +294,7 @@ class HInstructionStringifier implements HVisitor<String> {
String visitInterceptor(HInterceptor node) {
String value = temporaryId(node.inputs[0]);
if (node.interceptedClasses != null) {
- JavaScriptBackend backend = compiler.backend;
- String cls =
- backend.namer.suffixForGetInterceptor(node.interceptedClasses);
+ String cls = namer.suffixForGetInterceptor(node.interceptedClasses);
return "Interceptor ($cls): $value";
}
return "Interceptor: $value";
« no previous file with comments | « pkg/compiler/lib/src/ssa/ssa.dart ('k') | pkg/compiler/lib/src/ssa/types_propagation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698