Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index aa098d6005eadf3fc4ffef7e5c3b5cab93f54fc2..193dcc4c90d98fc31e064d69a4ec5ccfe09234f7 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -14977,7 +14977,6 @@ int BytecodeArray::SourceStatementPosition(int offset) { |
void BytecodeArray::Disassemble(std::ostream& os) { |
os << "Parameter count " << parameter_count() << "\n"; |
os << "Frame size " << frame_size() << "\n"; |
- Vector<char> buf = Vector<char>::New(50); |
const uint8_t* base_address = GetFirstBytecodeAddress(); |
interpreter::SourcePositionTableIterator source_positions( |
@@ -14993,12 +14992,13 @@ void BytecodeArray::Disassemble(std::ostream& os) { |
os << " "; |
} |
const uint8_t* current_address = base_address + iterator.current_offset(); |
- SNPrintF(buf, "%p", current_address); |
- os << buf.start() << " : "; |
+ os << reinterpret_cast<const void*>(current_address) << " " << std::setw(4) |
+ << iterator.current_offset() << " : "; |
rmcilroy
2016/03/17 11:29:37
It's difficult to tell what this looks like when r
Michael Starzinger
2016/03/17 11:51:14
I went with this formatting because it is the same
rmcilroy
2016/03/17 13:17:08
@ symbols sound good to me, let's go with that.
Michael Starzinger
2016/04/08 13:49:29
Done.
|
interpreter::Bytecodes::Decode(os, current_address, parameter_count()); |
if (interpreter::Bytecodes::IsJump(iterator.current_bytecode())) { |
- SNPrintF(buf, " (%p)", base_address + iterator.GetJumpTargetOffset()); |
- os << buf.start(); |
+ const void* jump_target = base_address + iterator.GetJumpTargetOffset(); |
+ os << " (" << jump_target << " / " << iterator.GetJumpTargetOffset() |
+ << ")"; |
} |
os << std::endl; |
iterator.Advance(); |