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

Unified Diff: src/objects.cc

Issue 2106843006: Dump source position tabe under --print-code (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 35f1e47155f55cb815c93e1a60ec1ad32ab2875e..626556b81889600cc453e69ca705cbd0002cf2b1 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -14333,6 +14333,17 @@ void Code::Disassemble(const char* name, std::ostream& os) { // NOLINT
}
os << "\n";
+ SourcePositionTableIterator it(source_position_table());
+ 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() << (it.is_statement() ? " statement" : "")
+ << "\n";
+ }
+ os << "\n";
+ }
+
if (kind() == FUNCTION) {
DeoptimizationOutputData* data =
DeoptimizationOutputData::cast(this->deoptimization_data());
« 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