Dump source position tabe under --print-code

BUG=v8:5117
R=yangguo

Review-Url: https://codereview.chromium.org/2106843006
Cr-Commit-Position: refs/heads/master@{#37411}
This commit is contained in:
alph 2016-06-29 21:39:02 -07:00 committed by Commit bot
parent 75077703d9
commit 561be7bb81

View File

@ -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());