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

Unified Diff: src/runtime/runtime-interpreter.cc

Issue 1803373002: [interpreter] Print bytecode offsets when dumping bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 4 years, 8 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/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-interpreter.cc
diff --git a/src/runtime/runtime-interpreter.cc b/src/runtime/runtime-interpreter.cc
index 22ae9113d81cf087e1c526a17f227ad349153973..854cead4e593522b06fd6b6996c542de52298ccf 100644
--- a/src/runtime/runtime-interpreter.cc
+++ b/src/runtime/runtime-interpreter.cc
@@ -117,10 +117,10 @@ RUNTIME_FUNCTION(Runtime_InterpreterTraceBytecodeEntry) {
AdvanceToOffsetForTracing(bytecode_iterator, offset);
if (offset == bytecode_iterator.current_offset()) {
// Print bytecode.
- const uint8_t* bytecode_address =
- reinterpret_cast<const uint8_t*>(*bytecode_array) + bytecode_offset;
- os << " -> " << static_cast<const void*>(bytecode_address)
- << " (" << bytecode_offset << ") : ";
+ const uint8_t* base_address = bytecode_array->GetFirstBytecodeAddress();
+ const uint8_t* bytecode_address = base_address + offset;
+ os << " -> " << static_cast<const void*>(bytecode_address) << " @ "
+ << std::setw(4) << offset << " : ";
interpreter::Bytecodes::Decode(os, bytecode_address,
bytecode_array->parameter_count());
os << std::endl;
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698