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

Unified Diff: src/objects.cc

Issue 2788513004: [disasm] Print all pc offsets as hex (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 0d0e3ed0ae90d00eca5ba3a17b0c86df985367f4..c7d1292352d57c773462ef2d7e149cc397545fe9 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -14747,8 +14747,8 @@ void Code::Disassemble(const char* name, std::ostream& os) { // NOLINT
if (!it.done()) {
os << "Source positions:\n pc offset position\n";
for (; !it.done(); it.Advance()) {
- os << std::setw(10) << it.code_offset() << std::setw(10)
- << it.source_position().ScriptOffset()
+ os << std::setw(10) << std::hex << it.code_offset() << std::dec
+ << std::setw(10) << it.source_position().ScriptOffset()
<< (it.is_statement() ? " statement" : "") << "\n";
}
os << "\n";
@@ -14771,7 +14771,7 @@ void Code::Disassemble(const char* name, std::ostream& os) { // NOLINT
for (unsigned i = 0; i < table.length(); i++) {
unsigned pc_offset = table.GetPcOffset(i);
os << static_cast<const void*>(instruction_start() + pc_offset) << " ";
- os << std::setw(4) << pc_offset << " ";
+ os << std::setw(4) << std::hex << pc_offset << std::dec << " ";
table.PrintEntry(i, os);
os << " (sp -> fp) ";
SafepointEntry entry = table.GetEntry(i);
@@ -14799,8 +14799,8 @@ void Code::Disassemble(const char* name, std::ostream& os) { // NOLINT
for (uint32_t i = 0; i < back_edges.length(); i++) {
os << std::setw(6) << back_edges.ast_id(i).ToInt() << " "
- << std::setw(9) << back_edges.pc_offset(i) << " " << std::setw(10)
- << back_edges.loop_depth(i) << "\n";
+ << std::setw(9) << std::hex << back_edges.pc_offset(i) << std::dec
+ << " " << std::setw(10) << back_edges.loop_depth(i) << "\n";
}
os << "\n";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698