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

Unified Diff: src/compiler/scheduler.cc

Issue 944223003: Use iostream formatting when printing code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/scheduler.cc
diff --git a/src/compiler/scheduler.cc b/src/compiler/scheduler.cc
index 674b89ef66762d0b5ffa5c5b052e094d3ac0d290..c933eacb7e8852c03479237c9d595d96a377303f 100644
--- a/src/compiler/scheduler.cc
+++ b/src/compiler/scheduler.cc
@@ -4,6 +4,8 @@
#include "src/compiler/scheduler.h"
+#include <iomanip>
+
#include "src/bit-vector.h"
#include "src/compiler/common-operator.h"
#include "src/compiler/control-equivalence.h"
@@ -950,17 +952,14 @@ class SpecialRPONumberer : public ZoneObject {
os << ":\n";
for (BasicBlock* block = order_; block != NULL; block = block->rpo_next()) {
- BasicBlock::Id bid = block->id();
- // TODO(jarin,svenpanne): Add formatting here once we have support for
- // that in streams (we want an equivalent of PrintF("%5d:", x) here).
- os << " " << block->rpo_number() << ":";
+ os << std::setw(5) << block->rpo_number() << ":";
for (size_t i = 0; i < loops_.size(); i++) {
bool range = loops_[i].header->LoopContains(block);
bool membership = loops_[i].header != block && range;
os << (membership ? " |" : " ");
os << (range ? "x" : " ");
}
- os << " B" << bid << ": ";
+ os << " B" << block->id() << ": ";
if (block->loop_end() != NULL) {
os << " range: [" << block->rpo_number() << ", "
<< block->loop_end()->rpo_number() << ")";
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698