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

Unified Diff: runtime/vm/deopt_instructions.cc

Issue 12049039: Fix source position for stack traces with optimized top function. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: avoid default arguments by using pending_deoptimization_env_ Created 7 years, 11 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
Index: runtime/vm/deopt_instructions.cc
===================================================================
--- runtime/vm/deopt_instructions.cc (revision 17448)
+++ runtime/vm/deopt_instructions.cc (working copy)
@@ -210,12 +210,8 @@
*to_addr = continue_at_pc;
}
- static void GetEncodedValues(intptr_t from_index,
- intptr_t* object_table_index,
- intptr_t* deopt_id) {
- *object_table_index = ObjectTableIndex::decode(from_index);
- *deopt_id = DeoptId::decode(from_index);
- }
+ intptr_t object_table_index() const { return object_table_index_; }
+ intptr_t deopt_id() const { return deopt_id_; }
private:
static const intptr_t kFieldWidth = kBitsPerWord / 2;
@@ -548,7 +544,7 @@
}
void Execute(DeoptimizationContext* deopt_context, intptr_t to_index) {
- // The deoptimization info is uncompresses by translating away suffixes
+ // The deoptimization info is uncompressed by translating away suffixes
// before executing the instructions.
UNREACHABLE();
}
@@ -575,19 +571,17 @@
}
-uword DeoptInstr::GetRetAfterAddress(intptr_t from_index,
+uword DeoptInstr::GetRetAfterAddress(DeoptInstr* instr,
const Array& object_table,
Function* func) {
+ ASSERT(instr->kind() == kRetAfterAddress);
+ DeoptRetAfterAddressInstr* ret_after_instr =
+ static_cast<DeoptRetAfterAddressInstr*>(instr);
ASSERT(!object_table.IsNull());
ASSERT(func != NULL);
- intptr_t object_table_index;
- intptr_t deopt_id;
- DeoptRetAfterAddressInstr::GetEncodedValues(from_index,
- &object_table_index,
- &deopt_id);
- *func |= object_table.At(object_table_index);
+ *func |= object_table.At(ret_after_instr->object_table_index());
srdjan 2013/01/28 18:03:58 You need to sync, there is no more |=
Florian Schneider 2013/01/29 12:19:07 Done.
const Code& code = Code::Handle(func->unoptimized_code());
- return code.GetDeoptAfterPcAtDeoptId(deopt_id);
+ return code.GetDeoptAfterPcAtDeoptId(ret_after_instr->deopt_id());
}

Powered by Google App Engine
This is Rietveld 408576698