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

Unified Diff: vm/il_printer.cc

Issue 10735002: Add support for fixed parameters in SSA builder and fix a bug in the pre-order graph traversal. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 5 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 | « vm/flow_graph_builder.cc ('k') | vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/il_printer.cc
===================================================================
--- vm/il_printer.cc (revision 9345)
+++ vm/il_printer.cc (working copy)
@@ -57,7 +57,7 @@
void FlowGraphPrinter::PrintInstruction(Instruction* instr) {
- char str[120];
+ char str[1000];
BufferFormatter f(str, sizeof(str));
instr->PrintTo(&f);
if (FLAG_print_environments && (instr->env() != NULL)) {
@@ -68,7 +68,7 @@
void FlowGraphPrinter::PrintComputation(Computation* comp) {
- char str[120];
+ char str[1000];
BufferFormatter f(str, sizeof(str));
comp->PrintTo(&f);
OS::Print("%s", str);
@@ -109,10 +109,10 @@
f->Print(", %s, '%s'",
String::Handle(dst_type().Name()).ToCString(),
dst_name().ToCString());
- f->Print(" (instantiator:");
+ f->Print(" instantiator(");
instantiator()->PrintTo(f);
f->Print(")");
- f->Print(" (instantiator_type_arguments:");
+ f->Print(" instantiator_type_arguments(");
instantiator_type_arguments()->PrintTo(f);
f->Print(")");
}
@@ -206,10 +206,10 @@
f->Print(" %s %s",
negate_result() ? "ISNOT" : "IS",
String::Handle(type().Name()).ToCString());
- f->Print(" (instantiator:");
+ f->Print(" instantiator(");
instantiator()->PrintTo(f);
f->Print(")");
- f->Print(" (type-arg:");
+ f->Print(" type-arg(");
instantiator_type_arguments()->PrintTo(f);
f->Print(")");
}
@@ -325,10 +325,7 @@
void GraphEntryInstr::PrintTo(BufferFormatter* f) const {
f->Print("%2d: [graph]", block_id());
if (start_env_ != NULL) {
- for (intptr_t i = 0; i < start_env_->length(); ++i) {
- f->Print("\n ");
- (*start_env_)[i]->PrintTo(f);
- }
+ start_env_->PrintTo(f);
}
}
@@ -355,6 +352,11 @@
}
+void ParameterInstr::PrintTo(BufferFormatter* f) const {
+ f->Print(" v%d <- parameter(%d)", index());
+}
+
+
void TargetEntryInstr::PrintTo(BufferFormatter* f) const {
f->Print("%2d: [target", block_id());
if (HasTryIndex()) {
@@ -423,7 +425,7 @@
void FlowGraphVisualizer::Print(const char* format, ...) {
- char str[120];
+ char str[1000];
BufferFormatter f(str, sizeof(str));
f.Print("%*s", 2 * indent_, "");
va_list args;
@@ -435,7 +437,7 @@
void FlowGraphVisualizer::PrintInstruction(Instruction* instr) {
- char str[120];
+ char str[1000];
BufferFormatter f(str, sizeof(str));
instr->PrintToVisualizer(&f);
if (FLAG_print_environments && (instr->env() != NULL)) {
@@ -560,6 +562,9 @@
// or _ for instruction without result.
void GraphEntryInstr::PrintToVisualizer(BufferFormatter* f) const {
f->Print("_ [graph]");
+ if (start_env_ != NULL) {
+ start_env_->PrintTo(f);
+ }
}
@@ -596,6 +601,13 @@
}
+void ParameterInstr::PrintToVisualizer(BufferFormatter* f) const {
+ ASSERT(ssa_temp_index() != -1);
+ ASSERT(temp_index() == -1);
+ f->Print("v%d Parameter(%d)", ssa_temp_index(), index());
+}
+
+
void TargetEntryInstr::PrintToVisualizer(BufferFormatter* f) const {
f->Print("_ [target");
if (HasTryIndex()) {
« no previous file with comments | « vm/flow_graph_builder.cc ('k') | vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698