From: Steve MacLean Date: Fri, 30 Nov 2018 22:18:46 +0000 (-0500) Subject: Address PR feedback X-Git-Tag: accepted/tizen/unified/20190422.045933~483 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=52e3f4f7ac60c2e3ba19a01e6f666de4388cf1e8;p=platform%2Fupstream%2Fcoreclr.git Address PR feedback --- diff --git a/src/vm/appdomain.cpp b/src/vm/appdomain.cpp index b0cb03b..19999cd 100644 --- a/src/vm/appdomain.cpp +++ b/src/vm/appdomain.cpp @@ -3822,8 +3822,7 @@ BOOL AppDomain::IsCompilationDomain() BOOL isCompilationDomain = (m_dwFlags & COMPILATION_DOMAIN) != 0; #ifdef FEATURE_PREJIT - _ASSERTE(!isCompilationDomain || - (IsCompilationProcess() && IsPassiveDomain())); + _ASSERTE(!isCompilationDomain || IsCompilationProcess()); #endif // FEATURE_PREJIT return isCompilationDomain; } diff --git a/src/vm/appdomain.hpp b/src/vm/appdomain.hpp index b946106..b326b26 100644 --- a/src/vm/appdomain.hpp +++ b/src/vm/appdomain.hpp @@ -2603,18 +2603,11 @@ public: return (m_dwFlags & IGNORE_UNHANDLED_EXCEPTIONS); } - BOOL IsPassiveDomain() - { - LIMITED_METHOD_CONTRACT; - - return (m_dwFlags & PASSIVE_DOMAIN); - } - void SetCompilationDomain() { LIMITED_METHOD_CONTRACT; - m_dwFlags |= (PASSIVE_DOMAIN|COMPILATION_DOMAIN); + m_dwFlags |= (COMPILATION_DOMAIN); } BOOL IsCompilationDomain(); @@ -3283,7 +3276,6 @@ public: ALLOCATEDCOM = 0x0008, LOAD_SYSTEM_ASSEMBLY_EVENT_SENT = 0x0040, COMPILATION_DOMAIN = 0x0400, // Are we ngenning? - PASSIVE_DOMAIN = 0x2000, // Can we execute code in this AppDomain IGNORE_UNHANDLED_EXCEPTIONS = 0x10000, // AppDomain was created using the APPDOMAIN_IGNORE_UNHANDLED_EXCEPTIONS flag ENABLE_PINVOKE_AND_CLASSIC_COMINTEROP = 0x20000, // AppDomain was created using the APPDOMAIN_ENABLE_PINVOKE_AND_CLASSIC_COMINTEROP flag ENABLE_SKIP_PLAT_CHECKS = 0x200000, // Skip various assembly checks (like platform check) diff --git a/src/vm/ceeload.cpp b/src/vm/ceeload.cpp index a050638..c6911ed 100644 --- a/src/vm/ceeload.cpp +++ b/src/vm/ceeload.cpp @@ -3103,49 +3103,8 @@ void Module::SetDomainFile(DomainFile *pDomainFile) DomainLocalModule* pModuleData = 0; - // Do we need to allocate memory for the non GC statics? - if (m_ModuleID == NULL) - { - // Allocate memory for the module statics. - LoaderAllocator *pLoaderAllocator = NULL; - if (GetAssembly()->IsCollectible()) - { - pLoaderAllocator = GetAssembly()->GetLoaderAllocator(); - } - else - { - pLoaderAllocator = pDomainFile->GetAppDomain()->GetLoaderAllocator(); - } - - SIZE_T size = GetDomainLocalModuleSize(); - - LOG((LF_CLASSLOADER, LL_INFO10, "STATICS: Allocating %i bytes for precomputed statics in module %S in LoaderAllocator %p\n", - size, this->GetDebugName(), pLoaderAllocator)); - - // We guarantee alignment for 64-bit regular statics on 32-bit platforms even without FEATURE_64BIT_ALIGNMENT for performance reasons. - - _ASSERTE(size >= DomainLocalModule::OffsetOfDataBlob()); - - pModuleData = (DomainLocalModule*)(void*) - pLoaderAllocator->GetHighFrequencyHeap()->AllocAlignedMem( - size, MAX_PRIMITIVE_FIELD_SIZE); - - // Note: Memory allocated on loader heap is zero filled - // memset(pModuleData, 0, size); - - // Verify that the space is really zero initialized - _ASSERTE(pModuleData->GetPrecomputedGCStaticsBasePointer() == NULL); - - // If the module was loaded as domain-specific, then we need to assign - // this module a domain-neutral module ID. - pModuleData->m_ModuleIndex = Module::AllocateModuleIndex(); - m_ModuleIndex = pModuleData->m_ModuleIndex; - } - else - { - pModuleData = this->m_ModuleID; - LOG((LF_CLASSLOADER, LL_INFO10, "STATICS: Allocation not needed for ngened non shared module %s in Appdomain %08x\n")); - } + pModuleData = this->m_ModuleID; + LOG((LF_CLASSLOADER, LL_INFO10, "STATICS: Allocation not needed for ngened non shared module %s in Appdomain %08x\n")); // Non shared case, module points directly to the statics. In ngen case // m_pDomainModule is already set for the non shared case @@ -6684,7 +6643,7 @@ void Module::FixupVTables() // @todo: workaround! // If we are compiling in-process, we don't want to fixup the vtables - as it // will have side effects on the other copy of the module! - if (SystemDomain::GetCurrentDomain()->IsPassiveDomain()) { + if (SystemDomain::GetCurrentDomain()->IsCompilationDomain()) { return; }