diff options
author | danmosemsft <danmose@microsoft.com> | 2017-02-10 17:12:53 -0800 |
---|---|---|
committer | danmosemsft <danmose@microsoft.com> | 2017-02-10 21:36:06 -0800 |
commit | 54891e0650e69f08832f75a40dc102efc6115d38 (patch) | |
tree | 0e032a0b337767801f696cbaeacded267c694f32 /src/inc | |
parent | 396f7d43b3c0f3ca7034a6d1d9cd7d6914778a1e (diff) | |
download | coreclr-54891e0650e69f08832f75a40dc102efc6115d38.tar.gz coreclr-54891e0650e69f08832f75a40dc102efc6115d38.tar.bz2 coreclr-54891e0650e69f08832f75a40dc102efc6115d38.zip |
Remove always defined FEATURE_CORECLR
Diffstat (limited to 'src/inc')
-rw-r--r-- | src/inc/appxutil.h | 87 | ||||
-rw-r--r-- | src/inc/clrconfigvalues.h | 26 | ||||
-rw-r--r-- | src/inc/clrhost.h | 2 | ||||
-rw-r--r-- | src/inc/clrinternal.idl | 195 | ||||
-rw-r--r-- | src/inc/clrnt.h | 2 | ||||
-rw-r--r-- | src/inc/cor.h | 5 | ||||
-rw-r--r-- | src/inc/corcompile.h | 37 | ||||
-rw-r--r-- | src/inc/corhost.h | 504 | ||||
-rw-r--r-- | src/inc/corpolicy.h | 40 | ||||
-rw-r--r-- | src/inc/corpriv.h | 14 | ||||
-rw-r--r-- | src/inc/dacvars.h | 12 | ||||
-rw-r--r-- | src/inc/fusionpriv.idl | 16 | ||||
-rw-r--r-- | src/inc/fxretarget.h | 2 | ||||
-rw-r--r-- | src/inc/holder.h | 5 | ||||
-rw-r--r-- | src/inc/longfilepathwrappers.h | 115 | ||||
-rw-r--r-- | src/inc/metadatatracker.h | 2 | ||||
-rw-r--r-- | src/inc/palclr_win.h | 61 | ||||
-rw-r--r-- | src/inc/registrywrapper.h | 28 | ||||
-rw-r--r-- | src/inc/shimload.h | 11 | ||||
-rw-r--r-- | src/inc/stacktrace.h | 2 | ||||
-rw-r--r-- | src/inc/switches.h | 29 | ||||
-rw-r--r-- | src/inc/utilcode.h | 250 | ||||
-rw-r--r-- | src/inc/vptr_list.h | 3 | ||||
-rw-r--r-- | src/inc/winwrap.h | 10 | ||||
-rw-r--r-- | src/inc/zapper.h | 73 |
25 files changed, 12 insertions, 1519 deletions
diff --git a/src/inc/appxutil.h b/src/inc/appxutil.h index 2892ab7dd8..893c429c95 100644 --- a/src/inc/appxutil.h +++ b/src/inc/appxutil.h @@ -24,7 +24,6 @@ template <typename T> class NewArrayHolder; BOOL WinRTSupported(); -#ifdef FEATURE_CORECLR namespace AppX { @@ -45,92 +44,6 @@ namespace AppX #endif // DACCESS_COMPILE }; -#else // FEATURE_CORECLR - -struct AppXRTInfo; -typedef DPTR(AppXRTInfo) PTR_AppXRTInfo; - -//--------------------------------------------------------------------------------------------- -namespace AppX -{ - // cleans up resources allocated in InitAppXRT() - void ShutDown(); - - // Returns true if process is immersive (or if running in mockup environment). - // NOTE: a return value of true doesn't necessarily indicate that the process is a - // real Metro app, e.g. it could be an ngen process compiling an AppX assembly. - bool IsAppXProcess(); - -#ifdef DACCESS_COMPILE - bool DacIsAppXProcess(); -#endif // DACCESS_COMPILE - - // Returns true if process is immersive (or if running in mockup environment). - // Use only in NOFAULT regions when you are 100% sure that code:IsAppXProcess has been already called. - // This function does not initialize (no faults). - bool IsAppXProcess_Initialized_NoFault(); - - // Returns true if process is NGen worker compiling an AppX assembly. - bool IsAppXNGen(); - - // Returns true if the host OS supports immersive apps. - inline bool IsAppXSupported() - { return WinRTSupported() != FALSE; } - - LPCWSTR GetHeadPackageMoniker(); - - HRESULT GetCurrentPackageId( - __inout PUINT32 pBufferLength, - __out PBYTE pBuffer); - - HRESULT GetCurrentPackageInfo( - __in UINT32 dwFlags, - __inout PUINT32 pcbBuffer, - __out PBYTE pbBuffer, - __out PUINT32 nCount); - - bool IsAdaptiveApp(); - HRESULT GetCurrentPackageRoot(_Inout_ UINT32* length, _Out_opt_ PWSTR packageRoot); - HRESULT GetWinMetadataDirForAdaptiveApps(_Out_ LPWSTR* winMetadDataDir); -#ifdef FEATURE_APPX_BINDER - enum FindFindInPackageFlags - { - FindFindInPackageFlags_None = 0, - FindFindInPackageFlags_AllowLongFormatPath = 1, - FindFindInPackageFlags_SkipCurrentPackageGraph = 2, // Only search in alt path - }; - - // If the function succeeds, pcchPathName is set to the length of the string that is copied to the buffer, - // in characters, including the terminating null character, and the function returns S_OK. If the buffer - // is too small, pcchPathName is set to the length of the buffer required (in characters), - // including the terminating null character, and the function returns ERROR_INSUFFICIENT_BUFFER. - HRESULT FindFileInCurrentPackage( - __in PCWSTR pszFileName, - __inout PUINT32 pcchPathName, - __out PWSTR pszPathName, - __in UINT32 uiFlags = PACKAGE_FILTER_CLR_DEFAULT, - __in PCWSTR *rgwzAltPaths = NULL, - __in UINT32 cAltPaths = 0, - FindFindInPackageFlags findInCurrentPackageFlags = FindFindInPackageFlags_None); -#endif // FEATURE_APPX_BINDER - - // Attempts to retrieve the AppContainer SID for the specified process. - // For non-AppContainer processes the function will return S_FALSE and pAppContainerTokenInfo will be NULL. - // For AppContainer processes the function will return S_OK and pAppContainerTokenInfo will contain data. - // Note that there might be legitimate cases where this function fails (caller doesn't have permissions to - // OpenProcess() for example) so any callers must account for such failures. - // Use of NewArrayHolder permits method to reuse info for current process (dwPid == self) or to allocate - // memory (dwPid != self). Cast the result to PTOKEN_APPCONTAINER_INFORMATION; - HRESULT GetAppContainerTokenInfoForProcess( - DWORD dwPid, - NewArrayHolder<BYTE>& pbAppContainerTokenInfo, // Cast to PTOKEN_APPCONTAINER_INFORMATION on return. - DWORD* pcbAppContainerTokenInfo = nullptr); - - // Called during NGen to pretend that we are in a certain package. - HRESULT SetCurrentPackageForNGen(__in PCWSTR pszPackageFullName); -} - -#endif // FEATURE_CORECLR #else // FEATURE_APPX diff --git a/src/inc/clrconfigvalues.h b/src/inc/clrconfigvalues.h index eb321f3b3b..347cdd0c34 100644 --- a/src/inc/clrconfigvalues.h +++ b/src/inc/clrconfigvalues.h @@ -123,13 +123,9 @@ CONFIG_DWORD_INFO(INTERNAL_AppDomainNoUnload, W("AppDomainNoUnload"), 0, "Not us RETAIL_CONFIG_STRING_INFO_EX(INTERNAL_TargetFrameworkMoniker, W("TargetFrameworkMoniker"), "Allows the test team to specify what TargetFrameworkMoniker to use.", CLRConfig::IgnoreHKLM | CLRConfig::IgnoreHKCU | CLRConfig::IgnoreConfigFiles | CLRConfig::IgnoreWindowsQuirkDB) RETAIL_CONFIG_STRING_INFO_EX(INTERNAL_AppContextSwitchOverrides, W("AppContextSwitchOverrides"), "Allows default switch values defined in AppContext to be overwritten by values in the Config", CLRConfig::IgnoreEnv | CLRConfig::IgnoreHKLM | CLRConfig::IgnoreHKCU | CLRConfig::IgnoreWindowsQuirkDB | CLRConfig::ConfigFile_ApplicationFirst) -#ifdef FEATURE_CORECLR // For the proposal and discussion on why finalizers are not run on shutdown by default anymore in CoreCLR, see the API review: // https://github.com/dotnet/corefx/issues/5205 #define DEFAULT_FinalizeOnShutdown (0) -#else -#define DEFAULT_FinalizeOnShutdown (1) -#endif RETAIL_CONFIG_DWORD_INFO(EXTERNAL_FinalizeOnShutdown, W("FinalizeOnShutdown"), DEFAULT_FinalizeOnShutdown, "When enabled, on shutdown, blocks all user threads and calls finalizers for all finalizable objects, including live objects") // @@ -312,9 +308,7 @@ RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_gcConcurrent, W("gcConcurrent"), (DWORD)-1, #ifdef FEATURE_CONSERVATIVE_GC RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_gcConservative, W("gcConservative"), 0, "Enables/Disables conservative GC") #endif -#ifdef FEATURE_CORECLR RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_gcServer, W("gcServer"), 0, "Enables server GC") -#endif CONFIG_STRING_INFO(INTERNAL_GcCoverage, W("GcCoverage"), "specify a method or regular expression of method names to run with GCStress") CONFIG_STRING_INFO(INTERNAL_SkipGCCoverage, W("SkipGcCoverage"), "specify a list of assembly names to skip with GC Coverage") RETAIL_CONFIG_DWORD_INFO_DIRECT_ACCESS(UNSUPPORTED_gcForceCompact, W("gcForceCompact"), "When set to true, always do compacting GC") @@ -386,7 +380,7 @@ CONFIG_STRING_INFO_EX(INTERNAL_JitDebugBreak, W("JitDebugBreak"), "", CLRConfig: CONFIG_DWORD_INFO_DIRECT_ACCESS(INTERNAL_JitDebuggable, W("JitDebuggable"), "") CONFIG_DWORD_INFO_EX(INTERNAL_JitDefaultFill, W("JitDefaultFill"), 0xDD, "In debug builds, initialize the memory allocated by the nra with this byte.", CLRConfig::REGUTIL_default) CONFIG_DWORD_INFO_EX(INTERNAL_JitDirectAlloc, W("JitDirectAlloc"), 0, "", CLRConfig::REGUTIL_default) -#if (!defined(DEBUG) && !defined(_DEBUG)) || (defined(CROSSGEN_COMPILE) && !defined(FEATURE_CORECLR)) +#if !defined(DEBUG) && !defined(_DEBUG) #define INTERNAL_JitEnableNoWayAssert_Default 0 #else #define INTERNAL_JitEnableNoWayAssert_Default 1 @@ -477,7 +471,7 @@ RETAIL_CONFIG_DWORD_INFO(EXTERNAL_UseLegacyJit, W("useLegacyJit"), 0, "Set to 1 RETAIL_CONFIG_STRING_INFO_EX(EXTERNAL_DisableNativeImageLoadList, W("DisableNativeImageLoadList"), "Refuse to load native images corresponding to one of the assemblies on this semicolon-delimited list of assembly names.", CLRConfig::REGUTIL_default) #endif -#if defined(FEATURE_CORECLR) && defined(_TARGET_X86_) +#if defined(_TARGET_X86_) RETAIL_CONFIG_DWORD_INFO(EXTERNAL_UseWindowsX86CoreLegacyJit, W("UseWindowsX86CoreLegacyJit"), 0, "Set to 1 to do all JITing with compatjit.dll. Only applicable to Windows x86 .NET Core.") #endif @@ -670,9 +664,6 @@ CONFIG_DWORD_INFO_EX(INTERNAL_MD_RegMetaDump, W("MD_RegMetaDump"), 0, "? Dump MD CONFIG_DWORD_INFO_EX(INTERNAL_MD_TlbImp_BreakOnErr, W("MD_TlbImp_BreakOnErr"), 0, "ASSERT when importing TLB into MD", CLRConfig::REGUTIL_default) CONFIG_STRING_INFO_EX(INTERNAL_MD_TlbImp_BreakOnTypeImport, W("MD_TlbImp_BreakOnTypeImport"), "ASSERT when importing a type from TLB", (CLRConfig::LookupOptions) (CLRConfig::REGUTIL_default | CLRConfig::DontPrependCOMPlus_)) // MetaData - Desktop-only -#ifndef FEATURE_CORECLR -RETAIL_CONFIG_DWORD_INFO_EX(INTERNAL_MD_UseMinimalDeltas, W("MD_UseMinimalDeltas"), 1, "? Some MD modifications when applying EnC?", CLRConfig::REGUTIL_default) -#endif //!FEATURE_CORECLR CONFIG_DWORD_INFO_EX(INTERNAL_MD_WinMD_Disable, W("MD_WinMD_Disable"), 0, "Never activate the WinMD import adapter", CLRConfig::REGUTIL_default) CONFIG_DWORD_INFO_EX(INTERNAL_MD_WinMD_AssertOnIllegalUsage, W("MD_WinMD_AssertOnIllegalUsage"), 0, "ASSERT if a WinMD import adapter detects a tool incompatibility", CLRConfig::REGUTIL_default) @@ -777,12 +768,7 @@ RETAIL_CONFIG_STRING_INFO_EX(UNSUPPORTED_NicPath, W("NicPath"), "Redirects NIC a RETAIL_CONFIG_DWORD_INFO(INTERNAL_NGenTaskDelayStart, W("NGenTaskDelayStart"), 0, "Use NGen Task delay start trigger, instead of critical idle task") // Flag for cross-platform ngen: Removes all execution of managed or third-party code in the ngen compilation process. -#ifdef FEATURE_CORECLR RETAIL_CONFIG_DWORD_INFO(INTERNAL_Ningen, W("Ningen"), 1, "Enable no-impact ngen") -#else -// Ningen is off by default for desktop to reduce compat risk -RETAIL_CONFIG_DWORD_INFO(INTERNAL_Ningen, W("Ningen"), 0, "Enable no-impact ngen") -#endif CONFIG_DWORD_INFO(INTERNAL_NoASLRForNgen, W("NoASLRForNgen"), 0, "Turn off IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE bit in generated ngen images. Makes nidump output repeatable from run to run.") RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_NgenAllowOutput, W("NgenAllowOutput"), 0, "If set to 1, the NGEN worker will bind to the parent console, thus allowing stdout output to work", CLRConfig::REGUTIL_default) @@ -1027,11 +1013,7 @@ CONFIG_DWORD_INFO(INTERNAL_DebugAssertOnMissedCOWPage, W("DebugAssertOnMissedCOW #endif //FEATURE_LAZY_COW_PAGES -#ifdef FEATURE_CORECLR RETAIL_CONFIG_DWORD_INFO(EXTERNAL_ReadyToRun, W("ReadyToRun"), 1, "Enable/disable use of ReadyToRun native code") // On by default for CoreCLR -#else -RETAIL_CONFIG_DWORD_INFO(EXTERNAL_ReadyToRun, W("ReadyToRun"), 0, "Enable/disable use of ReadyToRun native code") // Off by default for desktop -#endif RETAIL_CONFIG_STRING_INFO(EXTERNAL_ReadyToRunExcludeList, W("ReadyToRunExcludeList"), "List of assemblies that cannot use Ready to Run images") RETAIL_CONFIG_STRING_INFO(EXTERNAL_ReadyToRunLogFile, W("ReadyToRunLogFile"), "Name of file to log success/failure of using Ready to Run images") @@ -1128,11 +1110,7 @@ CONFIG_DWORD_INFO_EX(INTERNAL_MscorsnLogging, W("MscorsnLogging"), 0, "Enables s RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_NativeImageRequire, W("NativeImageRequire"), 0, "", CLRConfig::REGUTIL_default) CONFIG_DWORD_INFO_EX(INTERNAL_NestedEhOom, W("NestedEhOom"), 0, "", CLRConfig::REGUTIL_default) RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_NO_SO_NOT_MAINLINE, W("NO_SO_NOT_MAINLINE"), 0, "", CLRConfig::REGUTIL_default) -#if defined(CROSSGEN_COMPILE) || defined(FEATURE_CORECLR) #define INTERNAL_NoGuiOnAssert_Default 1 -#else -#define INTERNAL_NoGuiOnAssert_Default 0 -#endif RETAIL_CONFIG_DWORD_INFO_EX(INTERNAL_NoGuiOnAssert, W("NoGuiOnAssert"), INTERNAL_NoGuiOnAssert_Default, "", CLRConfig::REGUTIL_default) RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_NoProcedureSplitting, W("NoProcedureSplitting"), 0, "", CLRConfig::REGUTIL_default) CONFIG_DWORD_INFO_EX(INTERNAL_NoStringInterning, W("NoStringInterning"), 1, "Disallows string interning. I see no value in it anymore.", CLRConfig::REGUTIL_default) diff --git a/src/inc/clrhost.h b/src/inc/clrhost.h index 8cd9e3e9c2..9fe978f95a 100644 --- a/src/inc/clrhost.h +++ b/src/inc/clrhost.h @@ -364,9 +364,7 @@ private: SEMAPHORE_COOKIE m_semaphore; }; -#if defined(FEATURE_CORECLR) || !defined(SELF_NO_HOST) || defined(DACCESS_COMPILE) HMODULE GetCLRModule (); -#endif // defined(FEATURE_CORECLR) || !defined(SELF_NO_HOST) || defined(DACCESS_COMPILE) #ifndef FEATURE_NO_HOST /* diff --git a/src/inc/clrinternal.idl b/src/inc/clrinternal.idl index 4193d1bfe8..0c93f4ae6d 100644 --- a/src/inc/clrinternal.idl +++ b/src/inc/clrinternal.idl @@ -16,17 +16,7 @@ import "unknwn.idl"; // import mscoree.idl for BucketParameters definition import "mscoree.idl"; -#ifndef FEATURE_CORECLR -import "hstring.idl"; -#endif //!FEATURE_CORECLR -#ifndef FEATURE_CORECLR -interface IActivationFactory; -cpp_quote("interface IActivationFactory;") - -interface IWinRTClassActivator; -cpp_quote("interface IWinRTClassActivator;") -#endif //!FEATURE_CORECLR cpp_quote("#if 0") @@ -97,30 +87,6 @@ cpp_quote("EXTERN_GUID(CLR_ID_ONECORE_CLR, 0xb1ee760d, 0x6c4a, 0x4533, 0xba, 0x4 // IID_IPrivateManagedExceptionReporting : uuid{AD76A023-332D-4298-8001-07AA9350DCA4} cpp_quote("EXTERN_GUID(IID_IPrivateManagedExceptionReporting, 0xad76a023, 0x332d, 0x4298, 0x80, 0x01, 0x07, 0xaa, 0x93, 0x50, 0xdc, 0xa4);") -#ifndef FEATURE_CORECLR -// CLSID CLRRuntimeHostInternal : uuid(f7721072-bf57-476d-89f8-a7625d27683a) -cpp_quote("EXTERN_GUID(CLSID_CLRRuntimeHostInternal, 0xf7721072, 0xbf57, 0x476d, 0x89, 0xf8, 0xa7, 0x62, 0x5d, 0x27, 0x68, 0x3a);") -// IID ICLRRuntimeHostInternal : uuid{07C4E752-3CBA-4A07-9943-B5F206382178} -cpp_quote("EXTERN_GUID(IID_ICLRRuntimeHostInternal, 0x07c4e752, 0x3cba, 0x4a07, 0x99, 0x43, 0xb5, 0xf2, 0x06, 0x38, 0x21, 0x78);") - -// CLSID_CLRShimControlInternal : uuid(62D02A5B-F527-44d8-80BC-650BBD3CB082) -cpp_quote("EXTERN_GUID(CLSID_CLRShimControlInternal, 0x62d02a5b, 0xf527, 0x44d8, 0x80, 0xbc, 0x65, 0xb, 0xbd, 0x3c, 0xb0, 0x82);") - -// IID ICLRShimControlInternal : uuid{826AAAD7-717B-44f8-9BB0-7DAC368B85A5} -cpp_quote("EXTERN_GUID(IID_ICLRShimControlInternal, 0x826AAAD7, 0x717b, 0x44f8, 0x9b, 0xb0, 0x7d, 0xac, 0x36, 0x8b, 0x85, 0xa5);") - -// CLSID_CLRActivationFactory : uuid{5B132A7D-DA8E-461b-A0F2-109141C768CB} -cpp_quote("EXTERN_GUID(CLSID_CLRActivationFactory, 0x5b132a7d, 0xda8e, 0x461b, 0xa0, 0xf2, 0x10, 0x91, 0x41, 0xc7, 0x68, 0xcb );") - -// IID_ICLRActivationFactory : uuid{331F2F6C-385F-462c-9125-816712FB2BC6} -cpp_quote("EXTERN_GUID(IID_ICLRActivationFactory, 0x331f2f6c, 0x385f, 0x462c, 0x91, 0x25, 0x81, 0x67, 0x12, 0xfb, 0x2b, 0xc6);") - -// IID_ICLRActivationFactory2 : uuid{035049E5-2658-40C0-9269-21C48D8F0748} -cpp_quote("EXTERN_GUID(IID_ICLRActivationFactory2, 0x035049E5, 0x2658, 0x40C0, 0x92, 0x69, 0x21, 0xC4, 0x8D, 0x8F, 0x07, 0x48);") - -// IID IID_ICLRExecutionManager: uuid(1000A3E7-B420-4620-AE30-FB19B587AD1D) -cpp_quote("EXTERN_GUID(IID_ICLRExecutionManager, 0x1000A3E7, 0xB420, 0x4620, 0xAE, 0x30, 0xFB, 0x19, 0xB5, 0x87, 0xAD, 0x1D);") -#endif // !FEATURE_CORECLR //***************************************************************************** // Interface for exposing services from the EE to other DLLs of the CLR. @@ -327,165 +293,4 @@ interface IPrivateManagedExceptionReporting : IUnknown HRESULT GetBucketParametersForCurrentException([out]BucketParameters *pParams); } -#ifndef FEATURE_CORECLR -/************************************************************************************** - ** ICLRRuntimeHostInternal ** - ** This is the functionality used only by CLR internal tools that moved from being ** - ** flat APIs (loading the latest runtime) to something that is runtime-specific and ** - ** requires the runtime to be loaded. ** - **************************************************************************************/ -[ - uuid(07C4E752-3CBA-4A07-9943-B5F206382178), - version(1.0), - helpstring("CLR internal hosting interface for V4.0"), - local -] -interface ICLRRuntimeHostInternal : IUnknown -{ - HRESULT MetaDataGetDispenser( - [in] REFCLSID rclsid, - [in] REFIID riid, - [out, iid_is(riid), retval] IUnknown **ppInterface); - - HRESULT GetAssemblyMDImport( - [in] LPCWSTR wszFileName, // The scope (file name) to open. - [in] REFIID riid, // Desired interface. - [out, iid_is(riid), retval] IUnknown **ppIUnk); // Returned interface on success. - - HRESULT GetMetaDataInternalInterface( - [in, size_is(cbData)] BYTE *pbData, // MetaData data. - [in] ULONG cbData, // MetaData data size. - [in] DWORD flags, // Flags. - [in] REFIID riid, // Desired interface. - [out, iid_is(riid), retval] LPVOID *ppInterface); // Returned interface. - - HRESULT GetMetaDataInternalInterfaceFromPublic( - [in] IUnknown *pInterface, // Given interface. - [in] REFIID riid, // Desired interface. - [out, iid_is(riid), retval] LPVOID *ppInterface); // Returned interface. - - HRESULT GetMetaDataPublicInterfaceFromInternal( - [in] IUnknown *pInterface, // Given interface. - [in] REFIID riid, // Desired interface. - [out, iid_is(riid), retval] LPVOID *ppInterface); // Returned interface. - - /********************************************************************************** - ** Returns the version string that MD emitter should by default write to images.** - ** Supersedes: GetCORRequiredVersion ** - **********************************************************************************/ - HRESULT GetImageVersionString( - [out, size_is(*pcchBuffer), annotation("__out_ecount_opt(*pcchBuffer)")] LPWSTR pwzBuffer, // Returned version string. - [in, out] DWORD *pcchBuffer); // Buffer size/version length. - - /********************************************************************************** - ** Locks the given module for this runtime. The HRESULT is S_OK if it is the ** - ** runtime represented by this instance, S_FALSE if somebody beat us to it. ** - **********************************************************************************/ - HRESULT LockModuleForRuntime( - [in] BYTE *pModuleBase, // Address where the module is mapped. - [in] REFIID riid, // Desired interface. - [out, iid_is(riid)] LPVOID *ppRuntime); // The owning runtime. - - /********************************************************************************** - ** Asks the Shim to attempt a graceful shutdown of all other runtimes loaded ** - ** in this process, then to exit the process via ::ExitProcess(). V4+ runtimes ** - ** call this instead of ::ExitProcess(). ** - **********************************************************************************/ - HRESULT ShutdownAllRuntimesThenExit( - [in] UINT exitCode); // Process exit code. - - /********************************************************************************** - ** GetTrueOSVersion - Bypasses the OS compatibility shim ** - **********************************************************************************/ - HRESULT GetTrueOSVersion( - [out, in] LPOSVERSIONINFO osvi); // OS Version. - - /********************************************************************************** - ** Returns the runtime that a COM component with the given CLSID would be ** - ** activated in. Returns runtime represented by this instance for Fx types. ** - **********************************************************************************/ - HRESULT GetRuntimeForManagedCOMObject( - [in] REFCLSID rclsid, // CLSID of the component. - [in] REFIID riid, // Desired runtime interface. - [out, iid_is(riid), retval] LPVOID *ppRuntime); // Returned runtime. -}; // interface ICLRRuntimeHostInternal - -/************************************************************************************** - ** ICLRShimControlInternal ** - ** This is the functionality used only by CLR internal tools that moved from being ** - ** flat APIs (loading the latest runtime) to controlshim behavior ** - **************************************************************************************/ -[ - uuid(826AAAD7-717B-44f8-9BB0-7DAC368B85A5), - version(1.0), - helpstring("CLR internal hosting interface for V4.0"), - local -] -interface ICLRShimControlInternal : IUnknown -{ - HRESULT SetShouldSkipSkuCheck( - [in] BOOL bValue - ); -}; // interface ICLRRuntimeHostInternal - - - -/************************************************************************************** - ** ICLRActivationFactory ** - ** This is the functionality used only by CLR to provide in-proc ** - ** hosting ** - **************************************************************************************/ -[ - uuid(331F2F6C-385F-462c-9125-816712FB2BC6), - version(1.0), - helpstring("CLR internal activation factory for V4.5"), - local -] -interface ICLRActivationFactory : IUnknown -{ - HRESULT CreateFactory([in] LPCWSTR activatableClassId, - [out, retval] IActivationFactory** factory); - -}; // interface ICLRActivationFactory - -/************************************************************************************** - ** ICLRActivationFactory2 ** - ** This is functionality exposed by the CLR to enable hosting WinRT components in a ** - ** non-AppX process ** - **************************************************************************************/ -[ - uuid(035049E5-2658-40C0-9269-21C48D8F0748), - version(1.0), - helpstring("CLR internal activation factory for desktop WinRT activation"), - local -] -interface ICLRActivationFactory2 : ICLRActivationFactory -{ - HRESULT GetClassActivatorForApplication(HSTRING appPath, [out] IWinRTClassActivator** ppActivator); -}; - -typedef enum -{ - PAUSE_APP_DOMAINS = 0x1 - -} PauseFlags; - -[ - uuid(1000A3E7-B420-4620-AE30-FB19B587AD1D), - version(1.0), - helpstring("Pause and Resume Interface"), - pointer_default(unique), - local -] -interface ICLRExecutionManager : IUnknown -{ - // Pause all managed threads - // Parameters are ignored and reserved for future use. - HRESULT Pause([in] DWORD dwAppDomainId, [in] DWORD dwFlags); - - // Resume managed threads - // Parameters are ignored and reserved for future use. - HRESULT Resume([in] DWORD dwAppDomainId); -} -#endif // !FEATURE_CORECLR diff --git a/src/inc/clrnt.h b/src/inc/clrnt.h index 08a93a4961..ebea066663 100644 --- a/src/inc/clrnt.h +++ b/src/inc/clrnt.h @@ -80,10 +80,8 @@ #define __field_ecount(EHCount) #endif -#ifdef FEATURE_CORECLR #undef _Ret_bytecap_ #define _Ret_bytecap_(_Size) -#endif #ifndef NT_SUCCESS #define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0) diff --git a/src/inc/cor.h b/src/inc/cor.h index 9fd279e74b..424500930a 100644 --- a/src/inc/cor.h +++ b/src/inc/cor.h @@ -190,13 +190,8 @@ DEPRECATED_CLR_STDAPI_(void) CoEEShutDownCOM(void); #endif //FEATURE_MAIN_CLR_MODULE_USES_CORE_NAME -#ifdef FEATURE_CORECLR #define MSCOREE_SHIM_W MAIN_CLR_DLL_NAME_W #define MSCOREE_SHIM_A MAIN_CLR_DLL_NAME_A -#else -#define MSCOREE_SHIM_W L"mscoree.dll" -#define MSCOREE_SHIM_A "mscoree.dll" -#endif // FEATURE_CORECLR #define SWITCHOUT_HANDLE_VALUE ((HANDLE)(LONG_PTR)-2) diff --git a/src/inc/corcompile.h b/src/inc/corcompile.h index 6b1fdb775a..9a8c6b0f8b 100644 --- a/src/inc/corcompile.h +++ b/src/inc/corcompile.h @@ -190,14 +190,8 @@ enum CorCompileCodegen CORCOMPILE_CODEGEN_PROFILING = 0x0004, // supports profiling CORCOMPILE_CODEGEN_PROF_INSTRUMENTING = 0x0008, // code is instrumented to collect profile count info -#if defined(_TARGET_AMD64_) && !defined(FEATURE_CORECLR) - CORCOMPILE_CODEGEN_USE_RYUJIT = 0x0100, // code is generated by Ryu JIT -#endif }; -#if defined(_TARGET_AMD64_) && !defined(FEATURE_CORECLR) -bool UseRyuJit(); -#endif // Used for INativeImageInstallInfo::GetConfigMask() // A bind will ask for the particular bits it needs set; if all bits are set, it is a match. Additional @@ -833,13 +827,8 @@ struct CORCOMPILE_ASSEMBLY_SIGNATURE typedef enum { -#ifdef FEATURE_CORECLR CORECLR_INFO, CROSSGEN_COMPILER_INFO, -#else - CLR_INFO, - NGEN_COMPILER_INFO, -#endif NUM_RUNTIME_DLLS } CorCompileRuntimeDlls; @@ -894,14 +883,6 @@ struct CORCOMPILE_VERSION_INFO }; -#ifndef FEATURE_CORECLR -enum CorCompileDependencyInfo -{ - - CORCOMPILE_DEPENDENCY_PEKIND_MASK = 0xff00, - CORCOMPILE_DEPENDENCY_PEKIND_SHIFT = 8, -}; -#endif //!FEATURE_CORECLR struct CORCOMPILE_DEPENDENCY @@ -916,9 +897,6 @@ struct CORCOMPILE_DEPENDENCY CORCOMPILE_NGEN_SIGNATURE signNativeImage; // INVALID_NGEN_SIGNATURE if this a soft-bound dependency -#ifndef FEATURE_CORECLR - CorCompileDependencyInfo dependencyInfo; //Flags about the dependency -#endif //!FEATURE_CORECLR }; /*********************************************************************************/ @@ -1566,19 +1544,6 @@ class ICorCompileInfo CORINFO_MODULE_HANDLE *pHandle ) = 0; -#ifndef FEATURE_CORECLR - // Check if the assembly supports automatic NGen - virtual BOOL SupportsAutoNGen( - CORINFO_ASSEMBLY_HANDLE assembly - ) = 0; - - // Tell OS to set cached signing level of the native image based on input assemblies - virtual HRESULT SetCachedSigningLevel( - HANDLE hNI, - HANDLE *pModules, - COUNT_T nModules - ) = 0; -#endif // Checks to see if an up to date zap exists for the // assembly @@ -1900,9 +1865,7 @@ extern "C" unsigned __stdcall PartialNGenStressPercentage(); // create a PDB dumping all functions in hAssembly into pdbPath extern "C" HRESULT __stdcall CreatePdb(CORINFO_ASSEMBLY_HANDLE hAssembly, BSTR pNativeImagePath, BSTR pPdbPath, BOOL pdbLines, BSTR pManagedPdbSearchPath, LPCWSTR pDiasymreaderPath); -#if defined(FEATURE_CORECLR) || defined(CROSSGEN_COMPILE) extern bool g_fNGenMissingDependenciesOk; -#endif extern bool g_fNGenWinMDResilient; diff --git a/src/inc/corhost.h b/src/inc/corhost.h index 579088ca61..8c634a926b 100644 --- a/src/inc/corhost.h +++ b/src/inc/corhost.h @@ -46,210 +46,6 @@ class DangerousNonHostedSpinLock; class AppDomain; class Assembly; -#if !defined(FEATURE_CORECLR) -class CorThreadpool : public ICorThreadpool -{ -public: - HRESULT STDMETHODCALLTYPE CorRegisterWaitForSingleObject(PHANDLE phNewWaitObject, - HANDLE hWaitObject, - WAITORTIMERCALLBACK Callback, - PVOID Context, - ULONG timeout, - BOOL executeOnlyOnce, - BOOL* pResult); - - HRESULT STDMETHODCALLTYPE CorBindIoCompletionCallback(HANDLE fileHandle, LPOVERLAPPED_COMPLETION_ROUTINE callback); - - HRESULT STDMETHODCALLTYPE CorUnregisterWait(HANDLE hWaitObject,HANDLE CompletionEvent, BOOL* pResult); - - HRESULT STDMETHODCALLTYPE CorQueueUserWorkItem(LPTHREAD_START_ROUTINE Function,PVOID Context,BOOL executeOnlyOnce, BOOL* pResult ); - - HRESULT STDMETHODCALLTYPE CorCallOrQueueUserWorkItem(LPTHREAD_START_ROUTINE Function,PVOID Context,BOOL* pResult ); - - HRESULT STDMETHODCALLTYPE CorCreateTimer(PHANDLE phNewTimer, - WAITORTIMERCALLBACK Callback, - PVOID Parameter, - DWORD DueTime, - DWORD Period, - BOOL* pResult); - - HRESULT STDMETHODCALLTYPE CorDeleteTimer(HANDLE Timer, HANDLE CompletionEvent, BOOL* pResult); - - HRESULT STDMETHODCALLTYPE CorChangeTimer(HANDLE Timer,ULONG DueTime,ULONG Period, BOOL* pResult); - - HRESULT STDMETHODCALLTYPE CorSetMaxThreads(DWORD MaxWorkerThreads, - DWORD MaxIOCompletionThreads); - - HRESULT STDMETHODCALLTYPE CorGetMaxThreads(DWORD *MaxWorkerThreads, - DWORD *MaxIOCompletionThreads); - - HRESULT STDMETHODCALLTYPE CorGetAvailableThreads(DWORD *AvailableWorkerThreads, - DWORD *AvailableIOCompletionThreads); -}; - -class CorGCHost : public IGCHost2 -{ -public: - // IGCHost - STDMETHODIMP STDMETHODCALLTYPE SetGCStartupLimits( - DWORD SegmentSize, - DWORD MaxGen0Size); - - STDMETHODIMP STDMETHODCALLTYPE Collect( - LONG Generation); - - STDMETHODIMP STDMETHODCALLTYPE GetStats( - COR_GC_STATS *pStats); - - STDMETHODIMP STDMETHODCALLTYPE GetThreadStats( - DWORD *pFiberCookie, - COR_GC_THREAD_STATS *pStats); - - STDMETHODIMP STDMETHODCALLTYPE SetVirtualMemLimit( - SIZE_T sztMaxVirtualMemMB); - - // IGCHost2 - STDMETHODIMP STDMETHODCALLTYPE SetGCStartupLimitsEx( - SIZE_T SegmentSize, - SIZE_T MaxGen0Size); - -private: - - HRESULT _SetGCSegmentSize(SIZE_T SegmentSize); - HRESULT _SetGCMaxGen0Size(SIZE_T MaxGen0Size); -}; - -class CorConfiguration : public ICorConfiguration -{ -public: - virtual HRESULT STDMETHODCALLTYPE SetGCThreadControl( - /* [in] */ IGCThreadControl __RPC_FAR *pGCThreadControl); - - virtual HRESULT STDMETHODCALLTYPE SetGCHostControl( - /* [in] */ IGCHostControl __RPC_FAR *pGCHostControl); - - virtual HRESULT STDMETHODCALLTYPE SetDebuggerThreadControl( - /* [in] */ IDebuggerThreadControl __RPC_FAR *pDebuggerThreadControl); - - virtual HRESULT STDMETHODCALLTYPE AddDebuggerSpecialThread( - /* [in] */ DWORD dwSpecialThreadId); - - // This mechanism isn't thread-safe with respect to reference counting, because - // the runtime will use the cached pointer without adding extra refcounts to protect - // itself. So if one thread calls GetGCThreadControl & another thread calls - // ICorHost::SetGCThreadControl, we have a race. - static IGCThreadControl *GetGCThreadControl() - { - LIMITED_METHOD_CONTRACT; - - return m_CachedGCThreadControl; - } - - static IGCHostControl *GetGCHostControl() - { - LIMITED_METHOD_CONTRACT; - - return m_CachedGCHostControl; - } - - static IDebuggerThreadControl *GetDebuggerThreadControl() - { - LIMITED_METHOD_CONTRACT; - - return m_CachedDebuggerThreadControl; - } - - static DWORD GetDebuggerSpecialThreadCount() - { - LIMITED_METHOD_CONTRACT; - - return m_DSTCount; - } - - static DWORD *GetDebuggerSpecialThreadArray() - { - LIMITED_METHOD_CONTRACT; - - return m_DSTArray; - } - - // Helper function that returns true if the thread is in the debugger special thread list - static BOOL IsDebuggerSpecialThread(DWORD dwThreadId); - - // Helper function to update the thread list in the debugger control block - static HRESULT RefreshDebuggerSpecialThreadList(); - - // Clean up debugger thread control object, called at shutdown - static void CleanupDebuggerThreadControl(); - -private: - // Cache the IGCThreadControl interface until the EE is started, at which point - // we pass it through. - static IGCThreadControl *m_CachedGCThreadControl; - static IGCHostControl *m_CachedGCHostControl; - static IDebuggerThreadControl *m_CachedDebuggerThreadControl; - - // Array of ID's of threads that should be considered "special" to - // the debugging services. - static DWORD *m_DSTArray; - static DWORD m_DSTArraySize; - static DWORD m_DSTCount; -}; - -class CorValidator : public IValidator -{ -protected: - CorValidator() {LIMITED_METHOD_CONTRACT;} - -public: - STDMETHODIMP STDMETHODCALLTYPE Validate( - IVEHandler *veh, - IUnknown *pAppDomain, - unsigned long ulFlags, - unsigned long ulMaxError, - unsigned long token, - __in_z LPWSTR fileName, - BYTE *pe, - unsigned long ulSize); - - STDMETHODIMP STDMETHODCALLTYPE FormatEventInfo( - HRESULT hVECode, - VEContext Context, - __out_ecount(ulMaxLength) LPWSTR msg, - unsigned long ulMaxLength, - SAFEARRAY *psa); -}; - -class CLRValidator : public ICLRValidator -{ -protected: - CLRValidator() {LIMITED_METHOD_CONTRACT;} - -public: - STDMETHODIMP STDMETHODCALLTYPE Validate( - IVEHandler *veh, - unsigned long ulAppDomainId, - unsigned long ulFlags, - unsigned long ulMaxError, - unsigned long token, - __in_z LPWSTR fileName, - BYTE *pe, - unsigned long ulSize); - - STDMETHODIMP STDMETHODCALLTYPE FormatEventInfo( - HRESULT hVECode, - VEContext Context, - __out_ecount(ulMaxLength) LPWSTR msg, - unsigned long ulMaxLength, - SAFEARRAY *psa); -}; - -class CorDebuggerInfo : public IDebuggerInfo -{ -public: - STDMETHODIMP IsDebuggerAttached(BOOL *pbAttached); -}; -#endif // !defined(FEATURE_CORECLR) class CorExecutionManager : public ICLRExecutionManager @@ -271,9 +67,7 @@ protected: CorRuntimeHostBase() :m_Started(FALSE), m_cRef(0) -#ifdef FEATURE_CORECLR , m_fStarted(FALSE) -#endif // FEATURE_CORECLR {LIMITED_METHOD_CONTRACT;} STDMETHODIMP_(ULONG) AddRef(void); @@ -336,11 +130,9 @@ protected: LONG m_cRef; // Ref count. -#ifdef FEATURE_CORECLR // This flag will be used to ensure that a CoreCLR host can invoke Start/Stop in pairs only. BOOL m_fStarted; BOOL m_fAppDomainCreated; // this flag is used when an appdomain can only create a single appdomain -#endif // FEATURE_CORECLR static ULONG m_Version; // Version of ICorRuntimeHost. // Some functions are only available in ICLRRuntimeHost. @@ -358,162 +150,6 @@ public: }; -#if !defined(FEATURE_CORECLR) // simple hosting -class CorHost : - public CorRuntimeHostBase, public ICorRuntimeHost, public CorThreadpool - , public CorGCHost, public CorConfiguration - , public CorValidator, public CorDebuggerInfo - , public CorExecutionManager -{ -public: - CorHost() {WRAPPER_NO_CONTRACT;} - - // *** IUnknown methods *** - STDMETHODIMP QueryInterface(REFIID riid, void** ppv); - STDMETHODIMP_(ULONG) AddRef(void) - { - WRAPPER_NO_CONTRACT; - STATIC_CONTRACT_SO_TOLERANT; - return CorRuntimeHostBase::AddRef(); - } - STDMETHODIMP_(ULONG) Release(void); - - - // *** ICorRuntimeHost methods *** - // Returns an object for configuring the runtime prior to - // it starting. If the runtime has been initialized this - // routine returns an error. See ICorConfiguration. - STDMETHODIMP GetConfiguration(ICorConfiguration** pConfiguration); - - - // Starts the runtime. This is equivalent to CoInitializeCor(); - STDMETHODIMP Start(void); - - STDMETHODIMP Stop(); - - // Creates a domain in the runtime. The identity array is - // a pointer to an array TYPE containing IIdentity objects defining - // the security identity. - STDMETHODIMP CreateDomain(LPCWSTR pwzFriendlyName, // Optional - IUnknown* pIdentityArray, // Optional - IUnknown ** pAppDomain) - { - WRAPPER_NO_CONTRACT; - STATIC_CONTRACT_SO_TOLERANT; - return CorRuntimeHostBase::CreateDomain(pwzFriendlyName,pIdentityArray,pAppDomain); - } - - // Returns the default domain. - STDMETHODIMP GetDefaultDomain(IUnknown ** pAppDomain) - { - WRAPPER_NO_CONTRACT; - STATIC_CONTRACT_SO_TOLERANT; - return CorRuntimeHostBase::GetDefaultDomain(pAppDomain); - } - - // Enumerate currently existing domains. - STDMETHODIMP EnumDomains(HDOMAINENUM *hEnum) - { - WRAPPER_NO_CONTRACT; - STATIC_CONTRACT_SO_TOLERANT; - return CorRuntimeHostBase::EnumDomains(hEnum); - } - - // Returns S_FALSE when there are no more domains. A domain - // is passed out only when S_OK is returned. - STDMETHODIMP NextDomain(HDOMAINENUM hEnum, - IUnknown** pAppDomain) - { - WRAPPER_NO_CONTRACT; - STATIC_CONTRACT_SO_TOLERANT; - return CorRuntimeHostBase::NextDomain(hEnum,pAppDomain); - } - - // Close the enumeration releasing resources - STDMETHODIMP CloseEnum(HDOMAINENUM hEnum) - { - WRAPPER_NO_CONTRACT; - STATIC_CONTRACT_SO_TOLERANT; - return CorRuntimeHostBase::CloseEnum(hEnum); - } - - STDMETHODIMP CreateDomainEx(LPCWSTR pwzFriendlyName, - IUnknown* pSetup, // Optional - IUnknown* pEvidence, // Optional - IUnknown ** pAppDomain) - { - WRAPPER_NO_CONTRACT; - STATIC_CONTRACT_SO_TOLERANT; - return CorRuntimeHostBase::CreateDomainEx(pwzFriendlyName,pSetup,pEvidence,pAppDomain); - } - - // Create appdomain setup object that can be passed into CreateDomainEx - STDMETHODIMP CreateDomainSetup(IUnknown** pAppDomainSetup) - { - WRAPPER_NO_CONTRACT; - STATIC_CONTRACT_SO_TOLERANT; - return CorRuntimeHostBase::CreateDomainSetup(pAppDomainSetup); - } - - // Create Evidence object that can be passed into CreateDomainEx - STDMETHODIMP CreateEvidence(IUnknown** pEvidence) - { - WRAPPER_NO_CONTRACT; - STATIC_CONTRACT_SO_TOLERANT; - return CorRuntimeHostBase::CreateEvidence(pEvidence); - } - - // Unload a domain, releasing the reference will only release the - // the wrapper to the domain not unload the domain. - STDMETHODIMP UnloadDomain(IUnknown* pAppDomain) - { - WRAPPER_NO_CONTRACT; - STATIC_CONTRACT_SO_TOLERANT; - return CorRuntimeHostBase::UnloadDomain(pAppDomain); - } - - // Returns the threads domain if there is one. - STDMETHODIMP CurrentDomain(IUnknown ** pAppDomain) - { - WRAPPER_NO_CONTRACT; - STATIC_CONTRACT_SO_TOLERANT; - return CorRuntimeHostBase::CurrentDomain(pAppDomain); - } - - // TODO: Following 4 APIs should be move to CorHost for V1. - STDMETHODIMP CreateLogicalThreadState(); // Return code. - STDMETHODIMP DeleteLogicalThreadState(); // Return code. - STDMETHODIMP SwitchInLogicalThreadState( // Return code. - DWORD *pFiberCookie // [in] Cookie that indicates the fiber to use. - ); - - STDMETHODIMP SwitchOutLogicalThreadState( // Return code. - DWORD **pFiberCookie // [out] Cookie that indicates the fiber being switched out. - ); - - STDMETHODIMP LocksHeldByLogicalThread( // Return code. - DWORD *pCount // [out] Number of locks that the current thread holds. - ) - { - WRAPPER_NO_CONTRACT; - STATIC_CONTRACT_SO_TOLERANT; - return CorRuntimeHostBase::LocksHeldByLogicalThread(pCount); - } - - // Class factory hook-up. - static HRESULT CreateObject(REFIID riid, void **ppUnk); - - STDMETHODIMP MapFile( // Return code. - HANDLE hFile, // [in] Handle for file - HMODULE *hMapAddress // [out] HINSTANCE for mapped file - ) - { - WRAPPER_NO_CONTRACT; - STATIC_CONTRACT_SO_TOLERANT; - return CorRuntimeHostBase::MapFile(hFile,hMapAddress); - } -}; -#endif // !defined(FEATURE_CORECLR) class ConnectionNameTable; typedef DPTR(class ConnectionNameTable) PTR_ConnectionNameTable; @@ -725,17 +361,7 @@ class CorHost2 : #ifndef FEATURE_PAL , public IPrivateManagedExceptionReporting /* This interface is for internal Watson testing only*/ #endif // FEATURE_PAL -#ifdef FEATURE_CORECLR , public ICLRRuntimeHost2 -#else - , public CorThreadpool - , public CorGCHost - , public CorConfiguration - , public CLRValidator - , public CorDebuggerInfo - , public ICLRRuntimeHost - , public ICLRPrivRuntime -#endif // FEATURE_CORECLR , public CorExecutionManager { friend struct _DacGlobals; @@ -755,12 +381,6 @@ public: // *** ICorRuntimeHost methods *** -#ifndef FEATURE_CORECLR - // Returns an object for configuring the runtime prior to - // it starting. If the runtime has been initialized this - // routine returns an error. See ICorConfiguration. - STDMETHODIMP GetConfiguration(ICorConfiguration** pConfiguration); -#endif // FEATURE_CORECLR #ifndef FEATURE_PAL // defined in IPrivateManagedExceptionReporting interface for internal Watson testing only @@ -818,7 +438,6 @@ public: LPCWSTR pwzArgument, DWORD *pReturnValue); -#ifdef FEATURE_CORECLR // *** ICLRRuntimeHost2 methods *** STDMETHODIMP CreateAppDomainWithManager( LPCWSTR wszFriendlyName, @@ -853,44 +472,13 @@ public: LPCWSTR* argv, DWORD* pReturnValue); -#endif // !FEATURE_CORECLR -#if !defined(FEATURE_CORECLR) - /********************************************************************************** - ** ICLRPrivRuntime Methods - **********************************************************************************/ - STDMETHODIMP GetInterface( - REFCLSID rclsid, - REFIID riid, - LPVOID * ppUnk); - - STDMETHODIMP CreateAppDomain( - LPCWSTR pwzFriendlyName, - ICLRPrivBinder * pBinder, - LPDWORD pdwAppDomainId); - - STDMETHODIMP CreateDelegate( - DWORD appDomainID, - LPCWSTR wszAssemblyName, - LPCWSTR wszClassName, - LPCWSTR wszMethodName, - LPVOID * ppvDelegate); - - STDMETHODIMP ExecuteMain( - ICLRPrivBinder * pBinder, - int * pRetVal); - -#endif // !FEATURE_CORECLR static IHostControl *GetHostControl () { LIMITED_METHOD_CONTRACT; -#ifdef FEATURE_CORECLR return NULL; -#else // FEATURE_CORECLR - return m_HostControl; -#endif // FEATURE_CORECLR } #ifdef FEATURE_INCLUDE_ALL_INTERFACES @@ -898,110 +486,70 @@ public: { LIMITED_METHOD_CONTRACT; -#ifdef FEATURE_CORECLR return NULL; -#else // FEATURE_CORECLR - return m_HostMemoryManager; -#endif // FEATURE_CORECLR } static IHostMalloc *GetHostMalloc () { LIMITED_METHOD_CONTRACT; -#ifdef FEATURE_CORECLR return NULL; -#else // FEATURE_CORECLR - return m_HostMalloc; -#endif // FEATURE_CORECLR } static IHostTaskManager *GetHostTaskManager () { LIMITED_METHOD_CONTRACT; -#ifdef FEATURE_CORECLR return NULL; -#else // FEATURE_CORECLR - return m_HostTaskManager; -#endif // FEATURE_CORECLR } static IHostThreadpoolManager *GetHostThreadpoolManager () { LIMITED_METHOD_CONTRACT; -#ifdef FEATURE_CORECLR return NULL; -#else // FEATURE_CORECLR - return m_HostThreadpoolManager; -#endif // FEATURE_CORECLR } static IHostIoCompletionManager *GetHostIoCompletionManager () { LIMITED_METHOD_CONTRACT; -#ifdef FEATURE_CORECLR return NULL; -#else // FEATURE_CORECLR - return m_HostIoCompletionManager; -#endif // FEATURE_CORECLR } static IHostSyncManager *GetHostSyncManager () { LIMITED_METHOD_CONTRACT; -#ifdef FEATURE_CORECLR return NULL; -#else // FEATURE_CORECLR - return m_HostSyncManager; -#endif // FEATURE_CORECLR } static IHostAssemblyManager *GetHostAssemblyManager() { LIMITED_METHOD_CONTRACT; -#ifdef FEATURE_CORECLR return NULL; -#else // FEATURE_CORECLR - return m_HostAssemblyManager; -#endif // FEATURE_CORECLR } static IHostGCManager *GetHostGCManager() { LIMITED_METHOD_CONTRACT; -#ifdef FEATURE_CORECLR return NULL; -#else // FEATURE_CORECLR - return m_HostGCManager; -#endif // FEATURE_CORECLR } static IHostSecurityManager *GetHostSecurityManager() { LIMITED_METHOD_CONTRACT; -#ifdef FEATURE_CORECLR return NULL; -#else // FEATURE_CORECLR - return m_HostSecurityManager; -#endif // FEATURE_CORECLR } static IHostPolicyManager *GetHostPolicyManager () { LIMITED_METHOD_CONTRACT; -#ifdef FEATURE_CORECLR return NULL; -#else // FEATURE_CORECLR - return m_HostPolicyManager; -#endif // FEATURE_CORECLR } #endif // FEATURE_INCLUDE_ALL_INTERFACES @@ -1009,12 +557,7 @@ public: { LIMITED_METHOD_CONTRACT; -#ifdef FEATURE_CORECLR return 0; -#else // FEATURE_CORECLR - _ASSERTE (m_HostOverlappedExtensionSize != -1); - return m_HostOverlappedExtensionSize; -#endif // FEATURE_CORECLR } #ifdef FEATURE_INCLUDE_ALL_INTERFACES @@ -1022,32 +565,13 @@ public: { LIMITED_METHOD_CONTRACT; -#ifdef FEATURE_CORECLR return NULL; -#else // FEATURE_CORECLR - return m_pHostDomainNeutralAsms; -#endif // FEATURE_CORECLR } #endif // FEATURE_INCLUDE_ALL_INTERFACES -#ifndef FEATURE_CORECLR - static HRESULT SetFlagsAndHostConfig(STARTUP_FLAGS dwStartupFlags, LPCWSTR pwzHostConfigFile, BOOL fFinalize); - static LPCWSTR GetHostConfigFile(); - - static void GetDefaultAppDomainProperties(StringArrayList **ppPropertyNames, StringArrayList **ppPropertyValues); -#endif // !FEATURE_CORECLR static STARTUP_FLAGS GetStartupFlags(); -#ifndef FEATURE_CORECLR - static HRESULT SetPropertiesForDefaultAppDomain(DWORD nProperties, - __in_ecount(nProperties) LPCWSTR *pwszPropertyNames, - __in_ecount(nProperties) LPCWSTR *pwszPropertyValues); - - static HRESULT SetAppDomainManagerType(LPCWSTR wszAppDomainManagerAssembly, - LPCWSTR wszAppDomainManagerType, - EInitializeNewDomainFlags dwInitializeDomainFlags); -#endif // FEATURE_CORECLR static LPCWSTR GetAppDomainManagerAsm(); @@ -1069,14 +593,12 @@ public: static BOOL IsLoadFromBlocked(); // LoadFrom, LoadFile and Load(byte[]) are blocked in certain hosting scenarios private: -#ifdef FEATURE_CORECLR // This flag indicates if this instance was the first to load and start CoreCLR BOOL m_fFirstToLoadCLR; // This flag indicates if the host has authenticated with us or not BOOL m_fIsHostAuthenticated; -#endif // FEATURE_CORECLR // Helpers for both ICLRRuntimeHost2 and ICLRPrivRuntime HRESULT _CreateAppDomain( @@ -1087,9 +609,6 @@ private: int nProperties, LPCWSTR* pPropertyNames, LPCWSTR* pPropertyValues, -#if !defined(FEATURE_CORECLR) - ICLRPrivBinder* pBinder, -#endif DWORD* pAppDomainID); HRESULT _CreateDelegate( @@ -1110,29 +629,6 @@ private: static LPCWSTR s_wszAppDomainManagerType; static EInitializeNewDomainFlags s_dwDomainManagerInitFlags; -#if !defined(FEATURE_CORECLR) - static StringArrayList s_defaultDomainPropertyNames; - static StringArrayList s_defaultDomainPropertyValues; - -protected: - static IHostMemoryManager *m_HostMemoryManager; - static IHostMalloc *m_HostMalloc; - static IHostTaskManager *m_HostTaskManager; - static IHostThreadpoolManager *m_HostThreadpoolManager; - static IHostIoCompletionManager *m_HostIoCompletionManager; - static IHostSyncManager *m_HostSyncManager; - static IHostAssemblyManager *m_HostAssemblyManager; - static IHostGCManager *m_HostGCManager; - static IHostSecurityManager *m_HostSecurityManager; - static IHostPolicyManager *m_HostPolicyManager; - static int m_HostOverlappedExtensionSize; - static ICLRAssemblyReferenceList *m_pHostDomainNeutralAsms; - - static WCHAR m_wzHostConfigFile[_MAX_PATH]; - - static BOOL m_dwFlagsFinalized; - static DangerousNonHostedSpinLock m_FlagsLock; // protects the flags and host config -#endif // !defined(FEATURE_CORECLR) SVAL_DECL(STARTUP_FLAGS, m_dwStartupFlags); }; diff --git a/src/inc/corpolicy.h b/src/inc/corpolicy.h index ce37db463e..21d615bc82 100644 --- a/src/inc/corpolicy.h +++ b/src/inc/corpolicy.h @@ -28,46 +28,6 @@ extern "C" { { 0xd41e4f1f, 0xa407, 0x11d1, {0x8b, 0xc9, 0x0, 0xc0, 0x4f, 0xa3, 0xa, 0x41 } } -#ifndef FEATURE_CORECLR -// See if we're set up to do a version check -#if (VER_MAJORVERSION < 4) -#error "Looks like major version isn't set correctly. Are you including product_version.h?" -#endif - -// The following check has been added to ensure the right thing is done -// for SxS compatibility of mscorsecimpl.dll when moving to a new framework -// version. -// -// The library is registered using a full path and a GUID in the following location: -// HKLM\SOFTWARE\Microsoft\Cryptography\Providers\Trust\* -// With a new SxS version of the framework, we need to move to a new -// GUID so older versions continue to work unimpacted. -// -// The check will fail when the runtime version changes; when it does, -// please do the following: -// -// If the new version is NOT a SxS release with the version number in the #if, -// update the version number in the #if below to the new version and you're done. -// -// If the new release is a SxS release, then there's a bit more work involved: -// 1. Change COREE_POLICY_PROVIDER in CorPolicy.h to a new GUID. -// 2. Update batchSetup to use the new GUID. To do so, update -// all occurrences of the GUID in -// ndp\clr\src\dlls\mscorsecimpl\mscorsecimpl.vrg -// 3. Update "real" setup to use the new GUID. To do so, update -// all occurrences of the GUID in -// setupauthoring\netfx\clr\Components\mscorsec.dll.ddc -// 4. Update the version number in the #if below. - -#if !(VER_MAJORVERSION == 4 && VER_MINORVERSION == 0) -#error "The guid for mscorsecimpl needs to change when the runtime version changes" -#endif - -// {A7F4C378-21BE-494e-BA0F-BB12C5D208C5} -#define COREE_POLICY_PROVIDER \ -{ 0xa7f4c378, 0x21be, 0x494e, {0xba, 0x0f, 0xbb, 0x12, 0xc5, 0xd2, 0x08, 0xc5 } } - -#endif //#ifndef FEATURE_CORECLR // This structure is returned from the winverify trust call, free up the structure // using CoTaskMemAlloc except for COREE_POLICY_PROVIDER which uses LocalALLoc. diff --git a/src/inc/corpriv.h b/src/inc/corpriv.h index 8c737c7607..edab391827 100644 --- a/src/inc/corpriv.h +++ b/src/inc/corpriv.h @@ -23,10 +23,6 @@ #include "peinformation.h" // -#ifndef FEATURE_CORECLR -interface IILFingerprint; -interface IILFingerprintFactory; -#endif interface IAssemblyName; // PE images loaded through the runtime. @@ -331,11 +327,6 @@ STDAPI RuntimeOpenImageInternal(LPCWSTR pszFileName, HCORMODULE* hHandle, STDAPI RuntimeOpenImageByStream(IStream* pIStream, UINT64 AssemblyId, DWORD dwModuleId, HCORMODULE* hHandle, DWORD *pdwLength, MDInternalImportFlags flags); -#ifndef FEATURE_CORECLR -// NOTE: Performance critical codepaths should cache the result of this function. -STDAPI RuntimeGetILFingerprintForPath(LPCWSTR path, IILFingerprint **ppFingerprint); -STDAPI RuntimeCreateCachingILFingerprintFactory(IILFingerprintFactory **ppILFingerprintFactory); -#endif //!FEATURE_CORECLR void RuntimeAddRefHandle(HCORMODULE hHandle); STDAPI RuntimeReleaseHandle(HCORMODULE hHandle); STDAPI RuntimeGetImageBase(HCORMODULE hHandle, LPVOID* base, BOOL bMapped, COUNT_T* dwSize); @@ -720,11 +711,6 @@ BOOL RuntimeVerifyNativeImageDependency(const CORCOMPILE_DEPENDENCY *pExpected -#ifndef FEATURE_CORECLR - -#include "iilfingerprint.h" - -#endif //!FEATURE_CORECLR #endif // _CORPRIV_H_ // EOF ======================================================================= diff --git a/src/inc/dacvars.h b/src/inc/dacvars.h index 0a60684ad1..b54ca108f3 100644 --- a/src/inc/dacvars.h +++ b/src/inc/dacvars.h @@ -160,11 +160,7 @@ DEFINE_DACVAR(ULONG, int, CCLRErrorReportingManager__g_ECustomDumpFlavor, CCLREr DEFINE_DACVAR(ULONG, PTR_SString, SString__s_Empty, SString::s_Empty) #ifdef FEATURE_APPX -#if defined(FEATURE_CORECLR) DEFINE_DACVAR(ULONG, BOOL, dac__g_fAppX, ::g_fAppX) -#else -DEFINE_DACVAR(ULONG, PTR_AppXRTInfo, dac__g_pAppXRTInfo, ::g_pAppXRTInfo) -#endif #endif // FEATURE_APPX DEFINE_DACVAR(ULONG, BOOL, SString__s_IsANSIMultibyte, SString::s_IsANSIMultibyte) @@ -236,9 +232,6 @@ DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pThreadClass, ::g_pThreadClass #ifdef FEATURE_CER DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pCriticalFinalizerObjectClass, ::g_pCriticalFinalizerObjectClass) #endif -#ifndef FEATURE_CORECLR -DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pAsyncFileStream_AsyncResultClass, ::g_pAsyncFileStream_AsyncResultClass) -#endif // !FEATURE_CORECLR DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pPredefinedArrayTypes, ::g_pPredefinedArrayTypes) DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_TypedReferenceMT, ::g_TypedReferenceMT) DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pByteArrayMT, ::g_pByteArrayMT) @@ -316,12 +309,10 @@ DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__saved_sweep_ephemeral_start, WKS::g DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__background_saved_lowest_address, WKS::gc_heap::background_saved_lowest_address) DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__background_saved_highest_address, WKS::gc_heap::background_saved_highest_address) -#ifdef FEATURE_CORECLR #ifndef FEATURE_PAL DEFINE_DACVAR(ULONG, HANDLE, dac__g_hContinueStartupEvent, ::g_hContinueStartupEvent) #endif // !FEATURE_PAL DEFINE_DACVAR(ULONG, DWORD, CorHost2__m_dwStartupFlags, CorHost2::m_dwStartupFlags) -#endif // FEATURE_CORECLR DEFINE_DACVAR(ULONG, HRESULT, dac__g_hrFatalError, ::g_hrFatalError) @@ -329,9 +320,6 @@ DEFINE_DACVAR(ULONG, HRESULT, dac__g_hrFatalError, ::g_hrFatalError) DEFINE_DACVAR(ULONG, DWORD, PEFile__s_NGENDebugFlags, PEFile::s_NGENDebugFlags) #endif //defined(DEBUGGING_SUPPORTED) && defined (FEATURE_PREJIT) -#ifndef FEATURE_CORECLR -DEFINE_DACVAR(ULONG, DWORD, AssemblyUsageLogManager__s_UsageLogFlags, AssemblyUsageLogManager::s_UsageLogFlags) -#endif // FEATURE_CORECLR #if defined(FEATURE_APPX_BINDER) DEFINE_DACVAR(ULONG, PTR_CLRPrivBinderAppX, CLRPrivBinderAppX__s_pSingleton, CLRPrivBinderAppX::s_pSingleton) diff --git a/src/inc/fusionpriv.idl b/src/inc/fusionpriv.idl index f9aaefcd9c..a988539f52 100644 --- a/src/inc/fusionpriv.idl +++ b/src/inc/fusionpriv.idl @@ -39,9 +39,6 @@ import "objidl.idl"; import "oleidl.idl"; import "fusion.idl"; -#ifndef FEATURE_CORECLR -import "binderngen.idl"; -#endif cpp_quote("#ifdef _MSC_VER") cpp_quote("#pragma once") @@ -955,16 +952,3 @@ interface IHostAssemblyModuleImport : IUnknown cpp_quote("#define EXPLICITBIND_FLAGS_NON_BINDABLE 0x0") cpp_quote("#define EXPLICITBIND_FLAGS_EXE 0x1") -#ifndef FEATURE_CORECLR -#pragma midl_echo("HRESULT BindToSystem(IAssemblyName *pNameSystem, LPCWSTR pcwzSystemDirectory, IUnknown *pNIEva, IApplicationContext *pAppCtx, IAssembly **ppAsmOut, IBindResult **ppNIAsmOut, IFusionBindLog **ppdbglog);") - -#pragma midl_echo("HRESULT ExplicitBind(LPCWSTR wzPath, IApplicationContext *pAppCtx, DWORD dwFlags, IUnknown *pNIEva, IAssembly **ppAsmOut, IBindResult **ppNIAsmOut, IFusionBindLog **ppdbglog);") - -#pragma midl_echo("HRESULT GetBindContextFromApplicationContext(IApplicationContext *pAppCtx, IBindContext **ppBindCtx);") - -#pragma midl_echo("HRESULT SetApplicationContext_WinRTBinder(IApplicationContext * pAppCtx, IBindContext * pWinRTBinder);") - -// Used by InstallNativeImage() to extract dependency names from the NI's CORCOMPILE_DEPENDENCY_INFO records. -#pragma midl_echo("STDAPI FusionGetAssemblyNameRefFromMDImport(IMetaDataAssemblyImport *pMDImport, /* This is really an mdAssemblyRef */ DWORD mdar, DWORD dwFlags, IAssemblyName **ppName);") - -#endif //!FEATURE_CORECLR diff --git a/src/inc/fxretarget.h b/src/inc/fxretarget.h index abac8d8047..eedb694b59 100644 --- a/src/inc/fxretarget.h +++ b/src/inc/fxretarget.h @@ -135,7 +135,6 @@ const FrameworkConfig g_arFxPolicy[] = {L"System.Windows.Forms", ECMA_PUBLICKEY_STR_L, VER_ASSEMBLYVERSION_STR_L, FxPolicyHelper::AppXBinder_Blocked}, {L"System.Xml", ECMA_PUBLICKEY_STR_L, VER_ASSEMBLYVERSION_STR_L, FxPolicyHelper::AppXBinder_Supported}, -#ifdef NDP4_AUTO_VERSION_ROLLFORWARD // Post-Everett FX 2.0 assemblies: {L"AspNetMMCExt", MICROSOFT_PUBLICKEY_STR_L, VER_ASSEMBLYVERSION_STR_L, FxPolicyHelper::AppXBinder_Blocked}, @@ -332,7 +331,6 @@ const FrameworkConfig g_arFxPolicy[] = {L"System.Windows", MICROSOFT_PUBLICKEY_STR_L, VER_ASSEMBLYVERSION_STR_L, FxPolicyHelper::AppXBinder_Supported}, {L"System.Xml.Serialization", ECMA_PUBLICKEY_STR_L, VER_ASSEMBLYVERSION_STR_L, FxPolicyHelper::AppXBinder_Supported}, -#endif // NDP4_AUTO_VERSION_ROLLFORWARD // ENDDICTIONARY }; //g_arFxPolicy diff --git a/src/inc/holder.h b/src/inc/holder.h index a4d19bbf92..36a3dfc4af 100644 --- a/src/inc/holder.h +++ b/src/inc/holder.h @@ -112,9 +112,6 @@ struct AutoExpVisibleValue const class AppXBindResultImpl *_asAppXBindResultImpl; #endif -#ifndef FEATURE_CORECLR - const class PEFingerprint *_asPEFingerprint; -#endif //!FEATURE_CORECLR const void *_pPreventEmptyUnion; }; }; @@ -1214,7 +1211,7 @@ FORCEINLINE void VoidDeleteFile(LPCWSTR wszFilePath) { WszDeleteFile(wszFilePath typedef Wrapper<LPCWSTR, DoNothing<LPCWSTR>, VoidDeleteFile, NULL> DeleteFileHolder; #endif // WszDeleteFile -#if !defined(FEATURE_CORECLR) || defined(FEATURE_CRYPTO) +#if defined(FEATURE_CRYPTO) // Crypto holders FORCEINLINE void VoidCryptReleaseContext(HCRYPTPROV h) { CryptReleaseContext(h, 0); } FORCEINLINE void VoidCryptDestroyHash(HCRYPTHASH h) { CryptDestroyHash(h); } diff --git a/src/inc/longfilepathwrappers.h b/src/inc/longfilepathwrappers.h index a0ffe38da5..3bb9166990 100644 --- a/src/inc/longfilepathwrappers.h +++ b/src/inc/longfilepathwrappers.h @@ -152,120 +152,5 @@ DWORD WINAPI GetEnvironmentVariableWrapper( BOOL PAL_GetPALDirectoryWrapper(SString& pbuffer); -#ifndef FEATURE_CORECLR -//Temporarily providing direct OS Calls Till All of the Desktop CLR start using the above format -inline DWORD -SearchPathWrapper( - _In_opt_ LPCWSTR lpPath, - _In_ LPCWSTR lpFileName, - _In_opt_ LPCWSTR lpExtension, - _In_ BOOL getPath, - _Out_ LPWSTR lpBuffer, - _Out_opt_ LPWSTR * lpFilePart - ) -{ - return SearchPathW( - lpPath, - lpFileName, - lpExtension, - getPath, - lpBuffer, - lpFilePart - ); -} - - -inline DWORD -GetShortPathNameWrapper( - _In_ LPCWSTR lpszLongPath, - _Out_ LPWSTR lpszShortPath, - _In_ DWORD cchBuffer - ) -{ - return GetShortPathNameW( - lpszLongPath, - lpszShortPath, - cchBuffer - ); -} - -inline DWORD -GetLongPathNameWrapper( - _In_ LPCWSTR lpszShortPath, - _Out_ LPWSTR lpszLongPath, - _In_ DWORD cchBuffer - ) -{ - return GetLongPathNameW( - lpszShortPath, - lpszLongPath, - cchBuffer - ); -} - -inline UINT GetTempFileNameWrapper( - _In_ LPCWSTR lpPathName, - _In_ LPCWSTR lpPrefixString, - _In_ UINT uUnique, - _Out_ LPWSTR lpTempFileName - ) -{ - return GetTempFileNameW( - lpPathName, - lpPrefixString, - uUnique, - lpTempFileName - ); -} - -inline DWORD GetTempPathWrapper( - _In_ DWORD nBufferLength, - _Out_ LPWSTR lpBuffer - ) -{ - return GetTempPathW( - nBufferLength, - lpBuffer - ); -} - -inline DWORD GetCurrentDirectoryWrapper( - _In_ DWORD nBufferLength, - _Out_ LPWSTR lpBuffer - ) -{ - return GetCurrentDirectoryW( - nBufferLength, - lpBuffer - ); -} - -inline DWORD -GetModuleFileNameWrapper( - _In_opt_ HMODULE hModule, - _Out_ LPWSTR lpFilename, - _In_ DWORD nSize - ) -{ - return GetModuleFileNameW( - hModule, - lpFilename, - nSize - ); -} - -inline DWORD GetEnvironmentVariableWrapper( - _In_opt_ LPCWSTR lpName, - _Out_opt_ LPWSTR lpBuffer, - _In_ DWORD nSize - ) -{ - return GetEnvironmentVariableW( - lpName, - lpBuffer, - nSize - ); -} -#endif //FEATURE_CORECLR #endif //_WIN_PATH_APIS_WRAPPER_ diff --git a/src/inc/metadatatracker.h b/src/inc/metadatatracker.h index 93ecaab983..00aa56afae 100644 --- a/src/inc/metadatatracker.h +++ b/src/inc/metadatatracker.h @@ -5,7 +5,7 @@ #ifndef _METADATATRACKER_H_ #define _METADATATRACKER_H_ -#if defined(FEATURE_PREJIT) && (!defined(FEATURE_CORECLR) || defined(FEATURE_WINDOWSPHONE)) +#if defined(FEATURE_PREJIT) && defined(FEATURE_WINDOWSPHONE) #define METADATATRACKER_DATA 1 #if !defined(DACCESS_COMPILE) diff --git a/src/inc/palclr_win.h b/src/inc/palclr_win.h index 18edc6c8f5..372f467cbd 100644 --- a/src/inc/palclr_win.h +++ b/src/inc/palclr_win.h @@ -83,67 +83,6 @@ // WIN_PAL_ENDTRY // -#if !defined(FEATURE_CORECLR) - -#include "staticcontract.h" - -#define WIN_PAL_TRY_NAKED \ - { \ - bool __exHandled; __exHandled = false; \ - DWORD __exCode; __exCode = 0; \ - __try \ - { - -#define WIN_PAL_TRY \ - { \ - WIN_PAL_TRY_NAKED \ - WIN_PAL_TRY_HANDLER_DBG_BEGIN - -#define WIN_PAL_TRY_FOR_DLLMAIN(_reason) \ - { \ - WIN_PAL_TRY_NAKED \ - WIN_PAL_TRY_HANDLER_DBG_BEGIN_DLLMAIN(_reason) - -// Note: PAL_SEH_RESTORE_GUARD_PAGE is only ever defined in clrex.h, so we only restore guard pages automatically -// when these macros are used from within the VM. -#define WIN_PAL_SEH_RESTORE_GUARD_PAGE PAL_SEH_RESTORE_GUARD_PAGE - -#define WIN_PAL_EXCEPT_NAKED(Disposition) \ - } __except(__exCode = GetExceptionCode(), Disposition) { \ - __exHandled = true; \ - WIN_PAL_SEH_RESTORE_GUARD_PAGE - -#define WIN_PAL_EXCEPT(Disposition) \ - WIN_PAL_TRY_HANDLER_DBG_END \ - WIN_PAL_EXCEPT_NAKED(Disposition) - -#define WIN_PAL_EXCEPT_FILTER_NAKED(pfnFilter, pvFilterParameter) \ - } __except(__exCode = GetExceptionCode(), pfnFilter(GetExceptionInformation(), pvFilterParameter)) { \ - __exHandled = true; \ - WIN_PAL_SEH_RESTORE_GUARD_PAGE - -#define WIN_PAL_EXCEPT_FILTER(pfnFilter, pvFilterParameter) \ - WIN_PAL_TRY_HANDLER_DBG_END \ - WIN_PAL_EXCEPT_FILTER_NAKED(pfnFilter, pvFilterParameter) - -#define WIN_PAL_FINALLY_NAKED \ - } __finally { \ - -#define WIN_PAL_FINALLY \ - WIN_PAL_TRY_HANDLER_DBG_END \ - WIN_PAL_FINALLY_NAKED - -#define WIN_PAL_ENDTRY_NAKED \ - } \ - } \ - -#define WIN_PAL_ENDTRY \ - } \ - WIN_PAL_ENDTRY_NAKED_DBG \ - } \ - } - -#endif // !PAL_WIN_SEH #if defined(_DEBUG_IMPL) && !defined(JIT_BUILD) && !defined(JIT64_BUILD) && !defined(_ARM_) // @ARMTODO diff --git a/src/inc/registrywrapper.h b/src/inc/registrywrapper.h index bd6afe190b..6b284506bb 100644 --- a/src/inc/registrywrapper.h +++ b/src/inc/registrywrapper.h @@ -11,38 +11,10 @@ #ifndef __REGISTRYWRAPPER_H #define __REGISTRYWRAPPER_H -#if !defined(FEATURE_UTILCODE_NO_DEPENDENCIES) && !defined(FEATURE_CORECLR) - -// Registry API wrappers - -LONG ClrRegCreateKeyEx( - HKEY hKey, - LPCWSTR lpSubKey, - DWORD Reserved, - __in_opt LPWSTR lpClass, - DWORD dwOptions, - REGSAM samDesired, - LPSECURITY_ATTRIBUTES lpSecurityAttributes, - PHKEY phkResult, - LPDWORD lpdwDisposition - ); - -LONG ClrRegOpenKeyEx( - HKEY hKey, - LPCWSTR lpSubKey, - DWORD ulOptions, - REGSAM samDesired, - PHKEY phkResult - ); - -bool IsNgenOffline(); - -#else #define ClrRegCreateKeyEx RegCreateKeyExW #define ClrRegOpenKeyEx RegOpenKeyExW #define IsNgenOffline() false -#endif #endif // __REGISTRYWRAPPER_H diff --git a/src/inc/shimload.h b/src/inc/shimload.h index 9a6ab7de6f..a2651d1aff 100644 --- a/src/inc/shimload.h +++ b/src/inc/shimload.h @@ -14,17 +14,6 @@ #ifndef _SHIMLOAD_H #define _SHIMLOAD_H -#ifndef FEATURE_CORECLR -#include <delayimp.h> - -extern FARPROC __stdcall ShimDelayLoadHook(unsigned dliNotify, // What event has occurred, dli* flag. - DelayLoadInfo *pdli); // Description of the event. - -//and one for safe mode -extern FARPROC __stdcall ShimSafeModeDelayLoadHook(unsigned dliNotify, // What event has occurred, dli* flag. - DelayLoadInfo *pdli); // Description of the event. - -#endif //***************************************************************************** // Sets/Gets the directory based on the location of the module. This routine diff --git a/src/inc/stacktrace.h b/src/inc/stacktrace.h index 49e951780c..24fdf9482c 100644 --- a/src/inc/stacktrace.h +++ b/src/inc/stacktrace.h @@ -74,7 +74,7 @@ void GetStringFromStackLevels(UINT ifrStart, UINT cfrTotal, __out_ecount(cchMaxA ******************************************************************** robch */ void GetStringFromAddr(DWORD_PTR dwAddr, __out_ecount(cchMaxAssertStackLevelStringLen) LPSTR szString); -#if defined(_TARGET_X86_) && defined(FEATURE_CORECLR) && !defined(FEATURE_PAL) +#if defined(_TARGET_X86_) && !defined(FEATURE_PAL) /**************************************************************************** * ClrCaptureContext * *-------------------* diff --git a/src/inc/switches.h b/src/inc/switches.h index 9faf620dc7..daf1751502 100644 --- a/src/inc/switches.h +++ b/src/inc/switches.h @@ -10,9 +10,6 @@ #define STRESS_HEAP #endif -#if !defined(CROSSGEN_COMPILE) && !defined(FEATURE_CORECLR) -#define STRESS_THREAD -#endif #define VERIFY_HEAP @@ -67,9 +64,6 @@ #define GC_STATS #endif -#if !defined(FEATURE_CORECLR) -#define EMIT_FIXUPS -#endif #if defined(_DEBUG) && !defined(DACCESS_COMPILE) && (defined(_TARGET_X86_) || defined(_TARGET_AMD64_)) // On x86/x64 Windows debug builds, respect the COMPlus_EnforceEEThreadNotRequiredContracts @@ -110,16 +104,12 @@ // ALLOW_SXS_JIT_NGEN enables AltJit support for NGEN, via COMPlus_AltJitNgen / COMPlus_AltJitName. // Note that if ALLOW_SXS_JIT_NGEN is defined, then ALLOW_SXS_JIT must be defined. #define ALLOW_SXS_JIT -#if defined(ALLOW_SXS_JIT) #define ALLOW_SXS_JIT_NGEN -#endif // ALLOW_SXS_JIT -#if defined(FEATURE_CORECLR) //master switch for gc suspension not based on hijacking #define FEATURE_ENABLE_GCPOLL -#endif //FEATURE_CORECLR -#if defined(FEATURE_ENABLE_GCPOLL) && defined(_TARGET_X86_) +#if defined(_TARGET_X86_) //this enables a fast version of the GC Poll helper instead of the default portable one. #define ENABLE_FAST_GCPOLL_HELPER #endif // defined(FEATURE_ENABLE_GCPOLL) && defined(_TARGET_X86_) @@ -132,18 +122,13 @@ #define PLATFORM_SUPPORTS_SAFE_THREADSUSPEND #endif // !FEATURE_PAL -#if !defined(PLATFORM_SUPPORTS_SAFE_THREADSUSPEND) && !defined(FEATURE_ENABLE_GCPOLL) -#error "Platform must support either safe thread suspension or GC polling" -#endif #if defined(STRESS_HEAP) && defined(_DEBUG) && defined(FEATURE_HIJACK) #define HAVE_GCCOVER #endif -#ifdef FEATURE_CORECLR //Turns on a startup delay to allow simulation of slower and faster startup times. #define ENABLE_STARTUP_DELAY -#endif #ifndef ALLOW_LOCAL_WORKER @@ -184,15 +169,9 @@ // Windows desktop supports the profiling API attach / detach feature. // This will eventually be supported on coreclr as well. -#if defined(PROFILING_SUPPORTED) && !defined(FEATURE_CORECLR) -#define FEATURE_PROFAPI_ATTACH_DETACH -#endif // Windows desktop DAC builds need to see some of the data used in the profiling API // attach / detach feature, particularly Thread::m_dwProfilerEvacuationCounter -#if defined(PROFILING_SUPPORTED_DATA) && !defined(FEATURE_CORECLR) -#define DATA_PROFAPI_ATTACH_DETACH -#endif // MUST NEVER CHECK IN WITH THIS ENABLED. // This is just for convenience in doing performance investigations in a checked-out enlistment. @@ -219,9 +198,7 @@ // are treated as potential pinned interior pointers. When enabled, the runtime flag COMPLUS_GCCONSERVATIVE // determines dynamically whether GC is conservative. Note that appdomain unload, LCG and unloadable assemblies // do not work reliably with conservative GC. -#ifdef FEATURE_CORECLR #define FEATURE_CONSERVATIVE_GC 1 -#endif #if (defined(_TARGET_ARM_) && !defined(ARM_SOFTFP)) || defined(_TARGET_ARM64_) #define FEATURE_HFA @@ -242,7 +219,7 @@ #define FEATURE_MINIMETADATA_IN_TRIAGEDUMPS -#if defined(FEATURE_PREJIT) && defined(FEATURE_CORECLR) +#if defined(FEATURE_PREJIT) // Desktop CLR allows profilers and debuggers to opt out of loading NGENd images, and to // JIT everything instead. "FEATURE_TREAT_NI_AS_MSIL_DURING_DIAGNOSTICS" is roughly the // equivalent for Apollo, where MSIL images may not be available at all. @@ -256,7 +233,7 @@ // If defined, support interpretation. #if !defined(CROSSGEN_COMPILE) -#if defined(ALLOW_SXS_JIT) && !defined(FEATURE_PAL) +#if !defined(FEATURE_PAL) #define FEATURE_STACK_SAMPLING #endif // defined (ALLOW_SXS_JIT) diff --git a/src/inc/utilcode.h b/src/inc/utilcode.h index a1a083638b..5394f1beb2 100644 --- a/src/inc/utilcode.h +++ b/src/inc/utilcode.h @@ -51,7 +51,6 @@ const WCHAR kWatsonName2[] = W("drwtsn32"); #define WINDOWS_KERNEL32_DLLNAME_A "kernel32" #define WINDOWS_KERNEL32_DLLNAME_W W("kernel32") -#if defined(FEATURE_CORECLR) #define CoreLibName_W W("System.Private.CoreLib") #define CoreLibName_IL_W W("System.Private.CoreLib.dll") #define CoreLibName_NI_W W("System.Private.CoreLib.ni.dll") @@ -64,20 +63,6 @@ const WCHAR kWatsonName2[] = W("drwtsn32"); #define CoreLibSatelliteName_A "System.Private.CoreLib.resources" #define CoreLibSatelliteNameLen 32 #define LegacyCoreLibName_A "mscorlib" -#else // !defined(FEATURE_CORECLR) -#define CoreLibName_W W("mscorlib") -#define CoreLibName_IL_W W("mscorlib.dll") -#define CoreLibName_NI_W W("mscorlib.ni.dll") -#define CoreLibName_TLB_W W("mscorlib.tlb") -#define CoreLibName_A "mscorlib" -#define CoreLibName_IL_A "mscorlib.dll" -#define CoreLibName_NI_A "mscorlib.ni.dll" -#define CoreLibName_TLB_A "mscorlib.tlb" -#define CoreLibNameLen 8 -#define CoreLibSatelliteName_A "mscorlib.resources" -#define CoreLibSatelliteNameLen 18 -#define LegacyCoreLibName_A "mscorlib" -#endif // defined(FEATURE_CORECLR) class StringArrayList; @@ -814,10 +799,8 @@ public: // Get the default resource location (mscorrc.dll for desktop, mscorrc.debug.dll for CoreCLR) static CCompRC* GetDefaultResourceDll(); -#ifdef FEATURE_CORECLR // Get the generic messages dll (Silverlight only, mscorrc.dll) static CCompRC* GetFallbackResourceDll(); -#endif static void ShutdownDefaultResourceDll(); static void GetDefaultCallbacks( FPGETTHREADUICULTURENAMES* fpGetThreadUICultureNames, @@ -842,12 +825,10 @@ public: fpGetThreadUICultureNames, fpGetThreadUICultureId); -#ifdef FEATURE_CORECLR m_FallbackResourceDll.SetResourceCultureCallbacks( fpGetThreadUICultureNames, fpGetThreadUICultureId); -#endif } #ifdef USE_FORMATMESSAGE_WRAPPER @@ -881,12 +862,10 @@ private: static CCompRC m_DefaultResourceDll; static LPCWSTR m_pDefaultResource; -#ifdef FEATURE_CORECLR // fallback resources if debug pack is not installed static LONG m_dwFallbackInitialized; static CCompRC m_FallbackResourceDll; static LPCWSTR m_pFallbackResource; -#endif // We must map between a thread's int and a dll instance. // Since we only expect 1 language almost all of the time, we'll special case @@ -1143,13 +1122,6 @@ void SplitPathInterior( __out_opt LPCWSTR *pwszFileName, __out_opt size_t *pcchFileName, __out_opt LPCWSTR *pwszExt, __out_opt size_t *pcchExt); -#ifndef FEATURE_CORECLR -void MakePath(__out_ecount (MAX_LONGPATH) register WCHAR *path, - __in LPCWSTR drive, - __in LPCWSTR dir, - __in LPCWSTR fname, - __in LPCWSTR ext); -#endif void MakePath(__out CQuickWSTR &path, __in LPCWSTR drive, @@ -1243,13 +1215,9 @@ public: static void FreeConfigString(__in __in_z LPWSTR name); -#ifdef FEATURE_CORECLR private: -#endif //FEATURE_CORECLR static LPWSTR EnvGetString(LPCWSTR name, BOOL fPrependCOMPLUS); -#ifdef FEATURE_CORECLR public: -#endif //FEATURE_CORECLR static BOOL UseRegistry(); @@ -1267,138 +1235,6 @@ private: BOOL fPrependCOMPLUS = TRUE); public: -#ifndef FEATURE_CORECLR - static void AllowRegistryUse(BOOL fAllowUse); - - -//***************************************************************************** -// Open's the given key and returns the value desired. If the key or value is -// not found, then the default is returned. -//***************************************************************************** - static long GetLong( // Return value from registry or default. - LPCTSTR szName, // Name of value to get. - long iDefault, // Default value to return if not found. - LPCTSTR szKey=NULL, // Name of key, NULL==default. - HKEY hKey=HKEY_LOCAL_MACHINE);// What key to work on. - -//***************************************************************************** -// Open's the given key and returns the value desired. If the key or value is -// not found, then the default is returned. -//***************************************************************************** - static long SetLong( // Return value from registry or default. - LPCTSTR szName, // Name of value to get. - long iValue, // Value to set. - LPCTSTR szKey=NULL, // Name of key, NULL==default. - HKEY hKey=HKEY_LOCAL_MACHINE);// What key to work on. - -//***************************************************************************** -// Open's the given key and returns the value desired. If the key or value is -// not found, then it's created -//***************************************************************************** - static long SetOrCreateLong( // Return value from registry or default. - LPCTSTR szName, // Name of value to get. - long iValue, // Value to set. - LPCTSTR szKey=NULL, // Name of key, NULL==default. - HKEY hKey=HKEY_LOCAL_MACHINE);// What key to work on. - - - -//***************************************************************************** -// Set an entry in the registry of the form: -// HKEY_CLASSES_ROOT\szKey\szSubkey = szValue. If szSubkey or szValue are -// NULL, omit them from the above expression. -//***************************************************************************** - static BOOL SetKeyAndValue( // TRUE or FALSE. - LPCTSTR szKey, // Name of the reg key to set. - LPCTSTR szSubkey, // Optional subkey of szKey. - LPCTSTR szValue); // Optional value for szKey\szSubkey. - -//***************************************************************************** -// Delete an entry in the registry of the form: -// HKEY_CLASSES_ROOT\szKey\szSubkey. -//***************************************************************************** - static LONG DeleteKey( // TRUE or FALSE. - LPCTSTR szKey, // Name of the reg key to set. - LPCTSTR szSubkey); // Subkey of szKey. - -//***************************************************************************** -// Open the key, create a new keyword and value pair under it. -//***************************************************************************** - static BOOL SetRegValue( // Return status. - LPCTSTR szKeyName, // Name of full key. - LPCTSTR szKeyword, // Name of keyword. - LPCTSTR szValue); // Value of keyword. - -//***************************************************************************** -// Does standard registration of a CoClass with a progid. -//***************************************************************************** - static HRESULT RegisterCOMClass( // Return code. - REFCLSID rclsid, // Class ID. - LPCTSTR szDesc, // Description of the class. - LPCTSTR szProgIDPrefix, // Prefix for progid. - int iVersion, // Version # for progid. - LPCTSTR szClassProgID, // Class progid. - LPCTSTR szThreadingModel, // What threading model to use. - LPCTSTR szModule, // Path to class. - HINSTANCE hInst, // Handle to module being registered - LPCTSTR szAssemblyName, // Optional assembly name - LPCTSTR szVersion, // Optional Runtime Version (directry containing runtime) - BOOL fExternal, // flag - External to mscoree. - BOOL fRelativePath); // flag - Relative path in szModule - -//***************************************************************************** -// Unregister the basic information in the system registry for a given object -// class. -//***************************************************************************** - static HRESULT UnregisterCOMClass( // Return code. - REFCLSID rclsid, // Class ID we are registering. - LPCTSTR szProgIDPrefix, // Prefix for progid. - int iVersion, // Version # for progid. - LPCTSTR szClassProgID, // Class progid. - BOOL fExternal); // flag - External to mscoree. - -//***************************************************************************** -// Does standard registration of a CoClass with a progid. -// NOTE: This is the non-side-by-side execution version. -//***************************************************************************** - static HRESULT RegisterCOMClass( // Return code. - REFCLSID rclsid, // Class ID. - LPCTSTR szDesc, // Description of the class. - LPCTSTR szProgIDPrefix, // Prefix for progid. - int iVersion, // Version # for progid. - LPCTSTR szClassProgID, // Class progid. - LPCTSTR szThreadingModel, // What threading model to use. - LPCTSTR szModule, // Path to class. - BOOL bInprocServer = true); // Whether we register the server as inproc or local - -//***************************************************************************** -// Unregister the basic information in the system registry for a given object -// class. -// NOTE: This is the non-side-by-side execution version. -//***************************************************************************** - static HRESULT UnregisterCOMClass( // Return code. - REFCLSID rclsid, // Class ID we are registering. - LPCTSTR szProgIDPrefix, // Prefix for progid. - int iVersion, // Version # for progid. - LPCTSTR szClassProgID); // Class progid. - -//***************************************************************************** -// Register a type library. -//***************************************************************************** - static HRESULT RegisterTypeLib( // Return code. - REFGUID rtlbid, // TypeLib ID we are registering. - int iVersion, // Typelib version. - LPCTSTR szDesc, // TypeLib description. - LPCTSTR szModule); // Path to the typelib. - -//***************************************************************************** -// Remove the registry keys for a type library. -//***************************************************************************** - static HRESULT UnregisterTypeLib( // Return code. - REFGUID rtlbid, // TypeLib ID we are registering. - int iVersion); // Typelib version. - -#endif //#ifndef FEATURE_CORECLR //***************************************************************************** // (Optional) Initialize the config registry cache @@ -1408,31 +1244,6 @@ public: private: -#ifndef FEATURE_CORECLR - -//***************************************************************************** -// Register the basics for a in proc server. -//***************************************************************************** - static HRESULT RegisterClassBase( // Return code. - REFCLSID rclsid, // Class ID we are registering. - LPCTSTR szDesc, // Class description. - LPCTSTR szProgID, // Class prog ID. - LPCTSTR szIndepProgID, // Class version independant prog ID. - __out_ecount (cchOutCLSID) LPTSTR szOutCLSID, // CLSID formatted in character form. - DWORD cchOutCLSID); // Out CLS ID buffer size in characters - - -//***************************************************************************** -// Delete the basic settings for an inproc server. -//***************************************************************************** - static HRESULT UnregisterClassBase( // Return code. - REFCLSID rclsid, // Class ID we are registering. - LPCTSTR szProgID, // Class prog ID. - LPCTSTR szIndepProgID, // Class version independant prog ID. - __out_ecount (cchOutCLSID) LPTSTR szOutCLSID, // Return formatted class ID here. - DWORD cchOutCLSID); // Out CLS ID buffer size in characters - -#endif //#ifndef FEATURE_CORECLR //***************************************************************************** // Return TRUE if the registry value name might have been seen in the registry @@ -4688,18 +4499,6 @@ public: return NtCurrentTeb()->ProcessEnvironmentBlock; } -#ifndef FEATURE_CORECLR - static void* GetFiberDataPtr() - { - LIMITED_METHOD_CONTRACT; - return ClrTeb::IsCurrentThreadAFiber()? GetCurrentFiber() : NULL; - } - - static BOOL IsCurrentThreadAFiber() - { - return IsThreadAFiber(); - } -#endif static void* InvalidFiberPtrId() { @@ -5205,22 +5004,6 @@ typedef Wrapper<BSTR, DoNothing, HolderSysFreeString> BSTRHolder; BOOL FileExists(LPCWSTR filename); -#ifndef FEATURE_CORECLR -class FileLockHolder -{ -public: - FileLockHolder(); - ~FileLockHolder(); - - virtual void Acquire(LPCWSTR lockName, HANDLE hInterrupt = 0, BOOL* pInterrupted = NULL); - HRESULT AcquireNoThrow(LPCWSTR lockName, HANDLE hInterrupt = 0, BOOL* pInterrupted = NULL); - - static BOOL IsTaken(LPCWSTR lockName); - void Release(); -private: - HANDLE _hLock; -}; -#endif // FEATURE_CORECLR // a class for general x.x version info class MajorMinorVersionInfo @@ -5336,7 +5119,6 @@ struct CoreClrCallbacks pfnGetCLRFunction_t m_pfnGetCLRFunction; }; -#if defined(FEATURE_CORECLR) || !defined(SELF_NO_HOST) || defined(DACCESS_COMPILE) // For DAC, we include this functionality only when EH SxS is enabled. @@ -5362,7 +5144,6 @@ void OnUninitializedCoreClrCallbacks(); #define VALIDATECORECLRCALLBACKS() #endif //_DEBUG -#endif // defined(FEATURE_CORECLR) || !defined(SELF_NO_HOST) || defined(DACCESS_COMPILE) #ifdef FEATURE_CORRUPTING_EXCEPTIONS @@ -5572,33 +5353,6 @@ void* FindLocalizedFile(_In_z_ LPCWSTR wzResourceDllName, LocalizedFileHandler l BOOL IsClrHostedLegacyComObject(REFCLSID rclsid); -#if !defined(FEATURE_CORECLR) && !defined(CROSSGEN_COMPILE) - -// No utilcode code should use the global LoadLibraryShim anymore. UtilCode::LoadLibraryShim will do -// the right thing based on whether the hosted or non-hosted utilcode is linked to. Using the global -// LoadLibraryShim will result in a deprecated use warning. - -#ifdef SELF_NO_HOST -#define LEGACY_ACTIVATION_SHIM_LOAD_LIBRARY WszLoadLibrary -#include "legacyactivationshim.h" -#include "mscoreepriv.h" - -namespace UtilCode -{ - inline HRESULT LoadLibraryShim(LPCWSTR szDllName, LPCWSTR szVersion, LPVOID pvReserved, HMODULE *phModDll) - { - return LegacyActivationShim::LoadLibraryShim(szDllName, szVersion, pvReserved, phModDll); - } -}; -#else // SELF_NO_HOST -namespace UtilCode -{ - // Hosted environment - HRESULT LoadLibraryShim(LPCWSTR szDllName, LPCWSTR szVersion, LPVOID pvReserved, HMODULE *phModDll); -}; -#endif // SELF_NO_HOST - -#endif // !FEATURE_CORECLR && !CROSSGEN_COMPILE // Helper to support termination due to heap corruption @@ -5606,10 +5360,6 @@ namespace UtilCode void EnableTerminationOnHeapCorruption(); -#if !defined(FEATURE_CORECLR) -// On success, sets pwszProcessExePath (required) to full path to process EXE. -HRESULT GetProcessExePath(LPCWSTR *pwszProcessExePath); -#endif namespace Clr { namespace Util { diff --git a/src/inc/vptr_list.h b/src/inc/vptr_list.h index bac0c1165e..11c91bba03 100644 --- a/src/inc/vptr_list.h +++ b/src/inc/vptr_list.h @@ -27,9 +27,6 @@ VPTR_CLASS(Module) VPTR_CLASS(ReflectionModule) VPTR_CLASS(AppDomain) -#ifndef FEATURE_CORECLR // FEATURE_NATIVE_IMAGE_GENERATION -VPTR_MULTI_CLASS(CompilationDomain, AppDomain) -#endif VPTR_CLASS(SharedDomain) VPTR_CLASS(SystemDomain) diff --git a/src/inc/winwrap.h b/src/inc/winwrap.h index f44aae5750..6c4dfe8331 100644 --- a/src/inc/winwrap.h +++ b/src/inc/winwrap.h @@ -633,16 +633,6 @@ #define WszRegQueryValueExTrue RegQueryValueExW #define WszRegQueryStringValueEx RegQueryValueExW -#ifndef FEATURE_CORECLR -#define WszRegDeleteKey RegDeleteKeyW -#define WszRegCreateKeyEx ClrRegCreateKeyEx -#define WszRegSetValueEx RegSetValueExW -#define WszRegDeleteValue RegDeleteValueW -#define WszRegLoadKey RegLoadKeyW -#define WszRegUnLoadKey RegUnLoadKeyW -#define WszRegRestoreKey RegRestoreKeyW -#define WszRegReplaceKey RegReplaceKeyW -#endif //#ifndef FEATURE_CORECLR #define WszRegQueryInfoKey RegQueryInfoKeyW #define WszRegEnumValue RegEnumValueW diff --git a/src/inc/zapper.h b/src/inc/zapper.h index 1018505faa..4356f5e682 100644 --- a/src/inc/zapper.h +++ b/src/inc/zapper.h @@ -115,20 +115,18 @@ class Zapper BOOL m_failed; CorInfoRegionKind m_currentRegionKind; -#if defined(FEATURE_CORECLR) || defined(CROSSGEN_COMPILE) SString m_platformAssembliesPaths; SString m_trustedPlatformAssemblies; SString m_platformResourceRoots; SString m_appPaths; SString m_appNiPaths; SString m_platformWinmdPaths; -#endif // FEATURE_CORECLR || CROSSGEN_COMPILE -#if defined(FEATURE_CORECLR) && !defined(FEATURE_MERGE_JIT_AND_ENGINE) +#if !defined(FEATURE_MERGE_JIT_AND_ENGINE) SString m_CLRJITPath; bool m_fDontLoadJit; #endif // defined(FEATURE_CORECLR) && !defined(FEATURE_MERGE_JIT_AND_ENGINE) -#if defined(FEATURE_CORECLR) && !defined(NO_NGENPDB) +#if !defined(NO_NGENPDB) SString m_DiasymreaderPath; #endif // defined(FEATURE_CORECLR) && !defined(NO_NGENPDB) bool m_fForceFullTrust; @@ -270,65 +268,6 @@ class Zapper } } m_assemblyDependencies; -#ifndef FEATURE_CORECLR // No load lists on CoreCLR - struct loadLists - { - loadLists() : - m_loadAlwaysList(NULL), - m_loadSometimesList(NULL), - m_loadNeverList(NULL) - { - } - - SAFEARRAY *m_loadAlwaysList; - SAFEARRAY *m_loadSometimesList; - SAFEARRAY *m_loadNeverList; - - void SetLoadLists(SAFEARRAY *loadAlwaysList, SAFEARRAY *loadSometimesList, SAFEARRAY *loadNeverList) - { - m_loadAlwaysList = loadAlwaysList; - m_loadSometimesList = loadSometimesList; - m_loadNeverList = loadNeverList; - } - - } m_loadLists; - - void SetLoadLists(SAFEARRAY *loadAlwaysList, SAFEARRAY *loadSometimesList, SAFEARRAY *loadNeverList) - { - m_loadLists.SetLoadLists(loadAlwaysList, loadSometimesList, loadNeverList); - } - - void SetAssemblyHardBindList() - { - SAFEARRAY *loadAlwaysList = m_loadLists.m_loadAlwaysList; - if (loadAlwaysList == NULL) - { - return; - } - - LONG ubound = 0; - IfFailThrow(SafeArrayGetUBound(loadAlwaysList, 1, &ubound)); - - BSTR *pArrBstr = NULL; - IfFailThrow(SafeArrayAccessData(loadAlwaysList, reinterpret_cast<void **>(&pArrBstr))); - - EX_TRY - { - _ASSERTE((ubound + 1) >= 0); - m_pEECompileInfo->SetAssemblyHardBindList(reinterpret_cast<LPWSTR *>(pArrBstr), ubound + 1); - } - EX_CATCH - { - // If something went wrong, try to unlock the OLE array - // Do not verify the outcome, as we can do nothing about it - SafeArrayUnaccessData(loadAlwaysList); - EX_RETHROW; - } - EX_END_CATCH_UNREACHABLE; - - IfFailThrow(SafeArrayUnaccessData(loadAlwaysList)); - } -#endif // !FEATURE_CORECLR public: @@ -442,7 +381,6 @@ class Zapper void GetOutputFolder(); -#if defined(FEATURE_CORECLR) || defined(CROSSGEN_COMPILE) void SetPlatformAssembliesPaths(LPCWSTR pwzPlatformAssembliesPaths); void SetTrustedPlatformAssemblies(LPCWSTR pwzTrustedPlatformAssemblies); void SetPlatformResourceRoots(LPCWSTR pwzPlatformResourceRoots); @@ -450,14 +388,13 @@ class Zapper void SetAppNiPaths(LPCWSTR pwzAppNiPaths); void SetPlatformWinmdPaths(LPCWSTR pwzPlatformWinmdPaths); void SetForceFullTrust(bool val); -#endif // FEATURE_CORECLR || CROSSGEN_COMPILE -#if defined(FEATURE_CORECLR) && !defined(FEATURE_MERGE_JIT_AND_ENGINE) +#if !defined(FEATURE_MERGE_JIT_AND_ENGINE) void SetCLRJITPath(LPCWSTR pwszCLRJITPath); void SetDontLoadJit(); #endif // defined(FEATURE_CORECLR) && !defined(FEATURE_MERGE_JIT_AND_ENGINE) -#if defined(FEATURE_CORECLR) && !defined(NO_NGENPDB) +#if !defined(NO_NGENPDB) void SetDiasymreaderPath(LPCWSTR pwzDiasymreaderPath); #endif // defined(FEATURE_CORECLR) && !defined(NO_NGENPDB) @@ -544,9 +481,7 @@ class ZapperOptions bool m_legacyMode; // true if the zapper was invoked using legacy mode -#ifdef FEATURE_CORECLR bool m_fNoMetaData; // Do not copy metadata and IL to native image -#endif ZapperOptions(); ~ZapperOptions(); |