@@ -474,11 +474,6 @@ void Module::Initialize(AllocMemTracker *pamTracker, LPCWSTR szName)
474
474
m_dwExportedTypeCount = 0 ;
475
475
m_dwCustomAttributeCount = 0 ;
476
476
477
- if (m_AssemblyRefByNameTable == NULL )
478
- {
479
- Module::CreateAssemblyRefByNameTable (pamTracker);
480
- }
481
-
482
477
#if defined(PROFILING_SUPPORTED) && !defined(DACCESS_COMPILE)
483
478
m_pJitInlinerTrackingMap = NULL ;
484
479
if (ReJitManager::IsReJITInlineTrackingEnabled ())
@@ -4875,59 +4870,6 @@ class CheckAsmOffsets
4875
4870
4876
4871
// -------------------------------------------------------------------------------
4877
4872
4878
- #ifndef DACCESS_COMPILE
4879
-
4880
- void Module::CreateAssemblyRefByNameTable (AllocMemTracker *pamTracker)
4881
- {
4882
- CONTRACTL
4883
- {
4884
- THROWS;
4885
- GC_NOTRIGGER;
4886
- INJECT_FAULT (COMPlusThrowOM (););
4887
- }
4888
- CONTRACTL_END
4889
-
4890
- LoaderHeap * pHeap = GetLoaderAllocator ()->GetLowFrequencyHeap ();
4891
- IMDInternalImport * pImport = GetMDImport ();
4892
-
4893
- DWORD dwMaxRid = pImport->GetCountWithTokenKind (mdtAssemblyRef);
4894
- if (dwMaxRid == 0 )
4895
- return ;
4896
-
4897
- S_SIZE_T dwAllocSize = S_SIZE_T (sizeof (LPWSTR)) * S_SIZE_T (dwMaxRid);
4898
- m_AssemblyRefByNameTable = (LPCSTR *) pamTracker->Track ( pHeap->AllocMem (dwAllocSize) );
4899
-
4900
- DWORD dwCount = 0 ;
4901
- for (DWORD rid=1 ; rid <= dwMaxRid; rid++)
4902
- {
4903
- mdAssemblyRef mdToken = TokenFromRid (rid,mdtAssemblyRef);
4904
- LPCSTR szName;
4905
- HRESULT hr;
4906
-
4907
- hr = pImport->GetAssemblyRefProps (mdToken, NULL , NULL , &szName, NULL , NULL , NULL , NULL );
4908
-
4909
- if (SUCCEEDED (hr))
4910
- {
4911
- m_AssemblyRefByNameTable[dwCount++] = szName;
4912
- }
4913
- }
4914
- m_AssemblyRefByNameCount = dwCount;
4915
- }
4916
-
4917
- bool Module::HasReferenceByName (LPCUTF8 pModuleName)
4918
- {
4919
- LIMITED_METHOD_CONTRACT;
4920
-
4921
- for (DWORD i=0 ; i < m_AssemblyRefByNameCount; i++)
4922
- {
4923
- if (0 == strcmp (pModuleName, m_AssemblyRefByNameTable[i]))
4924
- return true ;
4925
- }
4926
-
4927
- return false ;
4928
- }
4929
- #endif
4930
-
4931
4873
#ifdef DACCESS_COMPILE
4932
4874
void DECLSPEC_NORETURN ModuleBase::ThrowTypeLoadExceptionImpl (IMDInternalImport *pInternalImport,
4933
4875
mdToken token,
0 commit comments