diff options
author | danmosemsft <danmose@microsoft.com> | 2017-02-12 15:32:54 -0800 |
---|---|---|
committer | danmosemsft <danmose@microsoft.com> | 2017-02-12 16:58:50 -0800 |
commit | 206b6a7efbc2e947eff900f448b86573b77ae392 (patch) | |
tree | 1047a9631b0eba294a37571bc4384309308220f1 /src/vm | |
parent | 764b57ba3b7494a8391f32fea688c46247dc9336 (diff) | |
download | coreclr-206b6a7efbc2e947eff900f448b86573b77ae392.tar.gz coreclr-206b6a7efbc2e947eff900f448b86573b77ae392.tar.bz2 coreclr-206b6a7efbc2e947eff900f448b86573b77ae392.zip |
Remove remainder of FEATURE_CORECLR (tool missed some files, also comments)
Diffstat (limited to 'src/vm')
-rw-r--r-- | src/vm/appdomain.cpp | 2 | ||||
-rw-r--r-- | src/vm/appdomain.hpp | 2 | ||||
-rw-r--r-- | src/vm/assemblynative.cpp | 303 | ||||
-rw-r--r-- | src/vm/assemblyspec.hpp | 2 | ||||
-rw-r--r-- | src/vm/codeman.cpp | 4 | ||||
-rw-r--r-- | src/vm/comutilnative.cpp | 2 | ||||
-rw-r--r-- | src/vm/comwaithandle.cpp | 2 | ||||
-rw-r--r-- | src/vm/corhost.cpp | 10 | ||||
-rw-r--r-- | src/vm/domainfile.cpp | 2 | ||||
-rw-r--r-- | src/vm/excep.cpp | 10 | ||||
-rw-r--r-- | src/vm/excep.h | 2 | ||||
-rw-r--r-- | src/vm/methodtablebuilder.cpp | 105 | ||||
-rw-r--r-- | src/vm/mscorlib.h | 70 | ||||
-rw-r--r-- | src/vm/mtypes.h | 2 | ||||
-rw-r--r-- | src/vm/pefile.inl | 2 |
15 files changed, 21 insertions, 499 deletions
diff --git a/src/vm/appdomain.cpp b/src/vm/appdomain.cpp index f1452adb5c..0386c5f431 100644 --- a/src/vm/appdomain.cpp +++ b/src/vm/appdomain.cpp @@ -13625,7 +13625,7 @@ HRESULT AppDomain::SetWinrtApplicationContext(SString &appLocalWinMD) return m_pWinRtBinder->SetApplicationContext(pApplicationContext, appLocalWinMD); } -#endif // FEATURE_CORECLR && FEATURE_COMINTEROP +#endif // FEATURE_COMINTEROP #endif //!DACCESS_COMPILE diff --git a/src/vm/appdomain.hpp b/src/vm/appdomain.hpp index 1cae7e887b..f785bf0718 100644 --- a/src/vm/appdomain.hpp +++ b/src/vm/appdomain.hpp @@ -1979,7 +1979,7 @@ public: #if defined(FEATURE_COMINTEROP) HRESULT SetWinrtApplicationContext(SString &appLocalWinMD); -#endif // FEATURE_CORECLR && FEATURE_COMINTEROP +#endif // FEATURE_COMINTEROP BOOL CanReversePInvokeEnter(); void SetReversePInvokeCannotEnter(); diff --git a/src/vm/assemblynative.cpp b/src/vm/assemblynative.cpp index 8cc53216a9..a896313943 100644 --- a/src/vm/assemblynative.cpp +++ b/src/vm/assemblynative.cpp @@ -43,19 +43,8 @@ #include "policy.h" #endif -#ifdef FEATURE_CORECLR #include "appdomainnative.hpp" #include "../binder/inc/clrprivbindercoreclr.h" -#endif // FEATURE_CORECLR - -#ifndef FEATURE_CORECLR -#include "assemblynativeresource.h" -#endif // !FEATURE_CORECLR - -#if !defined(FEATURE_CORECLR) -#include "clrprivbinderloadfile.h" -#endif - #ifdef FEATURE_FUSION //---------------------------------------------------------------------------------------------------- @@ -318,12 +307,6 @@ Assembly* AssemblyNative::LoadFromBuffer(BOOL fForIntrospection, const BYTE* pAs if (pAssemblyData == NULL) COMPlusThrow(kArgumentNullException, W("ArgumentNull_Array")); -#ifndef FEATURE_CORECLR - // Event Tracing for Windows is used to log data for performance and functional testing purposes. - // The events in this function are used to help measure the performance of assembly loading as a whole when loading from a buffer. - FireEtwLoaderPhaseStart(GetAppDomain() ? GetAppDomain()->GetId().m_dwId : ETWAppDomainIdNotAvailable, ETWLoadContextNotAvailable, ETWFieldUnused, ETWLoaderDynamicLoad, NULL, NULL, GetClrInstanceId()); -#endif // FEATURE_CORECLR - if (fForIntrospection) { if (!GetThread()->GetDomain()->IsVerificationDomain()) GetThread()->GetDomain()->SetIllegalVerificationDomain(); @@ -357,13 +340,6 @@ Assembly* AssemblyNative::LoadFromBuffer(BOOL fForIntrospection, const BYTE* pAs CLRPrivBinderLoadFile* pBinderToUse = NULL; -#if !defined(FEATURE_CORECLR) - if (GetAppDomain()->HasLoadContextHostBinder()) - { - pBinderToUse = CLRPrivBinderLoadFile::GetOrCreateBinder(); - } -#endif // !FEATURE_CORECLR - pFile = PEAssembly::OpenMemory(pCallersAssembly->GetManifestFile(), pAssemblyData, (COUNT_T)uAssemblyLength, fForIntrospection, @@ -447,9 +423,6 @@ Assembly* AssemblyNative::LoadFromBuffer(BOOL fForIntrospection, const BYTE* pAs } #endif // FEATURE_REFLECTION_ONLY_LOAD -#ifndef FEATURE_CORECLR - FireEtwLoaderPhaseEnd(GetAppDomain() ? GetAppDomain()->GetId().m_dwId : ETWAppDomainIdNotAvailable, ETWLoadContextNotAvailable, ETWFieldUnused, ETWLoaderDynamicLoad, NULL, NULL, GetClrInstanceId()); -#endif // FEATURE_CORECLR LOG((LF_CLASSLOADER, LL_INFO100, "\tLoaded in-memory module\n")); @@ -1120,15 +1093,6 @@ void QCALLTYPE AssemblyNative::GetLocation(QCall::AssemblyHandle pAssembly, QCal BEGIN_QCALL; -#ifndef FEATURE_CORECLR - // workaround - lie about where mscorlib is. Mscorlib is now loaded out of the GAC, - // but some apps query its location to find the system directory. (Notably system.web) - if (pAssembly->IsSystem()) - { - retString.Set(SystemDomain::System()->BaseLibrary()); - } - else -#endif // !FEATURE_CORECLR { retString.Set(pAssembly->GetFile()->GetPath()); } @@ -1225,26 +1189,6 @@ void QCALLTYPE AssemblyNative::GetPublicKey(QCall::AssemblyHandle pAssembly, QCa END_QCALL; } -#if !FEATURE_CORECLR - -BYTE QCALLTYPE AssemblyNative::GetSecurityRuleSet(QCall::AssemblyHandle pAssembly) -{ - QCALL_CONTRACT; - - SecurityRuleSet ruleSet = SecurityRuleSet_Default; - - BEGIN_QCALL; - - ModuleSecurityDescriptor *pMSD = ModuleSecurityDescriptor::GetModuleSecurityDescriptor(pAssembly->GetAssembly()); - ruleSet = pMSD->GetSecurityRuleSet(); - - END_QCALL; - - return static_cast<BYTE>(ruleSet); -} - -#endif // !FEATURE_CORECLR - void QCALLTYPE AssemblyNative::GetSimpleName(QCall::AssemblyHandle pAssembly, QCall::StringHandleOnStack retSimpleName) { QCALL_CONTRACT; @@ -1277,14 +1221,6 @@ void QCALLTYPE AssemblyNative::GetCodeBase(QCall::AssemblyHandle pAssembly, BOOL StackSString codebase; -#ifndef FEATURE_CORECLR - if (pAssembly->IsSystem()) { - // workaround: lie about the location of mscorlib. Some callers assume it is in the install dir. - codebase.Set(SystemDomain::System()->BaseLibrary()); - PEAssembly::PathToUrl(codebase); - } - else -#endif // !FEATURE_CORECLR { pAssembly->GetFile()->GetCodeBase(codebase); } @@ -1350,23 +1286,6 @@ BYTE * QCALLTYPE AssemblyNative::GetResource(QCall::AssemblyHandle pAssembly, LP return pbInMemoryResource; } -#ifndef FEATURE_CORECLR - -BOOL QCALLTYPE AssemblyNative::UseRelativeBindForSatellites() -{ - QCALL_CONTRACT; - - BOOL retVal = TRUE; - - BEGIN_QCALL; - retVal = CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_RelativeBindForResources); - END_QCALL; - - return retVal; - -} -#endif // !FEATURE_CORECLR - INT32 QCALLTYPE AssemblyNative::GetManifestResourceInfo(QCall::AssemblyHandle pAssembly, LPCWSTR wszName, QCall::ObjectHandleOnStack retAssembly, QCall::StringHandleOnStack retFileName, QCall::StackCrawlMarkHandle stackMark) { QCALL_CONTRACT; @@ -1878,121 +1797,6 @@ void QCALLTYPE AssemblyNative::GetEntryPoint(QCall::AssemblyHandle pAssembly, QC return; } -#ifndef FEATURE_CORECLR -// prepare saving manifest to disk -void QCALLTYPE AssemblyNative::PrepareForSavingManifestToDisk(QCall::AssemblyHandle pAssembly, QCall::ModuleHandle pAssemblyModule) -{ - QCALL_CONTRACT; - - BEGIN_QCALL; - - pAssembly->GetAssembly()->PrepareSavingManifest((ReflectionModule *)(Module *)pAssemblyModule); - - END_QCALL; -} - -#endif - -#ifndef FEATURE_CORECLR -// add a file name to the file list of this assembly. On disk only. -mdFile QCALLTYPE AssemblyNative::AddFile(QCall::AssemblyHandle pAssembly, LPCWSTR wszFileName) -{ - QCALL_CONTRACT; - - mdFile retVal = 0; - - BEGIN_QCALL; - - retVal = pAssembly->GetAssembly()->AddFile(wszFileName); - - END_QCALL; - - return retVal; -} -#endif //FEATURE_CORECLR - -#ifndef FEATURE_CORECLR -// set the hash value on a file. -void QCALLTYPE AssemblyNative::SetFileHashValue(QCall::AssemblyHandle pAssembly, INT32 tkFile, LPCWSTR wszFullFileName) -{ - QCALL_CONTRACT; - - BEGIN_QCALL; - - pAssembly->GetAssembly()->SetFileHashValue(tkFile, wszFullFileName); - - END_QCALL; -} -#endif //FEATURE_CORECLR - -#ifndef FEATURE_CORECLR -// Add a Type name to the ExportedType table in the on-disk assembly manifest. -mdExportedType QCALLTYPE AssemblyNative::AddExportedTypeOnDisk(QCall::AssemblyHandle pAssembly, LPCWSTR wszCOMTypeName, INT32 tkImpl, INT32 tkTypeDef, INT32 flags) -{ - QCALL_CONTRACT; - - mdExportedType retVal = 0; - - BEGIN_QCALL; - - retVal = pAssembly->GetAssembly()->AddExportedTypeOnDisk(wszCOMTypeName, tkImpl, tkTypeDef, (CorTypeAttr)flags); - - END_QCALL; - - return retVal; -} - -// Add a Type name to the ExportedType table in the in-memory assembly manifest. -mdExportedType QCALLTYPE AssemblyNative::AddExportedTypeInMemory(QCall::AssemblyHandle pAssembly, LPCWSTR wszCOMTypeName, INT32 tkImpl, INT32 tkTypeDef, INT32 flags) -{ - QCALL_CONTRACT; - - mdExportedType retVal = 0; - - BEGIN_QCALL; - - retVal = pAssembly->GetAssembly()->AddExportedTypeInMemory(wszCOMTypeName, tkImpl, tkTypeDef, (CorTypeAttr)flags); - - END_QCALL; - - return retVal; -} -#endif //FEATURE_CORECLR - -#ifndef FEATURE_CORECLR -// add a Stand alone resource to ManifestResource table -void QCALLTYPE AssemblyNative::AddStandAloneResource(QCall::AssemblyHandle pAssembly, LPCWSTR wszName, LPCWSTR wszFileName, LPCWSTR wszFullFileName, INT32 iAttribute) -{ - QCALL_CONTRACT; - - BEGIN_QCALL; - - pAssembly->GetAssembly()->AddStandAloneResource( - wszName, - NULL, - NULL, - wszFileName, - wszFullFileName, - iAttribute); - - END_QCALL; -} -#endif //FEATURE_CORECLR - -#ifndef FEATURE_CORECLR -// Save security permission requests. -void QCALLTYPE AssemblyNative::AddDeclarativeSecurity(QCall::AssemblyHandle pAssembly, INT32 action, PVOID blob, INT32 length) -{ - QCALL_CONTRACT; - - BEGIN_QCALL; - - pAssembly->GetAssembly()->AddDeclarativeSecurity(action, blob, length); - - END_QCALL; -} -#endif //FEATURE_CORECLR - //--------------------------------------------------------------------------------------- // // Get the raw bytes making up this assembly @@ -2057,27 +1861,6 @@ extern void ManagedBitnessFlagsToUnmanagedBitnessFlags( INT32 portableExecutableKind, INT32 imageFileMachine, DWORD* pPeFlags, DWORD* pCorhFlags); -#ifndef FEATURE_CORECLR -void QCALLTYPE AssemblyNative::SaveManifestToDisk(QCall::AssemblyHandle pAssembly, - LPCWSTR wszManifestFileName, - INT32 entrypoint, - INT32 fileKind, - INT32 portableExecutableKind, - INT32 imageFileMachine) -{ - QCALL_CONTRACT; - - BEGIN_QCALL; - - DWORD peFlags = 0, corhFlags = 0; - ManagedBitnessFlagsToUnmanagedBitnessFlags(portableExecutableKind, imageFileMachine, &peFlags, &corhFlags); - - pAssembly->GetAssembly()->SaveManifestToDisk(wszManifestFileName, entrypoint, fileKind, corhFlags, peFlags); - - END_QCALL; -} -#endif // !FEATURE_CORECLR - void QCALLTYPE AssemblyNative::GetFullName(QCall::AssemblyHandle pAssembly, QCall::StringHandleOnStack retString) { QCALL_CONTRACT; @@ -2258,89 +2041,6 @@ FCIMPL1(ReflectModuleBaseObject *, AssemblyNative::GetInMemoryAssemblyModule, As } FCIMPLEND - -#ifndef FEATURE_CORECLR -// Create a stand-alone resource file for version resource. -void QCALLTYPE AssemblyNative::CreateVersionInfoResource(LPCWSTR pwzFilename, - LPCWSTR pwzTitle, - LPCWSTR pwzIconFilename, - LPCWSTR pwzDescription, - LPCWSTR pwzCopyright, - LPCWSTR pwzTrademark, - LPCWSTR pwzCompany, - LPCWSTR pwzProduct, - LPCWSTR pwzProductVersion, - LPCWSTR pwzFileVersion, - INT32 lcid, - BOOL fIsDll, - QCall::StringHandleOnStack retFileName) -{ - QCALL_CONTRACT; - - BEGIN_QCALL; - - Win32Res res; // Resource helper object. - const void *pvData=0; // Pointer to the resource. - ULONG cbData; // Size of the resource data. - ULONG cbWritten; - PathString szFile; // File name for resource file. - PathString szPath; // Path name for resource file. - HandleHolder hFile; - - res.SetInfo(pwzFilename, - pwzTitle, - pwzIconFilename, - pwzDescription, - pwzCopyright, - pwzTrademark, - pwzCompany, - pwzProduct, - pwzProductVersion, - pwzFileVersion, - lcid, - fIsDll); - - res.MakeResFile(&pvData, &cbData); - - //<TODO>Change the COMPlusThrowWin32's to exceptions with - // messages including the path/file name</TODO> - - // Persist to a file. - if (!WszGetTempPath(szPath)) - COMPlusThrowWin32(); - if (!WszGetTempFileName(szPath.GetUnicode(), W("RES"), 0, szFile)) - COMPlusThrowWin32(); - - hFile = WszCreateFile(szFile, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); - if (hFile == INVALID_HANDLE_VALUE) - COMPlusThrowWin32(); - - if (!WriteFile(hFile, pvData, cbData, &cbWritten, NULL)) - COMPlusThrowWin32(); - - retFileName.Set(szFile); - - END_QCALL; -} -#endif // !FEATURE_CORECLR - -#ifndef FEATURE_CORECLR -FCIMPL1(FC_BOOL_RET, AssemblyNative::IsGlobalAssemblyCache, AssemblyBaseObject* pAssemblyUNSAFE) -{ - FCALL_CONTRACT; - - ASSEMBLYREF refAssembly = (ASSEMBLYREF)ObjectToOBJECTREF(pAssemblyUNSAFE); - - if (refAssembly == NULL) - FCThrowRes(kArgumentNullException, W("Arg_InvalidHandle")); - - DomainAssembly *pAssembly = refAssembly->GetDomainAssembly(); - - FC_RETURN_BOOL(pAssembly->GetFile()->IsSourceGAC()); -} -FCIMPLEND -#endif // !FEATURE_CORECLR - void QCALLTYPE AssemblyNative::GetImageRuntimeVersion(QCall::AssemblyHandle pAssembly, QCall::StringHandleOnStack retString) { QCALL_CONTRACT; @@ -2355,9 +2055,6 @@ void QCALLTYPE AssemblyNative::GetImageRuntimeVersion(QCall::AssemblyHandle pAss IfFailThrow(pPEFile->GetMDImport()->GetVersionString(&pszVersion)); SString version(SString::Utf8, pszVersion); - #ifndef FEATURE_CORECLR - AdjustImageRuntimeVersion(&version); -#endif // FEATURE_CORECLR // Allocate a managed string that contains the version and return it. retString.Set(version); diff --git a/src/vm/assemblyspec.hpp b/src/vm/assemblyspec.hpp index 94a7844464..d2e2ab604b 100644 --- a/src/vm/assemblyspec.hpp +++ b/src/vm/assemblyspec.hpp @@ -673,7 +673,7 @@ class AssemblySpecBindingCache ++i; } } -#endif // defined(FEATURE_CORECLR) && !defined(DACCESS_COMPILE) +#endif // !defined(DACCESS_COMPILE) static BOOL CompareSpecs(UPTR u1, UPTR u2); }; diff --git a/src/vm/codeman.cpp b/src/vm/codeman.cpp index 94bae80c7e..ad4c5196b1 100644 --- a/src/vm/codeman.cpp +++ b/src/vm/codeman.cpp @@ -1400,7 +1400,7 @@ JIT_LOAD_DATA g_JitLoadData; // Global that holds the path to custom JIT location extern "C" LPCWSTR g_CLRJITPath = nullptr; -#endif // defined(FEATURE_CORECLR) && !defined(FEATURE_MERGE_JIT_AND_ENGINE) +#endif // !defined(FEATURE_MERGE_JIT_AND_ENGINE) // LoadAndInitializeJIT: load the JIT dll into the process, and initialize it (call the UtilCode initialization function, @@ -1693,7 +1693,7 @@ BOOL EEJitManager::LoadJIT() } } } -#endif // (defined(_TARGET_AMD64_) && !defined(CROSSGEN_COMPILE) && !defined(FEATURE_CORECLR)) || (defined(_TARGET_X86_) && defined(FEATURE_CORECLR)) +#endif // (defined(_TARGET_AMD64_) && !defined(CROSSGEN_COMPILE)) || (defined(_TARGET_X86_) ) #endif // !FEATURE_MERGE_JIT_AND_ENGINE diff --git a/src/vm/comutilnative.cpp b/src/vm/comutilnative.cpp index a82289c30a..891c302402 100644 --- a/src/vm/comutilnative.cpp +++ b/src/vm/comutilnative.cpp @@ -1498,7 +1498,7 @@ void QCALLTYPE Buffer::MemMove(void *dst, void *src, size_t length) { QCALL_CONTRACT; -#if defined(FEATURE_CORECLR) && !defined(FEATURE_CORESYSTEM) +#if !defined(FEATURE_CORESYSTEM) // Callers of memcpy do expect and handle access violations in some scenarios. // Access violations in the runtime dll are turned into fail fast by the vector exception handler by default. // We need to supress this behavior for CoreCLR using AVInRuntimeImplOkayHolder because of memcpy is statically linked in. diff --git a/src/vm/comwaithandle.cpp b/src/vm/comwaithandle.cpp index 7b15ae5acd..610bb867be 100644 --- a/src/vm/comwaithandle.cpp +++ b/src/vm/comwaithandle.cpp @@ -242,8 +242,6 @@ FCIMPL4(INT32, WaitHandleNative::CorWaitMultipleNative, Object* waitObjectsUNSAF // Because it's not, CoreCLR will allow WaitAll on STA threads. // But fixing this would be a breaking change at this point, since we already shipped // SL 2 and 3 this way. - // We we'll also check for FEATURE_CORECLR here, so that if we enable FEATURE_COMINTEROP - // on CoreCLR we won't break anyone. // Perhaps in a future release we can fix this, if we aren't quite so concerned about // compatibility.... diff --git a/src/vm/corhost.cpp b/src/vm/corhost.cpp index 8b27799b44..64f4e2b4cb 100644 --- a/src/vm/corhost.cpp +++ b/src/vm/corhost.cpp @@ -2168,7 +2168,7 @@ HRESULT CCLRGCManager::_SetGCMaxGen0Size(SIZE_T MaxGen0Size) } static CCLRGCManager s_GCManager; -#endif // !FEATURE_CORECLR || FEATURE_WINDOWSPHONE +#endif //FEATURE_WINDOWSPHONE #ifdef FEATURE_APPDOMAIN_RESOURCE_MONITORING class CCLRAppDomainResourceMonitor : public ICLRAppDomainResourceMonitor @@ -2343,7 +2343,7 @@ public: return S_OK; } else -#endif // !FEATURE_CORECLR || defined(FEATURE_WINDOWSPHONE) +#endif //defined(FEATURE_WINDOWSPHONE) if (g_fEEStarted && !m_fFullAccess) { // If runtime has been started, do not allow user to obtain CLR managers. @@ -2364,7 +2364,7 @@ public: *ppObject = &s_GCManager; return S_OK; } -#endif // !FEATURE_CORECLR || FEATURE_WINDOWSPHONE +#endif //FEATURE_WINDOWSPHONE #ifdef FEATURE_APPDOMAIN_RESOURCE_MONITORING else if (riid == IID_ICLRAppDomainResourceMonitor) @@ -4902,7 +4902,7 @@ SIZE_T STDMETHODCALLTYPE CExecutionEngine::ClrVirtualQuery(LPCVOID lpAddress, static VolatilePtr<BYTE> s_pStartOfUEFSection = NULL; static VolatilePtr<BYTE> s_pEndOfUEFSectionBoundary = NULL; static Volatile<DWORD> s_dwProtection = 0; -#endif // _DEBUG && FEATURE_CORECLR && !FEATURE_PAL +#endif // _DEBUG && !FEATURE_PAL #undef ClrVirtualProtect @@ -5018,7 +5018,7 @@ BOOL STDMETHODCALLTYPE CExecutionEngine::ClrVirtualProtect(LPVOID lpAddress, "Do not virtual protect the section in which UEF lives!"); } } -#endif // _DEBUG && FEATURE_CORECLR && !FEATURE_PAL +#endif // _DEBUG && !FEATURE_PAL return EEVirtualProtect(lpAddress, dwSize, flNewProtect, lpflOldProtect); } diff --git a/src/vm/domainfile.cpp b/src/vm/domainfile.cpp index 627239c487..f342933899 100644 --- a/src/vm/domainfile.cpp +++ b/src/vm/domainfile.cpp @@ -1258,7 +1258,7 @@ void DomainFile::FinishLoad() } } } -#endif // defined(FEATURE_CORECLR) && defined(FEATURE_COMINTEROP) +#endif //defined(FEATURE_COMINTEROP) #endif // FEATURE_PREJIT // Flush any log messages diff --git a/src/vm/excep.cpp b/src/vm/excep.cpp index 922b14df45..7a7b55b8e9 100644 --- a/src/vm/excep.cpp +++ b/src/vm/excep.cpp @@ -5579,7 +5579,7 @@ LONG EntryPointFilter(PEXCEPTION_POINTERS pExceptionInfo, PVOID _pData) //------------------------------------------------------------------------------ #if !defined(FEATURE_PAL) #pragma code_seg(push, uef, CLR_UEF_SECTION_NAME) -#endif // FEATURE_CORECLR && !FEATURE_PAL +#endif // !FEATURE_PAL LONG __stdcall COMUnhandledExceptionFilter( // EXCEPTION_CONTINUE_SEARCH or EXCEPTION_CONTINUE_EXECUTION EXCEPTION_POINTERS *pExceptionInfo) // Information about the exception. { @@ -5621,7 +5621,7 @@ LONG __stdcall COMUnhandledExceptionFilter( // EXCEPTION_CONTINUE_SEARCH or } // LONG __stdcall COMUnhandledExceptionFilter() #if !defined(FEATURE_PAL) #pragma code_seg(pop, uef) -#endif // FEATURE_CORECLR && !FEATURE_PAL +#endif // !FEATURE_PAL void PrintStackTraceToStdout(); @@ -7026,9 +7026,9 @@ DWORD GetGcMarkerExceptionCode(LPVOID ip) { return STATUS_CLR_GCCOVER_CODE; } -#else // !(defined(HAVE_GCCOVER) && defined(FEATURE_CORECLR)) +#else // defined(HAVE_GCCOVER) LIMITED_METHOD_CONTRACT; -#endif // defined(HAVE_GCCOVER) && defined(FEATURE_CORECLR) +#endif // defined(HAVE_GCCOVER) return 0; } @@ -11268,7 +11268,7 @@ PTR_VOID EHWatsonBucketTracker::RetrieveWatsonBuckets() { return NULL; } -#endif // defined(FEATURE_CORECLR) && !defined(DACCESS_COMPILE) +#endif //!defined(DACCESS_COMPILE) CONTRACTL { diff --git a/src/vm/excep.h b/src/vm/excep.h index 7e7df4fbcb..13d8a3b847 100644 --- a/src/vm/excep.h +++ b/src/vm/excep.h @@ -193,7 +193,7 @@ void UninstallUnhandledExceptionFilter(); // section that comes after UEF section, it can affect the UEF section and we will // assert about it in "CExecutionEngine::ClrVirtualProtect". #define CLR_UEF_SECTION_NAME ".CLR_UEF" -#endif // defined(FEATURE_CORECLR) && !defined(FEATURE_PAL) +#endif //!defined(FEATURE_PAL) LONG __stdcall COMUnhandledExceptionFilter(EXCEPTION_POINTERS *pExceptionInfo); diff --git a/src/vm/methodtablebuilder.cpp b/src/vm/methodtablebuilder.cpp index 55f1afd965..35fcb2c1ee 100644 --- a/src/vm/methodtablebuilder.cpp +++ b/src/vm/methodtablebuilder.cpp @@ -5141,18 +5141,6 @@ void MethodTableBuilder::SetSecurityFlagsOnMethod(bmtRTMethod* pParentMethod, // for linktime checks on these. // Also place linktime checks on all P/Invoke calls. if ( -#ifndef FEATURE_CORECLR - (IsInterface() && - (GetMDImport()->GetCustomAttributeByName(GetCl(), - COR_SUPPRESS_UNMANAGED_CODE_CHECK_ATTRIBUTE_ANSI, - NULL, - NULL) == S_OK || - GetMDImport()->GetCustomAttributeByName(pNewMD->GetMemberDef(), - COR_SUPPRESS_UNMANAGED_CODE_CHECK_ATTRIBUTE_ANSI, - NULL, - NULL) == S_OK) ) || - -#endif // !FEATURE_CORECLR pNewMD->IsNDirect() || (pNewMD->IsComPlusCall() && !IsInterface())) { @@ -12177,19 +12165,6 @@ VOID MethodTableBuilder::VerifyClassInheritanceSecurityHelper( // This method throws on failure. Security::ClassInheritanceCheck(pChildMT, pParentMT); -#ifndef FEATURE_CORECLR - // Check the entire parent chain for inheritance permission demands. - while (pParentMT != NULL) - { - if (pParentMT->GetClass()->RequiresInheritanceCheck()) - { - // This method throws on failure. - Security::ClassInheritanceCheck(pChildMT, pParentMT); - } - - pParentMT = pParentMT->GetParentMethodTable(); - } -#endif // !FEATURE_CORECLR } //******************************************************************************* @@ -12208,74 +12183,6 @@ VOID MethodTableBuilder::VerifyMethodInheritanceSecurityHelper( Security::MethodInheritanceCheck(pChildMD, pParentMD); -#ifndef FEATURE_CORECLR - - // If no inheritance checks are required, just return. - if (!pParentMD->RequiresInheritanceCheck() && - !pParentMD->ParentRequiresInheritanceCheck()) - { - return; - } - - DWORD dwSlot = pParentMD->GetSlot(); - -#ifdef _DEBUG - // Get the name and signature for the method so we can find the new parent method desc. - // We use the parent MethodDesc for this because the child could actually have a very - // different name in the case that the child is MethodImpling the parent. - - // Get the name. - LPCUTF8 szName; - szName = pParentMD->GetName(); - - // Get the signature. - PCCOR_SIGNATURE pSignature; - DWORD cSignature; - pParentMD->GetSig(&pSignature, &cSignature); - Module *pModule = pParentMD->GetModule(); -#endif // _DEBUG - - do - { - if (pParentMD->RequiresInheritanceCheck()) - { - Security::MethodInheritanceCheck(pChildMD, pParentMD); - } - - if (pParentMD->ParentRequiresInheritanceCheck()) - { - MethodTable *pGrandParentMT = pParentMD->GetMethodTable()->GetParentMethodTable(); - CONSISTENCY_CHECK(CheckPointer(pGrandParentMT)); - - // Find this method in the parent. - // If it does exist in the parent, it would be at the same vtable slot. - if (dwSlot >= pGrandParentMT->GetNumVirtuals()) - { - // Parent does not have this many vtable slots, so it doesn't exist there - pParentMD = NULL; - } - else - { - // It is in the vtable of the parent - pParentMD = pGrandParentMT->GetMethodDescForSlot(dwSlot); - _ASSERTE(pParentMD != NULL); - -#ifdef _DEBUG - _ASSERTE(pParentMD == MemberLoader::FindMethod(pGrandParentMT, - szName, - pSignature, - cSignature, - pModule)); -#endif // _DEBUG - } - } - else - { - pParentMD = NULL; - } - } while (pParentMD != NULL); - -#endif // !FEATURE_CORECLR } //******************************************************************************* @@ -12520,7 +12427,6 @@ void MethodTableBuilder::VerifyInheritanceSecurity() // permission demands on the current class. If these first checks // succeeded, then the cached declared method list is scanned for // methods that have inheritance permission demands. -#ifdef FEATURE_CORECLR // // If we are transparent, and every class up the inheritence chain is also entirely transparent, // that means that no inheritence rules could be broken. If that's the case, we don't need to check @@ -12551,12 +12457,9 @@ void MethodTableBuilder::VerifyInheritanceSecurity() } } -#endif // FEATURE_CORECLR if (GetParentMethodTable() != NULL -#if FEATURE_CORECLR && !fInheritenceChainTransparent -#endif // FEATURE_CORECLR ) { // Check the parent for inheritance permission demands. @@ -12641,18 +12544,10 @@ void MethodTableBuilder::VerifyInheritanceSecurity() MethodTable *pCurItfMT = itfIt.GetInterface(); CONSISTENCY_CHECK(CheckPointer(pCurItfMT)); -#ifdef FEATURE_CORECLR if (fNeedTransparencyInheritanceCheck && !(Security::IsTypeAllTransparent(itfIt.GetInterface()) && fCurrentTypeAllTransparent) ) -#else // FEATURE_CORECLR - EEClass * pCurItfCls = pCurItfMT->GetClass(); - if (fNeedTransparencyInheritanceCheck || - fNeedPartialTrustInterfaceMappingCheck || - pCurItfCls->RequiresInheritanceCheck() || - pCurItfCls->SomeMethodsRequireInheritanceCheck()) -#endif // !FEATURE_CORECLR { // An interface is introduced by this type either if it is explicitly declared on the // type's interface list or if one of the type's explicit interfaces requires the diff --git a/src/vm/mscorlib.h b/src/vm/mscorlib.h index c4fd43d6d7..3b57f9c8f9 100644 --- a/src/vm/mscorlib.h +++ b/src/vm/mscorlib.h @@ -134,12 +134,6 @@ DEFINE_METHOD(APP_DOMAIN, TURN_ON_BINDING_REDIRECTS, TurnOnBindingRedi DEFINE_METHOD(APP_DOMAIN, CREATE_APP_DOMAIN_MANAGER, CreateAppDomainManager, IM_RetVoid) DEFINE_METHOD(APP_DOMAIN, INITIALIZE_COMPATIBILITY_FLAGS, InitializeCompatibilityFlags, IM_RetVoid) DEFINE_METHOD(APP_DOMAIN, INITIALIZE_DOMAIN_SECURITY, InitializeDomainSecurity, IM_Evidence_Evidence_Bool_IntPtr_Bool_RetVoid) -#ifndef FEATURE_CORECLR -DEFINE_METHOD(APP_DOMAIN, PAUSE, Pause, SM_RetVoid) -DEFINE_METHOD(APP_DOMAIN, RESUME, Resume, SM_RetVoid) -DEFINE_CLASS(APPDOMAIN_MANAGER, System, AppDomainManager) -DEFINE_PROPERTY(APPDOMAIN_MANAGER, ENTRY_ASSEMBLY, EntryAssembly, AssemblyBase) -#endif // FEATURE_CORECLR DEFINE_CLASS(CLEANUP_WORK_LIST, StubHelpers, CleanupWorkList) @@ -167,9 +161,6 @@ DEFINE_FIELD_U(_AppDomainManagerType, AppDomainSetupObject, m_App DEFINE_FIELD_U(_CompatFlags, AppDomainSetupObject, m_CompatFlags) DEFINE_FIELD_U(_TargetFrameworkName, AppDomainSetupObject, m_TargetFrameworkName) DEFINE_FIELD_U(_LoaderOptimization, AppDomainSetupObject, m_LoaderOptimization) -#ifndef FEATURE_CORECLR -DEFINE_FIELD_U(_AppDomainSortingSetupInfo, AppDomainSetupObject, m_AppDomainSortingSetupInfo) -#endif // FEATURE_CORECLR #ifdef FEATURE_COMINTEROP DEFINE_FIELD_U(_DisableInterfaceCache, AppDomainSetupObject, m_DisableInterfaceCache) #endif // FEATURE_COMINTEROP @@ -245,9 +236,6 @@ DEFINE_FIELD_U(_ModuleResolve, AssemblyBaseObject, m_pModuleEven DEFINE_FIELD_U(m_fullname, AssemblyBaseObject, m_fullname) DEFINE_FIELD_U(m_syncRoot, AssemblyBaseObject, m_pSyncRoot) DEFINE_FIELD_U(m_assembly, AssemblyBaseObject, m_pAssembly) -#ifndef FEATURE_CORECLR -DEFINE_FIELD_U(m_flags, AssemblyBaseObject, m_flags) -#endif DEFINE_CLASS(ASSEMBLY, Reflection, RuntimeAssembly) DEFINE_FIELD(ASSEMBLY, HANDLE, m_assembly) DEFINE_METHOD(ASSEMBLY, GET_NAME, GetName, IM_RetAssemblyName) @@ -391,18 +379,6 @@ DEFINE_METHOD(CONTEXT, RESERVE_SLOT, ReserveSlot, DEFINE_CLASS(CONTEXT_BOUND_OBJECT, System, ContextBoundObject) #endif -#ifndef FEATURE_CORECLR -DEFINE_CLASS_U(Globalization, AppDomainSortingSetupInfo, AppDomainSortingSetupInfoObject) -DEFINE_FIELD_U(_pfnIsNLSDefinedString, AppDomainSortingSetupInfoObject, m_pfnIsNLSDefinedString) -DEFINE_FIELD_U(_pfnCompareStringEx, AppDomainSortingSetupInfoObject, m_pfnCompareStringEx) -DEFINE_FIELD_U(_pfnLCMapStringEx, AppDomainSortingSetupInfoObject, m_pfnLCMapStringEx) -DEFINE_FIELD_U(_pfnFindNLSStringEx, AppDomainSortingSetupInfoObject, m_pfnFindNLSStringEx) -DEFINE_FIELD_U(_pfnCompareStringOrdinal, AppDomainSortingSetupInfoObject, m_pfnCompareStringOrdinal) -DEFINE_FIELD_U(_pfnGetNLSVersionEx, AppDomainSortingSetupInfoObject, m_pfnGetNLSVersionEx) -DEFINE_FIELD_U(_pfnFindStringOrdinal, AppDomainSortingSetupInfoObject, m_pfnFindStringOrdinal) -DEFINE_FIELD_U(_useV2LegacySorting, AppDomainSortingSetupInfoObject, m_useV2LegacySorting) -DEFINE_FIELD_U(_useV4LegacySorting, AppDomainSortingSetupInfoObject, m_useV4LegacySorting) -#endif // FEATURE_CORECLR #ifndef FEATURE_COREFX_GLOBALIZATION DEFINE_CLASS_U(Globalization, CultureData, CultureDataBaseObject) @@ -579,9 +555,7 @@ DEFINE_CLASS(ENUM, System, Enum) DEFINE_CLASS(ENVIRONMENT, System, Environment) DEFINE_METHOD(ENVIRONMENT, GET_RESOURCE_STRING_LOCAL, GetResourceStringLocal, SM_Str_RetStr) -#ifdef FEATURE_CORECLR DEFINE_METHOD(ENVIRONMENT, SET_COMMAND_LINE_ARGS, SetCommandLineArgs, SM_ArrStr_RetVoid) -#endif #ifdef FEATURE_COMINTEROP DEFINE_CLASS(ERROR_WRAPPER, Interop, ErrorWrapper) @@ -632,12 +606,10 @@ DEFINE_METHOD(EXCEPTION, ADD_EXCEPTION_DATA_FOR_RESTRICTED_ERROR_INFO DEFINE_METHOD(EXCEPTION, TRY_GET_RESTRICTED_LANGUAGE_ERROR_OBJECT, TryGetRestrictedLanguageErrorObject, IM_RefObject_RetBool) #endif // FEATURE_COMINTEROP -#ifdef FEATURE_CORECLR DEFINE_CLASS(CROSSAPPDOMAINMARSHALEDEXCEPTION, System, CrossAppDomainMarshaledException) DEFINE_METHOD(CROSSAPPDOMAINMARSHALEDEXCEPTION, STR_INT_CTOR, .ctor, IM_Str_Int_RetVoid) -#endif //FEATURE_CORECLR DEFINE_CLASS(SYSTEM_EXCEPTION, System, SystemException) @@ -677,22 +649,6 @@ DEFINE_CLASS(I_RT_FIELD_INFO, System, IRuntimeFieldInfo) DEFINE_CLASS(FIELD_INFO, Reflection, FieldInfo) -#ifndef FEATURE_CORECLR -DEFINE_CLASS_U(IO, FileStreamAsyncResult, AsyncResultBase) -DEFINE_FIELD_U(_userCallback, AsyncResultBase, _userCallback) -DEFINE_FIELD_U(_userStateObject, AsyncResultBase, _userStateObject) -DEFINE_FIELD_U(_waitHandle, AsyncResultBase, _waitHandle) -DEFINE_FIELD_U(_handle, AsyncResultBase, _fileHandle) -DEFINE_FIELD_U(_overlapped, AsyncResultBase, _overlapped) -DEFINE_FIELD_U(_EndXxxCalled, AsyncResultBase, _EndXxxCalled) -DEFINE_FIELD_U(_numBytes, AsyncResultBase, _numBytes) -DEFINE_FIELD_U(_errorCode, AsyncResultBase, _errorCode) -DEFINE_FIELD_U(_numBufferedBytes, AsyncResultBase, _numBufferedBytes) -DEFINE_FIELD_U(_isWrite, AsyncResultBase, _isWrite) -DEFINE_FIELD_U(_isComplete, AsyncResultBase, _isComplete) -DEFINE_FIELD_U(_completedSynchronously, AsyncResultBase, _completedSynchronously) -DEFINE_CLASS(FILESTREAM_ASYNCRESULT, IO, FileStreamAsyncResult) -#endif // !FEATURE_CORECLR DEFINE_CLASS(GUID, System, Guid) @@ -1195,9 +1151,6 @@ DEFINE_METHOD(SAFE_HANDLE, RELEASE_HANDLE, ReleaseHandle, DEFINE_METHOD(SAFE_HANDLE, DISPOSE, Dispose, IM_RetVoid) DEFINE_METHOD(SAFE_HANDLE, DISPOSE_BOOL, Dispose, IM_Bool_RetVoid) -#ifndef FEATURE_CORECLR -DEFINE_CLASS(SAFE_TOKENHANDLE, SafeHandles, SafeAccessTokenHandle) -#endif DEFINE_CLASS(SAFE_TYPENAMEPARSER_HANDLE, System, SafeTypeNameParserHandle) @@ -1283,9 +1236,6 @@ DEFINE_METHOD(STRING_BUILDER, REPLACE_BUFFER_INTERNAL,ReplaceBufferInterna DEFINE_METHOD(STRING_BUILDER, REPLACE_BUFFER_ANSI_INTERNAL,ReplaceBufferAnsiInternal, IM_PtrSByt_Int_RetVoid) DEFINE_CLASS(STRONG_NAME_KEY_PAIR, Reflection, StrongNameKeyPair) -#ifndef FEATURE_CORECLR -DEFINE_METHOD(STRONG_NAME_KEY_PAIR, GET_KEY_PAIR, GetKeyPair, IM_RefObject_RetBool) -#endif DEFINE_CLASS_U(Threading, SynchronizationContext, SynchronizationContextObject) DEFINE_FIELD_U(_props, SynchronizationContextObject, _props) @@ -1304,9 +1254,6 @@ DEFINE_CLASS_U(Threading, Thread, ThreadBaseObj #ifdef FEATURE_REMOTING DEFINE_FIELD_U(m_Context, ThreadBaseObject, m_ExposedContext) #endif -#ifndef FEATURE_CORECLR -DEFINE_FIELD_U(m_ExecutionContext, ThreadBaseObject, m_ExecutionContext) -#endif DEFINE_FIELD_U(m_Name, ThreadBaseObject, m_Name) DEFINE_FIELD_U(m_Delegate, ThreadBaseObject, m_Delegate) #ifdef FEATURE_LEAK_CULTURE_INFO @@ -1428,13 +1375,6 @@ DEFINE_METHOD(STUBHELPERS, IS_QCALL, IsQCall, DEFINE_METHOD(STUBHELPERS, INIT_DECLARING_TYPE, InitDeclaringType, SM_IntPtr_RetVoid) DEFINE_METHOD(STUBHELPERS, GET_NDIRECT_TARGET, GetNDirectTarget, SM_IntPtr_RetIntPtr) DEFINE_METHOD(STUBHELPERS, GET_DELEGATE_TARGET, GetDelegateTarget, SM_Delegate_RefIntPtr_RetIntPtr) -#ifndef FEATURE_CORECLR // CAS -DEFINE_METHOD(STUBHELPERS, DEMAND_PERMISSION, DemandPermission, SM_IntPtr_RetVoid) -#ifdef _TARGET_X86_ -DEFINE_METHOD(STUBHELPERS, SET_COPY_CTOR_COOKIE_CHAIN, SetCopyCtorCookieChain, SM_IntPtr_IntPtr_Int_IntPtr_RetVoid) -DEFINE_FIELD(STUBHELPERS, COPY_CTOR_STUB_DESC, s_copyCtorStubDesc) -#endif // _TARGET_X86_ -#endif // !FEATURE_CORECLR #ifdef FEATURE_COMINTEROP DEFINE_METHOD(STUBHELPERS, GET_COM_HR_EXCEPTION_OBJECT, GetCOMHRExceptionObject, SM_Int_IntPtr_Obj_RetException) DEFINE_METHOD(STUBHELPERS, GET_COM_HR_EXCEPTION_OBJECT_WINRT, GetCOMHRExceptionObject_WinRT, SM_Int_IntPtr_Obj_RetException) @@ -1453,13 +1393,11 @@ DEFINE_METHOD(STUBHELPERS, GET_OUTER_INSPECTABLE, Ge DEFINE_METHOD(STUBHELPERS, TRIGGER_EXCEPTION_SWALLOWED_MDA, TriggerExceptionSwallowedMDA, SM_Exception_IntPtr_RetException) #endif // MDA_SUPPORTED #endif // FEATURE_COMINTEROP -#if defined(MDA_SUPPORTED) || (defined(CROSSGEN_COMPILE) && !defined(FEATURE_CORECLR)) +#if defined(MDA_SUPPORTED) DEFINE_METHOD(STUBHELPERS, CHECK_COLLECTED_DELEGATE_MDA, CheckCollectedDelegateMDA, SM_IntPtr_RetVoid) #endif // MDA_SUPPORTED DEFINE_METHOD(STUBHELPERS, SET_LAST_ERROR, SetLastError, SM_RetVoid) -#ifdef FEATURE_CORECLR DEFINE_METHOD(STUBHELPERS, CLEAR_LAST_ERROR, ClearLastError, SM_RetVoid) -#endif DEFINE_METHOD(STUBHELPERS, THROW_INTEROP_PARAM_EXCEPTION, ThrowInteropParamException, SM_Int_Int_RetVoid) DEFINE_METHOD(STUBHELPERS, ADD_TO_CLEANUP_LIST, AddToCleanupList, SM_RefCleanupWorkList_SafeHandle_RetIntPtr) @@ -1504,12 +1442,6 @@ DEFINE_METHOD(STUBHELPERS, ARRAY_TYPE_CHECK, ArrayTypeCheck, DEFINE_METHOD(STUBHELPERS, MULTICAST_DEBUGGER_TRACE_HELPER, MulticastDebuggerTraceHelper, SM_Obj_Int_RetVoid) #endif -#if defined(_TARGET_X86_) && !defined(FEATURE_CORECLR) -DEFINE_CLASS(COPYCTORSTUBCOOKIE, StubHelpers, CopyCtorStubCookie) -DEFINE_METHOD(COPYCTORSTUBCOOKIE, SET_DATA, SetData, IM_IntPtr_UInt_IntPtr_IntPtr_RetVoid) -DEFINE_METHOD(COPYCTORSTUBCOOKIE, SET_NEXT, SetNext, IM_IntPtr_RetVoid) -#endif // _TARGET_X86_ && !FEATURE_CORECLR - DEFINE_CLASS(ANSICHARMARSHALER, StubHelpers, AnsiCharMarshaler) DEFINE_METHOD(ANSICHARMARSHALER, CONVERT_TO_NATIVE, ConvertToNative, SM_Char_Bool_Bool_RetByte) DEFINE_METHOD(ANSICHARMARSHALER, CONVERT_TO_MANAGED, ConvertToManaged, SM_Byte_RetChar) diff --git a/src/vm/mtypes.h b/src/vm/mtypes.h index 71241efa78..1a14760372 100644 --- a/src/vm/mtypes.h +++ b/src/vm/mtypes.h @@ -60,7 +60,7 @@ DEFINE_MARSHALER_TYPE(MARSHAL_TYPE_UTF8_BUFFER, UTF8BufferMarshaler, // CoreCLR doesn't have any support for marshalling interface pointers. // Not even support for fake CCWs. DEFINE_MARSHALER_TYPE(MARSHAL_TYPE_INTERFACE, InterfaceMarshaler, true) -#endif // defined(FEATURE_COMINTEROP) || !defined(FEATURE_CORECLR) +#endif // defined(FEATURE_COMINTEROP) #ifdef FEATURE_COMINTEROP DEFINE_MARSHALER_TYPE(MARSHAL_TYPE_SAFEARRAY, SafeArrayMarshaler, false) diff --git a/src/vm/pefile.inl b/src/vm/pefile.inl index 455a46d919..fb73e5df4a 100644 --- a/src/vm/pefile.inl +++ b/src/vm/pefile.inl @@ -1333,7 +1333,7 @@ inline BOOL PEFile::IsPtrInILImage(PTR_CVOID data) TADDR taddrILMetadata = dac_cast<TADDR>(pDecoder->GetMetadata(&cbILMetadata)); return ((taddrILMetadata <= taddrData) && (taddrData < taddrILMetadata + cbILMetadata)); } -#endif // defined(FEATURE_PREJIT) && defined(FEATURE_CORECLR) +#endif // defined(FEATURE_PREJIT) return GetOpenedILimage()->IsPtrInImage(data); } else |