summaryrefslogtreecommitdiff
path: root/src/vm/ceeload.cpp
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-12-27 16:46:08 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2016-12-27 16:46:08 +0900
commitdb20f3f1bb8595633a7e16c8900fd401a453a6b5 (patch)
treee5435159cd1bf0519276363a6fe1663d1721bed3 /src/vm/ceeload.cpp
parent4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (diff)
downloadcoreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.gz
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.bz2
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.zip
Imported Upstream version 1.0.0.9127upstream/1.0.0.9127
Diffstat (limited to 'src/vm/ceeload.cpp')
-rw-r--r--src/vm/ceeload.cpp30
1 files changed, 23 insertions, 7 deletions
diff --git a/src/vm/ceeload.cpp b/src/vm/ceeload.cpp
index 464c147cb4..c95fbac16e 100644
--- a/src/vm/ceeload.cpp
+++ b/src/vm/ceeload.cpp
@@ -1656,6 +1656,7 @@ void Module::Destruct()
m_InstMethodHashTableCrst.Destroy();
m_ISymUnmanagedReaderCrst.Destroy();
+#ifdef FEATURE_CER
if (m_pCerPrepInfo)
{
_ASSERTE(m_pCerCrst != NULL);
@@ -1672,6 +1673,7 @@ void Module::Destruct()
}
if (m_pCerCrst)
delete m_pCerCrst;
+#endif // FEATURE_CER
if (m_debuggerSpecificData.m_pDynamicILCrst)
{
@@ -1702,8 +1704,10 @@ void Module::Destruct()
}
#ifdef FEATURE_PREJIT
+#ifdef FEATURE_CER
if (m_pCerNgenRootTable && (m_dwTransientFlags & M_CER_ROOT_TABLE_ON_HEAP))
delete m_pCerNgenRootTable;
+#endif
if (HasNativeImage())
{
@@ -3154,6 +3158,7 @@ BOOL Module::IsPreV4Assembly()
return !!(m_dwPersistedFlags & IS_PRE_V4_ASSEMBLY);
}
+#ifdef FEATURE_CER
DWORD Module::GetReliabilityContract()
{
CONTRACTL
@@ -3180,6 +3185,7 @@ DWORD Module::GetReliabilityContract()
return m_dwReliabilityContract;
}
+#endif // FEATURE_CER
ArrayDPTR(FixupPointer<PTR_MethodTable>) ModuleCtorInfo::GetGCStaticMTs(DWORD index)
{
@@ -3427,8 +3433,8 @@ void Module::EnumRegularStaticGCRefs(AppDomain* pAppDomain, promote_func* fn, Sc
}
CONTRACT_END;
- _ASSERTE(GCHeap::IsGCInProgress() &&
- GCHeap::IsServerHeap() &&
+ _ASSERTE(GCHeapUtilities::IsGCInProgress() &&
+ GCHeapUtilities::IsServerHeap() &&
IsGCSpecialThread());
@@ -6268,7 +6274,7 @@ Module *Module::GetModuleIfLoaded(mdFile kFile, BOOL onlyLoadedInAppDomain, BOOL
#ifndef DACCESS_COMPILE
#if defined(FEATURE_MULTIMODULE_ASSEMBLIES)
// check if actually loaded, unless happens during GC (GC works only with loaded assemblies)
- if (!GCHeap::IsGCInProgress() && onlyLoadedInAppDomain && pModule && !pModule->IsManifest())
+ if (!GCHeapUtilities::IsGCInProgress() && onlyLoadedInAppDomain && pModule && !pModule->IsManifest())
{
DomainModule *pDomainModule = pModule->FindDomainModule(GetAppDomain());
if (pDomainModule == NULL || !pDomainModule->IsLoaded())
@@ -9860,10 +9866,12 @@ void Module::PrepareTypesForSave(DataImage *image)
PrepareRemotableMethodInfo(pMT);
#endif // FEATURE_REMOTING
+#ifdef FEATURE_CER
// If this module defines any CriticalFinalizerObject derived classes,
// then we'll prepare these types for Constrained Execution Regions (CER) now.
// (Normally they're prepared at object instantiation time, a little too late for ngen).
PrepareCriticalType(pMT);
+#endif // FEATURE_CER
}
}
@@ -9947,7 +9955,9 @@ void Module::Save(DataImage *image)
// Cache values of all persisted flags computed from custom attributes
IsNoStringInterning();
IsRuntimeWrapExceptions();
+#ifdef FEATURE_CER
GetReliabilityContract();
+#endif
IsPreV4Assembly();
HasDefaultDllImportSearchPathsAttribute();
@@ -10302,10 +10312,12 @@ void Module::Save(DataImage *image)
m_nPropertyNameSet * sizeof(BYTE),
DataImage::ITEM_PROPERTY_NAME_SET);
+#ifdef FEATURE_CER
// Save Constrained Execution Region (CER) fixup information (used to eagerly fixup trees of methods to avoid any runtime
// induced failures when invoking the tree).
if (m_pCerNgenRootTable != NULL)
m_pCerNgenRootTable->Save(image, profileData);
+#endif
// Sort the list of RVA statics in an ascending order wrt the RVA
// and save them.
@@ -10761,6 +10773,7 @@ void Module::PlaceMethod(DataImage *image, MethodDesc *pMD, DWORD profilingFlags
image->PlaceStructureForAddress(pMD, CORCOMPILE_SECTION_WRITE);
}
+#ifdef FEATURE_CER
if (profilingFlags & (1 << ReadCerMethodList))
{
// protect against stale IBC data
@@ -10771,6 +10784,7 @@ void Module::PlaceMethod(DataImage *image, MethodDesc *pMD, DWORD profilingFlags
image->PlaceStructureForAddress(m_pCerNgenRootTable->GetList(pMD), CORCOMPILE_SECTION_HOT);
}
}
+#endif // FEATURE_CER
if (profilingFlags & (1 << WriteMethodPrecode))
{
@@ -11314,6 +11328,7 @@ void Module::Fixup(DataImage *image)
image->ZeroField(m_FileReferencesMap.pTable, 0,
m_FileReferencesMap.GetSize() * sizeof(void*));
+#ifdef FEATURE_CER
//
// Fixup Constrained Execution Regions restoration records.
//
@@ -11330,6 +11345,7 @@ void Module::Fixup(DataImage *image)
// Zero out fields we always compute at runtime lazily.
image->ZeroField(this, offsetof(Module, m_pCerPrepInfo), sizeof(m_pCerPrepInfo));
image->ZeroField(this, offsetof(Module, m_pCerCrst), sizeof(m_pCerCrst));
+#endif // FEATURE_CER
image->ZeroField(this, offsetof(Module, m_debuggerSpecificData), sizeof(m_debuggerSpecificData));
@@ -15593,7 +15609,7 @@ FieldDesc *Module::LookupFieldDef(mdFieldDef token)
#endif // DACCESS_COMPILE
-#ifndef DACCESS_COMPILE
+#if !defined(DACCESS_COMPILE) && defined(FEATURE_CER)
// Access to CerPrepInfo, the structure used to track CERs prepared at runtime (as opposed to ngen time). GetCerPrepInfo will
// return the structure associated with the given method desc if it exists or NULL otherwise. CreateCerPrepInfo will get the
@@ -15745,7 +15761,7 @@ void Module::RestoreCer(MethodDesc *pMD)
#endif // FEATURE_PREJIT
-#endif // !DACCESS_COMPILE
+#endif // !DACCESS_COMPILE && FEATURE_CER
@@ -15911,9 +15927,9 @@ void Module::ExpandAll()
pMD->GetMDImport(),
&ignored));
#ifdef FEATURE_INTERPRETER
- pMD->MakeJitWorker(pHeader, CORJIT_FLG_MAKEFINALCODE, 0);
+ pMD->MakeJitWorker(pHeader, CORJIT_FLAGS(CORJIT_FLAGS::CORJIT_FLAG_MAKEFINALCODE));
#else
- pMD->MakeJitWorker(pHeader, 0, 0);
+ pMD->MakeJitWorker(pHeader, CORJIT_FLAGS());
#endif
}
}