Chromium Code Reviews| 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(); |