diff --git a/src/coreclr/dlls/mscoree/mscoree.cpp b/src/coreclr/dlls/mscoree/mscoree.cpp index b09c0d12431f3..fe8ec220cd628 100644 --- a/src/coreclr/dlls/mscoree/mscoree.cpp +++ b/src/coreclr/dlls/mscoree/mscoree.cpp @@ -66,14 +66,11 @@ STDAPI DLLEXPORT MetaDataGetDispenser( // Return HRESULT NonVMComHolder pcf(NULL); HRESULT hr; - BEGIN_ENTRYPOINT_NOTHROW; IfFailGo(MetaDataDllGetClassObject(rclsid, IID_IClassFactory, (void **) &pcf)); hr = pcf->CreateInstance(NULL, riid, ppv); ErrExit: - END_ENTRYPOINT_NOTHROW; - return (hr); } @@ -96,13 +93,7 @@ STDAPI DLLEXPORT GetMetaDataInternalInterface( PRECONDITION(CheckPointer(ppv)); } CONTRACTL_END; - HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - hr = GetMDInternalInterface(pData, cbData, flags, riid, ppv); - - END_ENTRYPOINT_NOTHROW; - return hr; + return GetMDInternalInterface(pData, cbData, flags, riid, ppv); } // --------------------------------------------------------------------------- @@ -123,13 +114,7 @@ STDAPI DLLEXPORT GetMetaDataInternalInterfaceFromPublic( PRECONDITION(CheckPointer(ppv)); } CONTRACTL_END; - HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - hr = GetMDInternalInterfaceFromPublic(pv, riid, ppv); - - END_ENTRYPOINT_NOTHROW; - return hr; + return GetMDInternalInterfaceFromPublic(pv, riid, ppv); } // --------------------------------------------------------------------------- @@ -150,13 +135,7 @@ STDAPI DLLEXPORT GetMetaDataPublicInterfaceFromInternal( ENTRY_POINT; } CONTRACTL_END; - HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - hr = GetMDPublicInterfaceFromInternal(pv, riid, ppv); - - END_ENTRYPOINT_NOTHROW; - return hr; + return GetMDPublicInterfaceFromInternal(pv, riid, ppv); } @@ -178,12 +157,7 @@ STDAPI ReOpenMetaDataWithMemory( PRECONDITION(CheckPointer(pData)); } CONTRACTL_END; - HRESULT hr = S_OK; - - BEGIN_ENTRYPOINT_NOTHROW; - hr = MDReOpenMetaDataWithMemory(pUnk, pData, cbData); - END_ENTRYPOINT_NOTHROW; - return hr; + return MDReOpenMetaDataWithMemory(pUnk, pData, cbData); } // --------------------------------------------------------------------------- @@ -205,12 +179,7 @@ STDAPI ReOpenMetaDataWithMemoryEx( PRECONDITION(CheckPointer(pData)); } CONTRACTL_END; - HRESULT hr = S_OK; - - BEGIN_ENTRYPOINT_NOTHROW; - hr = MDReOpenMetaDataWithMemoryEx(pUnk, pData, cbData, dwReOpenFlags); - END_ENTRYPOINT_NOTHROW; - return hr; + return MDReOpenMetaDataWithMemoryEx(pUnk, pData, cbData, dwReOpenFlags); } static DWORD g_dwSystemDirectory = 0; diff --git a/src/coreclr/inc/entrypoints.h b/src/coreclr/inc/entrypoints.h deleted file mode 100644 index dcd6cb5d06508..0000000000000 --- a/src/coreclr/inc/entrypoints.h +++ /dev/null @@ -1,28 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -//----------------------------------------------------------------------------- -// Entrypoint markers -// Used to identify all external entrypoints into the CLR (via COM, exports, etc) -// and perform various tasks on all of them -//----------------------------------------------------------------------------- - - -#ifndef __ENTRYPOINTS_h__ -#define __ENTRYPOINTS_h__ - -#define BEGIN_ENTRYPOINT_THROWS -#define END_ENTRYPOINT_THROWS -#define BEGIN_ENTRYPOINT_THROWS_WITH_THREAD(____thread) -#define END_ENTRYPOINT_THROWS_WITH_THREAD -#define BEGIN_ENTRYPOINT_NOTHROW_WITH_THREAD(___thread) -#define END_ENTRYPOINT_NOTHROW_WITH_THREAD -#define BEGIN_ENTRYPOINT_NOTHROW -#define END_ENTRYPOINT_NOTHROW -#define BEGIN_ENTRYPOINT_VOIDRET -#define END_ENTRYPOINT_VOIDRET -#define BEGIN_CLEANUP_ENTRYPOINT -#define END_CLEANUP_ENTRYPOINT - -#endif // __ENTRYPOINTS_h__ - - diff --git a/src/coreclr/inc/ex.h b/src/coreclr/inc/ex.h index 01e405541dfde..c1724578cfae1 100644 --- a/src/coreclr/inc/ex.h +++ b/src/coreclr/inc/ex.h @@ -21,7 +21,6 @@ #include "corerror.h" #include "stresslog.h" #include "staticcontract.h" -#include "entrypoints.h" #if !defined(_DEBUG_IMPL) && defined(_DEBUG) && !defined(DACCESS_COMPILE) #define _DEBUG_IMPL 1 diff --git a/src/coreclr/inc/utilcode.h b/src/coreclr/inc/utilcode.h index 3060d65798b08..dcfc3523d9b7f 100644 --- a/src/coreclr/inc/utilcode.h +++ b/src/coreclr/inc/utilcode.h @@ -36,7 +36,6 @@ #endif #include "contract.h" -#include "entrypoints.h" #include diff --git a/src/coreclr/md/ceefilegen/cceegen.cpp b/src/coreclr/md/ceefilegen/cceegen.cpp index 3d11067d376e9..050d16288ef93 100644 --- a/src/coreclr/md/ceefilegen/cceegen.cpp +++ b/src/coreclr/md/ceefilegen/cceegen.cpp @@ -101,21 +101,17 @@ STDMETHODIMP CCeeGen::SetInitialGrowth(DWORD growth) STDMETHODIMP CCeeGen::EmitString (_In_ LPWSTR lpString, ULONG *RVA) { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; if (! RVA) IfFailGo(E_POINTER); hr = getStringSection().getEmittedStringRef(lpString, RVA); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; } STDMETHODIMP CCeeGen::GetString(ULONG RVA, __inout LPWSTR *lpString) { HRESULT hr = E_FAIL; - BEGIN_ENTRYPOINT_NOTHROW; if (! lpString) IfFailGo(E_POINTER); @@ -123,8 +119,6 @@ STDMETHODIMP CCeeGen::GetString(ULONG RVA, __inout LPWSTR *lpString) ErrExit: - - END_ENTRYPOINT_NOTHROW; if (*lpString) return S_OK; return hr; @@ -133,7 +127,6 @@ STDMETHODIMP CCeeGen::GetString(ULONG RVA, __inout LPWSTR *lpString) STDMETHODIMP CCeeGen::AllocateMethodBuffer(ULONG cchBuffer, UCHAR **lpBuffer, ULONG *RVA) { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; ULONG methodOffset = 0; @@ -152,15 +145,12 @@ STDMETHODIMP CCeeGen::AllocateMethodBuffer(ULONG cchBuffer, UCHAR **lpBuffer, UL *RVA = methodOffset; ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } STDMETHODIMP CCeeGen::GetMethodBuffer(ULONG RVA, UCHAR **lpBuffer) { HRESULT hr = E_FAIL; - BEGIN_ENTRYPOINT_NOTHROW; if (! lpBuffer) IfFailGo(E_POINTER); @@ -168,8 +158,6 @@ STDMETHODIMP CCeeGen::GetMethodBuffer(ULONG RVA, UCHAR **lpBuffer) ErrExit: - END_ENTRYPOINT_NOTHROW; - if (lpBuffer != NULL && *lpBuffer != 0) return S_OK; @@ -179,15 +167,12 @@ STDMETHODIMP CCeeGen::GetMethodBuffer(ULONG RVA, UCHAR **lpBuffer) STDMETHODIMP CCeeGen::ComputePointer(HCEESECTION section, ULONG RVA, UCHAR **lpBuffer) { HRESULT hr = E_FAIL; - BEGIN_ENTRYPOINT_NOTHROW; if (! lpBuffer) IfFailGo(E_POINTER); *lpBuffer = (UCHAR*) ((CeeSection *)section)->computePointer(RVA); ErrExit: - END_ENTRYPOINT_NOTHROW; - if (lpBuffer != NULL && *lpBuffer != 0) return S_OK; return hr; @@ -196,52 +181,33 @@ STDMETHODIMP CCeeGen::ComputePointer(HCEESECTION section, ULONG RVA, UCHAR **lpB STDMETHODIMP CCeeGen::GetIMapTokenIface ( IUnknown **pIMapToken) { - BEGIN_ENTRYPOINT_NOTHROW; - _ASSERTE(!"E_NOTIMPL"); - END_ENTRYPOINT_NOTHROW; - return E_NOTIMPL; } STDMETHODIMP CCeeGen::AddNotificationHandler ( IUnknown *pHandler) { - BEGIN_ENTRYPOINT_NOTHROW; _ASSERTE(!"E_NOTIMPL"); - END_ENTRYPOINT_NOTHROW; - return E_NOTIMPL; } STDMETHODIMP CCeeGen::GenerateCeeFile () { - BEGIN_ENTRYPOINT_NOTHROW; - _ASSERTE(!"E_NOTIMPL"); - END_ENTRYPOINT_NOTHROW; - return E_NOTIMPL; } STDMETHODIMP CCeeGen::GetIlSection ( HCEESECTION *section) { - BEGIN_ENTRYPOINT_NOTHROW; - *section = (HCEESECTION)(m_sections[m_ilIdx]); - END_ENTRYPOINT_NOTHROW; - return S_OK; } STDMETHODIMP CCeeGen::GetStringSection(HCEESECTION *section) { - BEGIN_ENTRYPOINT_NOTHROW; - _ASSERTE(!"E_NOTIMPL"); - END_ENTRYPOINT_NOTHROW; - return E_NOTIMPL; } @@ -251,12 +217,7 @@ STDMETHODIMP CCeeGen::AddSectionReloc ( HCEESECTION relativeTo, CeeSectionRelocType relocType) { - HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - hr = m_sections[m_ilIdx]->addSectReloc(offset, *(m_sections[m_ilIdx]), relocType); - END_ENTRYPOINT_NOTHROW; - return hr; + return m_sections[m_ilIdx]->addSectReloc(offset, *(m_sections[m_ilIdx]), relocType); } STDMETHODIMP CCeeGen::GetSectionCreate ( @@ -264,24 +225,16 @@ STDMETHODIMP CCeeGen::GetSectionCreate ( DWORD flags, HCEESECTION *section) { - HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - short sectionIdx; - hr = getSectionCreate (name, flags, (CeeSection **)section, §ionIdx); - END_ENTRYPOINT_NOTHROW; - return hr; + return getSectionCreate (name, flags, (CeeSection **)section, §ionIdx); } STDMETHODIMP CCeeGen::GetSectionDataLen ( HCEESECTION section, ULONG *dataLen) { - BEGIN_ENTRYPOINT_NOTHROW; - CeeSection *pSection = (CeeSection*) section; *dataLen = pSection->dataLen(); - END_ENTRYPOINT_NOTHROW; return NOERROR; } @@ -292,11 +245,8 @@ STDMETHODIMP CCeeGen::GetSectionBlock ( ULONG align, void **ppBytes) { - BEGIN_ENTRYPOINT_NOTHROW; - CeeSection *pSection = (CeeSection*) section; *ppBytes = (BYTE *)pSection->getBlock(len, align); - END_ENTRYPOINT_NOTHROW; if (*ppBytes == 0) return E_OUTOFMEMORY; diff --git a/src/coreclr/md/ceefilegen/ceegentokenmapper.cpp b/src/coreclr/md/ceefilegen/ceegentokenmapper.cpp index c94597c68f834..bf4118948c508 100644 --- a/src/coreclr/md/ceefilegen/ceegentokenmapper.cpp +++ b/src/coreclr/md/ceefilegen/ceegentokenmapper.cpp @@ -48,8 +48,6 @@ HRESULT STDMETHODCALLTYPE CeeGenTokenMapper::Map( ULONG ridFrom = 0; TOKENMAP *pMap = NULL; - BEGIN_ENTRYPOINT_NOTHROW; - if ( IndexForType(tkFrom) == -1 ) { // It is a type that we are not tracking, such as mdtProperty or mdtEvent, @@ -89,8 +87,6 @@ HRESULT STDMETHODCALLTYPE CeeGenTokenMapper::Map( *pToken = tkTo; ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } diff --git a/src/coreclr/md/compiler/assemblymd.cpp b/src/coreclr/md/compiler/assemblymd.cpp index 7372e4cbe29a2..a22d5cc64b31c 100644 --- a/src/coreclr/md/compiler/assemblymd.cpp +++ b/src/coreclr/md/compiler/assemblymd.cpp @@ -35,8 +35,6 @@ STDMETHODIMP RegMeta::GetAssemblyProps( // S_OK or error. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - AssemblyRec *pRecord; CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); @@ -81,10 +79,6 @@ STDMETHODIMP RegMeta::GetAssemblyProps( // S_OK or error. if (szName || pchName) IfFailGo(pMiniMd->getNameOfAssembly(pRecord, szName, cchName, pchName)); ErrExit: - - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::GetAssemblyProps @@ -105,8 +99,6 @@ STDMETHODIMP RegMeta::GetAssemblyRefProps( // S_OK or error. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - AssemblyRefRec *pRecord; CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); @@ -144,9 +136,6 @@ STDMETHODIMP RegMeta::GetAssemblyRefProps( // S_OK or error. if (szName || pchName) IfFailGo(pMiniMd->getNameOfAssemblyRef(pRecord, szName, cchName, pchName)); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::GetAssemblyRefProps @@ -164,8 +153,6 @@ STDMETHODIMP RegMeta::GetFileProps( // S_OK or error. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - FileRec *pRecord; CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); @@ -190,8 +177,6 @@ STDMETHODIMP RegMeta::GetFileProps( // S_OK or error. } ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::GetFileProps @@ -209,8 +194,6 @@ STDMETHODIMP RegMeta::GetExportedTypeProps( // S_OK or error. { HRESULT hr = S_OK; // A result. - BEGIN_ENTRYPOINT_NOTHROW; - ExportedTypeRec *pRecord; // The exported type. CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); int bTruncation=0; // Was there name truncation? @@ -266,8 +249,6 @@ STDMETHODIMP RegMeta::GetExportedTypeProps( // S_OK or error. } ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::GetExportedTypeProps @@ -285,8 +266,6 @@ STDMETHODIMP RegMeta::GetManifestResourceProps( // S_OK or error. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - ManifestResourceRec *pRecord; CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); @@ -311,9 +290,6 @@ STDMETHODIMP RegMeta::GetManifestResourceProps( // S_OK or error. if (szName || pchName) IfFailGo(pMiniMd->getNameOfManifestResource(pRecord, szName, cchName, pchName)); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::GetManifestResourceProps @@ -329,8 +305,6 @@ STDMETHODIMP RegMeta::EnumAssemblyRefs( // S_OK or error { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); HENUMInternal *pEnum; @@ -362,9 +336,6 @@ STDMETHODIMP RegMeta::EnumAssemblyRefs( // S_OK or error ErrExit: HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::EnumAssemblyRefs @@ -379,8 +350,6 @@ STDMETHODIMP RegMeta::EnumFiles( // S_OK or error { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); HENUMInternal *pEnum; @@ -411,8 +380,6 @@ STDMETHODIMP RegMeta::EnumFiles( // S_OK or error ErrExit: HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::EnumFiles @@ -427,8 +394,6 @@ STDMETHODIMP RegMeta::EnumExportedTypes( // S_OK or error { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); HENUMInternal *pEnum = NULL; @@ -482,8 +447,6 @@ STDMETHODIMP RegMeta::EnumExportedTypes( // S_OK or error HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::EnumExportedTypes @@ -498,8 +461,6 @@ STDMETHODIMP RegMeta::EnumManifestResources( // S_OK or error { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); HENUMInternal *pEnum; @@ -531,8 +492,6 @@ STDMETHODIMP RegMeta::EnumManifestResources( // S_OK or error ErrExit: HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::EnumManifestResources @@ -545,8 +504,6 @@ STDMETHODIMP RegMeta::GetAssemblyFromScope( // S_OK or error HRESULT hr = NOERROR; CMiniMdRW *pMiniMd = NULL; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "MD RegMeta::GetAssemblyFromScope(%#08x)\n", ptkAssembly)); LOCKREAD(); _ASSERTE(ptkAssembly); @@ -561,8 +518,6 @@ STDMETHODIMP RegMeta::GetAssemblyFromScope( // S_OK or error IfFailGo( CLDB_E_RECORD_NOTFOUND ); } ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::GetAssemblyFromScope @@ -576,8 +531,6 @@ STDMETHODIMP RegMeta::FindExportedTypeByName( // S_OK or error { HRESULT hr = S_OK; // A result. - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd = NULL; LPSTR szNameUTF8 = NULL; @@ -606,8 +559,6 @@ STDMETHODIMP RegMeta::FindExportedTypeByName( // S_OK or error tkEnclosingType, ptkExportedType)); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::FindExportedTypeByName @@ -620,8 +571,6 @@ STDMETHODIMP RegMeta::FindManifestResourceByName( // S_OK or error { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LPCUTF8 szNameTmp = NULL; CMiniMdRW *pMiniMd = NULL; @@ -660,9 +609,6 @@ STDMETHODIMP RegMeta::FindManifestResourceByName( // S_OK or error } IfFailGo( CLDB_E_RECORD_NOTFOUND ); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::FindManifestResourceByName @@ -678,21 +624,12 @@ STDMETHODIMP RegMeta::FindAssembliesByName( // S_OK or error ULONG *pcAssemblies) // [OUT] The number of assemblies returned. { #ifdef FEATURE_METADATA_IN_VM - HRESULT hr = S_OK; - - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "RegMeta::FindAssembliesByName(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", szAppBase, szPrivateBin, szAssemblyName, ppIUnk, cMax, pcAssemblies)); // No need to lock this function. It is going through fusion to find the matching Assemblies by name - IfFailGo(COR_E_NOTSUPPORTED); - -ErrExit: - END_ENTRYPOINT_NOTHROW; - - return hr; + return COR_E_NOTSUPPORTED; #else //!FEATURE_METADATA_IN_VM // Calls to fusion are not supported outside VM return E_NOTIMPL; diff --git a/src/coreclr/md/compiler/assemblymd_emit.cpp b/src/coreclr/md/compiler/assemblymd_emit.cpp index 6eeb0bcb12559..84d5f2883bc5c 100644 --- a/src/coreclr/md/compiler/assemblymd_emit.cpp +++ b/src/coreclr/md/compiler/assemblymd_emit.cpp @@ -41,8 +41,6 @@ STDMETHODIMP RegMeta::DefineAssembly( // S_OK or error. if (szName == NULL || pMetaData == NULL || pma == NULL) return E_INVALIDARG; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "RegMeta::DefineAssembly(0x%08x, 0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n", pbPublicKey, cbPublicKey, ulHashAlgId, MDSTR(szName), pMetaData, dwAssemblyFlags, pma)); @@ -93,9 +91,6 @@ STDMETHODIMP RegMeta::DefineAssembly( // S_OK or error. IfFailGo(_SetAssemblyProps(*pma, pbPublicKey, cbPublicKey, ulHashAlgId, szName, pMetaData, dwAssemblyFlags)); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::DefineAssembly @@ -120,8 +115,6 @@ STDMETHODIMP RegMeta::DefineAssemblyRef( // S_OK or error. if (szName == NULL || pmar == NULL || pMetaData == NULL) return E_INVALIDARG; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "RegMeta::DefineAssemblyRef(0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", pbPublicKeyOrToken, cbPublicKeyOrToken, MDSTR(szName), pMetaData, pbHashValue, cbHashValue, dwAssemblyRefFlags, pmar)); @@ -184,8 +177,6 @@ STDMETHODIMP RegMeta::DefineAssemblyRef( // S_OK or error. ErrExit: SetCallerExternal(); - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::DefineAssemblyRef @@ -201,8 +192,6 @@ STDMETHODIMP RegMeta::DefineFile( // S_OK or error. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - FileRec *pRecord = NULL; RID iRecord; @@ -254,9 +243,6 @@ STDMETHODIMP RegMeta::DefineFile( // S_OK or error. // Set rest of the attributes. IfFailGo(_SetFileProps(*pmf, pbHashValue, cbHashValue, dwFileFlags)); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::DefineFile @@ -272,8 +258,6 @@ STDMETHODIMP RegMeta::DefineExportedType( // S_OK or error. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - ExportedTypeRec *pRecord = NULL; RID iRecord; LPSTR szNameUTF8; @@ -352,9 +336,6 @@ STDMETHODIMP RegMeta::DefineExportedType( // S_OK or error. IfFailGo(_SetExportedTypeProps(*pmct, tkImplementation, tkTypeDef, dwExportedTypeFlags)); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::DefineExportedType @@ -370,8 +351,6 @@ STDMETHODIMP RegMeta::DefineManifestResource( // S_OK or error. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - ManifestResourceRec *pRecord = NULL; RID iRecord; @@ -429,9 +408,6 @@ STDMETHODIMP RegMeta::DefineManifestResource( // S_OK or error. dwOffset, dwResourceFlags)); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::DefineManifestResource @@ -449,8 +425,6 @@ STDMETHODIMP RegMeta::SetAssemblyProps( // S_OK or error. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - _ASSERTE(TypeFromToken(ma) == mdtAssembly && RidFromToken(ma)); LOG((LOGMD, "RegMeta::SetAssemblyProps(%#08x, %#08x, %#08x, %#08x %S, %#08x, %#08x)\n", @@ -463,8 +437,6 @@ STDMETHODIMP RegMeta::SetAssemblyProps( // S_OK or error. IfFailGo(_SetAssemblyProps(ma, pbPublicKey, cbPublicKey, ulHashAlgId, szName, pMetaData, dwAssemblyFlags)); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP SetAssemblyProps() @@ -483,8 +455,6 @@ STDMETHODIMP RegMeta::SetAssemblyRefProps( // S_OK or error. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - _ASSERTE(TypeFromToken(ar) == mdtAssemblyRef && RidFromToken(ar)); LOG((LOGMD, "RegMeta::SetAssemblyRefProps(0x%08x, 0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", @@ -506,8 +476,6 @@ STDMETHODIMP RegMeta::SetAssemblyRefProps( // S_OK or error. dwAssemblyRefFlags)); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::SetAssemblyRefProps @@ -522,9 +490,6 @@ STDMETHODIMP RegMeta::SetFileProps( // S_OK or error. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - _ASSERTE(TypeFromToken(file) == mdtFile && RidFromToken(file)); LOG((LOGMD, "RegMeta::SetFileProps(%#08x, %#08x, %#08x, %#08x)\n", @@ -536,9 +501,6 @@ STDMETHODIMP RegMeta::SetFileProps( // S_OK or error. IfFailGo( _SetFileProps(file, pbHashValue, cbHashValue, dwFileFlags) ); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::SetFileProps @@ -553,9 +515,6 @@ STDMETHODIMP RegMeta::SetExportedTypeProps( // S_OK or error. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - LOG((LOGMD, "RegMeta::SetExportedTypeProps(%#08x, %#08x, %#08x, %#08x)\n", ct, tkImplementation, tkTypeDef, dwExportedTypeFlags)); @@ -564,9 +523,6 @@ STDMETHODIMP RegMeta::SetExportedTypeProps( // S_OK or error. IfFailGo( _SetExportedTypeProps( ct, tkImplementation, tkTypeDef, dwExportedTypeFlags) ); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::SetExportedTypeProps @@ -581,8 +537,6 @@ STDMETHODIMP RegMeta::SetManifestResourceProps(// S_OK or error. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "RegMeta::SetManifestResourceProps(%#08x, %#08x, %#08x, %#08x)\n", mr, tkImplementation, dwOffset, dwResourceFlags)); @@ -596,9 +550,6 @@ STDMETHODIMP RegMeta::SetManifestResourceProps(// S_OK or error. IfFailGo( _SetManifestResourceProps( mr, tkImplementation, dwOffset, dwResourceFlags) ); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::SetManifestResourceProps() diff --git a/src/coreclr/md/compiler/classfactory.cpp b/src/coreclr/md/compiler/classfactory.cpp index 0cc972e761746..f47029cb5fd7b 100644 --- a/src/coreclr/md/compiler/classfactory.cpp +++ b/src/coreclr/md/compiler/classfactory.cpp @@ -121,9 +121,6 @@ HRESULT STDMETHODCALLTYPE MDClassFactory::CreateInstance( { HRESULT hr; - BEGIN_ENTRYPOINT_NOTHROW; - - // Avoid confusion. *ppvObject = NULL; _ASSERTE(m_pCoClass); @@ -136,8 +133,6 @@ HRESULT STDMETHODCALLTYPE MDClassFactory::CreateInstance( hr = (*m_pCoClass->pfnCreateObject)(riid, ppvObject); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } diff --git a/src/coreclr/md/compiler/custattr_emit.cpp b/src/coreclr/md/compiler/custattr_emit.cpp index d7c62fadcfb8d..c9b31c66562d9 100644 --- a/src/coreclr/md/compiler/custattr_emit.cpp +++ b/src/coreclr/md/compiler/custattr_emit.cpp @@ -702,8 +702,6 @@ STDMETHODIMP RegMeta::DefineCustomAttribute( #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - CustomAttributeRec *pRecord = NULL; // New custom Attribute record. RID iRecord; // New custom Attribute RID. CMiniMdRW *pMiniMd = &m_pStgdb->m_MiniMd; @@ -823,8 +821,6 @@ STDMETHODIMP RegMeta::DefineCustomAttribute( IfFailGo(UpdateENCLog(TokenFromRid(iRecord, mdtCustomAttribute))); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineCustomAttribute @@ -842,8 +838,6 @@ STDMETHODIMP RegMeta::SetCustomAttributeValue( // Return code. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr; - BEGIN_ENTRYPOINT_NOTHROW; - CustomAttributeRec *pRecord = NULL;// Existing custom Attribute record. LOCKWRITE(); @@ -858,9 +852,6 @@ STDMETHODIMP RegMeta::SetCustomAttributeValue( // Return code. IfFailGo(UpdateENCLog(tkAttr)); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::SetCustomAttributeValue diff --git a/src/coreclr/md/compiler/custattr_import.cpp b/src/coreclr/md/compiler/custattr_import.cpp index c7b40c1981f84..18afd21c451a3 100644 --- a/src/coreclr/md/compiler/custattr_import.cpp +++ b/src/coreclr/md/compiler/custattr_import.cpp @@ -64,8 +64,6 @@ STDMETHODIMP RegMeta::GetCustomAttributeByName( // S_OK or error. { HRESULT hr; // A result. - BEGIN_ENTRYPOINT_NOTHROW; - LPUTF8 szName; // Name in UFT8. int iLen; // A length. CMiniMdRW *pMiniMd = NULL; @@ -80,9 +78,6 @@ STDMETHODIMP RegMeta::GetCustomAttributeByName( // S_OK or error. hr = ImportHelper::GetCustomAttributeByName(pMiniMd, tkObj, szName, ppData, pcbData); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::GetCustomAttributeByName() @@ -100,8 +95,6 @@ STDMETHODIMP RegMeta::EnumCustomAttributes( { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); RID ridStart; RID ridEnd; @@ -226,8 +219,6 @@ STDMETHODIMP RegMeta::EnumCustomAttributes( HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::EnumCustomAttributes() @@ -244,8 +235,6 @@ STDMETHODIMP RegMeta::GetCustomAttributeProps( { HRESULT hr = S_OK; // A result. - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd; LOCKREAD(); @@ -269,8 +258,5 @@ STDMETHODIMP RegMeta::GetCustomAttributeProps( } ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::GetCustomAttributeProps diff --git a/src/coreclr/md/compiler/disp.cpp b/src/coreclr/md/compiler/disp.cpp index 968f8060f6322..eccf3c958658b 100644 --- a/src/coreclr/md/compiler/disp.cpp +++ b/src/coreclr/md/compiler/disp.cpp @@ -65,7 +65,6 @@ Disp::DefineScope( HRESULT hr = S_OK; PathString szFileName(PathString::Literal, W("file:")); PathString szFileNameSuffix; - BEGIN_ENTRYPOINT_NOTHROW; RegMeta *pMeta = 0; OptionValue optionForNewScope = m_OptionValue; @@ -115,7 +114,6 @@ Disp::DefineScope( delete pMeta; *ppIUnk = NULL; } - END_ENTRYPOINT_NOTHROW; return hr; #else //!FEATURE_METADATA_EMIT @@ -129,14 +127,7 @@ Disp::DefineScope( //***************************************************************************** static HRESULT DeliverScope(IMDCommon *pMDCommon, REFIID riid, DWORD dwOpenFlags, IUnknown **ppIUnk) { - HRESULT hr; - BEGIN_ENTRYPOINT_NOTHROW; - - IfFailGo(pMDCommon->QueryInterface(riid, (void**)ppIUnk)); - - ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; + return pMDCommon->QueryInterface(riid, (void**)ppIUnk); } //***************************************************************************** @@ -149,7 +140,6 @@ HRESULT Disp::OpenScope( // Return code. IUnknown **ppIUnk) // [out] Return interface on success. { HRESULT hr; - BEGIN_ENTRYPOINT_NOTHROW; LOG((LF_METADATA, LL_INFO10, "Disp::OpenScope(%S, 0x%08x, 0x%08x, 0x%08x)\n", MDSTR(szFileName), dwOpenFlags, riid, ppIUnk)); IMDCommon *pMDCommon = NULL; @@ -164,7 +154,7 @@ HRESULT Disp::OpenScope( // Return code. ErrExit: if (pMDCommon) pMDCommon->Release(); - END_ENTRYPOINT_NOTHROW; + return hr; } @@ -182,8 +172,6 @@ Disp::OpenRawScope( { HRESULT hr; - BEGIN_ENTRYPOINT_NOTHROW; - _ASSERTE(szFileName != NULL); _ASSERTE(ppIUnk != NULL); RegMeta *pMeta = NULL; @@ -270,8 +258,6 @@ Disp::OpenRawScope( *ppIUnk = NULL; } - END_ENTRYPOINT_NOTHROW; - return hr; } // Disp::OpenScope @@ -287,7 +273,6 @@ HRESULT Disp::OpenScopeOnMemory( // Return code. IUnknown **ppIUnk) // [out] Return interface on success. { HRESULT hr; - BEGIN_ENTRYPOINT_NOTHROW; LOG((LF_METADATA, LL_INFO10, "Disp::OpenScopeOnMemory(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", pData, cbData, dwOpenFlags, riid, ppIUnk)); IMDCommon *pMDCommon = NULL; @@ -301,7 +286,7 @@ HRESULT Disp::OpenScopeOnMemory( // Return code. ErrExit: if (pMDCommon) pMDCommon->Release(); - END_ENTRYPOINT_NOTHROW; + return hr; } @@ -317,8 +302,6 @@ HRESULT Disp::OpenRawScopeOnMemory( // Return code. { HRESULT hr; - BEGIN_ENTRYPOINT_NOTHROW; - RegMeta *pMeta = 0; _ASSERTE(!IsOfReserved(dwOpenFlags)); @@ -356,8 +339,6 @@ HRESULT Disp::OpenRawScopeOnMemory( // Return code. *ppIUnk = 0; } - END_ENTRYPOINT_NOTHROW; - return hr; } // Disp::OpenScopeOnMemory @@ -389,9 +370,6 @@ HRESULT Disp::FindAssembly( // S_OK or error ULONG cchName, // [IN] the name buffer's size ULONG *pcName) // [OUT] the number of characters returned in the buffer { - BEGIN_ENTRYPOINT_NOTHROW; - END_ENTRYPOINT_NOTHROW; - return E_NOTIMPL; } // Disp::FindAssembly @@ -405,9 +383,6 @@ HRESULT Disp::FindAssemblyModule( // S_OK or error ULONG cchName, // [IN] the name buffer's size ULONG *pcName) // [OUT] the number of characters returned in the buffer { - BEGIN_ENTRYPOINT_NOTHROW; - END_ENTRYPOINT_NOTHROW; - return E_NOTIMPL; } // Disp::FindAssemblyModule @@ -420,9 +395,6 @@ HRESULT Disp::OpenScopeOnITypeInfo( // Return code. REFIID riid, // [in] The interface desired. IUnknown **ppIUnk) // [out] Return interface on success. { - BEGIN_ENTRYPOINT_NOTHROW; - END_ENTRYPOINT_NOTHROW; - return E_NOTIMPL; } // Disp::OpenScopeOnITypeInfo @@ -446,8 +418,6 @@ Disp::DefinePortablePdbScope( #ifdef FEATURE_METADATA_EMIT HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - RegMeta* pMeta = 0; OptionValue optionForNewScope = m_OptionValue; @@ -492,7 +462,6 @@ Disp::DefinePortablePdbScope( delete pMeta; *ppIUnk = NULL; } - END_ENTRYPOINT_NOTHROW; return hr; #else //!FEATURE_METADATA_EMIT @@ -514,7 +483,6 @@ HRESULT Disp::OpenScopeOnCustomDataSource( // S_OK or error IUnknown **ppIUnk) // [out] Return interface on success. { HRESULT hr; - BEGIN_ENTRYPOINT_NOTHROW; LOG((LF_METADATA, LL_INFO10, "Disp::OpenScopeOnCustomDataSource(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", pCustomSource, dwOpenFlags, riid, ppIUnk)); IMDCommon *pMDCommon = NULL; @@ -528,7 +496,7 @@ HRESULT Disp::OpenScopeOnCustomDataSource( // S_OK or error ErrExit: if (pMDCommon) pMDCommon->Release(); - END_ENTRYPOINT_NOTHROW; + return hr; } @@ -544,8 +512,6 @@ HRESULT Disp::OpenRawScopeOnCustomDataSource( // Return code. { HRESULT hr; - BEGIN_ENTRYPOINT_NOTHROW; - RegMeta *pMeta = 0; _ASSERTE(!IsOfReserved(dwOpenFlags)); @@ -584,8 +550,6 @@ HRESULT Disp::OpenRawScopeOnCustomDataSource( // Return code. *ppIUnk = 0; } - END_ENTRYPOINT_NOTHROW; - return hr; } // Disp::OpenRawScopeOnCustomDataSource @@ -663,7 +627,6 @@ Disp::SetOption( const VARIANT *pvalue) // [in] Value to which the option is to be set. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; LOG((LF_METADATA, LL_INFO10, "Disp::SetOption(0x%08x, 0x%08x)\n", optionid, pvalue)); @@ -819,7 +782,6 @@ Disp::SetOption( } ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; } // Disp::SetOption @@ -834,7 +796,6 @@ HRESULT Disp::GetOption( // Return code. VARIANT *pvalue) // [out] Value to which the option is currently set. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; LOG((LF_METADATA, LL_INFO10, "Disp::GetOption(0x%08x, 0x%08x)\n", optionid, pvalue)); @@ -885,8 +846,6 @@ HRESULT Disp::GetOption( // Return code. IfFailGo(E_INVALIDARG); } ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // Disp::GetOption diff --git a/src/coreclr/md/compiler/emit.cpp b/src/coreclr/md/compiler/emit.cpp index 7c4208ba7dbe1..a75e09ca893d5 100644 --- a/src/coreclr/md/compiler/emit.cpp +++ b/src/coreclr/md/compiler/emit.cpp @@ -39,8 +39,6 @@ STDMETHODIMP RegMeta::DefineMethod( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - MethodRec *pRecord = NULL; // The new record. RID iRecord; // The new record's RID. LPUTF8 szNameUtf8; @@ -131,8 +129,6 @@ STDMETHODIMP RegMeta::DefineMethod( // S_OK or error. ErrExit: SetCallerExternal(); - END_ENTRYPOINT_NOTHROW; - return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineMethod @@ -150,8 +146,6 @@ STDMETHODIMP RegMeta::DefineMethodImpl( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - MethodImplRec *pMethodImplRec = NULL; RID iMethodImplRec; @@ -194,9 +188,6 @@ STDMETHODIMP RegMeta::DefineMethodImpl( // S_OK or error. IfFailGo(UpdateENCLog2(TBL_MethodImpl, iMethodImplRec)); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineMethodImpl @@ -214,8 +205,6 @@ STDMETHODIMP RegMeta::SetMethodImplFlags( // [IN] S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - MethodRec *pMethodRec; LOG((LOGMD, "MD RegMeta::SetMethodImplFlags(0x%08x, 0x%08x)\n", @@ -231,7 +220,6 @@ STDMETHODIMP RegMeta::SetMethodImplFlags( // [IN] S_OK or error. IfFailGo(UpdateENCLog(md)); ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::SetMethodImplFlags @@ -249,8 +237,6 @@ STDMETHODIMP RegMeta::SetFieldRVA( // [IN] S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - FieldRVARec *pFieldRVARec; RID iFieldRVA; FieldRec *pFieldRec; @@ -261,7 +247,6 @@ STDMETHODIMP RegMeta::SetFieldRVA( // [IN] S_OK or error. _ASSERTE(TypeFromToken(fd) == mdtFieldDef); - IfFailGo(m_pStgdb->m_MiniMd.FindFieldRVAHelper(fd, &iFieldRVA)); if (InvalidRid(iFieldRVA)) @@ -290,7 +275,6 @@ STDMETHODIMP RegMeta::SetFieldRVA( // [IN] S_OK or error. IfFailGo(UpdateENCLog2(TBL_FieldRVA, iFieldRVA)); ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::SetFieldRVA @@ -384,9 +368,6 @@ STDMETHODIMP RegMeta::DefineTypeRefByName( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - LOG((LOGMD, "MD RegMeta::DefineTypeRefByName(0x%08x, %S, 0x%08x)\n", tkResolutionScope, MDSTR(szName), ptr)); LOCKWRITE(); @@ -397,8 +378,6 @@ STDMETHODIMP RegMeta::DefineTypeRefByName( // S_OK or error. IfFailGo(_DefineTypeRef(tkResolutionScope, szName, TRUE, ptr)); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineTypeRefByName @@ -420,8 +399,6 @@ STDMETHODIMP RegMeta::DefineImportType( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - IMetaDataImport2 *pImport2 = NULL; IMDCommon *pImport2MDCommon = NULL; @@ -439,7 +416,6 @@ STDMETHODIMP RegMeta::DefineImportType( // S_OK or error. pAssemImport, pbHashValue, cbHashValue, pImport, tdImport, pAssemEmit, ptr)); - LOCKWRITE(); IfFailGo(m_pStgdb->m_MiniMd.PreUpdate()); @@ -476,7 +452,7 @@ STDMETHODIMP RegMeta::DefineImportType( // S_OK or error. pImport2MDCommon->Release(); if (pAssemImportMDCommon) pAssemImportMDCommon->Release(); - END_ENTRYPOINT_NOTHROW; + return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineImportType @@ -496,8 +472,6 @@ STDMETHODIMP RegMeta::DefineMemberRef( // S_OK or error #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - MemberRefRec *pRecord = 0; // The MemberRef record. RID iRecord; // RID of new MemberRef record. LPUTF8 szNameUtf8; @@ -565,8 +539,6 @@ STDMETHODIMP RegMeta::DefineMemberRef( // S_OK or error IfFailGo(UpdateENCLog(*pmr)); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineMemberRef @@ -589,9 +561,6 @@ STDMETHODIMP RegMeta::DefineImportMember( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - LOG((LOGMD, "MD RegMeta::DefineImportMember(" "0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x," " 0x%08x, 0x%08x, 0x%08x)\n", @@ -681,8 +650,6 @@ STDMETHODIMP RegMeta::DefineImportMember( // S_OK or error. pmr)); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineImportMember @@ -706,9 +673,6 @@ STDMETHODIMP RegMeta::DefineEvent( #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - LOG((LOGMD, "MD RegMeta::DefineEvent(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", td, szEvent, dwEventFlags, tkEventType, mdAddOn, mdRemoveOn, mdFire, rmdOtherMethods, pmdEvent)); LOCKWRITE(); @@ -730,8 +694,6 @@ STDMETHODIMP RegMeta::DefineEvent( IfFailGo(_SetEventProps2(*pmdEvent, mdAddOn, mdRemoveOn, mdFire, rmdOtherMethods, IsENCOn())); IfFailGo(UpdateENCLog(*pmdEvent)); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineEvent @@ -753,8 +715,6 @@ STDMETHODIMP RegMeta::SetClassLayout( #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; // A result. - BEGIN_ENTRYPOINT_NOTHROW; - int index = 0; // Loop control. LOG((LOGMD, "MD RegMeta::SetClassLayout(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", @@ -784,8 +744,6 @@ STDMETHODIMP RegMeta::SetClassLayout( IfFailGo(_SetClassLayout(td, dwPackSize, ulClassSize)); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::SetClassLayout @@ -885,8 +843,6 @@ STDMETHODIMP RegMeta::DeleteClassLayout( #ifdef FEATURE_METADATA_EMIT_ALL HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - ClassLayoutRec *pClassLayoutRec; TypeDefRec *pTypeDefRec; FieldLayoutRec *pFieldLayoutRec; @@ -944,7 +900,6 @@ STDMETHODIMP RegMeta::DeleteClassLayout( } } ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; #else //!FEATURE_METADATA_EMIT_ALL return E_NOTIMPL; @@ -964,9 +919,6 @@ STDMETHODIMP RegMeta::SetFieldMarshal( #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - LOG((LOGMD, "MD RegMeta::SetFieldMarshal(0x%08x, 0x%08x, 0x%08x)\n", tk, pvNativeType, cbNativeType)); LOCKWRITE(); @@ -976,7 +928,6 @@ STDMETHODIMP RegMeta::SetFieldMarshal( hr = _SetFieldMarshal(tk, pvNativeType, cbNativeType); ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::SetFieldMarshal @@ -1046,13 +997,9 @@ STDMETHODIMP RegMeta::DeleteFieldMarshal( #ifdef FEATURE_METADATA_EMIT_ALL HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - FieldMarshalRec *pFieldMarshRec; RID iFieldMarshRec; - - LOG((LOGMD, "MD RegMeta::DeleteFieldMarshal(0x%08x)\n", tk)); LOCKWRITE(); @@ -1096,7 +1043,6 @@ STDMETHODIMP RegMeta::DeleteFieldMarshal( IfFailGo(UpdateENCLog2(TBL_FieldMarshal, iFieldMarshRec)); ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; #else //!FEATURE_METADATA_EMIT_ALL return E_NOTIMPL; @@ -1116,8 +1062,6 @@ STDMETHODIMP RegMeta::DefinePermissionSet( #ifdef FEATURE_METADATA_EMIT_ALL HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "MD RegMeta::DefinePermissionSet(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", tk, dwAction, pvPermission, cbPermission, ppm)); LOCKWRITE(); @@ -1127,7 +1071,6 @@ STDMETHODIMP RegMeta::DefinePermissionSet( IfFailGo(_DefinePermissionSet(tk, dwAction, pvPermission, cbPermission, ppm)); ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; #else //!FEATURE_METADATA_EMIT_ALL return E_NOTIMPL; @@ -1226,8 +1169,6 @@ STDMETHODIMP RegMeta::SetRVA( // [IN] S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "MD RegMeta::SetRVA(0x%08x, 0x%08x)\n", md, ulRVA)); @@ -1237,8 +1178,6 @@ STDMETHODIMP RegMeta::SetRVA( // [IN] S_OK or error. IfFailGo(_SetRVA(md, ulRVA, UINT32_MAX)); // 0xbaad ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::SetRVA @@ -1258,8 +1197,6 @@ STDMETHODIMP RegMeta::GetTokenFromSig( // [IN] S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "MD RegMeta::GetTokenFromSig(0x%08x, 0x%08x, 0x%08x)\n", pvSig, cbSig, pmsig)); @@ -1271,8 +1208,6 @@ STDMETHODIMP RegMeta::GetTokenFromSig( // [IN] S_OK or error. IfFailGo(_GetTokenFromSig(pvSig, cbSig, pmsig)); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::GetTokenFromSig @@ -1289,8 +1224,6 @@ STDMETHODIMP RegMeta::DefineModuleRef( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "MD RegMeta::DefineModuleRef(%S, 0x%08x)\n", MDSTR(szName), pmur)); LOCKWRITE(); @@ -1299,7 +1232,6 @@ STDMETHODIMP RegMeta::DefineModuleRef( // S_OK or error. hr = _DefineModuleRef(szName, pmur); ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineModuleRef @@ -1370,8 +1302,6 @@ STDMETHODIMP RegMeta::SetParent( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - MemberRefRec *pMemberRef; LOG((LOGMD, "MD RegMeta::SetParent(0x%08x, 0x%08x)\n", @@ -1396,8 +1326,6 @@ STDMETHODIMP RegMeta::SetParent( // S_OK or error. IfFailGo(UpdateENCLog(mr)); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::SetParent @@ -1415,8 +1343,6 @@ STDMETHODIMP RegMeta::GetTokenFromTypeSpec( // [IN] S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - TypeSpecRec *pTypeSpecRec; RID iRec; @@ -1458,8 +1384,6 @@ STDMETHODIMP RegMeta::GetTokenFromTypeSpec( // [IN] S_OK or error. IfFailGo(UpdateENCLog(*ptypespec)); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::GetTokenFromTypeSpec @@ -1480,8 +1404,6 @@ STDMETHODIMP RegMeta::DefineUserString( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - UINT32 nIndex; // Index into the user string heap. CQuickBytes qb; // For storing the string with the byte prefix. ULONG ulMemSize; // Size of memory taken by the string passed in. @@ -1519,8 +1441,6 @@ STDMETHODIMP RegMeta::DefineUserString( // S_OK or error. *pstk = TokenFromRid(nIndex, mdtString); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineUserString @@ -1540,8 +1460,6 @@ STDMETHODIMP RegMeta::DeleteToken( #ifdef FEATURE_METADATA_EMIT_ALL HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "MD RegMeta::DeleteToken(0x%08x)\n", tkObj)); LOCKWRITE(); @@ -1700,10 +1618,7 @@ STDMETHODIMP RegMeta::DeleteToken( break; } - ErrExit: - - END_ENTRYPOINT_NOTHROW; - +ErrExit: return hr; #else //!FEATURE_METADATA_EMIT_ALL return E_NOTIMPL; @@ -1724,8 +1639,6 @@ STDMETHODIMP RegMeta::SetTypeDefProps( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "RegMeta::SetTypeDefProps(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", td, dwTypeDefFlags, tkExtends, rtkImplements)); LOCKWRITE(); @@ -1735,8 +1648,6 @@ STDMETHODIMP RegMeta::SetTypeDefProps( // S_OK or error. hr = _SetTypeDefProps(td, dwTypeDefFlags, tkExtends, rtkImplements); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::SetTypeDefProps @@ -1758,8 +1669,6 @@ STDMETHODIMP RegMeta::DefineNestedType( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "RegMeta::DefineNestedType(%S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", MDSTR(szTypeDef), dwTypeDefFlags, tkExtends, rtkImplements, tdEncloser, ptd)); @@ -1774,7 +1683,6 @@ STDMETHODIMP RegMeta::DefineNestedType( // S_OK or error. tkExtends, rtkImplements, tdEncloser, ptd)); ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineNestedType @@ -1796,8 +1704,6 @@ STDMETHODIMP RegMeta::DefineGenericParam( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - mdToken tkRet = mdGenericParamNil; mdToken tkOwnerType = TypeFromToken(tkOwner); @@ -1871,8 +1777,6 @@ STDMETHODIMP RegMeta::DefineGenericParam( // S_OK or error. if(pgp != NULL) *pgp = tkRet; - END_ENTRYPOINT_NOTHROW; - return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineGenericParam @@ -1892,8 +1796,6 @@ STDMETHODIMP RegMeta::SetGenericParamProps( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "RegMeta::SetGenericParamProps(0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n", gp, dwParamFlags,szName,reserved,rtkConstraints)); @@ -1916,8 +1818,6 @@ STDMETHODIMP RegMeta::SetGenericParamProps( // S_OK or error. hr = META_E_BAD_INPUT_PARAMETER; ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::SetGenericParamProps @@ -2008,8 +1908,6 @@ STDMETHODIMP RegMeta::GetReferencedTypeSysTables( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "RegMeta::GetReferencedTypeSysTables()\n")); ULONG64 refTablesBitVector = 0; @@ -2045,8 +1943,6 @@ STDMETHODIMP RegMeta::GetReferencedTypeSysTables( // S_OK or error. } ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::GetReferencedTypeSysTables @@ -2063,15 +1959,11 @@ STDMETHODIMP RegMeta::DefinePdbStream( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "RegMeta::DefinePdbStream()\n")); IfFailGo(m_pStgdb->m_pPdbHeap->SetData(pdbStream)); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefinePdbStream @@ -2102,8 +1994,6 @@ STDMETHODIMP RegMeta::DefineDocument( // S_OK or error. UINT32* partsIndexesPtr = NULL; char* stringToken = NULL; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "RegMeta::DefineDocument(%s)\n", docName)); LOCKWRITE(); @@ -2176,8 +2066,6 @@ STDMETHODIMP RegMeta::DefineDocument( // S_OK or error. if (partsIndexes != NULL) delete[] partsIndexes; - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineDocument @@ -2195,8 +2083,6 @@ STDMETHODIMP RegMeta::DefineSequencePoints( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "RegMeta::DefineSequencePoints()\n")); LOCKWRITE(); @@ -2214,8 +2100,6 @@ STDMETHODIMP RegMeta::DefineSequencePoints( // S_OK or error. MethodDebugInformationRec::COL_SequencePoints, pMethodDbgInfo, sequencePtsBlob, sequencePtsBlobSize)); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineSequencePoints @@ -2236,8 +2120,6 @@ STDMETHODIMP RegMeta::DefineLocalScope( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "RegMeta::DefineLocalScope()\n")); LOCKWRITE(); @@ -2258,8 +2140,6 @@ STDMETHODIMP RegMeta::DefineLocalScope( // S_OK or error. m_pStgdb->m_MiniMd.SetSorted(TBL_LocalScope, true); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineLocalScope @@ -2278,8 +2158,6 @@ STDMETHODIMP RegMeta::DefineLocalVariable( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "RegMeta::DefineLocalVariable(%s)\n", name)); LOCKWRITE(); @@ -2297,8 +2175,6 @@ STDMETHODIMP RegMeta::DefineLocalVariable( // S_OK or error. *locVarToken = TokenFromRid(localVariableRecord, mdtLocalVariable); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineLocalVariable @@ -2318,12 +2194,9 @@ STDMETHODIMP RegMeta::DefineMethodSpec( // S_OK or error #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - MethodSpecRec *pRecord = 0; // The MethodSpec record. RID iRecord; // RID of new MethodSpec record. - LOG((LOGMD, "MD RegMeta::DefineMethodSpec(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", tkImport, pvSigBlob, cbSigBlob, pmi)); LOCKWRITE(); @@ -2386,8 +2259,6 @@ STDMETHODIMP RegMeta::DefineMethodSpec( // S_OK or error IfFailGo(UpdateENCLog(*pmi)); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineMethodSpec @@ -2406,8 +2277,6 @@ STDMETHODIMP RegMeta::SetMethodProps( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "RegMeta::SetMethodProps(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", md, dwMethodFlags, ulCodeRVA, dwImplFlags)); LOCKWRITE(); @@ -2422,8 +2291,6 @@ STDMETHODIMP RegMeta::SetMethodProps( // S_OK or error. hr = _SetMethodProps(md, dwMethodFlags, ulCodeRVA, dwImplFlags); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::SetMethodProps @@ -2445,8 +2312,6 @@ STDMETHODIMP RegMeta::SetEventProps( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "MD RegMeta::SetEventProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", ev, dwEventFlags, tkEventType, mdAddOn, mdRemoveOn, mdFire, rmdOtherMethods)); LOCKWRITE(); @@ -2457,8 +2322,6 @@ STDMETHODIMP RegMeta::SetEventProps( // S_OK or error. IfFailGo(_SetEventProps2(ev, mdAddOn, mdRemoveOn, mdFire, rmdOtherMethods, true)); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::SetEventProps @@ -2476,8 +2339,6 @@ STDMETHODIMP RegMeta::SetPermissionSetProps( // S_OK or error. #ifdef FEATURE_METADATA_EMIT_ALL HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - USHORT sAction = static_cast(dwAction); // Corresponding DeclSec field is a USHORT. mdPermission tkPerm; @@ -2499,8 +2360,6 @@ STDMETHODIMP RegMeta::SetPermissionSetProps( // S_OK or error. *ppm = tkPerm; IfFailGo(_SetPermissionSetProps(tkPerm, dwAction, pvPermission, cbPermission)); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #else //!FEATURE_METADATA_EMIT_ALL return E_NOTIMPL; @@ -2521,8 +2380,6 @@ STDMETHODIMP RegMeta::DefinePinvokeMap( // Return code. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "MD RegMeta::DefinePinvokeMap(0x%08x, 0x%08x, %S, 0x%08x)\n", tk, dwMappingFlags, MDSTR(szImportName), mrImportDLL)); LOCKWRITE(); @@ -2532,8 +2389,6 @@ STDMETHODIMP RegMeta::DefinePinvokeMap( // Return code. hr = _DefinePinvokeMap(tk, dwMappingFlags, szImportName, mrImportDLL); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefinePinvokeMap @@ -2644,8 +2499,6 @@ STDMETHODIMP RegMeta::SetPinvokeMap( // Return code. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - ImplMapRec *pRecord; RID iRecord; @@ -2678,8 +2531,6 @@ STDMETHODIMP RegMeta::SetPinvokeMap( // Return code. IfFailGo(UpdateENCLog2(TBL_ImplMap, iRecord)); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::SetPinvokeMap @@ -2693,8 +2544,6 @@ STDMETHODIMP RegMeta::DeletePinvokeMap( // Return code. #ifdef FEATURE_METADATA_EMIT_ALL HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - ImplMapRec *pRecord; RID iRecord; @@ -2741,7 +2590,6 @@ STDMETHODIMP RegMeta::DeletePinvokeMap( // Return code. IfFailGo(UpdateENCLog2(TBL_ImplMap, iRecord)); ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; #else //!FEATURE_METADATA_EMIT_ALL return E_NOTIMPL; @@ -2767,8 +2615,6 @@ HRESULT RegMeta::DefineField( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - FieldRec *pRecord = NULL; // The new record. RID iRecord; // RID of new record. LPUTF8 szNameUtf8; @@ -2862,9 +2708,6 @@ HRESULT RegMeta::DefineField( // S_OK or error. ErrExit: SetCallerExternal(); - - END_ENTRYPOINT_NOTHROW; - return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineField @@ -2891,8 +2734,6 @@ HRESULT RegMeta::DefineProperty( #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - PropertyRec *pPropRec = NULL; RID iPropRec; PropertyMapRec *pPropMap; @@ -2977,9 +2818,6 @@ HRESULT RegMeta::DefineProperty( ErrExit: SetCallerExternal(); - - END_ENTRYPOINT_NOTHROW; - return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::DefineProperty @@ -3003,8 +2841,6 @@ HRESULT RegMeta::DefineParam( #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - RID iRecord; ParamRec *pRecord = 0; @@ -3058,7 +2894,6 @@ HRESULT RegMeta::DefineParam( ErrExit: ; - END_ENTRYPOINT_NOTHROW; SetCallerExternal(); return hr; @@ -3080,9 +2915,6 @@ HRESULT RegMeta::SetFieldProps( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - LOG((LOGMD, "MD: RegMeta::SetFieldProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", fd, dwFieldFlags, dwCPlusTypeFlag, pValue, cchValue)); LOCKWRITE(); @@ -3100,8 +2932,6 @@ HRESULT RegMeta::SetFieldProps( // S_OK or error. hr = _SetFieldProps(fd, dwFieldFlags, dwCPlusTypeFlag, pValue, cchValue); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::SetFieldProps @@ -3124,9 +2954,6 @@ HRESULT RegMeta::SetPropertyProps( // S_OK or error. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - LOG((LOGMD, "MD RegMeta::SetPropertyProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", pr, dwPropFlags, dwCPlusTypeFlag, pValue, cchValue, mdSetter, mdGetter, rmdOtherMethods)); @@ -3137,8 +2964,6 @@ HRESULT RegMeta::SetPropertyProps( // S_OK or error. hr = _SetPropertyProps(pr, dwPropFlags, dwCPlusTypeFlag, pValue, cchValue, mdSetter, mdGetter, rmdOtherMethods); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::SetPropertyProps @@ -3160,8 +2985,6 @@ HRESULT RegMeta::SetParamProps( // Return code. #else //!FEATURE_METADATA_EMIT_IN_DEBUGGER HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "MD RegMeta::SetParamProps(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", pd, MDSTR(szName), dwParamFlags, dwCPlusTypeFlag, pValue, cchValue)); LOCKWRITE(); @@ -3171,8 +2994,6 @@ HRESULT RegMeta::SetParamProps( // Return code. hr = _SetParamProps(pd, szName, dwParamFlags, dwCPlusTypeFlag, pValue, cchValue); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; #endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER } // RegMeta::SetParamProps @@ -3186,8 +3007,6 @@ STDMETHODIMP RegMeta::ApplyEditAndContinue( // S_OK or error. #ifdef FEATURE_METADATA_EMIT_ALL HRESULT hr; - BEGIN_ENTRYPOINT_NOTHROW; - IMetaDataImport2 *pImport=0; // Interface on the delta metadata. RegMeta *pDeltaMD=0; // The delta metadata. CMiniMdRW *mdDelta = NULL; @@ -3207,7 +3026,7 @@ STDMETHODIMP RegMeta::ApplyEditAndContinue( // S_OK or error. ErrExit: if (pImport) pImport->Release(); - END_ENTRYPOINT_NOTHROW; + return hr; #else //!FEATURE_METADATA_EMIT_ALL return E_NOTIMPL; diff --git a/src/coreclr/md/compiler/helper.cpp b/src/coreclr/md/compiler/helper.cpp index 71e12fa2643a5..06da321386552 100644 --- a/src/coreclr/md/compiler/helper.cpp +++ b/src/coreclr/md/compiler/helper.cpp @@ -40,8 +40,6 @@ STDMETHODIMP RegMeta::TranslateSigWithScope( // S_OK or error. IMDCommon *pAssemImportMDCommon = NULL; IMDCommon *pImportMDCommon = NULL; - BEGIN_ENTRYPOINT_NOTHROW; - RegMeta *pRegMetaAssemEmit = static_cast(pAssemEmit); RegMeta *pRegMetaEmit = NULL; @@ -87,8 +85,6 @@ STDMETHODIMP RegMeta::TranslateSigWithScope( // S_OK or error. } ErrExit: - END_ENTRYPOINT_NOTHROW; - if (pAssemImportMDCommon) pAssemImportMDCommon->Release(); if (pImportMDCommon) diff --git a/src/coreclr/md/compiler/import.cpp b/src/coreclr/md/compiler/import.cpp index a19a1e684991a..51f8e4267eda7 100644 --- a/src/coreclr/md/compiler/import.cpp +++ b/src/coreclr/md/compiler/import.cpp @@ -33,8 +33,6 @@ STDMETHODIMP RegMeta::EnumMembers( // S_OK, S_FALSE, or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); RID ridStartMethod; RID ridEndMethod; @@ -103,9 +101,6 @@ STDMETHODIMP RegMeta::EnumMembers( // S_OK, S_FALSE, or error. HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::EnumMembers() @@ -122,8 +117,6 @@ STDMETHODIMP RegMeta::EnumMembersWithName( // S_OK, S_FALSE, or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); RID ridStart; RID ridEnd; @@ -222,8 +215,6 @@ STDMETHODIMP RegMeta::EnumMembersWithName( // S_OK, S_FALSE, or error. HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::EnumMembersWithName() @@ -239,8 +230,6 @@ STDMETHODIMP RegMeta::EnumMethods( { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); RID ridStart; RID ridEnd; @@ -250,8 +239,6 @@ STDMETHODIMP RegMeta::EnumMethods( LOG((LOGMD, "MD RegMeta::EnumMethods(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", phEnum, td, rMethods, cMax, pcTokens)); - - LOCKREAD(); if ( *ppmdEnum == 0 ) @@ -316,8 +303,6 @@ STDMETHODIMP RegMeta::EnumMethods( HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::EnumMethods() @@ -337,8 +322,6 @@ STDMETHODIMP RegMeta::EnumMethodsWithName( // S_OK, S_FALSE, or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); RID ridStart; RID ridEnd; @@ -353,11 +336,8 @@ STDMETHODIMP RegMeta::EnumMethodsWithName( // S_OK, S_FALSE, or error. LOG((LOGMD, "MD RegMeta::EnumMethodsWithName(0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n", phEnum, cl, MDSTR(szName), rMethods, cMax, pcTokens)); - - LOCKREAD(); - if ( *ppmdEnum == 0 ) { // instantiating a new ENUM @@ -418,8 +398,6 @@ STDMETHODIMP RegMeta::EnumMethodsWithName( // S_OK, S_FALSE, or error. HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::EnumMethodsWithName() @@ -438,8 +416,6 @@ RegMeta::EnumFields( { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast(phEnum); RID ridStart; RID ridEnd; @@ -513,8 +489,6 @@ RegMeta::EnumFields( HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::EnumFields @@ -533,8 +507,6 @@ STDMETHODIMP RegMeta::EnumFieldsWithName( // S_OK, S_FALSE, or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); RID ridStart; RID ridEnd; @@ -612,8 +584,6 @@ STDMETHODIMP RegMeta::EnumFieldsWithName( // S_OK, S_FALSE, or error. HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::EnumFieldsWithName() @@ -630,8 +600,6 @@ STDMETHODIMP RegMeta::EnumParams( // S_OK, S_FALSE, or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); RID ridStart; RID ridEnd; @@ -682,8 +650,6 @@ STDMETHODIMP RegMeta::EnumParams( // S_OK, S_FALSE, or error. HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::EnumParams() @@ -701,8 +667,6 @@ STDMETHODIMP RegMeta::EnumMemberRefs( // S_OK, S_FALSE, or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); ULONG ridEnd; ULONG index; @@ -756,9 +720,6 @@ STDMETHODIMP RegMeta::EnumMemberRefs( // S_OK, S_FALSE, or error. HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::EnumMemberRefs() @@ -776,19 +737,14 @@ STDMETHODIMP RegMeta::EnumMethodImpls( // S_OK, S_FALSE, or error { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); MethodImplRec *pRec; HENUMInternal *pEnum = NULL; HENUMInternal hEnum; - LOG((LOGMD, "MD RegMeta::EnumMethodImpls(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", phEnum, td, rMethodBody, rMethodDecl, cMax, pcTokens)); - - LOCKREAD(); HENUMInternal::ZeroEnum(&hEnum); @@ -833,8 +789,6 @@ STDMETHODIMP RegMeta::EnumMethodImpls( // S_OK, S_FALSE, or error HENUMInternal::DestroyEnum(pEnum); HENUMInternal::ClearEnum(&hEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::EnumMethodImpls() @@ -853,8 +807,6 @@ STDMETHODIMP RegMeta::EnumPermissionSets( // S_OK, S_FALSE, or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); RID ridStart; RID ridEnd; @@ -951,8 +903,6 @@ STDMETHODIMP RegMeta::EnumPermissionSets( // S_OK, S_FALSE, or error. HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::EnumPermissionSets() @@ -969,9 +919,6 @@ STDMETHODIMP RegMeta::FindMember( { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - - LOG((LOGMD, "MD RegMeta::FindMember(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n", td, MDSTR(szName), pvSigBlob, cbSigBlob, pmb)); @@ -997,8 +944,6 @@ STDMETHODIMP RegMeta::FindMember( pmb) ); } ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::FindMember() @@ -1016,8 +961,6 @@ STDMETHODIMP RegMeta::FindMethod( { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); LPUTF8 szNameUtf8; UTF8STR(szName, szNameUtf8); @@ -1042,8 +985,6 @@ STDMETHODIMP RegMeta::FindMethod( pmb)); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::FindMethod @@ -1061,8 +1002,6 @@ RegMeta::FindField( { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); LOG((LOGMD, "MD RegMeta::FindField(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n", @@ -1087,8 +1026,6 @@ RegMeta::FindField( pmb)); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::FindField @@ -1106,8 +1043,6 @@ STDMETHODIMP RegMeta::FindMemberRef( { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); LPUTF8 szNameUtf8; UTF8STR(szName, szNameUtf8); @@ -1115,9 +1050,6 @@ STDMETHODIMP RegMeta::FindMemberRef( LOG((LOGMD, "MD RegMeta::FindMemberRef(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n", tkPar, MDSTR(szName), pvSigBlob, cbSigBlob, pmr)); - - - // @todo: Can this causing building hash table? If so, should this consider the write lock? LOCKREAD(); @@ -1133,9 +1065,6 @@ STDMETHODIMP RegMeta::FindMemberRef( IfFailGo( ImportHelper::FindMemberRef(pMiniMd, tkPar, szNameUtf8, pvSigBlob, cbSigBlob, pmr) ); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::FindMemberRef() @@ -1156,7 +1085,6 @@ STDMETHODIMP RegMeta::GetMethodProps( DWORD *pdwImplFlags) // [OUT] Impl. Flags { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; MethodRec *pMethodRec; CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); @@ -1215,8 +1143,6 @@ STDMETHODIMP RegMeta::GetMethodProps( } ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::GetMethodProps() @@ -1235,8 +1161,6 @@ STDMETHODIMP RegMeta::GetMemberRefProps( // S_OK or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); MemberRefRec *pMemberRefRec; @@ -1279,9 +1203,6 @@ STDMETHODIMP RegMeta::GetMemberRefProps( // S_OK or error. } ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::GetMemberRefProps() @@ -1298,8 +1219,6 @@ STDMETHODIMP RegMeta::EnumProperties( // S_OK, S_FALSE, or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); RID ridStart = 0; RID ridEnd = 0; @@ -1387,9 +1306,6 @@ STDMETHODIMP RegMeta::EnumProperties( // S_OK, S_FALSE, or error. HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::EnumProperties() @@ -1407,8 +1323,6 @@ STDMETHODIMP RegMeta::EnumEvents( // S_OK, S_FALSE, or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); RID ridStart = 0; RID ridEnd = 0; @@ -1488,8 +1402,6 @@ STDMETHODIMP RegMeta::EnumEvents( // S_OK, S_FALSE, or error. HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::EnumEvents() @@ -1515,8 +1427,6 @@ STDMETHODIMP RegMeta::GetEventProps( // S_OK, S_FALSE, or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); EventRec *pRec; HENUMInternal hEnum; @@ -1599,7 +1509,6 @@ STDMETHODIMP RegMeta::GetEventProps( // S_OK, S_FALSE, or error. ErrExit: HENUMInternal::ClearEnum(&hEnum); - END_ENTRYPOINT_NOTHROW; return hr; } // STDMETHODIMP RegMeta::GetEventProps() @@ -1617,7 +1526,6 @@ STDMETHODIMP RegMeta::EnumMethodSemantics( // S_OK, S_FALSE, or error. ULONG *pcEventProp) // [OUT] Put # put here. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); ULONG ridEnd; @@ -1663,8 +1571,6 @@ STDMETHODIMP RegMeta::EnumMethodSemantics( // S_OK, S_FALSE, or error. HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::EnumMethodSemantics() @@ -1680,8 +1586,6 @@ STDMETHODIMP RegMeta::GetMethodSemantics( // S_OK, S_FALSE, or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); MethodSemanticsRec *pRec; ULONG ridCur; @@ -1717,7 +1621,6 @@ STDMETHODIMP RegMeta::GetMethodSemantics( // S_OK, S_FALSE, or error. ErrExit: HENUMInternal::ClearEnum(&hEnum); - END_ENTRYPOINT_NOTHROW; return hr; } // STDMETHODIMP RegMeta::GetMethodSemantics() @@ -1737,8 +1640,6 @@ STDMETHODIMP RegMeta::GetClassLayout( { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); ClassLayoutRec *pRec; RID ridClassLayout; @@ -1831,8 +1732,6 @@ STDMETHODIMP RegMeta::GetClassLayout( hr = CLDB_E_RECORD_NOTFOUND; ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::GetClassLayout() @@ -1848,8 +1747,6 @@ STDMETHODIMP RegMeta::GetFieldMarshal( { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); RID rid; FieldMarshalRec *pFieldMarshalRec; @@ -1876,8 +1773,6 @@ STDMETHODIMP RegMeta::GetFieldMarshal( IfFailGo(pMiniMd->getNativeTypeOfFieldMarshal(pFieldMarshalRec, ppvNativeType, pcbNativeType)); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::GetFieldMarshal() @@ -1894,8 +1789,6 @@ RegMeta::GetRVA( { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); LOG((LOGMD, "MD RegMeta::GetRVA(0x%08x, 0x%08x, 0x%08x)\n", @@ -1956,8 +1849,6 @@ RegMeta::GetRVA( } } ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::GetRVA @@ -1974,8 +1865,6 @@ STDMETHODIMP RegMeta::GetPermissionSetProps( { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "MD RegMeta::GetPermissionSetProps(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", pm, pdwAction, ppvPermission, pcbPermission)); @@ -2001,8 +1890,6 @@ STDMETHODIMP RegMeta::GetPermissionSetProps( } ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; } // STDMETHODIMP RegMeta::GetPermissionSetProps() @@ -2026,8 +1913,6 @@ STDMETHODIMP RegMeta::GetSigFromToken( // S_OK or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); StandAloneSigRec *pRec; @@ -2044,11 +1929,7 @@ STDMETHODIMP RegMeta::GetSigFromToken( // S_OK or error. IfFailGo(pMiniMd->GetStandAloneSigRecord(RidFromToken(mdSig), &pRec)); IfFailGo(pMiniMd->getSignatureOfStandAloneSig(pRec, ppvSig, pcbSig)); - ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::GetSigFromToken() @@ -2064,13 +1945,9 @@ STDMETHODIMP RegMeta::GetModuleRefProps( // S_OK or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); ModuleRefRec *pModuleRefRec; - - LOG((LOGMD, "MD RegMeta::GetModuleRefProps(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", mur, szName, cchName, pchName)); LOCKREAD(); @@ -2086,9 +1963,6 @@ STDMETHODIMP RegMeta::GetModuleRefProps( // S_OK or error. } ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::GetModuleRefProps() @@ -2105,8 +1979,6 @@ STDMETHODIMP RegMeta::EnumModuleRefs( // S_OK or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); HENUMInternal *pEnum; @@ -2141,8 +2013,6 @@ STDMETHODIMP RegMeta::EnumModuleRefs( // S_OK or error. ErrExit: HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::EnumModuleRefs() @@ -2157,8 +2027,6 @@ STDMETHODIMP RegMeta::GetTypeSpecFromToken( // S_OK or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); TypeSpecRec *pRec = NULL; @@ -2176,8 +2044,6 @@ STDMETHODIMP RegMeta::GetTypeSpecFromToken( // S_OK or error. IfFailGo(pMiniMd->getSignatureOfTypeSpec(pRec, ppvSig, pcbSig)); ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; } // STDMETHODIMP RegMeta::GetTypeSpecFromToken() @@ -2202,9 +2068,6 @@ STDMETHODIMP RegMeta::GetNameFromToken( // S_OK or error. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); LOG((LOGMD, "MD RegMeta::GetNameFromToken(0x%08x, 0x%08x)\n", @@ -2232,10 +2095,6 @@ STDMETHODIMP RegMeta::GetNameFromToken( // S_OK or error. } ErrExit: - - - END_ENTRYPOINT_NOTHROW; - return (hr); } // RegMeta::GetNameFromToken @@ -2253,8 +2112,6 @@ STDMETHODIMP RegMeta::EnumUnresolvedMethods( // S_OK or error. #ifdef FEATURE_METADATA_EMIT HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal ** ppmdEnum = reinterpret_cast (phEnum); uint32_t iCountTypeDef; // Count of TypeDefs. uint32_t ulStart, ulEnd; // Bounds of methods on a given TypeDef. @@ -2375,8 +2232,6 @@ STDMETHODIMP RegMeta::EnumUnresolvedMethods( // S_OK or error. HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - END_ENTRYPOINT_NOTHROW; - return hr; #else //!FEATURE_METADATA_EMIT return E_NOTIMPL; @@ -2397,8 +2252,6 @@ STDMETHODIMP RegMeta::GetUserString( // S_OK or error. ULONG cchStringSize_Dummy; MetaData::DataBlob userString; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "MD RegMeta::GetUserString(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", stk, wszString, cchStringSize, pcchStringSize)); @@ -2448,7 +2301,6 @@ STDMETHODIMP RegMeta::GetUserString( // S_OK or error. } ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; } // RegMeta::GetUserString @@ -2465,8 +2317,6 @@ STDMETHODIMP RegMeta::GetPinvokeMap( // S_OK or error. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - ImplMapRec * pRecord; uint32_t iRecord; @@ -2494,8 +2344,6 @@ STDMETHODIMP RegMeta::GetPinvokeMap( // S_OK or error. if (szImportName || pchImportName) IfFailGo(m_pStgdb->m_MiniMd.getImportNameOfImplMap(pRecord, szImportName, cchImportName, pchImportName)); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // HRESULT RegMeta::GetPinvokeMap() @@ -2510,8 +2358,6 @@ STDMETHODIMP RegMeta::EnumSignatures( // S_OK or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppsigEnum = reinterpret_cast (phEnum); HENUMInternal *pEnum; @@ -2546,8 +2392,6 @@ STDMETHODIMP RegMeta::EnumSignatures( // S_OK or error. ErrExit: HENUMInternal::DestroyEnumIfEmpty(ppsigEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::EnumSignatures @@ -2563,8 +2407,6 @@ STDMETHODIMP RegMeta::EnumTypeSpecs( // S_OK or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppEnum = reinterpret_cast (phEnum); HENUMInternal *pEnum; @@ -2599,8 +2441,6 @@ STDMETHODIMP RegMeta::EnumTypeSpecs( // S_OK or error. ErrExit: HENUMInternal::DestroyEnumIfEmpty(ppEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::EnumTypeSpecs @@ -2616,8 +2456,6 @@ STDMETHODIMP RegMeta::EnumUserStrings( // S_OK or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppEnum = reinterpret_cast (phEnum); HENUMInternal *pEnum = NULL; @@ -2676,8 +2514,6 @@ STDMETHODIMP RegMeta::EnumUserStrings( // S_OK or error. HENUMInternal::DestroyEnumIfEmpty(ppEnum); HENUMInternal::DestroyEnum(pEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::EnumUserStrings @@ -2692,9 +2528,6 @@ STDMETHODIMP RegMeta::GetParamForMethodIndex( // S_OK or error. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - LOG((LOGMD, "MD RegMeta::GetParamForMethodIndex(0x%08x, 0x%08x, 0x%08x)\n", md, ulParamSeq, ppd)); @@ -2704,9 +2537,6 @@ STDMETHODIMP RegMeta::GetParamForMethodIndex( // S_OK or error. IfFailGo(_FindParamOfMethod(md, ulParamSeq, ppd)); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::GetParamForMethodIndex() @@ -2730,15 +2560,10 @@ HRESULT RegMeta::GetMemberProps( { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "MD RegMeta::GetMemberProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", mb, pClass, szMember, cchMember, pchMember, pdwAttr, ppvSigBlob, pcbSigBlob, pulCodeRVA, pdwImplFlags, pdwCPlusTypeFlag, ppValue, pchValue)); - - - _ASSERTE(TypeFromToken(mb) == mdtMethodDef || TypeFromToken(mb) == mdtFieldDef); // No need to lock this function. It is calling public APIs. Keep it that way. @@ -2775,8 +2600,6 @@ HRESULT RegMeta::GetMemberProps( pchValue) ); } ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // HRESULT RegMeta::GetMemberProps() @@ -2798,8 +2621,6 @@ HRESULT RegMeta::GetFieldProps( { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - FieldRec *pFieldRec; CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); @@ -2885,8 +2706,6 @@ HRESULT RegMeta::GetFieldProps( } ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // HRESULT RegMeta::GetFieldProps() @@ -2913,8 +2732,6 @@ HRESULT RegMeta::GetPropertyProps( // S_OK, S_FALSE, or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd; PropertyRec *pRec; HENUMInternal hEnum; @@ -2928,8 +2745,6 @@ HRESULT RegMeta::GetPropertyProps( // S_OK, S_FALSE, or error. pchDefaultValue, pmdSetter, pmdGetter, rmdOtherMethod, cMax, pcOtherMethod)); - - LOCKREAD(); _ASSERTE(TypeFromToken(prop) == mdtProperty); @@ -3052,7 +2867,6 @@ HRESULT RegMeta::GetPropertyProps( // S_OK, S_FALSE, or error. ErrExit: HENUMInternal::ClearEnum(&hEnum); - END_ENTRYPOINT_NOTHROW; return hr; } // HRESULT RegMeta::GetPropertyProps() @@ -3075,8 +2889,6 @@ HRESULT RegMeta::GetParamProps( // S_OK or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - ParamRec *pParamRec; CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); @@ -3144,8 +2956,6 @@ HRESULT RegMeta::GetParamProps( // S_OK or error. IfFailGo( pMiniMd->getNameOfParam(pParamRec, szName, cchName, pchName) ); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // HRESULT RegMeta::GetParamProps() @@ -3164,8 +2974,6 @@ HRESULT RegMeta::GetGenericParamProps( // S_OK or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - GenericParamRec *pGenericParamRec; CMiniMdRW *pMiniMd = NULL; RID ridRD = RidFromToken(rd); @@ -3201,8 +3009,6 @@ HRESULT RegMeta::GetGenericParamProps( // S_OK or error. hr = META_E_BAD_INPUT_PARAMETER; ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // HRESULT RegMeta::GetGenericParamProps() @@ -3216,8 +3022,6 @@ HRESULT RegMeta::GetGenericParamConstraintProps( // S_OK or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - GenericParamConstraintRec *pGPCRec; CMiniMdRW *pMiniMd = NULL; RID ridRD = RidFromToken(rd); @@ -3247,8 +3051,6 @@ HRESULT RegMeta::GetGenericParamConstraintProps( // S_OK or error. hr = META_E_BAD_INPUT_PARAMETER; ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // HRESULT RegMeta::GetGenericParamConstraintProps() @@ -3263,8 +3065,6 @@ HRESULT RegMeta::GetMethodSpecProps( // S_OK or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - MethodSpecRec *pMethodSpecRec; CMiniMdRW *pMiniMd = NULL; @@ -3300,9 +3100,6 @@ HRESULT RegMeta::GetMethodSpecProps( // S_OK or error. ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // HRESULT RegMeta::GetMethodSpecProps() @@ -3316,21 +3113,16 @@ HRESULT RegMeta::GetPEKind( // S_OK or error. HRESULT hr = NOERROR; MAPPINGTYPE mt = MTYPE_NOMAPPING; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "MD RegMeta::GetPEKind(0x%08x, 0x%08x)\n",pdwPEKind,pdwMachine)); LOCKREAD(); - if (m_pStgdb->m_pStgIO != NULL) mt = m_pStgdb->m_pStgIO->GetMemoryMappedType(); hr = m_pStgdb->GetPEKind(mt, pdwPEKind, pdwMachine); - ErrExit: - - END_ENTRYPOINT_NOTHROW; +ErrExit: return hr; } // HRESULT RegMeta::GetPEKind() @@ -3346,7 +3138,6 @@ HRESULT RegMeta::GetVersionString( // S_OK or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; REGMETA_POSSIBLE_INTERNAL_POINTER_EXPOSED(); DWORD cch; // Length of WideChar string. @@ -3385,8 +3176,6 @@ HRESULT RegMeta::GetVersionString( // S_OK or error. *pchBufSize = cch; ErrExit: - - END_ENTRYPOINT_NOTHROW; return hr; } // HRESULT RegMeta::GetVersionString() @@ -3399,8 +3188,6 @@ HRESULT RegMeta::GetNestedClassProps( // S_OK or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - NestedClassRec *pRecord; uint32_t iRecord; CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); @@ -3433,8 +3220,6 @@ HRESULT RegMeta::GetNestedClassProps( // S_OK or error. *ptdEnclosingClass = pMiniMd->getEnclosingClassOfNestedClass(pRecord); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // HRESULT RegMeta::GetNestedClassProps() @@ -3448,8 +3233,6 @@ HRESULT RegMeta::GetNativeCallConvFromSig( // S_OK or error. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - PCCOR_SIGNATURE pvSigBlob = reinterpret_cast(pvSig); ULONG cbTotal = 0; // total of number bytes for return type + all fixed arguments ULONG cbCur = 0; // index through the pvSigBlob @@ -3460,9 +3243,6 @@ HRESULT RegMeta::GetNativeCallConvFromSig( // S_OK or error. ULONG cArgsIndex; ULONG callConv = pmCallConvWinapi; // The calling convention. - - - *pCallConv = pmCallConvWinapi; // remember the number of bytes to represent the calling convention @@ -3527,8 +3307,6 @@ HRESULT RegMeta::GetNativeCallConvFromSig( // S_OK or error. } ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // HRESULT RegMeta::GetNativeCallConvFromSig() diff --git a/src/coreclr/md/compiler/regmeta.cpp b/src/coreclr/md/compiler/regmeta.cpp index d4a74bd9c2e97..969eb98d2c6a7 100644 --- a/src/coreclr/md/compiler/regmeta.cpp +++ b/src/coreclr/md/compiler/regmeta.cpp @@ -86,8 +86,6 @@ RegMeta::RegMeta() : RegMeta::~RegMeta() { - BEGIN_CLEANUP_ENTRYPOINT; - _ASSERTE(!m_bCached); HRESULT hr = S_OK; @@ -166,8 +164,6 @@ RegMeta::~RegMeta() if (m_OptionValue.m_RuntimeVersion != NULL) delete[] m_OptionValue.m_RuntimeVersion; - END_CLEANUP_ENTRYPOINT; - } // RegMeta::~RegMeta() HRESULT RegMeta::SetOption(OptionValue *pOptionValue) @@ -541,7 +537,6 @@ RegMeta::QueryInterface( void ** ppUnk) { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; int fIsInterfaceRW = false; *ppUnk = 0; @@ -699,9 +694,6 @@ RegMeta::QueryInterface( AddRef(); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::QueryInterface diff --git a/src/coreclr/md/compiler/regmeta_compilersupport.cpp b/src/coreclr/md/compiler/regmeta_compilersupport.cpp index e65d3c37eca31..87a9127e6226e 100644 --- a/src/coreclr/md/compiler/regmeta_compilersupport.cpp +++ b/src/coreclr/md/compiler/regmeta_compilersupport.cpp @@ -70,8 +70,6 @@ STDMETHODIMP RegMeta::GetDeltaSaveSize( // S_OK or error. #ifdef FEATURE_METADATA_EMIT_ALL HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - // Make sure we're in EnC mode if (!IsENCOn()) { @@ -84,8 +82,6 @@ STDMETHODIMP RegMeta::GetDeltaSaveSize( // S_OK or error. m_pStgdb->m_MiniMd.DisableDeltaMetadataGeneration(); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; #else //!FEATURE_METADATA_EMIT_ALL return E_NOTIMPL; @@ -102,9 +98,6 @@ STDMETHODIMP RegMeta::SaveDelta( // S_OK or error. #ifdef FEATURE_METADATA_EMIT_ALL HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - // Make sure we're in EnC mode if (!IsENCOn()) { @@ -112,16 +105,11 @@ STDMETHODIMP RegMeta::SaveDelta( // S_OK or error. IfFailGo(META_E_NOT_IN_ENC_MODE); } - - m_pStgdb->m_MiniMd.EnableDeltaMetadataGeneration(); hr = Save(szFile, dwSaveFlags); m_pStgdb->m_MiniMd.DisableDeltaMetadataGeneration(); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; #else //!FEATURE_METADATA_EMIT_ALL return E_NOTIMPL; @@ -138,8 +126,6 @@ STDMETHODIMP RegMeta::SaveDeltaToStream( // S_OK or error. #ifdef FEATURE_METADATA_EMIT_ALL HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - // Make sure we're in EnC mode if (!IsENCOn()) { @@ -147,15 +133,11 @@ STDMETHODIMP RegMeta::SaveDeltaToStream( // S_OK or error. IfFailGo(META_E_NOT_IN_ENC_MODE); } - - m_pStgdb->m_MiniMd.EnableDeltaMetadataGeneration(); hr = SaveToStream(pIStream, dwSaveFlags); m_pStgdb->m_MiniMd.DisableDeltaMetadataGeneration(); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; #else //!FEATURE_METADATA_EMIT_ALL return E_NOTIMPL; @@ -171,26 +153,17 @@ STDMETHODIMP RegMeta::SaveDeltaToMemory( // S_OK or error. ULONG cbData) // [IN] Max size of data buffer. { #ifdef FEATURE_METADATA_EMIT_ALL - HRESULT hr = S_OK; - - BEGIN_ENTRYPOINT_NOTHROW; - // Make sure we're in EnC mode if (!IsENCOn()) { _ASSERTE(!"Not in EnC mode!"); - IfFailGo(META_E_NOT_IN_ENC_MODE); + return META_E_NOT_IN_ENC_MODE; } - m_pStgdb->m_MiniMd.EnableDeltaMetadataGeneration(); - hr = SaveToMemory(pbData, cbData); + HRESULT hr = SaveToMemory(pbData, cbData); m_pStgdb->m_MiniMd.DisableDeltaMetadataGeneration(); -ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; #else //!FEATURE_METADATA_EMIT_ALL return E_NOTIMPL; @@ -208,8 +181,6 @@ RegMeta::ResetENCLog() #ifdef FEATURE_METADATA_EMIT_ALL HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - // Make sure we're in EnC mode if (!IsENCOn()) { @@ -219,8 +190,6 @@ RegMeta::ResetENCLog() IfFailGo(m_pStgdb->m_MiniMd.ResetENCLog()); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; #else //!FEATURE_METADATA_EMIT_ALL return E_NOTIMPL; diff --git a/src/coreclr/md/compiler/regmeta_emit.cpp b/src/coreclr/md/compiler/regmeta_emit.cpp index 1b03550699c9e..7f161c9987bc3 100644 --- a/src/coreclr/md/compiler/regmeta_emit.cpp +++ b/src/coreclr/md/compiler/regmeta_emit.cpp @@ -50,8 +50,6 @@ STDMETHODIMP RegMeta::SetModuleProps( // S_OK or error. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - ModuleRec *pModule; // The module record to modify. LOG((LOGMD, "RegMeta::SetModuleProps(%S)\n", MDSTR(szName))); @@ -74,9 +72,6 @@ STDMETHODIMP RegMeta::SetModuleProps( // S_OK or error. IfFailGo(UpdateENCLog(TokenFromRid(1, mdtModule))); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::SetModuleProps() @@ -89,8 +84,6 @@ STDMETHODIMP RegMeta::Save( // S_OK or error. { HRESULT hr=S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "RegMeta::Save(%S, 0x%08x)\n", MDSTR(szFile), dwSaveFlags)); LOCKWRITE(); @@ -114,9 +107,6 @@ STDMETHODIMP RegMeta::Save( // S_OK or error. #endif // _DEBUG ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::Save() @@ -129,8 +119,6 @@ STDMETHODIMP RegMeta::SaveToStream( // S_OK or error. { HRESULT hr=S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOCKWRITE(); LOG((LOGMD, "RegMeta::SaveToStream(0x%08x, 0x%08x)\n", pIStream, dwSaveFlags)); @@ -149,9 +137,6 @@ STDMETHODIMP RegMeta::SaveToStream( // S_OK or error. #endif // _DEBUG ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::SaveToStream() @@ -187,8 +172,6 @@ STDMETHODIMP RegMeta::SaveToMemory( // S_OK or error. { HRESULT hr; - BEGIN_ENTRYPOINT_NOTHROW; - IStream *pStream = 0; // Working pointer for save. LOG((LOGMD, "MD RegMeta::SaveToMemory(0x%08x, 0x%08x)\n", @@ -211,7 +194,6 @@ STDMETHODIMP RegMeta::SaveToMemory( // S_OK or error. ErrExit: if (pStream) pStream->Release(); - END_ENTRYPOINT_NOTHROW; return (hr); } // STDMETHODIMP RegMeta::SaveToMemory() @@ -225,8 +207,6 @@ STDMETHODIMP RegMeta::GetSaveSize( // S_OK or error. { HRESULT hr=S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - FilterTable *ft = NULL; LOG((LOGMD, "RegMeta::GetSaveSize(0x%08x, 0x%08x)\n", fSave, pdwSaveSize)); @@ -253,7 +233,6 @@ STDMETHODIMP RegMeta::GetSaveSize( // S_OK or error. } } - if (ft->Count() != 0) { int iCount; @@ -274,9 +253,6 @@ STDMETHODIMP RegMeta::GetSaveSize( // S_OK or error. hr = m_pStgdb->GetSaveSize(fSave, (UINT32 *)pdwSaveSize, m_ReorderingOptions); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::GetSaveSize @@ -291,7 +267,6 @@ HRESULT RegMeta::UnmarkAll() { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; int i; int iCount; TypeDefRec *pRec; @@ -416,10 +391,6 @@ HRESULT RegMeta::UnmarkAll() } } ErrExit: - - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::UnmarkAll @@ -459,8 +430,6 @@ STDMETHODIMP RegMeta::MarkToken( // Return code. { HRESULT hr = NOERROR; - BEGIN_ENTRYPOINT_NOTHROW; - // LOG((LOGMD, "RegMeta::MarkToken(0x%08x)\n", tk)); LOCKWRITE(); @@ -536,9 +505,6 @@ STDMETHODIMP RegMeta::MarkToken( // Return code. break; } ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::MarkToken @@ -554,8 +520,6 @@ HRESULT RegMeta::IsTokenMarked( { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - FilterTable *pFilter = NULL; LOG((LOGMD, "RegMeta::IsTokenMarked(0x%08x)\n", tk)); @@ -618,9 +582,6 @@ HRESULT RegMeta::IsTokenMarked( break; } ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::IsTokenMarked @@ -638,8 +599,6 @@ STDMETHODIMP RegMeta::DefineTypeDef( // S_OK or error. { HRESULT hr = S_OK; // A result. - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "RegMeta::DefineTypeDef(%S, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", MDSTR(szTypeDef), dwTypeDefFlags, tkExtends, rtkImplements, ptd)); @@ -652,9 +611,6 @@ STDMETHODIMP RegMeta::DefineTypeDef( // S_OK or error. IfFailGo(_DefineTypeDef(szTypeDef, dwTypeDefFlags, tkExtends, rtkImplements, mdTokenNil, ptd)); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::DefineTypeDef() @@ -667,8 +623,6 @@ STDMETHODIMP RegMeta::SetHandler( // S_OK. { HRESULT hr = S_OK; // A result. - BEGIN_ENTRYPOINT_NOTHROW; - IMapToken *pIMap = NULL; LOG((LOGMD, "RegMeta::SetHandler(0x%08x)\n", pUnk)); @@ -687,9 +641,6 @@ STDMETHODIMP RegMeta::SetHandler( // S_OK. pIMap->Release(); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::SetHandler() diff --git a/src/coreclr/md/compiler/regmeta_imetadatatables.cpp b/src/coreclr/md/compiler/regmeta_imetadatatables.cpp index af519ecb809f1..25b64d3261cc6 100644 --- a/src/coreclr/md/compiler/regmeta_imetadatatables.cpp +++ b/src/coreclr/md/compiler/regmeta_imetadatatables.cpp @@ -48,13 +48,8 @@ HRESULT RegMeta::GetStringHeapSize( _Out_ ULONG *pcbStringsHeapSize) // [OUT] Size of the string heap. { - HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - *pcbStringsHeapSize = m_pStgdb->m_MiniMd.m_StringHeap.GetUnalignedSize(); - - END_ENTRYPOINT_NOTHROW; - return hr; + return S_OK; } // RegMeta::GetStringHeapSize // -------------------------------------------------------------------------------------- @@ -67,13 +62,8 @@ HRESULT RegMeta::GetBlobHeapSize( _Out_ ULONG *pcbBlobsHeapSize) // [OUT] Size of the blob heap. { - HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - *pcbBlobsHeapSize = m_pStgdb->m_MiniMd.m_BlobHeap.GetUnalignedSize(); - - END_ENTRYPOINT_NOTHROW; - return hr; + return S_OK; } // RegMeta::GetBlobHeapSize // -------------------------------------------------------------------------------------- @@ -86,13 +76,8 @@ HRESULT RegMeta::GetGuidHeapSize( _Out_ ULONG *pcbGuidsHeapSize) // [OUT] Size of the Guid heap. { - HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - *pcbGuidsHeapSize = m_pStgdb->m_MiniMd.m_GuidHeap.GetSize(); - - END_ENTRYPOINT_NOTHROW; - return hr; + return S_OK; } // RegMeta::GetGuidHeapSize // -------------------------------------------------------------------------------------- @@ -105,13 +90,8 @@ HRESULT RegMeta::GetUserStringHeapSize( _Out_ ULONG *pcbUserStringsHeapSize) // [OUT] Size of the user string heap. { - HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - *pcbUserStringsHeapSize = m_pStgdb->m_MiniMd.m_UserStringHeap.GetUnalignedSize(); - - END_ENTRYPOINT_NOTHROW; - return hr; + return S_OK; } // RegMeta::GetUserStringHeapSize // -------------------------------------------------------------------------------------- @@ -127,7 +107,6 @@ HRESULT RegMeta::GetString( const char **pszString) // [OUT] Put a pointer to the string here. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; IfFailGo(m_pStgdb->m_MiniMd.getString( ixString, @@ -138,7 +117,6 @@ HRESULT RegMeta::GetString( ErrExit: *pszString = NULL; Exit: - END_ENTRYPOINT_NOTHROW; return hr; } // RegMeta::GetString @@ -156,7 +134,6 @@ HRESULT RegMeta::GetBlob( _Outptr_ const void **ppvData) // [OUT] Put a pointer to the blob here. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; MetaData::DataBlob dataBlob; IfFailGo(m_pStgdb->m_MiniMd.getBlob(ixBlob, &dataBlob)); @@ -170,7 +147,6 @@ HRESULT RegMeta::GetBlob( *ppvData = NULL; *pcbDataSize = 0; Exit: - END_ENTRYPOINT_NOTHROW; return hr; } // RegMeta::GetBlob @@ -192,7 +168,6 @@ HRESULT RegMeta::GetGuid( const GUID **ppGuid) // [OUT] Put a pointer to the GUID here. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; REGMETA_POSSIBLE_INTERNAL_POINTER_EXPOSED(); @@ -210,7 +185,6 @@ HRESULT RegMeta::GetGuid( } ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; } // RegMeta::GetGuid @@ -229,7 +203,6 @@ RegMeta::GetUserString( _Outptr_opt_ const void **ppvData) // [OUT] Put a pointer to the UserString here. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; MetaData::DataBlob userString; IfFailGo(m_pStgdb->m_MiniMd.GetUserString(ixUserString, &userString)); @@ -243,7 +216,6 @@ RegMeta::GetUserString( *ppvData = NULL; *pcbDataSize = 0; Exit: - END_ENTRYPOINT_NOTHROW; return hr; } // RegMeta::GetUserString @@ -262,7 +234,6 @@ RegMeta::GetNextString( _Out_ ULONG *pixNextString) // [OUT] Put the index of the next string here. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; REGMETA_POSSIBLE_INTERNAL_POINTER_EXPOSED(); @@ -292,7 +263,6 @@ RegMeta::GetNextString( // Return S_FALSE if either of the string indexes is invalid (backward API compatibility) hr = S_FALSE; Exit: - END_ENTRYPOINT_NOTHROW; return hr; } // RegMeta::GetNextString @@ -310,7 +280,6 @@ RegMeta::GetNextBlob( _Out_ ULONG *pixNextBlob) // [OUT] Put the index of the next blob here. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; REGMETA_POSSIBLE_INTERNAL_POINTER_EXPOSED(); @@ -340,7 +309,6 @@ RegMeta::GetNextBlob( // Return S_FALSE if either of the string indexes is invalid (backward API compatibility) hr = S_FALSE; Exit: - END_ENTRYPOINT_NOTHROW; return hr; } // RegMeta::GetNextBlob @@ -361,7 +329,6 @@ RegMeta::GetNextGuid( _Out_ ULONG *pixNextGuid) // [OUT] Put the index of the next guid here. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; S_UINT32 ixNextGuid = S_UINT32(ixGuid) + S_UINT32(1); if (ixNextGuid.IsOverflow()) @@ -383,7 +350,6 @@ RegMeta::GetNextGuid( // Return S_FALSE if next guid index is invalid (backward API compatibility) hr = S_FALSE; Exit: - END_ENTRYPOINT_NOTHROW; return hr; } // RegMeta::GetNextGuid @@ -405,7 +371,6 @@ RegMeta::GetNextUserString( _Out_ ULONG *pixNextUserString) // [OUT] Put the index of the next user string here. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; REGMETA_POSSIBLE_INTERNAL_POINTER_EXPOSED(); @@ -435,7 +400,6 @@ RegMeta::GetNextUserString( // Return S_FALSE if either of the string indexes is invalid (backward API compatibility) hr = S_FALSE; Exit: - END_ENTRYPOINT_NOTHROW; return hr; } // RegMeta::GetNextUserString @@ -447,14 +411,10 @@ HRESULT RegMeta::GetNumTables( _Out_ ULONG *pcTables) // [OUT] Count of tables. { - BEGIN_ENTRYPOINT_NOTHROW; - // These are for dumping metadata information. // We probably don't need to do any lock here. *pcTables = m_pStgdb->m_MiniMd.GetCountTables(); - END_ENTRYPOINT_NOTHROW; - return S_OK; } // RegMeta::GetNumTables @@ -467,14 +427,10 @@ RegMeta::GetTableIndex( ULONG token, // [IN] Token for which to get table index. _Out_ ULONG *pixTbl) // [OUT] Put table index here. { - BEGIN_ENTRYPOINT_NOTHROW; - // These are for dumping metadata information. // We probably don't need to do any lock here. *pixTbl = CMiniMdRW::GetTableForToken(token); - END_ENTRYPOINT_NOTHROW; - return S_OK; } // RegMeta::GetTableIndex @@ -494,7 +450,6 @@ RegMeta::GetTableInfo( HRESULT hr = S_OK; CMiniTableDef *pTbl = NULL; - BEGIN_ENTRYPOINT_NOTHROW; // These are for dumping metadata information. // We probably don't need to do any lock here. @@ -514,7 +469,6 @@ RegMeta::GetTableInfo( *ppName = g_Tables[ixTbl].m_pName; ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; } // RegMeta::GetTableInfo @@ -535,8 +489,6 @@ RegMeta::GetColumnInfo( CMiniTableDef *pTbl = NULL; CMiniColDef *pCol = NULL; - BEGIN_ENTRYPOINT_NOTHROW; - // These are for dumping metadata information. // We probably don't need to do any lock here. @@ -556,7 +508,6 @@ RegMeta::GetColumnInfo( *ppName = g_Tables[ixTbl].m_pColNames[ixCol]; ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; } // RegMeta::GetColumnInfo @@ -573,8 +524,6 @@ RegMeta::GetCodedTokenInfo( { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - // These are for dumping metadata information. // We probably don't need to do any lock here. @@ -590,7 +539,6 @@ RegMeta::GetCodedTokenInfo( *ppName = g_CodedTokens[ixCdTkn].m_pName; ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; } // RegMeta::GetCodedTokenInfo @@ -606,8 +554,6 @@ RegMeta::GetRow( { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - // These are for dumping metadata information. // We probably don't need to do any lock here. @@ -621,7 +567,6 @@ RegMeta::GetRow( IfFailGo(m_pStgdb->m_MiniMd.getRow(ixTbl, rid, ppRow)); ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; } // RegMeta::GetRow @@ -640,8 +585,6 @@ RegMeta::GetColumn( CMiniColDef *pCol = NULL; CMiniTableDef *pTbl = NULL; - BEGIN_ENTRYPOINT_NOTHROW; - // These are for dumping metadata information. // We probably don't need to do any lock here. @@ -671,7 +614,6 @@ RegMeta::GetColumn( } ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; } // RegMeta::GetColumn @@ -684,15 +626,9 @@ RegMeta::GetMetaDataStorage( const void **ppvMd, // [OUT] put pointer to MD section here (aka, 'BSJB'). ULONG *pcbMd) // [OUT] put size of the stream here. { - HRESULT hr = S_OK; - - BEGIN_ENTRYPOINT_NOTHROW; REGMETA_POSSIBLE_INTERNAL_POINTER_EXPOSED(); - hr = m_pStgdb->GetRawData(ppvMd, pcbMd); - - END_ENTRYPOINT_NOTHROW; - return hr; + return m_pStgdb->GetRawData(ppvMd, pcbMd); } // RegMeta::GetMetaDataStorage // -------------------------------------------------------------------------------------- @@ -706,13 +642,7 @@ RegMeta::GetMetaDataStreamInfo( const void **ppv, // [OUT] put pointer to MD stream here. ULONG *pcb) // [OUT] put size of the stream here. { - HRESULT hr = S_OK; - - BEGIN_ENTRYPOINT_NOTHROW; REGMETA_POSSIBLE_INTERNAL_POINTER_EXPOSED(); - hr = m_pStgdb->GetRawStreamInfo(ix, ppchName, ppv, pcb); - - END_ENTRYPOINT_NOTHROW; - return hr; + return m_pStgdb->GetRawStreamInfo(ix, ppchName, ppv, pcb); } // RegMeta::GetMetaDataStreamInfo diff --git a/src/coreclr/md/compiler/regmeta_import.cpp b/src/coreclr/md/compiler/regmeta_import.cpp index 77f6c4a547db8..fad0d94d1b889 100644 --- a/src/coreclr/md/compiler/regmeta_import.cpp +++ b/src/coreclr/md/compiler/regmeta_import.cpp @@ -48,7 +48,6 @@ BOOL RegMeta::IsValidToken( // true if tk is valid token { BOOL fRet = FALSE; HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_VOIDRET; LOCKREADNORET(); @@ -58,7 +57,6 @@ BOOL RegMeta::IsValidToken( // true if tk is valid token fRet = m_pStgdb->m_MiniMd._IsValidToken(tk); ErrExit: - END_ENTRYPOINT_VOIDRET; return fRet; } // RegMeta::IsValidToken @@ -68,8 +66,6 @@ BOOL RegMeta::IsValidToken( // true if tk is valid token void STDMETHODCALLTYPE RegMeta::CloseEnum( HCORENUM hEnum) // The enumerator. { - BEGIN_CLEANUP_ENTRYPOINT; - LOG((LOGMD, "RegMeta::CloseEnum(0x%08x)\n", hEnum)); // No need to lock this function. @@ -79,7 +75,6 @@ void STDMETHODCALLTYPE RegMeta::CloseEnum( return; HENUMInternal::DestroyEnum(pmdEnum); - END_CLEANUP_ENTRYPOINT; } // RegMeta::CloseEnum //***************************************************************************** @@ -121,12 +116,7 @@ STDMETHODIMP RegMeta::CountEnum( HCORENUM hEnum, // The enumerator. ULONG *pulCount) // Put the count here. { - HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - hr = ::CountEnum(hEnum, pulCount); - END_ENTRYPOINT_NOTHROW; - return hr; + return ::CountEnum(hEnum, pulCount); } // RegMeta::CountEnum //***************************************************************************** @@ -136,24 +126,16 @@ STDMETHODIMP RegMeta::ResetEnum( HCORENUM hEnum, // The enumerator. ULONG ulPos) // Seek position. { - HRESULT hr = S_OK; - - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal *pmdEnum = reinterpret_cast (hEnum); // No need to lock this function. LOG((LOGMD, "RegMeta::ResetEnum(0x%08x, 0x%08x)\n", hEnum, ulPos)); - if (pmdEnum == NULL) - goto ErrExit; + if (pmdEnum != NULL) + pmdEnum->u.m_ulCur = pmdEnum->u.m_ulStart + ulPos; - pmdEnum->u.m_ulCur = pmdEnum->u.m_ulStart + ulPos; - -ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; + return S_OK; } // RegMeta::ResetEnum //***************************************************************************** @@ -167,8 +149,6 @@ STDMETHODIMP RegMeta::EnumTypeDefs( { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); HENUMInternal *pEnum = NULL; @@ -223,9 +203,6 @@ STDMETHODIMP RegMeta::EnumTypeDefs( HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::EnumTypeDefs @@ -241,8 +218,6 @@ STDMETHODIMP RegMeta::EnumInterfaceImpls( { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); RID ridStart; RID ridEnd; @@ -298,9 +273,6 @@ STDMETHODIMP RegMeta::EnumInterfaceImpls( HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::EnumInterfaceImpls @@ -309,8 +281,6 @@ STDMETHODIMP RegMeta::EnumGenericParams(HCORENUM *phEnum, mdToken tkOwner, { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); RID ridStart; RID ridEnd; @@ -390,8 +360,6 @@ STDMETHODIMP RegMeta::EnumGenericParams(HCORENUM *phEnum, mdToken tkOwner, HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // RegMeta::EnumGenericParams @@ -404,8 +372,6 @@ STDMETHODIMP RegMeta::EnumMethodSpecs( { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); RID ridStart; RID ridEnd; @@ -492,8 +458,6 @@ STDMETHODIMP RegMeta::EnumMethodSpecs( HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::EnumMethodSpecs() @@ -506,8 +470,6 @@ STDMETHODIMP RegMeta::EnumGenericParamConstraints( { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); RID ridStart; RID ridEnd; @@ -578,8 +540,6 @@ STDMETHODIMP RegMeta::EnumGenericParamConstraints( HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); HENUMInternal::DestroyEnum(pEnum); - END_ENTRYPOINT_NOTHROW; - return hr; } @@ -594,14 +554,10 @@ STDMETHODIMP RegMeta::EnumTypeRefs( { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - HENUMInternal **ppmdEnum = reinterpret_cast (phEnum); ULONG cTotal; HENUMInternal *pEnum = *ppmdEnum; - - LOG((LOGMD, "RegMeta::EnumTypeRefs(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", phEnum, rTypeRefs, cMax, pcTypeRefs)); LOCKREAD(); @@ -624,9 +580,6 @@ STDMETHODIMP RegMeta::EnumTypeRefs( ErrExit: HENUMInternal::DestroyEnumIfEmpty(ppmdEnum); - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::EnumTypeRefs() @@ -639,7 +592,6 @@ STDMETHODIMP RegMeta::FindTypeDefByName(// S_OK or error. mdTypeDef *ptd) // [OUT] Put the TypeDef token here. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW LOG((LOGMD, "{%08x} RegMeta::FindTypeDefByName(%S, 0x%08x, 0x%08x)\n", this, MDSTR(wzTypeDef), tkEnclosingClass, ptd)); @@ -669,9 +621,6 @@ STDMETHODIMP RegMeta::FindTypeDefByName(// S_OK or error. tkEnclosingClass, ptd); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::FindTypeDefByName() @@ -686,8 +635,6 @@ STDMETHODIMP RegMeta::GetScopeProps( { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); ModuleRec *pModuleRec; @@ -707,9 +654,6 @@ STDMETHODIMP RegMeta::GetScopeProps( if (szName || pchName) IfFailGo( pMiniMd->getNameOfModule(pModuleRec, szName, cchName, pchName) ); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::GetScopeProps() @@ -719,9 +663,6 @@ STDMETHODIMP RegMeta::GetScopeProps( STDMETHODIMP RegMeta::GetModuleFromScope(// S_OK. mdModule *pmd) // [OUT] Put mdModule token here. { - HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - LOG((LOGMD, "RegMeta::GetModuleFromScope(0x%08x)\n", pmd)); _ASSERTE(pmd); @@ -730,9 +671,7 @@ STDMETHODIMP RegMeta::GetModuleFromScope(// S_OK. *pmd = TokenFromRid(1, mdtModule); - END_ENTRYPOINT_NOTHROW; - - return hr; + return S_OK; } // STDMETHODIMP RegMeta::GetModuleFromScope() //***************************************************************************** @@ -744,8 +683,6 @@ HRESULT RegMeta::IsGlobal( // S_OK ir error. { HRESULT hr=S_OK; // A result. - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); mdToken tkParent; // Parent of field or method. @@ -788,8 +725,6 @@ HRESULT RegMeta::IsGlobal( // S_OK ir error. } ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // HRESULT RegMeta::IsGlobal() @@ -807,8 +742,6 @@ RegMeta::GetTypeDefProps( { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd = &(m_pStgdb->m_MiniMd); TypeDefRec *pTypeDefRec; BOOL fTruncation = FALSE; // Was there name truncation? @@ -894,9 +827,6 @@ RegMeta::GetTypeDefProps( } ErrExit: - END_ENTRYPOINT_NOTHROW; - - return hr; } // RegMeta::GetTypeDefProps @@ -910,13 +840,9 @@ STDMETHODIMP RegMeta::GetInterfaceImplProps( // S_OK or error. { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd = NULL; InterfaceImplRec *pIIRec = NULL; - - LOG((LOGMD, "RegMeta::GetInterfaceImplProps(0x%08x, 0x%08x, 0x%08x)\n", iiImpl, pClass, ptkIface)); LOCKREAD(); @@ -936,8 +862,6 @@ STDMETHODIMP RegMeta::GetInterfaceImplProps( // S_OK or error. } ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::GetInterfaceImplProps() @@ -954,8 +878,6 @@ RegMeta::GetTypeRefProps( { HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - CMiniMdRW *pMiniMd; TypeRefRec *pTypeRefRec; BOOL fTruncation = FALSE; // Was there name truncation? @@ -1030,7 +952,6 @@ RegMeta::GetTypeRefProps( } ErrExit: - END_ENTRYPOINT_NOTHROW; return hr; } // RegMeta::GetTypeRefProps @@ -1044,8 +965,6 @@ STDMETHODIMP RegMeta::FindTypeRef( // S_OK or error. { HRESULT hr = S_OK; // A result. - BEGIN_ENTRYPOINT_NOTHROW; - LPUTF8 szFullName; LPCUTF8 szNamespace; LPCUTF8 szName; @@ -1053,8 +972,6 @@ STDMETHODIMP RegMeta::FindTypeRef( // S_OK or error. _ASSERTE(wzTypeName && ptk); - - LOG((LOGMD, "RegMeta::FindTypeRef(0x%8x, %ls, 0x%08x)\n", tkResolutionScope, MDSTR(wzTypeName), ptk)); LOCKREAD(); @@ -1070,9 +987,6 @@ STDMETHODIMP RegMeta::FindTypeRef( // S_OK or error. szName, ptk); ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } // STDMETHODIMP RegMeta::FindTypeRef() diff --git a/src/coreclr/md/compiler/regmeta_vm.cpp b/src/coreclr/md/compiler/regmeta_vm.cpp index 0cd3e4ab90df6..66a5522a7cbd1 100644 --- a/src/coreclr/md/compiler/regmeta_vm.cpp +++ b/src/coreclr/md/compiler/regmeta_vm.cpp @@ -156,8 +156,6 @@ RegMeta::ResolveTypeRef( #ifdef FEATURE_METADATA_IN_VM HRESULT hr; - BEGIN_ENTRYPOINT_NOTHROW; - TypeRefRec * pTypeRefRec; WCHAR wzNameSpace[_MAX_PATH]; CMiniMdRW * pMiniMd = NULL; @@ -229,8 +227,6 @@ RegMeta::ResolveTypeRef( IfFailGo(META_E_CANNOTRESOLVETYPEREF); ErrExit: - END_ENTRYPOINT_NOTHROW; - return hr; #else // FEATURE_METADATA_IN_VM return E_NOTIMPL; @@ -243,8 +239,6 @@ RegMeta::ResolveTypeRef( // Thus Release() is in a satellite lib. ULONG RegMeta::Release() { - BEGIN_CLEANUP_ENTRYPOINT; - #if defined(FEATURE_METADATA_IN_VM) _ASSERTE(!m_bCached || LOADEDMODULES::IsEntryInList(this)); #else @@ -274,7 +268,6 @@ ULONG RegMeta::Release() } #endif // FEATURE_METADATA_IN_VM } - END_CLEANUP_ENTRYPOINT return cRef; } // RegMeta::Release diff --git a/src/coreclr/md/staticmd/apis.cpp b/src/coreclr/md/staticmd/apis.cpp index b13fd8cb7e1b6..02459f54bb743 100644 --- a/src/coreclr/md/staticmd/apis.cpp +++ b/src/coreclr/md/staticmd/apis.cpp @@ -32,14 +32,11 @@ STDAPI DLLEXPORT MetaDataGetDispenser( // Return HRESULT NonVMComHolder pcf(NULL); HRESULT hr; - BEGIN_ENTRYPOINT_NOTHROW; IfFailGo(MetaDataDllGetClassObject(rclsid, IID_IClassFactory, (void **) &pcf)); hr = pcf->CreateInstance(NULL, riid, ppv); ErrExit: - END_ENTRYPOINT_NOTHROW; - return (hr); } @@ -62,13 +59,7 @@ STDAPI DLLEXPORT GetMetaDataInternalInterface( PRECONDITION(CheckPointer(ppv)); } CONTRACTL_END; - HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - hr = GetMDInternalInterface(pData, cbData, flags, riid, ppv); - - END_ENTRYPOINT_NOTHROW; - return hr; + return GetMDInternalInterface(pData, cbData, flags, riid, ppv); } // --------------------------------------------------------------------------- @@ -89,13 +80,7 @@ STDAPI DLLEXPORT GetMetaDataInternalInterfaceFromPublic( PRECONDITION(CheckPointer(ppv)); } CONTRACTL_END; - HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - hr = GetMDInternalInterfaceFromPublic(pv, riid, ppv); - - END_ENTRYPOINT_NOTHROW; - return hr; + return GetMDInternalInterfaceFromPublic(pv, riid, ppv); } // --------------------------------------------------------------------------- @@ -116,11 +101,5 @@ STDAPI DLLEXPORT GetMetaDataPublicInterfaceFromInternal( ENTRY_POINT; } CONTRACTL_END; - HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - hr = GetMDPublicInterfaceFromInternal(pv, riid, ppv); - - END_ENTRYPOINT_NOTHROW; - return hr; + return GetMDPublicInterfaceFromInternal(pv, riid, ppv); } diff --git a/src/coreclr/utilcode/posterror.cpp b/src/coreclr/utilcode/posterror.cpp index a07588df6cc7a..c5ecd43f30f3e 100644 --- a/src/coreclr/utilcode/posterror.cpp +++ b/src/coreclr/utilcode/posterror.cpp @@ -265,8 +265,6 @@ static HRESULT PostErrorVA( // Returned error. WCHAR *rcMsg = (WCHAR*)alloca(cchMsg * sizeof(WCHAR)); // Error message. HRESULT hr; - BEGIN_ENTRYPOINT_NOTHROW; - // Return warnings without text. if (!FAILED(hrRpt)) goto ErrExit; @@ -291,8 +289,6 @@ static HRESULT PostErrorVA( // Returned error. ErrExit: - END_ENTRYPOINT_NOTHROW; - #endif // FEATURE_COMINTEROP return (hrRpt); diff --git a/src/coreclr/vm/assembly.cpp b/src/coreclr/vm/assembly.cpp index 034b815c8f437..1c3408ec3a8c1 100644 --- a/src/coreclr/vm/assembly.cpp +++ b/src/coreclr/vm/assembly.cpp @@ -1510,8 +1510,6 @@ INT32 Assembly::ExecuteMainMethod(PTRARRAYREF *stringArgs, BOOL waitForOtherThre HRESULT hr = S_OK; INT32 iRetVal = 0; - BEGIN_ENTRYPOINT_THROWS; - Thread *pThread = GetThread(); MethodDesc *pMeth; { @@ -1580,7 +1578,6 @@ INT32 Assembly::ExecuteMainMethod(PTRARRAYREF *stringArgs, BOOL waitForOtherThre IfFailThrow(hr); - END_ENTRYPOINT_THROWS; return iRetVal; } diff --git a/src/coreclr/vm/ceemain.cpp b/src/coreclr/vm/ceemain.cpp index c9e69176e9ca9..00411af2d843b 100644 --- a/src/coreclr/vm/ceemain.cpp +++ b/src/coreclr/vm/ceemain.cpp @@ -284,8 +284,6 @@ HRESULT EnsureEEStarted() // which we will do further down. if (!g_fEEStarted) { - BEGIN_ENTRYPOINT_NOTHROW; - // Initialize our configuration. CLRConfig::Initialize(); @@ -317,8 +315,6 @@ HRESULT EnsureEEStarted() } } } - - END_ENTRYPOINT_NOTHROW; } else { diff --git a/src/coreclr/vm/codeman.cpp b/src/coreclr/vm/codeman.cpp index 95589eb2ac935..a81a2bd9f663f 100644 --- a/src/coreclr/vm/codeman.cpp +++ b/src/coreclr/vm/codeman.cpp @@ -4577,8 +4577,6 @@ extern "C" void GetRuntimeStackWalkInfo(IN ULONG64 ControlPc, BEGIN_PRESERVE_LAST_ERROR; - BEGIN_ENTRYPOINT_VOIDRET; - if (pModuleBase) *pModuleBase = NULL; if (pFuncEntry) @@ -4604,8 +4602,7 @@ extern "C" void GetRuntimeStackWalkInfo(IN ULONG64 ControlPc, } Exit: - END_ENTRYPOINT_VOIDRET; - + ; END_PRESERVE_LAST_ERROR; } #endif // FEATURE_EH_FUNCLETS @@ -6574,7 +6571,7 @@ void ReadyToRunJitManager::JitTokenToMethodRegionInfo(const METHODTOKEN& MethodT PTR_RUNTIME_FUNCTION pColdRuntimeFunction = pRuntimeFunctions + coldMethodIndex; methodRegionInfo->coldStartAddress = JitTokenToModuleBase(MethodToken) + RUNTIME_FUNCTION__BeginAddress(pColdRuntimeFunction); - + ULONG coldMethodIndexNext; if ((ULONG)(lookupIndex) == (pInfo->m_nHotColdMap - 2)) { @@ -6639,4 +6636,4 @@ void ReadyToRunJitManager::EnumMemoryRegionsForMethodUnwindInfo(CLRDataEnumMemor #endif //FEATURE_EH_FUNCLETS #endif // #ifdef DACCESS_COMPILE -#endif \ No newline at end of file +#endif diff --git a/src/coreclr/vm/comcallablewrapper.cpp b/src/coreclr/vm/comcallablewrapper.cpp index 8d37c14f3f92c..11fb385c38ca3 100644 --- a/src/coreclr/vm/comcallablewrapper.cpp +++ b/src/coreclr/vm/comcallablewrapper.cpp @@ -339,8 +339,6 @@ extern "C" PCODE ComPreStubWorker(ComPrestubMethodFrame *pPFrame, UINT64 *pError HRESULT hr = S_OK; PCODE retAddr = NULL; - BEGIN_ENTRYPOINT_VOIDRET; - PCODE pStub = NULL; BOOL fNonTransientExceptionThrown = FALSE; @@ -530,9 +528,6 @@ extern "C" PCODE ComPreStubWorker(ComPrestubMethodFrame *pPFrame, UINT64 *pError retAddr = NULL; Exit: - - END_ENTRYPOINT_VOIDRET; - RETURN retAddr; } diff --git a/src/coreclr/vm/corhost.cpp b/src/coreclr/vm/corhost.cpp index db99db62b10c5..650ed761c2f43 100644 --- a/src/coreclr/vm/corhost.cpp +++ b/src/coreclr/vm/corhost.cpp @@ -65,8 +65,6 @@ STDMETHODIMP CorHost2::Start() HRESULT hr; - BEGIN_ENTRYPOINT_NOTHROW; - // Ensure that only one thread at a time gets in here DangerousNonHostedSpinLockHolder lockHolder(&lockOnlyOneToInvokeStart); @@ -116,7 +114,6 @@ STDMETHODIMP CorHost2::Start() } } - END_ENTRYPOINT_NOTHROW; return hr; } @@ -136,7 +133,6 @@ HRESULT CorHost2::Stop() return E_UNEXPECTED; } HRESULT hr=S_OK; - BEGIN_ENTRYPOINT_NOTHROW; // Is this host eligible to invoke the Stop method? if ((!m_fStarted) && (!m_fFirstToLoadCLR)) @@ -176,8 +172,6 @@ HRESULT CorHost2::Stop() } } } - END_ENTRYPOINT_NOTHROW; - return hr; } @@ -199,30 +193,15 @@ HRESULT CorHost2::GetCurrentAppDomainId(DWORD *pdwAppDomainId) return HOST_E_CLRNOTAVAILABLE; } - HRESULT hr = S_OK; - - BEGIN_ENTRYPOINT_NOTHROW; - - if(pdwAppDomainId == NULL) - { - hr = E_POINTER; - } - else - { - Thread *pThread = GetThreadNULLOk(); - if (!pThread) - { - hr = E_UNEXPECTED; - } - else - { - *pdwAppDomainId = DefaultADID; - } - } + if (pdwAppDomainId == NULL) + return E_POINTER; - END_ENTRYPOINT_NOTHROW; + Thread *pThread = GetThreadNULLOk(); + if (!pThread) + return E_UNEXPECTED; - return hr; + *pdwAppDomainId = DefaultADID; + return S_OK; } HRESULT CorHost2::ExecuteApplication(LPCWSTR pwzAppFullName, @@ -403,8 +382,6 @@ HRESULT CorHost2::ExecuteInDefaultAppDomain(LPCWSTR pwzAssemblyPath, HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - Thread *pThread = GetThreadNULLOk(); if (pThread == NULL) { @@ -469,9 +446,6 @@ HRESULT CorHost2::ExecuteInDefaultAppDomain(LPCWSTR pwzAssemblyPath, UNINSTALL_UNHANDLED_MANAGED_EXCEPTION_TRAP; ErrExit: - - END_ENTRYPOINT_NOTHROW; - return hr; } @@ -513,7 +487,6 @@ HRESULT CorHost2::ExecuteInAppDomain(DWORD dwAppDomainId, HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; BEGIN_EXTERNAL_ENTRYPOINT(&hr); GCX_COOP_THREAD_EXISTS(GET_THREAD()); @@ -524,7 +497,6 @@ HRESULT CorHost2::ExecuteInAppDomain(DWORD dwAppDomainId, hr=ExecuteInAppDomainHelper (pCallback, cookie); } END_EXTERNAL_ENTRYPOINT; - END_ENTRYPOINT_NOTHROW; return hr; } @@ -574,8 +546,6 @@ HRESULT CorHost2::CreateAppDomainWithManager( if ((wszAppDomainManagerAssemblyName != NULL) || (wszAppDomainManagerTypeName != NULL)) return E_INVALIDARG; - BEGIN_ENTRYPOINT_NOTHROW; - BEGIN_EXTERNAL_ENTRYPOINT(&hr); AppDomain* pDomain = SystemDomain::System()->DefaultDomain(); @@ -664,8 +634,6 @@ HRESULT CorHost2::CreateAppDomainWithManager( END_EXTERNAL_ENTRYPOINT; - END_ENTRYPOINT_NOTHROW; - return hr; } @@ -708,8 +676,6 @@ HRESULT CorHost2::CreateDelegate( if (appDomainID != DefaultADID) return HOST_E_INVALIDOPERATION; - BEGIN_ENTRYPOINT_NOTHROW; - BEGIN_EXTERNAL_ENTRYPOINT(&hr); GCX_COOP_THREAD_EXISTS(GET_THREAD()); @@ -758,8 +724,6 @@ HRESULT CorHost2::CreateDelegate( END_EXTERNAL_ENTRYPOINT; - END_ENTRYPOINT_NOTHROW; - return hr; } @@ -859,7 +823,6 @@ STDMETHODIMP CorHost2::UnloadAppDomain2(DWORD dwDomainId, BOOL fWaitUntilDone, i } HRESULT hr=S_OK; - BEGIN_ENTRYPOINT_NOTHROW; if (!m_fFirstToLoadCLR) { @@ -885,7 +848,6 @@ STDMETHODIMP CorHost2::UnloadAppDomain2(DWORD dwDomainId, BOOL fWaitUntilDone, i hr = S_FALSE; } } - END_ENTRYPOINT_NOTHROW; if (pLatchedExitCode) { @@ -977,18 +939,11 @@ HRESULT CorHost2::GetBucketParametersForCurrentException(BucketParameters *pPara } CONTRACTL_END; - HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - // To avoid confusion, clear the buckets. memset(pParams, 0, sizeof(BucketParameters)); // Defer to Watson helper. - hr = ::GetBucketParametersForCurrentException(pParams); - - END_ENTRYPOINT_NOTHROW; - - return hr; + return ::GetBucketParametersForCurrentException(pParams); } #endif // !TARGET_UNIX diff --git a/src/coreclr/vm/dllimportcallback.cpp b/src/coreclr/vm/dllimportcallback.cpp index 8296fd22111fe..4eeab74f68d8c 100644 --- a/src/coreclr/vm/dllimportcallback.cpp +++ b/src/coreclr/vm/dllimportcallback.cpp @@ -436,8 +436,6 @@ void STDCALL LogUMTransition(UMEntryThunk* thunk) } CONTRACTL_END; - BEGIN_ENTRYPOINT_VOIDRET; - void** retESP = ((void**) &thunk) + 4; MethodDesc* method = thunk->GetMethod(); @@ -448,9 +446,6 @@ void STDCALL LogUMTransition(UMEntryThunk* thunk) method->m_pszDebugMethodName, method->m_pszDebugMethodSignature, retESP, *retESP)); } - - END_ENTRYPOINT_VOIDRET; - - } +} #endif // _DEBUG diff --git a/src/coreclr/vm/frames.cpp b/src/coreclr/vm/frames.cpp index c7cc82b7ce3a1..f8f4a93db1e47 100644 --- a/src/coreclr/vm/frames.cpp +++ b/src/coreclr/vm/frames.cpp @@ -115,8 +115,6 @@ void __stdcall Frame::LogTransition(Frame* frame) GC_NOTRIGGER; } CONTRACTL_END; - BEGIN_ENTRYPOINT_VOIDRET; - #ifdef TARGET_X86 // On x86, StubLinkerCPU::EmitMethodStubProlog calls Frame::LogTransition // but the caller of EmitMethodStubProlog sets the GSCookie later on. @@ -127,8 +125,6 @@ void __stdcall Frame::LogTransition(Frame* frame) if (Frame::ShouldLogTransitions()) frame->Log(); - - END_ENTRYPOINT_VOIDRET; } // void Frame::Log() #endif // #ifndef DACCESS_COMPILE diff --git a/src/coreclr/vm/i386/excepx86.cpp b/src/coreclr/vm/i386/excepx86.cpp index 43a6e8c518329..2dbcc04214363 100644 --- a/src/coreclr/vm/i386/excepx86.cpp +++ b/src/coreclr/vm/i386/excepx86.cpp @@ -3406,20 +3406,13 @@ LONG CLRNoCatchHandler(EXCEPTION_POINTERS* pExceptionInfo, PVOID pv) WRAPPER_NO_CONTRACT; STATIC_CONTRACT_ENTRY_POINT; - LONG result = EXCEPTION_CONTINUE_SEARCH; - - // This function can be called during the handling of a SO - //BEGIN_ENTRYPOINT_VOIDRET; - - result = CLRVectoredExceptionHandler(pExceptionInfo); + LONG result = CLRVectoredExceptionHandler(pExceptionInfo); if (EXCEPTION_EXECUTE_HANDLER == result) { result = EXCEPTION_CONTINUE_SEARCH; } - //END_ENTRYPOINT_VOIDRET; - return result; #else // !FEATURE_EH_FUNCLETS return EXCEPTION_CONTINUE_SEARCH; diff --git a/src/coreclr/vm/i386/stublinkerx86.cpp b/src/coreclr/vm/i386/stublinkerx86.cpp index 10fcbe5f30271..c02dfe8e9368e 100644 --- a/src/coreclr/vm/i386/stublinkerx86.cpp +++ b/src/coreclr/vm/i386/stublinkerx86.cpp @@ -3184,8 +3184,6 @@ GetModuleInformationProc *g_pfnGetModuleInformation = NULL; extern "C" VOID __cdecl DebugCheckStubUnwindInfoWorker (CONTEXT *pStubContext) { - BEGIN_ENTRYPOINT_VOIDRET; - LOG((LF_STUBS, LL_INFO1000000, "checking stub unwind info:\n")); // @@ -3300,8 +3298,6 @@ extern "C" VOID __cdecl DebugCheckStubUnwindInfoWorker (CONTEXT *pStubContext) } } ErrExit: - - END_ENTRYPOINT_VOIDRET; return; } @@ -4909,14 +4905,10 @@ Thread* __stdcall CreateThreadBlockReturnHr(ComMethodFrame *pFrame) WRAPPER_NO_CONTRACT; - Thread *pThread = NULL; - HRESULT hr = S_OK; // This means that a thread is FIRST coming in from outside the EE. - BEGIN_ENTRYPOINT_THROWS; - pThread = SetupThreadNoThrow(&hr); - END_ENTRYPOINT_THROWS; + Thread* pThread = SetupThreadNoThrow(&hr); if (pThread == NULL) { // Unwind stack, and return hr diff --git a/src/coreclr/vm/multicorejitplayer.cpp b/src/coreclr/vm/multicorejitplayer.cpp index c2c1cc0afa077..9f8818cca41dd 100644 --- a/src/coreclr/vm/multicorejitplayer.cpp +++ b/src/coreclr/vm/multicorejitplayer.cpp @@ -1374,8 +1374,6 @@ DWORD WINAPI MulticoreJitProfilePlayer::StaticJITThreadProc(void *args) HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - MulticoreJitTrace(("StaticJITThreadProc starting")); // Mark the background thread via an ETW event for diagnostics. @@ -1411,8 +1409,6 @@ DWORD WINAPI MulticoreJitProfilePlayer::StaticJITThreadProc(void *args) MulticoreJitTrace(("StaticJITThreadProc endding(%x)", hr)); - END_ENTRYPOINT_NOTHROW; - return (DWORD) hr; } diff --git a/src/coreclr/vm/olecontexthelpers.cpp b/src/coreclr/vm/olecontexthelpers.cpp index d705b210fefda..d97c9ee8394f1 100644 --- a/src/coreclr/vm/olecontexthelpers.cpp +++ b/src/coreclr/vm/olecontexthelpers.cpp @@ -42,8 +42,6 @@ LPVOID SetupOleContext() IUnknown* pObjCtx = NULL; - BEGIN_ENTRYPOINT_VOIDRET; - #ifdef FEATURE_COMINTEROP if (g_fComStarted) { @@ -66,8 +64,6 @@ LPVOID SetupOleContext() } #endif // FEATURE_COMINTEROP - END_ENTRYPOINT_VOIDRET; - RETURN pObjCtx; } diff --git a/src/coreclr/vm/threads.cpp b/src/coreclr/vm/threads.cpp index d4919f4e1120f..36a5a30141871 100644 --- a/src/coreclr/vm/threads.cpp +++ b/src/coreclr/vm/threads.cpp @@ -1050,11 +1050,9 @@ Thread* WINAPI CreateThreadBlockThrow() // We want to throw an exception for reverse p-invoke, and our assertion may fire if // a unmanaged caller does not setup an exception handler. CONTRACT_VIOLATION(ThrowsViolation); // WON'T FIX - This enables catastrophic failure exception in reverse P/Invoke - the only way we can communicate an error to legacy code. - Thread* pThread = NULL; - BEGIN_ENTRYPOINT_THROWS; HRESULT hr = S_OK; - pThread = SetupThreadNoThrow(&hr); + Thread* pThread = SetupThreadNoThrow(&hr); if (pThread == NULL) { // Creating Thread failed, and we need to throw an exception to report status. @@ -1062,7 +1060,6 @@ Thread* WINAPI CreateThreadBlockThrow() ULONG_PTR arg = hr; RaiseException(EXCEPTION_EXX, 0, 1, &arg); } - END_ENTRYPOINT_THROWS; return pThread; } diff --git a/src/coreclr/vm/virtualcallstub.cpp b/src/coreclr/vm/virtualcallstub.cpp index c06e37d1886bb..f823b5c85be07 100644 --- a/src/coreclr/vm/virtualcallstub.cpp +++ b/src/coreclr/vm/virtualcallstub.cpp @@ -1535,8 +1535,6 @@ void VirtualCallStubManager::BackPatchWorkerStatic(PCODE returnAddress, TADDR si PRECONDITION(returnAddress != NULL); } CONTRACTL_END - BEGIN_ENTRYPOINT_VOIDRET; - StubCallSite callSite(siteAddrForRegisterIndirect, returnAddress); PCODE callSiteTarget = callSite.GetSiteTarget(); @@ -1546,8 +1544,6 @@ void VirtualCallStubManager::BackPatchWorkerStatic(PCODE returnAddress, TADDR si PREFIX_ASSUME(pMgr != NULL); pMgr->BackPatchWorker(&callSite); - - END_ENTRYPOINT_VOIDRET; } #if defined(TARGET_X86) && defined(TARGET_UNIX)