X87: More OStreamsUse OStreams more often

port r22232

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=
R=weiliang.lin@intel.com

Review URL: https://codereview.chromium.org/379493002

Patch from Chunyang Dai <chunyang.dai@intel.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 9440ed3e
......@@ -377,8 +377,9 @@ LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind) {
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);
}
......
......@@ -63,7 +63,8 @@ TEST(AssemblerIa320) {
Handle<Code> code = isolate->factory()->NewCode(
desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
#ifdef OBJECT_PRINT
code->Print();
OFStream os(stdout);
code->Print(os);
#endif
F2 f = FUNCTION_CAST<F2>(code->entry());
int res = f(3, 4);
......@@ -99,7 +100,8 @@ TEST(AssemblerIa321) {
Handle<Code> code = isolate->factory()->NewCode(
desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
#ifdef OBJECT_PRINT
code->Print();
OFStream os(stdout);
code->Print(os);
#endif
F1 f = FUNCTION_CAST<F1>(code->entry());
int res = f(100);
......@@ -139,7 +141,8 @@ TEST(AssemblerIa322) {
Handle<Code> code = isolate->factory()->NewCode(
desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
#ifdef OBJECT_PRINT
code->Print();
OFStream os(stdout);
code->Print(os);
#endif
F1 f = FUNCTION_CAST<F1>(code->entry());
int res = f(10);
......@@ -217,7 +220,8 @@ TEST(AssemblerIa329) {
Handle<Code> code = isolate->factory()->NewCode(
desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
#ifdef OBJECT_PRINT
code->Print();
OFStream os(stdout);
code->Print(os);
#endif
F7 f = FUNCTION_CAST<F7>(code->entry());
......
......@@ -375,7 +375,8 @@ TEST(DisasmIa320) {
desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
USE(code);
#ifdef OBJECT_PRINT
code->Print();
OFStream os(stdout);
code->Print(os);
byte* begin = code->instruction_start();
byte* end = begin + code->instruction_size();
disasm::Disassembler::Disassemble(stdout, begin, end);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment