Revision: 22259
Author: [email protected]
Date: Tue Jul 8 05:24:52 2014 UTC
Log: 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=
[email protected]
Review URL: https://codereview.chromium.org/379493002
Patch from Chunyang Dai <[email protected]>.
http://code.google.com/p/v8/source/detail?r=22259
Modified:
/branches/bleeding_edge/src/x87/lithium-x87.cc
/branches/bleeding_edge/test/cctest/test-assembler-x87.cc
/branches/bleeding_edge/test/cctest/test-disasm-x87.cc
=======================================
--- /branches/bleeding_edge/src/x87/lithium-x87.cc Tue Jul 1 13:34:18 2014
UTC
+++ /branches/bleeding_edge/src/x87/lithium-x87.cc Tue Jul 8 05:24:52 2014
UTC
@@ -377,8 +377,9 @@
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);
}
=======================================
--- /branches/bleeding_edge/test/cctest/test-assembler-x87.cc Mon Jun 30
13:25:46 2014 UTC
+++ /branches/bleeding_edge/test/cctest/test-assembler-x87.cc Tue Jul 8
05:24:52 2014 UTC
@@ -63,7 +63,8 @@
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 @@
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 @@
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 @@
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());
=======================================
--- /branches/bleeding_edge/test/cctest/test-disasm-x87.cc Tue Jun 3
08:12:43 2014 UTC
+++ /branches/bleeding_edge/test/cctest/test-disasm-x87.cc Tue Jul 8
05:24:52 2014 UTC
@@ -375,7 +375,8 @@
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);
--
--
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.