diff --git a/src/coreclr/vm/ceeload.cpp b/src/coreclr/vm/ceeload.cpp index 088ee89a07f56c..2f0bc91514a4f3 100644 --- a/src/coreclr/vm/ceeload.cpp +++ b/src/coreclr/vm/ceeload.cpp @@ -472,11 +472,6 @@ void Module::Initialize(AllocMemTracker *pamTracker, LPCWSTR szName) m_dwExportedTypeCount = 0; m_dwCustomAttributeCount = 0; - if (m_AssemblyRefByNameTable == NULL) - { - Module::CreateAssemblyRefByNameTable(pamTracker); - } - #if defined(PROFILING_SUPPORTED) && !defined(DACCESS_COMPILE) m_pJitInlinerTrackingMap = NULL; if (ReJitManager::IsReJITInlineTrackingEnabled()) @@ -4873,59 +4868,6 @@ class CheckAsmOffsets //------------------------------------------------------------------------------- -#ifndef DACCESS_COMPILE - -void Module::CreateAssemblyRefByNameTable(AllocMemTracker *pamTracker) -{ - CONTRACTL - { - THROWS; - GC_NOTRIGGER; - INJECT_FAULT(COMPlusThrowOM();); - } - CONTRACTL_END - - LoaderHeap * pHeap = GetLoaderAllocator()->GetLowFrequencyHeap(); - IMDInternalImport * pImport = GetMDImport(); - - DWORD dwMaxRid = pImport->GetCountWithTokenKind(mdtAssemblyRef); - if (dwMaxRid == 0) - return; - - S_SIZE_T dwAllocSize = S_SIZE_T(sizeof(LPWSTR)) * S_SIZE_T(dwMaxRid); - m_AssemblyRefByNameTable = (LPCSTR *) pamTracker->Track( pHeap->AllocMem(dwAllocSize) ); - - DWORD dwCount = 0; - for (DWORD rid=1; rid <= dwMaxRid; rid++) - { - mdAssemblyRef mdToken = TokenFromRid(rid,mdtAssemblyRef); - LPCSTR szName; - HRESULT hr; - - hr = pImport->GetAssemblyRefProps(mdToken, NULL, NULL, &szName, NULL, NULL, NULL, NULL); - - if (SUCCEEDED(hr)) - { - m_AssemblyRefByNameTable[dwCount++] = szName; - } - } - m_AssemblyRefByNameCount = dwCount; -} - -bool Module::HasReferenceByName(LPCUTF8 pModuleName) -{ - LIMITED_METHOD_CONTRACT; - - for (DWORD i=0; i < m_AssemblyRefByNameCount; i++) - { - if (0 == strcmp(pModuleName, m_AssemblyRefByNameTable[i])) - return true; - } - - return false; -} -#endif - #ifdef DACCESS_COMPILE void DECLSPEC_NORETURN ModuleBase::ThrowTypeLoadExceptionImpl(IMDInternalImport *pInternalImport, mdToken token, diff --git a/src/coreclr/vm/ceeload.h b/src/coreclr/vm/ceeload.h index 36cb346cb0ec35..7a95a1d83fa248 100644 --- a/src/coreclr/vm/ceeload.h +++ b/src/coreclr/vm/ceeload.h @@ -1319,9 +1319,6 @@ class Module : public ModuleBase mdAssemblyRef FindAssemblyRef(Assembly *targetAssembly); - void CreateAssemblyRefByNameTable(AllocMemTracker *pamTracker); - bool HasReferenceByName(LPCUTF8 pModuleName); - #endif // !DACCESS_COMPILE DWORD GetAssemblyRefMax() {LIMITED_METHOD_CONTRACT; return m_ManifestModuleReferencesMap.GetSize() - 1; } @@ -1588,10 +1585,6 @@ class Module : public ModuleBase PTR_JITInlineTrackingMap m_pJitInlinerTrackingMap; #endif // defined(PROFILING_SUPPORTED) || defined(PROFILING_SUPPORTED_DATA) - - LPCSTR *m_AssemblyRefByNameTable; // array that maps mdAssemblyRef tokens into their simple name - DWORD m_AssemblyRefByNameCount; // array size - // a.dll calls a method in b.dll and that method call a method in c.dll. When ngening // a.dll it is possible then method in b.dll can be inlined. When that happens a.ni.dll stores // an added native metadata which has information about assemblyRef to c.dll