From a39e2c6adead2b170866001436602872ea0188da Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Sat, 13 Aug 2016 18:52:58 -0700 Subject: [PATCH] Fixup a few contracts [tfs-changeset: 1622296] Commit migrated from https://github.com/dotnet/coreclr/commit/c1d05a8456344bba910290214532c2387bbc985e --- src/coreclr/src/vm/assembly.hpp | 4 ++-- src/coreclr/src/vm/eetwain.cpp | 24 +++++++++--------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/coreclr/src/vm/assembly.hpp b/src/coreclr/src/vm/assembly.hpp index 83fc53b..bcd36b9 100644 --- a/src/coreclr/src/vm/assembly.hpp +++ b/src/coreclr/src/vm/assembly.hpp @@ -219,7 +219,7 @@ public: BOOL Next() { - WRAPPER_NO_CONTRACT; + LIMITED_METHOD_CONTRACT; SUPPORTS_DAC; while (++m_i <= m_pManifest->GetFileMax()) { @@ -231,7 +231,7 @@ public: Module *GetModule() { - WRAPPER_NO_CONTRACT; + LIMITED_METHOD_CONTRACT; SUPPORTS_DAC; return m_pManifest->LookupFile(TokenFromRid(m_i, mdtFile)); } diff --git a/src/coreclr/src/vm/eetwain.cpp b/src/coreclr/src/vm/eetwain.cpp index 165335f..032bda7 100644 --- a/src/coreclr/src/vm/eetwain.cpp +++ b/src/coreclr/src/vm/eetwain.cpp @@ -364,7 +364,7 @@ const size_t END_FIN_POP_STACK = sizeof(TADDR); // The offset (in bytes) from EBP for the secutiy object on the stack inline size_t GetSecurityObjectOffset(hdrInfo * info) { - SUPPORTS_DAC; + LIMITED_METHOD_DAC_CONTRACT; _ASSERTE(info->securityCheck && info->ebpFrame); @@ -376,8 +376,7 @@ inline size_t GetSecurityObjectOffset(hdrInfo * info) inline size_t GetLocallocSPOffset(hdrInfo * info) { - LIMITED_METHOD_CONTRACT; - SUPPORTS_DAC; + LIMITED_METHOD_DAC_CONTRACT; _ASSERTE(info->localloc && info->ebpFrame); @@ -390,7 +389,7 @@ size_t GetLocallocSPOffset(hdrInfo * info) inline size_t GetParamTypeArgOffset(hdrInfo * info) { - SUPPORTS_DAC; + LIMITED_METHOD_DAC_CONTRACT; _ASSERTE((info->genericsContext || info->handlers) && info->ebpFrame); @@ -403,8 +402,7 @@ size_t GetParamTypeArgOffset(hdrInfo * info) inline size_t GetStartShadowSPSlotsOffset(hdrInfo * info) { - WRAPPER_NO_CONTRACT; - SUPPORTS_DAC; + LIMITED_METHOD_DAC_CONTRACT; _ASSERTE(info->handlers && info->ebpFrame); @@ -433,7 +431,7 @@ PTR_TADDR GetFirstBaseSPslotPtr(TADDR ebp, hdrInfo * info) inline size_t GetEndShadowSPSlotsOffset(hdrInfo * info, unsigned maxHandlerNestingLevel) { - WRAPPER_NO_CONTRACT; + LIMITED_METHOD_DAC_CONTRACT; _ASSERTE(info->handlers && info->ebpFrame); @@ -5234,8 +5232,7 @@ OBJECTREF EECodeManager::GetInstance( PREGDISPLAY pContext, GenericParamContextType EECodeManager::GetParamContextType(PREGDISPLAY pContext, EECodeInfo * pCodeInfo) { - WRAPPER_NO_CONTRACT; - SUPPORTS_DAC; + LIMITED_METHOD_DAC_CONTRACT; #ifdef _TARGET_X86_ /* Extract the necessary information from the info block header */ @@ -5300,8 +5297,7 @@ PTR_VOID EECodeManager::GetParamTypeArg(PREGDISPLAY pContext, EECodeInfo * pCodeInfo) { - WRAPPER_NO_CONTRACT; - SUPPORTS_DAC; + LIMITED_METHOD_DAC_CONTRACT; #ifdef _TARGET_X86_ PTR_VOID methodInfoPtr = pCodeInfo->GetGCInfo(); @@ -5342,8 +5338,7 @@ PTR_VOID EECodeManager::GetParamTypeArg(PREGDISPLAY pContext, PTR_VOID EECodeManager::GetExactGenericsToken(PREGDISPLAY pContext, EECodeInfo * pCodeInfo) { - WRAPPER_NO_CONTRACT; - SUPPORTS_DAC; + LIMITED_METHOD_DAC_CONTRACT; return EECodeManager::GetExactGenericsToken(GetCallerSp(pContext), pCodeInfo); } @@ -5352,8 +5347,7 @@ PTR_VOID EECodeManager::GetExactGenericsToken(PREGDISPLAY pContext, PTR_VOID EECodeManager::GetExactGenericsToken(SIZE_T baseStackSlot, EECodeInfo * pCodeInfo) { - WRAPPER_NO_CONTRACT; - SUPPORTS_DAC; + LIMITED_METHOD_DAC_CONTRACT; GCInfoToken gcInfoToken = pCodeInfo->GetGCInfoToken(); -- 2.7.4