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

Unified Diff: runtime/vm/deopt_instructions.cc

Issue 10952002: Reapply "Deoptimization support in inlined code." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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/flow_graph.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/deopt_instructions.cc
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index 2222143a3b36094ca1c6d72cb51bb4c413ebda8b..9419411099cbfb0eb736e04b768344f3a508ba96 100644
--- a/runtime/vm/deopt_instructions.cc
+++ b/runtime/vm/deopt_instructions.cc
@@ -28,16 +28,25 @@ DeoptimizationContext::DeoptimizationContext(intptr_t* to_frame_start,
from_frame_size_ = isolate_->deopt_frame_copy_size();
registers_copy_ = isolate_->deopt_cpu_registers_copy();
xmm_registers_copy_ = isolate_->deopt_xmm_registers_copy();
+ caller_fp_ = GetFromFp();
}
-intptr_t* DeoptimizationContext::GetFromFpAddress() const {
- return &from_frame_[from_frame_size_ - 1 - num_args_ - 1];
+intptr_t DeoptimizationContext::GetFromFp() const {
+ return from_frame_[from_frame_size_ - 1 - num_args_ - 1];
}
-intptr_t* DeoptimizationContext::GetFromPcAddress() const {
- return &from_frame_[from_frame_size_ - 1 - num_args_];
+intptr_t DeoptimizationContext::GetFromPc() const {
+ return from_frame_[from_frame_size_ - 1 - num_args_];
+}
+
+intptr_t DeoptimizationContext::GetCallerFp() const {
+ return caller_fp_;
+}
+
+void DeoptimizationContext::SetCallerFp(intptr_t caller_fp) {
+ caller_fp_ = caller_fp;
}
// Deoptimization instruction moving value from optimized frame at
@@ -334,9 +343,10 @@ class DeoptCallerFpInstr : public DeoptInstr {
}
void Execute(DeoptimizationContext* deopt_context, intptr_t to_index) {
- intptr_t* from_addr = deopt_context->GetFromFpAddress();
+ intptr_t from = deopt_context->GetCallerFp();
intptr_t* to_addr = deopt_context->GetToFrameAddressAt(to_index);
- *to_addr = *from_addr;
+ *to_addr = from;
+ deopt_context->SetCallerFp(reinterpret_cast<intptr_t>(to_addr));
}
private:
@@ -358,9 +368,9 @@ class DeoptCallerPcInstr : public DeoptInstr {
}
void Execute(DeoptimizationContext* deopt_context, intptr_t to_index) {
- intptr_t* from_addr = deopt_context->GetFromPcAddress();
+ intptr_t from = deopt_context->GetFromPc();
intptr_t* to_addr = deopt_context->GetToFrameAddressAt(to_index);
- *to_addr = *from_addr;
+ *to_addr = from;
}
private:
« no previous file with comments | « runtime/vm/deopt_instructions.h ('k') | runtime/vm/flow_graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698