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

Unified Diff: runtime/vm/deopt_instructions.cc

Issue 11833025: Fix for issue 7757 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
« no previous file with comments | « runtime/vm/deopt_instructions.h ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/deopt_instructions.cc
===================================================================
--- runtime/vm/deopt_instructions.cc (revision 16999)
+++ runtime/vm/deopt_instructions.cc (working copy)
@@ -209,6 +209,13 @@
*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);
+ }
+
private:
static const intptr_t kFieldWidth = kBitsPerWord / 2;
class ObjectTableIndex : public BitField<intptr_t, 0, kFieldWidth> { };
@@ -563,6 +570,22 @@
}
+uword DeoptInstr::GetRetAfterAddress(intptr_t from_index,
+ const Array& object_table,
+ Function* func) {
+ 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);
+ const Code& code = Code::Handle(func->unoptimized_code());
+ return code.GetDeoptAfterPcAtDeoptId(deopt_id);
+}
+
+
DeoptInstr* DeoptInstr::Create(intptr_t kind_as_int, intptr_t from_index) {
Kind kind = static_cast<Kind>(kind_as_int);
switch (kind) {
« no previous file with comments | « runtime/vm/deopt_instructions.h ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698