diff options
author | Scott Mosier <smosier@microsoft.com> | 2016-06-15 01:58:38 +0300 |
---|---|---|
committer | Scott Mosier <smosier@microsoft.com> | 2016-06-15 01:58:38 +0300 |
commit | a0124b03284c2f790a36d1e671c72a6a186b7a7a (patch) | |
tree | d0cd5e970391825ee453ccf553df5b204772f919 /src/Native/Runtime/RHCodeMan.h | |
parent | 1c852985291c3828c169264408f81bbe1fd9c4c7 (diff) |
ICodeManager refactoring to support separated funclets
Today, we assume that funclets are separate methods, in the sense that they get unique unwind information, but that's where the separation ends. They are still tightly coupled to their "parent method" in other ways. One of those couplings is the fact that they must be laid out contiguously with the parent method. These changes update the EH dispatcher and the ICodeManager abstraction to allow for funclets to be disconnected from their parent method. This mostly falls into the category of using addresses instead of offsets when referring to handlers and when handling the special case of "remapping" a hardware fault location to a safe point in an associated handler.
[tfs-changeset: 1612757]
Diffstat (limited to 'src/Native/Runtime/RHCodeMan.h')
-rw-r--r-- | src/Native/Runtime/RHCodeMan.h | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/src/Native/Runtime/RHCodeMan.h b/src/Native/Runtime/RHCodeMan.h index 049ec89d3..96da747e4 100644 --- a/src/Native/Runtime/RHCodeMan.h +++ b/src/Native/Runtime/RHCodeMan.h @@ -34,6 +34,19 @@ public: EEMethodInfo * GetEEMethodInfo(MethodInfo * pMethodInfo); +struct MethodGcInfoPointers +{ + GCInfoHeader * m_pGCInfoHeader; + PTR_UInt8 m_pbEncodedSafePointList; + PTR_UInt8 m_pbCallsiteStringBlob; + PTR_UInt8 m_pbDeltaShortcutTable; + + GCInfoHeader * GetGCInfoHeader() + { + return m_pGCInfoHeader; + } +}; + class EECodeManager { public: @@ -43,12 +56,10 @@ public: multiple times (but all differenct references pointing to the same object have to be individually enumerated). */ - static void EnumGcRefs(EEMethodInfo * pMethodInfo, + static void EnumGcRefs(MethodGcInfoPointers * pMethodInfo, UInt32 codeOffset, REGDISPLAY * pContext, - GCEnumContext * hCallback, - PTR_UInt8 pbCallsiteStringBlob, - PTR_UInt8 pbDeltaShortcutTable); + GCEnumContext * hCallback); /* Unwind the current stack frame, i.e. update the virtual register @@ -58,26 +69,28 @@ public: registers are trashed) Returns success of operation. */ - static bool UnwindStackFrame(EEMethodInfo * pMethodInfo, - UInt32 codeOffset, + static bool UnwindStackFrame(GCInfoHeader * pInfoHeader, REGDISPLAY * pContext); - static PTR_VOID GetReversePInvokeSaveFrame(EEMethodInfo * pMethodInfo, + static PTR_VOID GetReversePInvokeSaveFrame(GCInfoHeader * pInfoHeader, REGDISPLAY * pContext); - static UIntNative GetConservativeUpperBoundForOutgoingArgs(EEMethodInfo * pMethodInfo, + static UIntNative GetConservativeUpperBoundForOutgoingArgs(GCInfoHeader * pInfoHeader, REGDISPLAY * pContext); - static PTR_VOID GetFramePointer(EEMethodInfo * pMethodInfo, + static PTR_VOID GetFramePointer(GCInfoHeader * pInfoHeader, REGDISPLAY * pContext); - static PTR_PTR_VOID GetReturnAddressLocationForHijack(EEMethodInfo * pMethodInfo, - UInt32 codeOffset, - REGDISPLAY * pContext); + static PTR_PTR_VOID GetReturnAddressLocationForHijack(GCInfoHeader * pGCInfoHeader, + UInt32 cbMethodCodeSize, + PTR_UInt8 pbEpilogTable, + UInt32 codeOffset, + REGDISPLAY * pContext); - static GCRefKind GetReturnValueKind(EEMethodInfo * pMethodInfo); + static GCRefKind GetReturnValueKind(GCInfoHeader * pInfoHeader); - static bool GetEpilogOffset(EEMethodInfo * pMethodInfo, UInt32 codeOffset, UInt32 * epilogOffsetOut, UInt32 * epilogSizeOut); + static bool GetEpilogOffset(GCInfoHeader * pInfoHeader, UInt32 cbMethodCodeSize, PTR_UInt8 pbEpilogTable, + UInt32 codeOffset, UInt32 * epilogOffsetOut, UInt32 * epilogSizeOut); static void ** GetReturnAddressLocationFromEpilog(GCInfoHeader * pInfoHeader, REGDISPLAY * pContext, UInt32 epilogOffset, UInt32 epilogSize); |