Reviewers: danno, Sven Panne, Paul Lind, kisg, palfia, dusmil,
Description:
MIPS: More OStreamsUse OStreams more often.
Port r22232 (f837b91)
Original commit message:
This is a mostly mechanical CL (more than 90% Emacs macros and
query-replace-regexp) moving FILE*/StringStream*-based APIs to
OStream-based APIs. There are a few places where this had to stop,
otherwise the CL would be even bigger, but this can easily and
incrementally cleaned up later.
BUG=
Please review this at https://codereview.chromium.org/373773002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+9, -7 lines):
M src/mips/lithium-mips.cc
M src/mips/simulator-mips.cc
Index: src/mips/lithium-mips.cc
diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc
index
7f2a47fd4ccc6090d0c0a54baed9c1b3e4ccf635..f264f6248ec7f4fe13ce40ad326d94c9d5d9c0db
100644
--- a/src/mips/lithium-mips.cc
+++ b/src/mips/lithium-mips.cc
@@ -322,8 +322,9 @@ void LAccessArgumentsAt::PrintDataTo(StringStream*
stream) {
void LStoreNamedField::PrintDataTo(StringStream* stream) {
object()->PrintTo(stream);
- hydrogen()->access().PrintTo(stream);
- stream->Add(" <- ");
+ OStringStream os;
+ os << hydrogen()->access() << " <- ";
+ stream->Add(os.c_str());
value()->PrintTo(stream);
}
Index: src/mips/simulator-mips.cc
diff --git a/src/mips/simulator-mips.cc b/src/mips/simulator-mips.cc
index
f329703517886f0564bfe47a9d8df567c48b29bf..052eaed8272f7224d1fc7830dc92c48770cb108f
100644
--- a/src/mips/simulator-mips.cc
+++ b/src/mips/simulator-mips.cc
@@ -455,17 +455,18 @@ void MipsDebugger::Debug() {
|| (strcmp(cmd, "printobject") == 0)) {
if (argc == 2) {
int32_t value;
+ OFStream os(stdout);
if (GetValue(arg1, &value)) {
Object* obj = reinterpret_cast<Object*>(value);
- PrintF("%s: \n", arg1);
+ os << arg1 << ": \n";
#ifdef DEBUG
- obj->PrintLn();
+ obj->Print(os);
+ os << "\n";
#else
- obj->ShortPrint();
- PrintF("\n");
+ os << Brief(obj) << "\n";
#endif
} else {
- PrintF("%s unrecognized\n", arg1);
+ os << arg1 << " unrecognized\n";
}
} else {
PrintF("printobject <value>\n");
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.