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

Unified Diff: runtime/vm/deopt_instructions.cc

Issue 254723003: Remember all deopt reasons in ic_data, not just the last one. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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 35415)
+++ runtime/vm/deopt_instructions.cc (working copy)
@@ -44,12 +44,12 @@
deferred_objects_(NULL) {
object_table_ = code.object_table();
- intptr_t deopt_reason = kDeoptUnknown;
+ DeoptReasonId deopt_reason = kDeoptUnknown;
const DeoptInfo& deopt_info =
DeoptInfo::Handle(code.GetDeoptInfoAtPc(frame->pc(), &deopt_reason));
ASSERT(!deopt_info.IsNull());
deopt_info_ = deopt_info.raw();
- deopt_reason_ = static_cast<DeoptReasonId>(deopt_reason);
+ deopt_reason_ = deopt_reason;
const Function& function = Function::Handle(code.function());
@@ -96,7 +96,7 @@
if (FLAG_trace_deoptimization || FLAG_trace_deoptimization_verbose) {
OS::PrintErr(
- "Deoptimizing (reason %" Pd " '%s') at pc %#" Px " '%s' (count %d)\n",
+ "Deoptimizing (reason %d '%s') at pc %#" Px " '%s' (count %d)\n",
deopt_reason,
DeoptReasonToText(deopt_reason_),
frame->pc(),
@@ -615,7 +615,7 @@
ICData& ic_data = ICData::Handle();
CodePatcher::GetInstanceCallAt(pc, code, &ic_data);
if (!ic_data.IsNull()) {
- ic_data.set_deopt_reason(deopt_context->deopt_reason());
+ ic_data.AddDeoptReason(deopt_context->deopt_reason());
}
} else if (deopt_context->deopt_reason() == kDeoptHoistedCheckClass) {
// Prevent excessive deoptimization.

Powered by Google App Engine
This is Rietveld 408576698