Skip to content

Commit 8e92aef

Browse files
authored
Remove unused members on Module - crossgen remnants (#103848)
1 parent 386f16f commit 8e92aef

3 files changed

Lines changed: 8 additions & 36 deletions

File tree

src/coreclr/vm/binder.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,8 +1155,6 @@ void CoreLibBinder::AttachModule(Module * pModule)
11551155
c_rgCoreLibFieldDescriptions, c_nCoreLibFieldDescriptions);
11561156

11571157
pGlobalBinder->AllocateTables();
1158-
1159-
pModule->m_pBinder = pGlobalBinder;
11601158
}
11611159

11621160
void CoreLibBinder::SetDescriptions(Module * pModule,

src/coreclr/vm/ceeload.cpp

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,6 @@ Module::Module(Assembly *pAssembly, PEAssembly *pPEAssembly)
346346
m_pPEAssembly = pPEAssembly;
347347
m_dwTransientFlags = CLASSES_FREED;
348348

349-
// Memory allocated on LoaderHeap is zero-filled. Spot-check it here.
350-
_ASSERTE(m_pBinder == NULL);
351-
352349
pPEAssembly->AddRef();
353350
}
354351

@@ -418,20 +415,12 @@ void Module::Initialize(AllocMemTracker *pamTracker, LPCWSTR szName)
418415

419416
m_Crst.Init(CrstModule);
420417
m_LookupTableCrst.Init(CrstModuleLookupTable, CrstFlags(CRST_UNSAFE_ANYMODE | CRST_DEBUGGER_THREAD));
421-
m_FixupCrst.Init(CrstModuleFixup, (CrstFlags)(CRST_HOST_BREAKABLE|CRST_REENTRANCY));
422418
m_InstMethodHashTableCrst.Init(CrstInstMethodHashTable, CRST_REENTRANCY);
423419
m_ISymUnmanagedReaderCrst.Init(CrstISymUnmanagedReader, CRST_DEBUGGER_THREAD);
424420

425421
AllocateMaps();
426422
m_dwTransientFlags &= ~((DWORD)CLASSES_FREED); // Set flag indicating LookupMaps are now in a consistent and destructable state
427423

428-
#ifdef FEATURE_COLLECTIBLE_TYPES
429-
if (GetAssembly()->IsCollectible())
430-
{
431-
InterlockedOr((LONG*)&m_dwPersistedFlags, COLLECTIBLE_MODULE);
432-
}
433-
#endif // FEATURE_COLLECTIBLE_TYPES
434-
435424
#ifdef FEATURE_READYTORUN
436425
m_pNativeImage = NULL;
437426
if ((m_pReadyToRunInfo = ReadyToRunInfo::Initialize(this, pamTracker)) != NULL)
@@ -723,7 +712,6 @@ void Module::Destruct()
723712
ClearInMemorySymbolStream();
724713

725714
m_Crst.Destroy();
726-
m_FixupCrst.Destroy();
727715
m_LookupTableCrst.Destroy();
728716
m_InstMethodHashTableCrst.Destroy();
729717
m_ISymUnmanagedReaderCrst.Destroy();
@@ -830,6 +818,12 @@ MethodTable *Module::GetGlobalMethodTable()
830818

831819
#endif // !DACCESS_COMPILE
832820

821+
BOOL Module::IsCollectible()
822+
{
823+
LIMITED_METHOD_DAC_CONTRACT;
824+
return GetAssembly()->IsCollectible();
825+
}
826+
833827
BOOL Module::IsManifest()
834828
{
835829
WRAPPER_NO_CONTRACT;
@@ -4543,10 +4537,6 @@ void Module::EnumMemoryRegions(CLRDataEnumMemoryFlags flags,
45434537
{
45444538
m_pAvailableClassesCaseIns->EnumMemoryRegions(flags);
45454539
}
4546-
if (m_pBinder.IsValid())
4547-
{
4548-
m_pBinder->EnumMemoryRegions(flags);
4549-
}
45504540

45514541
// Save the LookupMap structures.
45524542
m_MethodDefToDescMap.ListEnumMemoryRegions(flags);

src/coreclr/vm/ceeload.h

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -653,9 +653,7 @@ class Module : public ModuleBase
653653
WRAP_EXCEPTIONS = 0x00000020,
654654

655655
// unused = 0x00000040,
656-
657-
// This flag applies to assembly, but is also stored here so that it can be cached in ngen image
658-
COLLECTIBLE_MODULE = 0x00000080,
656+
// unused = 0x00000080,
659657

660658
//If attribute value has been cached before
661659
DEFAULT_DLL_IMPORT_SEARCH_PATHS_IS_CACHED = 0x00000400,
@@ -679,7 +677,6 @@ class Module : public ModuleBase
679677
PTR_Assembly m_pAssembly;
680678

681679
CrstExplicitInit m_Crst;
682-
CrstExplicitInit m_FixupCrst;
683680

684681
// Debugging symbols reader interface. This will only be
685682
// initialized if needed, either by the debugging subsystem or for
@@ -808,16 +805,8 @@ class Module : public ModuleBase
808805
// m_pAvailableClasses.
809806
PTR_EEClassHashTable m_pAvailableClassesCaseIns;
810807

811-
// Pointer to binder, if we have one
812-
friend class CoreLibBinder;
813-
PTR_CoreLibBinder m_pBinder;
814-
815808
public:
816-
BOOL IsCollectible()
817-
{
818-
LIMITED_METHOD_DAC_CONTRACT;
819-
return (m_dwPersistedFlags & COLLECTIBLE_MODULE) != 0;
820-
}
809+
BOOL IsCollectible();
821810

822811
#ifdef FEATURE_READYTORUN
823812
private:
@@ -1505,11 +1494,6 @@ class Module : public ModuleBase
15051494
InstrumentedILOffsetMapping GetInstrumentedILOffsetMapping(mdMethodDef token);
15061495

15071496
public:
1508-
CrstBase* GetFixupCrst()
1509-
{
1510-
return &m_FixupCrst;
1511-
}
1512-
15131497
// LoaderHeap for storing IJW thunks
15141498
PTR_LoaderHeap m_pThunkHeap;
15151499

0 commit comments

Comments
 (0)