Index: runtime/vm/stack_frame.h |
diff --git a/runtime/vm/stack_frame.h b/runtime/vm/stack_frame.h |
index 9cc7bd573ef68598eff00ab0799f337509b6b4cc..df105ab55b7d1b1bdb27d171067e2d0bf000ce56 100644 |
--- a/runtime/vm/stack_frame.h |
+++ b/runtime/vm/stack_frame.h |
@@ -51,6 +51,24 @@ class StackFrame : public ValueObject { |
return 0; |
} |
+ uword IsMarkedForLazyDeopt() const { |
+ uword raw_pc = *reinterpret_cast<uword*>( |
+ sp() + (kSavedPcSlotFromSp * kWordSize)); |
+ return raw_pc == StubCode::DeoptimizeLazyFromReturn_entry()->EntryPoint(); |
+ } |
+ void MarkForLazyDeopt() { |
+ set_pc(StubCode::DeoptimizeLazyFromReturn_entry()->EntryPoint()); |
+ } |
+ void UnmarkForLazyDeopt() { |
+ // If this frame was marked for lazy deopt, pc_ was computed to be the |
+ // original return address using the pending deopts table in GetCallerPc. |
+ // Write this value back into the frame. |
+ uword original_pc = pc(); |
+ ASSERT(original_pc != |
+ StubCode::DeoptimizeLazyFromReturn_entry()->EntryPoint()); |
+ set_pc(original_pc); |
+ } |
+ |
void set_pc(uword value) { |
*reinterpret_cast<uword*>(sp() + (kSavedPcSlotFromSp * kWordSize)) = value; |
pc_ = value; |
@@ -362,6 +380,11 @@ class InlinedFunctionsIterator : public ValueObject { |
}; |
+#if defined(DEBUG) |
+void ValidateFrames(); |
+#endif |
+ |
+ |
#if !defined(TARGET_ARCH_DBC) |
DART_FORCE_INLINE static intptr_t LocalVarIndex(intptr_t fp_offset, |
intptr_t var_index) { |