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

Unified Diff: runtime/vm/il_printer.cc

Issue 10912120: Restoring assert that deopt_id() should be accessed only if the instruction can deoptimize. Print r… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « runtime/vm/il_printer.h ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/il_printer.cc
===================================================================
--- runtime/vm/il_printer.cc (revision 11927)
+++ runtime/vm/il_printer.cc (working copy)
@@ -59,13 +59,19 @@
void FlowGraphPrinter::PrintInstruction(Instruction* instr) {
+ PrintOneInstruction(instr, print_locations_);
+}
+
+
+void FlowGraphPrinter::PrintOneInstruction(Instruction* instr,
+ bool print_locations) {
char str[1000];
BufferFormatter f(str, sizeof(str));
instr->PrintTo(&f);
if (FLAG_print_environments && (instr->env() != NULL)) {
instr->env()->PrintTo(&f);
}
- if (print_locations_ && (instr->locs() != NULL)) {
+ if (print_locations && (instr->locs() != NULL)) {
instr->locs()->PrintTo(&f);
}
if (instr->lifetime_position() != -1) {
@@ -125,7 +131,10 @@
void Definition::PrintTo(BufferFormatter* f) const {
// Do not access 'deopt_id()' as it asserts that the computation can
// deoptimize.
- f->Print("%s:%"Pd"(", DebugName(), deopt_id());
+ if (HasSSATemp()) {
+ f->Print("v%"Pd" <- ", ssa_temp_index());
+ }
+ f->Print("%s:%"Pd"(", DebugName(), deopt_id_);
PrintOperandsTo(f);
f->Print(")");
}
@@ -471,7 +480,7 @@
void PhiInstr::PrintTo(BufferFormatter* f) const {
- f->Print(" v%"Pd" <- phi(", ssa_temp_index());
+ f->Print(" v%"Pd" <- phi(", ssa_temp_index());
for (intptr_t i = 0; i < inputs_.length(); ++i) {
if (inputs_[i] != NULL) inputs_[i]->PrintTo(f);
if (i < inputs_.length() - 1) f->Print(", ");
@@ -510,7 +519,7 @@
void ReturnInstr::PrintTo(BufferFormatter* f) const {
- f->Print(" %s:%"Pd" ", DebugName(), deopt_id());
+ f->Print(" %s ", DebugName());
value()->PrintTo(f);
}
@@ -740,7 +749,7 @@
void ReturnInstr::PrintToVisualizer(BufferFormatter* f) const {
- f->Print("_ %s:%"Pd" ", DebugName(), deopt_id());
+ f->Print("_ %s ", DebugName());
value()->PrintTo(f);
}
« no previous file with comments | « runtime/vm/il_printer.h ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698