From: Jan Kotas Date: Mon, 24 Oct 2016 04:31:29 +0000 (-0700) Subject: Simplify GCINFODECODER_CONTRACT X-Git-Tag: accepted/tizen/base/20180629.140029~3264^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c490aa1355fc4db332124c089d787d673cfae9bc;p=platform%2Fupstream%2Fcoreclr.git Simplify GCINFODECODER_CONTRACT --- diff --git a/src/gcdump/gcdumpnonx86.cpp b/src/gcdump/gcdumpnonx86.cpp index c2f41c9..ca8cc75 100644 --- a/src/gcdump/gcdumpnonx86.cpp +++ b/src/gcdump/gcdumpnonx86.cpp @@ -520,7 +520,7 @@ void GCDump::DumpPtrsInFrame(PTR_CBYTE gcInfoBlock, #define LOG(x) ((void)0) #endif -#define GCINFODECODER_CONTRACT(contract) +#define GCINFODECODER_CONTRACT ((void)0) #define GET_CALLER_SP(pREGDISPLAY) ((size_t)GetSP(pREGDISPLAY->pCallerContext)) #define VALIDATE_OBJECTREF(objref, fDeep) ((void)0) #define VALIDATE_ROOT(isInterior, hCallBack, pObjRef) ((void)0) diff --git a/src/inc/gcinfodecoder.h b/src/inc/gcinfodecoder.h index c77c359..dcf5f14 100644 --- a/src/inc/gcinfodecoder.h +++ b/src/inc/gcinfodecoder.h @@ -153,10 +153,6 @@ enum ICodeManagerFlags #define MAX_PREDECODED_SLOTS 64 #endif -#if defined(FEATURE_PAL) && !defined(STATIC_CONTRACT_SUPPORTS_DAC_HOST_ONLY) -#define STATIC_CONTRACT_SUPPORTS_DAC_HOST_ONLY -#endif - enum GcInfoDecoderFlags @@ -286,8 +282,6 @@ public: __forceinline void SetCurrentPos( size_t pos ) { - STATIC_CONTRACT_SUPPORTS_DAC_HOST_ONLY; // note: this will set only the host instance, not the target instance - size_t adjPos = pos + m_InitialRelPos; m_pCurrent = m_pBuffer + adjPos / BITS_PER_SIZE_T; m_RelPos = (int)(adjPos % BITS_PER_SIZE_T); diff --git a/src/vm/gcinfodecoder.cpp b/src/vm/gcinfodecoder.cpp index 052cb4c..e660bf0 100644 --- a/src/vm/gcinfodecoder.cpp +++ b/src/vm/gcinfodecoder.cpp @@ -17,7 +17,7 @@ #endif #ifndef GCINFODECODER_CONTRACT -#define GCINFODECODER_CONTRACT(contract) contract +#define GCINFODECODER_CONTRACT LIMITED_METHOD_CONTRACT #endif // !GCINFODECODER_CONTRACT @@ -1430,10 +1430,7 @@ void GcInfoDecoder::ReportRegisterToGC( // AMD64 GCEnumCallback pCallBack, LPVOID hCallBack) { - GCINFODECODER_CONTRACT(CONTRACTL { - NOTHROW; - GC_NOTRIGGER; - } CONTRACTL_END); + GCINFODECODER_CONTRACT; _ASSERTE(regNum >= 0 && regNum <= 16); _ASSERTE(regNum != 4); // rsp @@ -1567,10 +1564,7 @@ void GcInfoDecoder::ReportRegisterToGC( // ARM GCEnumCallback pCallBack, LPVOID hCallBack) { - GCINFODECODER_CONTRACT(CONTRACTL { - NOTHROW; - GC_NOTRIGGER; - } CONTRACTL_END); + GCINFODECODER_CONTRACT; _ASSERTE(regNum >= 0 && regNum <= 14); _ASSERTE(regNum != 13); // sp @@ -1661,10 +1655,7 @@ void GcInfoDecoder::ReportRegisterToGC( // ARM64 GCEnumCallback pCallBack, LPVOID hCallBack) { - GCINFODECODER_CONTRACT(CONTRACTL { - NOTHROW; - GC_NOTRIGGER; - } CONTRACTL_END); + GCINFODECODER_CONTRACT; _ASSERTE(regNum >= 0 && regNum <= 30); _ASSERTE(regNum != 18); @@ -1821,10 +1812,7 @@ void GcInfoDecoder::ReportStackSlotToGC( GCEnumCallback pCallBack, LPVOID hCallBack) { - GCINFODECODER_CONTRACT(CONTRACTL { - NOTHROW; - GC_NOTRIGGER; - } CONTRACTL_END); + GCINFODECODER_CONTRACT; OBJECTREF* pObjRef = GetStackSlot(spOffset, spBase, pRD); _ASSERTE( IS_ALIGNED( pObjRef, sizeof( Object* ) ) );