#ifndef DACCESS_COMPILE
+#if defined(FEATURE_PAL) && !defined(CROSSGEN_COMPILE)
+
+#define DEFINE_DTOR(klass) \
+ public: \
+ virtual ~klass() { PopIfChained(); }
+
+#else
+
+#define DEFINE_DTOR(klass)
+
+#endif // FEATURE_PAL && !CROSSGEN_COMPILE
+
#define DEFINE_VTABLE_GETTER(klass) \
public: \
static TADDR GetMethodFrameVPtr() { \
} \
klass(bool dummy) { LIMITED_METHOD_CONTRACT; }
+#define DEFINE_VTABLE_GETTER_AND_DTOR(klass) \
+ DEFINE_VTABLE_GETTER(klass) \
+ DEFINE_DTOR(klass)
+
#define DEFINE_VTABLE_GETTER_AND_CTOR(klass) \
DEFINE_VTABLE_GETTER(klass) \
protected: \
klass() { LIMITED_METHOD_CONTRACT; }
+#define DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(klass) \
+ DEFINE_VTABLE_GETTER_AND_DTOR(klass) \
+ protected: \
+ klass() { LIMITED_METHOD_CONTRACT; }
+
#else
#define DEFINE_VTABLE_GETTER(klass) \
return klass::VPtrTargetVTable(); \
} \
+#define DEFINE_VTABLE_GETTER_AND_DTOR(klass) \
+ DEFINE_VTABLE_GETTER(klass) \
+
#define DEFINE_VTABLE_GETTER_AND_CTOR(klass) \
DEFINE_VTABLE_GETTER(klass) \
+#define DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(klass) \
+ DEFINE_VTABLE_GETTER_AND_CTOR(klass) \
+
#endif // #ifndef DACCESS_COMPILE
//-----------------------------------------------------------------------------
public:
-#if defined(FEATURE_PAL) && !defined(DACCESS_COMPILE) && !defined(CROSSGEN_COMPILE)
- virtual ~Frame();
-#endif // FEATURE_PAL && !DACCESS_COMPILE && !CROSSGEN_COMPILE
-
//------------------------------------------------------------------------
// Special characteristics of a frame
//------------------------------------------------------------------------
{
LIMITED_METHOD_CONTRACT;
}
+
+#if defined(FEATURE_PAL) && !defined(DACCESS_COMPILE) && !defined(CROSSGEN_COMPILE)
+ virtual ~Frame() { LIMITED_METHOD_CONTRACT; }
+
+ void PopIfChained();
+#endif // FEATURE_PAL && !DACCESS_COMPILE && !CROSSGEN_COMPILE
};
PTR_CONTEXT m_Regs;
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(ResumableFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(ResumableFrame)
};
#endif
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(RedirectedThreadFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(RedirectedThreadFrame)
};
typedef DPTR(RedirectedThreadFrame) PTR_RedirectedThreadFrame;
virtual void UpdateRegDisplay(const PREGDISPLAY);
// Keep as last entry in class
- DEFINE_VTABLE_GETTER(FaultingExceptionFrame)
+ DEFINE_VTABLE_GETTER_AND_DTOR(FaultingExceptionFrame)
};
//-----------------------------------------------------------------------
}
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(FuncEvalFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(FuncEvalFrame)
};
typedef VPTR(FuncEvalFrame) PTR_FuncEvalFrame;
LazyMachState m_MachState; // pRetAddr points to the return address and the stack arguments
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(HelperMethodFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(HelperMethodFrame)
};
// Restores registers saved in m_MachState
PTR_OBJECTREF gcPtrs[1];
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(HelperMethodFrame_1OBJ)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(HelperMethodFrame_1OBJ)
};
PTR_OBJECTREF gcPtrs[2];
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(HelperMethodFrame_2OBJ)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(HelperMethodFrame_2OBJ)
};
UINT m_numObjRefs;
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(HelperMethodFrame_PROTECTOBJ)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(HelperMethodFrame_PROTECTOBJ)
};
class FramedMethodFrame : public TransitionFrame
TraceDestination *trace, REGDISPLAY *regs);
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(TPMethodFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(TPMethodFrame)
};
#endif // FEATURE_REMOTING
TraceDestination *trace, REGDISPLAY *regs);
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(SecureDelegateFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(SecureDelegateFrame)
};
TraceDestination *trace, REGDISPLAY *regs);
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(MulticastFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(MulticastFrame)
};
protected:
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(ComMethodFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(ComMethodFrame)
};
typedef DPTR(class ComMethodFrame) PTR_ComMethodFrame;
TraceDestination *trace, REGDISPLAY *regs);
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(ComPlusMethodFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(ComPlusMethodFrame)
};
#endif // FEATURE_COMINTEROP
}
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(PInvokeCalliFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(PInvokeCalliFrame)
};
// Some context-related forwards.
DPTR(HijackArgs) m_Args;
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(HijackFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(HijackFrame)
};
#endif // FEATURE_HIJACK
Interception GetInterception();
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(PrestubMethodFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(PrestubMethodFrame)
};
//------------------------------------------------------------------------
friend class VirtualCallStubManager;
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(StubDispatchFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(StubDispatchFrame)
};
typedef VPTR(class StubDispatchFrame) PTR_StubDispatchFrame;
#endif
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(ExternalMethodFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(ExternalMethodFrame)
};
typedef VPTR(class ExternalMethodFrame) PTR_ExternalMethodFrame;
}
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(DynamicHelperFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(DynamicHelperFrame)
};
typedef VPTR(class DynamicHelperFrame) PTR_DynamicHelperFrame;
private:
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(StubHelperFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(StubHelperFrame)
};
#endif // _TARGET_X86_
private:
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(ComPrestubMethodFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(ComPrestubMethodFrame)
};
#endif // FEATURE_COMINTEROP
BOOL m_MaybeInterior;
// Keep as last entry in class
- DEFINE_VTABLE_GETTER(GCFrame)
+ DEFINE_VTABLE_GETTER_AND_DTOR(GCFrame)
};
#ifdef FEATURE_INTERPRETER
MethodDesc* GetFunction();
#endif
- DEFINE_VTABLE_GETTER(InterpreterFrame)
+ DEFINE_VTABLE_GETTER_AND_DTOR(InterpreterFrame)
};
VOID Pop();
// Keep as last entry in class
- DEFINE_VTABLE_GETTER(GCSafeCollectionFrame)
+ DEFINE_VTABLE_GETTER_AND_DTOR(GCSafeCollectionFrame)
};
#endif // FEATURE_REMOTING
PTR_ByRefInfo m_brInfo;
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(ProtectByRefsFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(ProtectByRefsFrame)
};
ValueClassInfo *m_pVCInfo;
// Keep as last entry in class
- DEFINE_VTABLE_GETTER(ProtectValueClassFrame)
+ DEFINE_VTABLE_GETTER_AND_DTOR(ProtectValueClassFrame)
};
}
// Keep as last entry in class
- DEFINE_VTABLE_GETTER(DebuggerClassInitMarkFrame)
+ DEFINE_VTABLE_GETTER_AND_DTOR(DebuggerClassInitMarkFrame)
};
}
// Keep as last entry in class
- DEFINE_VTABLE_GETTER(DebuggerSecurityCodeMarkFrame)
+ DEFINE_VTABLE_GETTER_AND_DTOR(DebuggerSecurityCodeMarkFrame)
};
//------------------------------------------------------------------------
}
// Keep as last entry in class
- DEFINE_VTABLE_GETTER(DebuggerExitFrame)
+ DEFINE_VTABLE_GETTER_AND_DTOR(DebuggerExitFrame)
};
//---------------------------------------------------------------------------------------
}
// Keep as last entry in class
- DEFINE_VTABLE_GETTER(DebuggerU2MCatchHandlerFrame)
+ DEFINE_VTABLE_GETTER_AND_DTOR(DebuggerU2MCatchHandlerFrame)
};
protected:
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(UMThkCallFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(UMThkCallFrame)
};
#endif // _TARGET_X86_
}
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(ReverseEnterRuntimeFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(ReverseEnterRuntimeFrame)
};
//-----------------------------------------------------------------------------
#endif
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(LeaveRuntimeFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(LeaveRuntimeFrame)
};
#endif
VOID Init();
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(InlinedCallFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(InlinedCallFrame)
};
//------------------------------------------------------------------------
#endif
// Keep as last entry in class
- DEFINE_VTABLE_GETTER(ContextTransitionFrame)
+ DEFINE_VTABLE_GETTER_AND_DTOR(ContextTransitionFrame)
};
// TODO [DAVBR]: For the full fix for VsWhidbey 450273, this
private:
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(TailCallFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(TailCallFrame)
};
//------------------------------------------------------------------------
private:
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(ExceptionFilterFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(ExceptionFilterFrame)
};
#ifdef _DEBUG
OBJECTREF *m_pObjRef;
// Keep as last entry in class
- DEFINE_VTABLE_GETTER(AssumeByrefFromJITStack)
+ DEFINE_VTABLE_GETTER_AND_DTOR(AssumeByrefFromJITStack)
}; //AssumeByrefFromJITStack
#endif //_DEBUG
void SetAssembly(Assembly *pAssembly) { LIMITED_METHOD_CONTRACT; m_pAssembly = pAssembly; }
// Keep as last entry in class
- DEFINE_VTABLE_GETTER_AND_CTOR(SecurityContextFrame)
+ DEFINE_VTABLE_GETTER_AND_CTOR_AND_DTOR(SecurityContextFrame)
};