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

Unified Diff: runtime/vm/deopt_instructions.cc

Issue 1192103004: VM: New calling convention for generated code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixed comments Created 5 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/disassembler_arm.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 d6e2568a9856fe51b78a38b57cc1319986d4f4ac..79f08d8f01e1a354a6edb0827ed74d3bc0231ce5 100644
--- a/runtime/vm/deopt_instructions.cc
+++ b/runtime/vm/deopt_instructions.cc
@@ -26,7 +26,8 @@ DeoptContext::DeoptContext(const StackFrame* frame,
const Code& code,
DestFrameOptions dest_options,
fpu_register_t* fpu_registers,
- intptr_t* cpu_registers)
+ intptr_t* cpu_registers,
+ bool is_lazy_deopt)
: code_(code.raw()),
object_pool_(code.GetObjectPool()),
deopt_info_(TypedData::null()),
@@ -45,7 +46,8 @@ DeoptContext::DeoptContext(const StackFrame* frame,
timeline_event_(NULL),
deferred_slots_(NULL),
deferred_objects_count_(0),
- deferred_objects_(NULL) {
+ deferred_objects_(NULL),
+ is_lazy_deopt_(is_lazy_deopt) {
const TypedData& deopt_info = TypedData::Handle(
code.GetDeoptInfoAtPc(frame->pc(), &deopt_reason_, &deopt_flags_));
ASSERT(!deopt_info.IsNull());
@@ -651,7 +653,16 @@ class DeoptPcMarkerInstr : public DeoptInstr {
}
void Execute(DeoptContext* deopt_context, intptr_t* dest_addr) {
- *dest_addr = Smi::RawValue(0);
+ Function& function = Function::Handle(deopt_context->zone());
+ function ^= deopt_context->ObjectAt(object_table_index_);
+ if (function.IsNull()) {
+ *reinterpret_cast<RawObject**>(dest_addr) = deopt_context->is_lazy_deopt()
+ ? StubCode::DeoptimizeLazy_entry()->code()
+ : StubCode::Deoptimize_entry()->code();
+ return;
+ }
+
+ *dest_addr = reinterpret_cast<intptr_t>(Object::null());
deopt_context->DeferPcMarkerMaterialization(
object_table_index_, dest_addr);
}
« no previous file with comments | « runtime/vm/deopt_instructions.h ('k') | runtime/vm/disassembler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698