From 484a2cf0b0c4e304a5093ec26e07fe41f8896c3c Mon Sep 17 00:00:00 2001 From: dotnet-bot Date: Wed, 6 May 2015 23:43:46 -0700 Subject: Merge changes from parent branch [tfs-changeset: 1466545] --- src/vm/compile.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/vm/compile.cpp') diff --git a/src/vm/compile.cpp b/src/vm/compile.cpp index 7d7892b3c7..d77a285a04 100644 --- a/src/vm/compile.cpp +++ b/src/vm/compile.cpp @@ -1033,7 +1033,7 @@ HRESULT CEECompileInfo::SetCompilationTarget(CORINFO_ASSEMBLY_HANDLE assembl mscorlib.InitializeSpec(SystemDomain::SystemFile()); GetAppDomain()->BindAssemblySpec(&mscorlib,TRUE,FALSE); - if (!SystemDomain::SystemFile()->HasNativeImage()) + if (!IsReadyToRunCompilation() && !SystemDomain::SystemFile()->HasNativeImage()) { if (!CLRConfig::GetConfigValue(CLRConfig::INTERNAL_NgenAllowMscorlibSoftbind)) { @@ -2527,6 +2527,11 @@ BOOL CEECompileInfo::NeedsTypeLayoutCheck(CORINFO_CLASS_HANDLE classHnd) if (!pMT->IsValueType()) return FALSE; + // Skip this check for equivalent types. Equivalent types are used for interop that ensures + // matching layout. + if (pMT->GetClass()->IsEquivalentType()) + return FALSE; + return !pMT->IsLayoutFixedInCurrentVersionBubble(); } @@ -8191,4 +8196,16 @@ HRESULT CompilationDomain::SetPlatformWinmdPaths(LPCWSTR pwzPlatformWinmdPaths) } #endif // CROSSGEN_COMPILE +#if defined(_TARGET_AMD64_) && !defined(FEATURE_CORECLR) +bool UseRyuJit() +{ +#ifdef CROSSGEN_COMPILE + return true; +#else + static ConfigDWORD useRyuJitValue; + return useRyuJitValue.val(CLRConfig::INTERNAL_UseRyuJit) == 1 || IsNgenOffline(); +#endif +} +#endif + #endif // FEATURE_PREJIT -- cgit v1.2.3