diff options
author | Jonghyun Park <parjong@gmail.com> | 2017-02-09 15:39:13 +0900 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-02-08 22:39:13 -0800 |
commit | 1163d34fe0d8c6ad7fc68b4c77a3da2eab8017d2 (patch) | |
tree | 6791dea08f0aaeea9be536fdd7801dea38f994ce /src/vm | |
parent | 1002e0fc483430933b7f7e561b4a3bd7702249d8 (diff) | |
download | coreclr-1163d34fe0d8c6ad7fc68b4c77a3da2eab8017d2.tar.gz coreclr-1163d34fe0d8c6ad7fc68b4c77a3da2eab8017d2.tar.bz2 coreclr-1163d34fe0d8c6ad7fc68b4c77a3da2eab8017d2.zip |
Clean up GetAddrOfSecurityObject (#9423)
Diffstat (limited to 'src/vm')
-rw-r--r-- | src/vm/eetwain.cpp | 12 | ||||
-rw-r--r-- | src/vm/stackwalk.cpp | 2 | ||||
-rw-r--r-- | src/vm/stackwalk.h | 2 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/vm/eetwain.cpp b/src/vm/eetwain.cpp index 2624f4cef5..340ea85e94 100644 --- a/src/vm/eetwain.cpp +++ b/src/vm/eetwain.cpp @@ -5034,7 +5034,7 @@ OBJECTREF* EECodeManager::GetAddrOfSecurityObjectFromCachedInfo(PREGDISPLAY pRD, } #endif // _TARGET_X86_ -#ifndef DACCESS_COMPILE +#if !defined(DACCESS_COMPILE) && !defined(CROSSGEN_COMPILE) OBJECTREF* EECodeManager::GetAddrOfSecurityObject(CrawlFrame *pCF) { CONTRACTL { @@ -5052,7 +5052,7 @@ OBJECTREF* EECodeManager::GetAddrOfSecurityObject(CrawlFrame *pCF) _ASSERTE(sizeof(CodeManStateBuf) <= sizeof(pState->stateBuf)); -#if defined(_TARGET_X86_) +#ifndef USE_GC_INFO_DECODER CodeManStateBuf * stateBuf = (CodeManStateBuf*)pState->stateBuf; /* Extract the necessary information from the info block header */ @@ -5070,7 +5070,7 @@ OBJECTREF* EECodeManager::GetAddrOfSecurityObject(CrawlFrame *pCF) return (OBJECTREF *)(size_t)(*pRD->GetEbpLocation() - GetSecurityObjectOffset(&stateBuf->hdrInfoBody)); } } -#elif defined(USE_GC_INFO_DECODER) && !defined(CROSSGEN_COMPILE) +#else // !USE_GC_INFO_DECODER GcInfoDecoder gcInfoDecoder( gcInfoToken, @@ -5105,13 +5105,11 @@ OBJECTREF* EECodeManager::GetAddrOfSecurityObject(CrawlFrame *pCF) OBJECTREF* pSlot = (OBJECTREF*) (spOffset + uCallerSP); return pSlot; } -#else // !_TARGET_X86_ && !(USE_GC_INFO_DECODER && !CROSSGEN_COMPILE) - PORTABILITY_ASSERT("EECodeManager::GetAddrOfSecurityObject is not implemented on this platform."); -#endif +#endif // USE_GC_INFO_DECODER return NULL; } -#endif +#endif // !DACCESS_COMPILE && !CROSSGEN_COMPILE #ifndef CROSSGEN_COMPILE /***************************************************************************** diff --git a/src/vm/stackwalk.cpp b/src/vm/stackwalk.cpp index 000930c64c..36af466e12 100644 --- a/src/vm/stackwalk.cpp +++ b/src/vm/stackwalk.cpp @@ -52,6 +52,7 @@ Assembly* CrawlFrame::GetAssembly() return pAssembly; } +#ifndef DACCESS_COMPILE OBJECTREF* CrawlFrame::GetAddrOfSecurityObject() { CONTRACTL { @@ -98,6 +99,7 @@ OBJECTREF* CrawlFrame::GetAddrOfSecurityObject() } return NULL; } +#endif BOOL CrawlFrame::IsInCalleesFrames(LPVOID stackPointer) { diff --git a/src/vm/stackwalk.h b/src/vm/stackwalk.h index f8bd519106..3de8c6acef 100644 --- a/src/vm/stackwalk.h +++ b/src/vm/stackwalk.h @@ -107,6 +107,7 @@ public: BOOL IsInCalleesFrames(LPVOID stackPointer); +#ifndef DACCESS_COMPILE /* Returns address of the securityobject stored in the current function (method?) Returns NULL if - not a function OR @@ -114,6 +115,7 @@ public: (which is an error) */ OBJECTREF * GetAddrOfSecurityObject(); +#endif // DACCESS_COMPILE // Fetch the extra type argument passed in some cases PTR_VOID GetParamTypeArg(); |