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

Unified Diff: runtime/vm/deopt_instructions.cc

Issue 12806007: Add asserts to catch missing deoptimization info early. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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/code_patcher.cc ('k') | no next file » | 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 20298)
+++ runtime/vm/deopt_instructions.cc (working copy)
@@ -277,7 +277,9 @@
function ^= deopt_context->ObjectAt(object_table_index_);
const Code& code =
Code::Handle(deopt_context->isolate(), function.unoptimized_code());
+ ASSERT(!code.IsNull());
uword continue_at_pc = code.GetDeoptAfterPcAtDeoptId(deopt_id_);
+ ASSERT(continue_at_pc != 0);
intptr_t* to_addr = deopt_context->GetToFrameAddressAt(to_index);
*to_addr = continue_at_pc;
}
@@ -332,7 +334,9 @@
function ^= deopt_context->ObjectAt(object_table_index_);
const Code& code =
Code::Handle(deopt_context->isolate(), function.unoptimized_code());
+ ASSERT(!code.IsNull());
uword continue_at_pc = code.GetDeoptBeforePcAtDeoptId(deopt_id_);
+ ASSERT(continue_at_pc != 0);
intptr_t* to_addr = deopt_context->GetToFrameAddressAt(to_index);
*to_addr = continue_at_pc;
@@ -585,7 +589,7 @@
// function occurring in the optimized frame.
function.set_deoptimization_counter(function.deoptimization_counter() + 1);
if (FLAG_trace_deoptimization) {
- OS::PrintErr("Deoptimizing inlined %s (count %d)\n",
+ OS::PrintErr("Deoptimizing %s (count %d)\n",
function.ToFullyQualifiedCString(),
function.deoptimization_counter());
}
@@ -719,7 +723,10 @@
ASSERT(func != NULL);
*func ^= object_table.At(ret_after_instr->object_table_index());
const Code& code = Code::Handle(func->unoptimized_code());
- return code.GetDeoptAfterPcAtDeoptId(ret_after_instr->deopt_id());
+ ASSERT(!code.IsNull());
+ uword res = code.GetDeoptAfterPcAtDeoptId(ret_after_instr->deopt_id());
+ ASSERT(res != 0);
+ return res;
}
« no previous file with comments | « runtime/vm/code_patcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698