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

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

Issue 2563443007: Reduce use of Compiler.closedWorld (Closed)
Patch Set: 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_branch_builder.dart ('k') | pkg/compiler/lib/src/ssa/type_builder.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 6c1d54319cda1ed02834769ddab0eef52d484694..ce13448c4292431c069444aa22b8dcf039ccdabf 100644
--- a/pkg/compiler/lib/src/ssa/ssa_tracer.dart
+++ b/pkg/compiler/lib/src/ssa/ssa_tracer.dart
@@ -10,6 +10,7 @@ import '../compiler.dart' show Compiler;
import '../diagnostics/invariant.dart' show DEBUG_MODE;
import '../js_backend/js_backend.dart';
import '../tracer.dart';
+import '../world.dart' show ClosedWorld;
import 'nodes.dart';
/**
@@ -117,6 +118,8 @@ class HInstructionStringifier implements HVisitor<String> {
HInstructionStringifier(this.currentBlock, this.compiler);
+ ClosedWorld get closedWorld => compiler.closedWorld;
+
visit(HInstruction node) => '${node.accept(this)} ${node.instructionType}';
String temporaryId(HInstruction instruction) {
@@ -125,27 +128,27 @@ class HInstructionStringifier implements HVisitor<String> {
prefix = 'u';
} else if (instruction.isConflicting()) {
prefix = 'c';
- } else if (instruction.isExtendableArray(compiler)) {
+ } else if (instruction.isExtendableArray(closedWorld)) {
prefix = 'e';
- } else if (instruction.isFixedArray(compiler)) {
+ } else if (instruction.isFixedArray(closedWorld)) {
prefix = 'f';
- } else if (instruction.isMutableArray(compiler)) {
+ } else if (instruction.isMutableArray(closedWorld)) {
prefix = 'm';
- } else if (instruction.isReadableArray(compiler)) {
+ } else if (instruction.isReadableArray(closedWorld)) {
prefix = 'a';
- } else if (instruction.isString(compiler)) {
+ } else if (instruction.isString(closedWorld)) {
prefix = 's';
- } else if (instruction.isIndexablePrimitive(compiler)) {
+ } else if (instruction.isIndexablePrimitive(closedWorld)) {
prefix = 'r';
- } else if (instruction.isBoolean(compiler)) {
+ } else if (instruction.isBoolean(closedWorld)) {
prefix = 'b';
- } else if (instruction.isInteger(compiler)) {
+ } else if (instruction.isInteger(closedWorld)) {
prefix = 'i';
- } else if (instruction.isDouble(compiler)) {
+ } else if (instruction.isDouble(closedWorld)) {
prefix = 'd';
- } else if (instruction.isNumber(compiler)) {
+ } else if (instruction.isNumber(closedWorld)) {
prefix = 'n';
- } else if (instruction.instructionType.containsAll(compiler.closedWorld)) {
+ } else if (instruction.instructionType.containsAll(closedWorld)) {
prefix = 'v';
} else {
prefix = 'U';
« no previous file with comments | « pkg/compiler/lib/src/ssa/ssa_branch_builder.dart ('k') | pkg/compiler/lib/src/ssa/type_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698