diff options
author | Jan Kotas <jkotas@microsoft.com> | 2018-11-20 10:56:12 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-20 10:56:12 -0800 |
commit | cc5df16d722aa9ffed9f8e4f236a5077753f8ca0 (patch) | |
tree | 81ee1eb099b1bf0fee069d624f6f12dea71583b3 /src/zap | |
parent | baee9b6c7c666a33e3f924a05a5f56eae134fe46 (diff) | |
download | coreclr-cc5df16d722aa9ffed9f8e4f236a5077753f8ca0.tar.gz coreclr-cc5df16d722aa9ffed9f8e4f236a5077753f8ca0.tar.bz2 coreclr-cc5df16d722aa9ffed9f8e4f236a5077753f8ca0.zip |
Delete CORCOMPILE_IMPORT_TABLE_ENTRY (#21109)
Diffstat (limited to 'src/zap')
-rw-r--r-- | src/zap/zapheaders.cpp | 1 | ||||
-rw-r--r-- | src/zap/zapimage.cpp | 4 | ||||
-rw-r--r-- | src/zap/zapimport.cpp | 29 | ||||
-rw-r--r-- | src/zap/zapimport.h | 23 | ||||
-rw-r--r-- | src/zap/zapperstats.cpp | 4 | ||||
-rw-r--r-- | src/zap/zapperstats.h | 1 |
6 files changed, 4 insertions, 58 deletions
diff --git a/src/zap/zapheaders.cpp b/src/zap/zapheaders.cpp index f3dab63683..8ca00d7486 100644 --- a/src/zap/zapheaders.cpp +++ b/src/zap/zapheaders.cpp @@ -116,7 +116,6 @@ void ZapImage::SaveNativeHeader() SetDirectoryData(&nativeHeader.EEInfoTable, m_pEEInfoTable); SetDirectoryData(&nativeHeader.HelperTable, m_pHelperTableSection); SetDirectoryData(&nativeHeader.ImportSections, m_pImportSectionsTable); - SetDirectoryData(&nativeHeader.ImportTable, m_pImportTable); SetDirectoryData(&nativeHeader.StubsData, m_pStubsSection); SetDirectoryData(&nativeHeader.VersionInfo, m_pVersionInfo); SetDirectoryData(&nativeHeader.Dependencies, m_pDependencies); diff --git a/src/zap/zapimage.cpp b/src/zap/zapimage.cpp index 073367d269..7dce3af285 100644 --- a/src/zap/zapimage.cpp +++ b/src/zap/zapimage.cpp @@ -149,7 +149,6 @@ void ZapImage::InitializeSections() m_pStubDispatchDataSection->Place(m_pStubDispatchDataTable); m_pImportTable = new (GetHeap()) ZapImportTable(this); - m_pImportTableSection->Place(m_pImportTable); m_pGCInfoTable = new (GetHeap()) ZapGCInfoTable(this); m_pExceptionInfoLookupTable = new (GetHeap()) ZapExceptionInfoLookupTable(this); @@ -229,7 +228,6 @@ void ZapImage::InitializeSectionsForReadyToRun() } m_pImportTable = new (GetHeap()) ZapImportTable(this); - m_pImportTableSection->Place(m_pImportTable); for (int i=0; i<ZapImportSectionType_Total; i++) { @@ -1166,8 +1164,6 @@ void ZapImage::PrintStats(LPCWSTR wszOutputFileName) ACCUM_SIZE(m_stats->m_dynamicInfoDelayListSize, m_pDelayLoadInfoDelayListSectionHot); ACCUM_SIZE(m_stats->m_dynamicInfoDelayListSize, m_pDelayLoadInfoDelayListSectionCold); - ACCUM_SIZE(m_stats->m_importTableSize, m_pImportTable); - ACCUM_SIZE(m_stats->m_debuggingTableSize, m_pDebugSection); ACCUM_SIZE(m_stats->m_headerSectionSize, m_pGCSection); ACCUM_SIZE(m_stats->m_codeSectionSize, m_pHotCodeSection); diff --git a/src/zap/zapimport.cpp b/src/zap/zapimport.cpp index e35d0b9de3..7b847e9430 100644 --- a/src/zap/zapimport.cpp +++ b/src/zap/zapimport.cpp @@ -26,22 +26,6 @@ const DWORD READYTORUN_HELPER_FLAG_VSD = 0x10000000; // ZapImportTable // -void ZapImportTable::Save(ZapWriter * pZapWriter) -{ - for (COUNT_T i = 0; i < m_modules.GetCount(); i++) - { - ModuleReferenceEntry * pModuleReference = m_modules[i]; - _ASSERTE(pModuleReference != NULL); - - CORCOMPILE_IMPORT_TABLE_ENTRY entry; - - entry.wAssemblyRid = pModuleReference->m_wAssemblyRid; - entry.wModuleRid = pModuleReference->m_wModuleRid; - - pZapWriter->Write(&entry, sizeof(entry)); - } -} - ZapImportTable::ModuleReferenceEntry * ZapImportTable::GetModuleReference(CORINFO_MODULE_HANDLE handle) { ModuleReferenceEntry * pEntry = m_moduleReferences.Lookup(handle); @@ -59,18 +43,9 @@ ZapImportTable::ModuleReferenceEntry * ZapImportTable::GetModuleReference(CORINF pEntry = new (m_pImage->GetHeap()) ModuleReferenceEntry(); pEntry->m_module = handle; - DWORD assemblyIndex = 0; - DWORD moduleIndex = 0; - GetCompileInfo()->EncodeModuleAsIndexes(m_pImage->GetModuleHandle(), handle, - &assemblyIndex, &moduleIndex, + GetCompileInfo()->EncodeModuleAsIndex(m_pImage->GetModuleHandle(), handle, + &pEntry->m_index, m_pImage->GetAssemblyEmit()); - _ASSERTE(assemblyIndex <= USHRT_MAX); - _ASSERTE(moduleIndex <= USHRT_MAX); - pEntry->m_wAssemblyRid = (USHORT) assemblyIndex; - pEntry->m_wModuleRid = (USHORT) moduleIndex; - - pEntry->m_index = m_modules.GetCount(); - m_modules.Append(pEntry); m_moduleReferences.Add(pEntry); diff --git a/src/zap/zapimport.h b/src/zap/zapimport.h index 811e0a7062..058cb0b145 100644 --- a/src/zap/zapimport.h +++ b/src/zap/zapimport.h @@ -143,7 +143,7 @@ public: // // There is a single instance of it per image. // -class ZapImportTable : public ZapNode +class ZapImportTable { // // Hashtable key of the import @@ -203,9 +203,6 @@ class ZapImportTable : public ZapNode { CORINFO_MODULE_HANDLE m_module; DWORD m_index; - - USHORT m_wAssemblyRid; - USHORT m_wModuleRid; }; class ModuleReferenceTraits : public NoRemoveSHashTraits< DefaultSHashTraits<ModuleReferenceEntry *> > @@ -307,7 +304,6 @@ class ZapImportTable : public ZapNode SHash< NoRemoveSHashTraits < ZapBlob::SHashTraits > > m_blobs; // Interned ZapBlos for signatures and fixups ModuleReferenceTable m_moduleReferences; - SArray<ModuleReferenceEntry *> m_modules; // Secondary table of ModuleReferences to allow fast index based lookup SHash< NoRemoveSHashTraits < ZapBlob::SHashTraits > > m_genericSignatures; @@ -446,23 +442,6 @@ public: ZapImport * GetPlacedHelperImport(ReadyToRunHelper helperNum); ZapImport * GetHelperImport(ReadyToRunHelper helperNum); #endif - - virtual DWORD GetSize() - { - return m_modules.GetCount() * sizeof(CORCOMPILE_IMPORT_TABLE_ENTRY); - } - - virtual UINT GetAlignment() - { - return sizeof(DWORD); - } - - virtual ZapNodeType GetType() - { - return ZapNodeType_ImportTable; - } - - virtual void Save(ZapWriter * pZapWriter); }; // diff --git a/src/zap/zapperstats.cpp b/src/zap/zapperstats.cpp index 40c03dd15f..9add33c244 100644 --- a/src/zap/zapperstats.cpp +++ b/src/zap/zapperstats.cpp @@ -107,7 +107,6 @@ ZapperStats::ZapperStats() , m_helperTableSize( 0 ) , m_dynamicInfoTableSize( 0 ) , m_dynamicInfoDelayListSize( 0 ) - , m_importTableSize( 0 ) , m_debuggingTableSize( 0 ) , m_headerSectionSize( 0 ) , m_codeSectionSize( 0 ) @@ -156,8 +155,7 @@ void ZapperStats::PrintStats() m_dynamicInfoDelayListSize + m_eeInfoTableSize + m_helperTableSize + - m_dynamicInfoTableSize + - m_importTableSize; + m_dynamicInfoTableSize; GetSvcLogger()->Printf( "Indirections: %8d\t%8.2f%%\n", totalIndirections, (double)totalIndirections/m_outputFileSize*100); diff --git a/src/zap/zapperstats.h b/src/zap/zapperstats.h index 2de4ca3417..0d137240c3 100644 --- a/src/zap/zapperstats.h +++ b/src/zap/zapperstats.h @@ -66,7 +66,6 @@ class ZapperStats unsigned m_helperTableSize; unsigned m_dynamicInfoTableSize; unsigned m_dynamicInfoDelayListSize; - unsigned m_importTableSize; unsigned m_debuggingTableSize; unsigned m_headerSectionSize; unsigned m_codeSectionSize; |