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

Unified Diff: runtime/vm/stack_frame.cc

Issue 171513003: Don't forget to subtract materialization instructions when computing the offset of the frame pointe… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 | « runtime/vm/stack_frame.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stack_frame.cc
diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc
index 76b4370419c6ea496a21d1d34925d92894478a51..14ca89247eb37a5fc22fd938e4186d754621e731 100644
--- a/runtime/vm/stack_frame.cc
+++ b/runtime/vm/stack_frame.cc
@@ -365,6 +365,7 @@ EntryFrame* StackFrameIterator::NextEntryFrame() {
InlinedFunctionsIterator::InlinedFunctionsIterator(const Code& code, uword pc)
: index_(0),
+ num_materializations_(0),
code_(Code::Handle(code.raw())),
deopt_info_(DeoptInfo::Handle()),
function_(Function::Handle()),
@@ -385,7 +386,11 @@ InlinedFunctionsIterator::InlinedFunctionsIterator(const Code& code, uword pc)
// Unpack deopt info into instructions (translate away suffixes).
const Array& deopt_table = Array::Handle(code_.deopt_info_array());
ASSERT(!deopt_table.IsNull());
+
+ const intptr_t translation_len = deopt_info_.TranslationLength();
deopt_info_.ToInstructions(deopt_table, &deopt_instructions_);
+ const intptr_t frame_size = deopt_info_.FrameSize();
+ num_materializations_ = translation_len - frame_size;
Cutch 2014/02/18 23:44:09 Put in an accessor for this.
turnidge 2014/02/19 00:55:54 Done.
object_table_ = code_.object_table();
Advance();
}
@@ -426,7 +431,7 @@ intptr_t InlinedFunctionsIterator::GetDeoptFpOffset() const {
index++) {
DeoptInstr* deopt_instr = deopt_instructions_[index];
if (deopt_instr->kind() == DeoptInstr::kCallerFp) {
- return index;
+ return (index - num_materializations_);
}
}
UNREACHABLE();
« no previous file with comments | « runtime/vm/stack_frame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698