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

Unified Diff: runtime/vm/stack_frame.h

Issue 2396433003: Lazy deopt: (Closed)
Patch Set: . Created 4 years, 2 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/exceptions.cc ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698