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

Unified Diff: src/objects.cc

Issue 334763003: Start using OStreams. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Reformatted. Feedback addressed. Created 6 years, 6 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 | « src/log.cc ('k') | src/property.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index d66d442bab45704549d332ad96de5c7adfbadec5..c7e44e6c49fb37fdfd3fe208a53209010e944518 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -1371,37 +1371,35 @@ void Map::PrintGeneralization(FILE* file,
Representation new_representation,
HeapType* old_field_type,
HeapType* new_field_type) {
- PrintF(file, "[generalizing ");
+ OFStream os(file);
+ os << "[generalizing ";
constructor_name()->PrintOn(file);
- PrintF(file, "] ");
+ os << "] ";
Name* name = instance_descriptors()->GetKey(modify_index);
if (name->IsString()) {
String::cast(name)->PrintOn(file);
} else {
- PrintF(file, "{symbol %p}", static_cast<void*>(name));
+ os << "{symbol " << static_cast<void*>(name) << "}";
}
- PrintF(file, ":");
+ os << ":";
if (constant_to_field) {
- PrintF(file, "c");
+ os << "c";
} else {
- PrintF(file, "%s", old_representation.Mnemonic());
- PrintF(file, "{");
- old_field_type->TypePrint(file, HeapType::SEMANTIC_DIM);
- PrintF(file, "}");
- }
- PrintF(file, "->%s", new_representation.Mnemonic());
- PrintF(file, "{");
- new_field_type->TypePrint(file, HeapType::SEMANTIC_DIM);
- PrintF(file, "}");
- PrintF(file, " (");
+ os << old_representation.Mnemonic() << "{";
+ old_field_type->PrintTo(os, HeapType::SEMANTIC_DIM);
+ os << "}";
+ }
+ os << "->" << new_representation.Mnemonic() << "{";
+ new_field_type->PrintTo(os, HeapType::SEMANTIC_DIM);
+ os << "} (";
if (strlen(reason) > 0) {
- PrintF(file, "%s", reason);
+ os << reason;
} else {
- PrintF(file, "+%i maps", descriptors - split);
+ os << "+" << (descriptors - split) << " maps";
}
- PrintF(file, ") [");
+ os << ") [";
JavaScriptFrame::PrintTop(GetIsolate(), file, false, true);
- PrintF(file, "]\n");
+ os << "]\n";
}
« no previous file with comments | « src/log.cc ('k') | src/property.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698