diff --git a/src/coreclr/vm/binder.cpp b/src/coreclr/vm/binder.cpp index 90aa2250f27e4..f518dda385038 100644 --- a/src/coreclr/vm/binder.cpp +++ b/src/coreclr/vm/binder.cpp @@ -1155,8 +1155,6 @@ void CoreLibBinder::AttachModule(Module * pModule) c_rgCoreLibFieldDescriptions, c_nCoreLibFieldDescriptions); pGlobalBinder->AllocateTables(); - - pModule->m_pBinder = pGlobalBinder; } void CoreLibBinder::SetDescriptions(Module * pModule, diff --git a/src/coreclr/vm/ceeload.cpp b/src/coreclr/vm/ceeload.cpp index b230dea048702..872e02903d406 100644 --- a/src/coreclr/vm/ceeload.cpp +++ b/src/coreclr/vm/ceeload.cpp @@ -346,9 +346,6 @@ Module::Module(Assembly *pAssembly, PEAssembly *pPEAssembly) m_pPEAssembly = pPEAssembly; m_dwTransientFlags = CLASSES_FREED; - // Memory allocated on LoaderHeap is zero-filled. Spot-check it here. - _ASSERTE(m_pBinder == NULL); - pPEAssembly->AddRef(); } @@ -418,20 +415,12 @@ void Module::Initialize(AllocMemTracker *pamTracker, LPCWSTR szName) m_Crst.Init(CrstModule); m_LookupTableCrst.Init(CrstModuleLookupTable, CrstFlags(CRST_UNSAFE_ANYMODE | CRST_DEBUGGER_THREAD)); - m_FixupCrst.Init(CrstModuleFixup, (CrstFlags)(CRST_HOST_BREAKABLE|CRST_REENTRANCY)); m_InstMethodHashTableCrst.Init(CrstInstMethodHashTable, CRST_REENTRANCY); m_ISymUnmanagedReaderCrst.Init(CrstISymUnmanagedReader, CRST_DEBUGGER_THREAD); AllocateMaps(); m_dwTransientFlags &= ~((DWORD)CLASSES_FREED); // Set flag indicating LookupMaps are now in a consistent and destructable state -#ifdef FEATURE_COLLECTIBLE_TYPES - if (GetAssembly()->IsCollectible()) - { - InterlockedOr((LONG*)&m_dwPersistedFlags, COLLECTIBLE_MODULE); - } -#endif // FEATURE_COLLECTIBLE_TYPES - #ifdef FEATURE_READYTORUN m_pNativeImage = NULL; if ((m_pReadyToRunInfo = ReadyToRunInfo::Initialize(this, pamTracker)) != NULL) @@ -723,7 +712,6 @@ void Module::Destruct() ClearInMemorySymbolStream(); m_Crst.Destroy(); - m_FixupCrst.Destroy(); m_LookupTableCrst.Destroy(); m_InstMethodHashTableCrst.Destroy(); m_ISymUnmanagedReaderCrst.Destroy(); @@ -830,6 +818,12 @@ MethodTable *Module::GetGlobalMethodTable() #endif // !DACCESS_COMPILE +BOOL Module::IsCollectible() +{ + LIMITED_METHOD_DAC_CONTRACT; + return GetAssembly()->IsCollectible(); +} + BOOL Module::IsManifest() { WRAPPER_NO_CONTRACT; @@ -4543,10 +4537,6 @@ void Module::EnumMemoryRegions(CLRDataEnumMemoryFlags flags, { m_pAvailableClassesCaseIns->EnumMemoryRegions(flags); } - if (m_pBinder.IsValid()) - { - m_pBinder->EnumMemoryRegions(flags); - } // Save the LookupMap structures. m_MethodDefToDescMap.ListEnumMemoryRegions(flags); diff --git a/src/coreclr/vm/ceeload.h b/src/coreclr/vm/ceeload.h index 58c13861f03fd..5a6996e4d6038 100644 --- a/src/coreclr/vm/ceeload.h +++ b/src/coreclr/vm/ceeload.h @@ -653,9 +653,7 @@ class Module : public ModuleBase WRAP_EXCEPTIONS = 0x00000020, // unused = 0x00000040, - - // This flag applies to assembly, but is also stored here so that it can be cached in ngen image - COLLECTIBLE_MODULE = 0x00000080, + // unused = 0x00000080, //If attribute value has been cached before DEFAULT_DLL_IMPORT_SEARCH_PATHS_IS_CACHED = 0x00000400, @@ -679,7 +677,6 @@ class Module : public ModuleBase PTR_Assembly m_pAssembly; CrstExplicitInit m_Crst; - CrstExplicitInit m_FixupCrst; // Debugging symbols reader interface. This will only be // initialized if needed, either by the debugging subsystem or for @@ -808,16 +805,8 @@ class Module : public ModuleBase // m_pAvailableClasses. PTR_EEClassHashTable m_pAvailableClassesCaseIns; - // Pointer to binder, if we have one - friend class CoreLibBinder; - PTR_CoreLibBinder m_pBinder; - public: - BOOL IsCollectible() - { - LIMITED_METHOD_DAC_CONTRACT; - return (m_dwPersistedFlags & COLLECTIBLE_MODULE) != 0; - } + BOOL IsCollectible(); #ifdef FEATURE_READYTORUN private: @@ -1505,11 +1494,6 @@ class Module : public ModuleBase InstrumentedILOffsetMapping GetInstrumentedILOffsetMapping(mdMethodDef token); public: - CrstBase* GetFixupCrst() - { - return &m_FixupCrst; - } - // LoaderHeap for storing IJW thunks PTR_LoaderHeap m_pThunkHeap;