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

Unified Diff: runtime/vm/deopt_instructions.cc

Issue 11369158: Reland: Improve smi shift operations and avoid repeated deoptimizations. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/flow_graph_optimizer.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 14713)
+++ runtime/vm/deopt_instructions.cc (working copy)
@@ -5,6 +5,7 @@
#include "vm/deopt_instructions.h"
#include "vm/assembler_macros.h"
+#include "vm/code_patcher.h"
#include "vm/intermediate_language.h"
#include "vm/locations.h"
#include "vm/parser.h"
@@ -17,7 +18,8 @@
DeoptimizationContext::DeoptimizationContext(intptr_t* to_frame_start,
intptr_t to_frame_size,
const Array& object_table,
- intptr_t num_args)
+ intptr_t num_args,
+ DeoptReasonId deopt_reason)
: object_table_(object_table),
to_frame_(to_frame_start),
to_frame_size_(to_frame_size),
@@ -26,6 +28,7 @@
registers_copy_(NULL),
xmm_registers_copy_(NULL),
num_args_(num_args),
+ deopt_reason_(deopt_reason),
isolate_(Isolate::Current()) {
from_frame_ = isolate_->deopt_frame_copy();
from_frame_size_ = isolate_->deopt_frame_copy_size();
@@ -256,6 +259,15 @@
uword continue_at_pc = code.GetDeoptBeforePcAtDeoptId(deopt_id_);
intptr_t* to_addr = deopt_context->GetToFrameAddressAt(to_index);
*to_addr = continue_at_pc;
+
+ uword pc = code.GetPcForDeoptId(deopt_id_, PcDescriptors::kIcCall);
+ if (pc != 0) {
srdjan 2012/11/09 17:53:54 Maybe add a comment what is happening here, e.g.:
Florian Schneider 2012/11/09 19:56:08 Done.
+ const ICData& ic_data = ICData::Handle(
+ CodePatcher::GetInstanceCallIcDataAt(pc));
+ if (!ic_data.IsNull()) {
+ ic_data.set_deopt_reason(deopt_context->deopt_reason());
+ }
+ }
}
private:
« no previous file with comments | « runtime/vm/deopt_instructions.h ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698