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

Unified Diff: src/deoptimizer.cc

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: fixed gcmole issue Created 4 years, 1 month 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
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index d029fd4ff8044dfbcce9f8d96dee74e01b49efde..8db28d23027f76ebc922dc0469f13e31ac174ddf 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -2727,16 +2727,19 @@ Deoptimizer::DeoptInfo Deoptimizer::GetDeoptInfo(Code* code, Address pc) {
int last_deopt_id = kNoDeoptimizationId;
int mask = RelocInfo::ModeMask(RelocInfo::DEOPT_REASON) |
RelocInfo::ModeMask(RelocInfo::DEOPT_ID) |
- RelocInfo::ModeMask(RelocInfo::DEOPT_POSITION);
+ RelocInfo::ModeMask(RelocInfo::DEOPT_SCRIPT_OFFSET) |
+ RelocInfo::ModeMask(RelocInfo::DEOPT_INLINING_ID);
for (RelocIterator it(code, mask); !it.done(); it.next()) {
RelocInfo* info = it.rinfo();
if (info->pc() >= pc) {
return DeoptInfo(last_position, last_reason, last_deopt_id);
}
- if (info->rmode() == RelocInfo::DEOPT_POSITION) {
- int raw_position = static_cast<int>(info->data());
- last_position = raw_position ? SourcePosition::FromRaw(raw_position)
- : SourcePosition::Unknown();
+ if (info->rmode() == RelocInfo::DEOPT_SCRIPT_OFFSET) {
+ int script_offset = static_cast<int>(info->data());
+ it.next();
+ DCHECK(it.rinfo()->rmode() == RelocInfo::DEOPT_INLINING_ID);
+ int inlining_id = static_cast<int>(it.rinfo()->data());
+ last_position = SourcePosition(script_offset, inlining_id);
} else if (info->rmode() == RelocInfo::DEOPT_ID) {
last_deopt_id = static_cast<int>(info->data());
} else if (info->rmode() == RelocInfo::DEOPT_REASON) {
« src/crankshaft/hydrogen.cc ('K') | « src/debug/liveedit.cc ('k') | src/disassembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698