summaryrefslogtreecommitdiff
path: root/src/vm/stubhelpers.cpp
diff options
context:
space:
mode:
authordanmosemsft <danmose@microsoft.com>2017-02-10 17:12:53 -0800
committerdanmosemsft <danmose@microsoft.com>2017-02-10 21:36:06 -0800
commit54891e0650e69f08832f75a40dc102efc6115d38 (patch)
tree0e032a0b337767801f696cbaeacded267c694f32 /src/vm/stubhelpers.cpp
parent396f7d43b3c0f3ca7034a6d1d9cd7d6914778a1e (diff)
downloadcoreclr-54891e0650e69f08832f75a40dc102efc6115d38.tar.gz
coreclr-54891e0650e69f08832f75a40dc102efc6115d38.tar.bz2
coreclr-54891e0650e69f08832f75a40dc102efc6115d38.zip
Remove always defined FEATURE_CORECLR
Diffstat (limited to 'src/vm/stubhelpers.cpp')
-rw-r--r--src/vm/stubhelpers.cpp176
1 files changed, 0 insertions, 176 deletions
diff --git a/src/vm/stubhelpers.cpp b/src/vm/stubhelpers.cpp
index cbe1d37c94..20f76cdc5e 100644
--- a/src/vm/stubhelpers.cpp
+++ b/src/vm/stubhelpers.cpp
@@ -373,42 +373,6 @@ FORCEINLINE static void *GetCOMIPFromRCW_GetTarget(IUnknown *pUnk, ComPlusCallIn
{
LIMITED_METHOD_CONTRACT;
-#ifndef FEATURE_CORECLR
-#ifdef _TARGET_X86_
- // m_pInterceptStub is either NULL if we never called on this method, -1 if we're not
- // hosted, or the host hook stub if we are hosted. The stub will extract the real target
- // from the 'this' argument.
- PVOID pInterceptStub = VolatileLoadWithoutBarrier(&pComInfo->m_pInterceptStub);
-
- if (pInterceptStub != (LPVOID)-1)
- {
- if (pInterceptStub != NULL)
- {
- return pInterceptStub;
- }
-
- if (NDirect::IsHostHookEnabled() || pComInfo->HasCopyCtorArgs())
- {
- return NULL;
- }
-
- if (!EnsureWritablePagesNoThrow(&pComInfo->m_pInterceptStub, sizeof(pComInfo->m_pInterceptStub)))
- {
- return NULL;
- }
-
- pComInfo->m_pInterceptStub = (LPVOID)-1;
- }
-#else // _TARGET_X86_
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
- if (NDirect::IsHostHookEnabled())
- {
- // There's one static stub on !_TARGET_X86_.
- return (LPVOID)GetEEFuncEntryPoint(PInvokeStubForHost);
- }
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
-#endif // _TARGET_X86_
-#endif // FEATURE_CORECLR
LPVOID *lpVtbl = *(LPVOID **)pUnk;
return lpVtbl[pComInfo->m_cachedComSlot];
@@ -435,44 +399,6 @@ NOINLINE static IUnknown* GetCOMIPFromRCWHelper(LPVOID pFCall, OBJECTREF pSrc, M
pRetUnk.Release();
}
-#ifndef FEATURE_CORECLR
-#ifdef _TARGET_X86_
- GCX_PREEMP();
- Stub *pInterceptStub = NULL;
-
- if (pComInfo->m_pInterceptStub == NULL)
- {
- if (pComInfo->HasCopyCtorArgs())
- {
- // static stub that gets its arguments in a thread-static field
- pInterceptStub = NDirect::GetStubForCopyCtor();
- }
-
- if (NDirect::IsHostHookEnabled())
- {
- pInterceptStub = pComInfo->GenerateStubForHost(
- pMD->GetDomain()->GetLoaderAllocator()->GetStubHeap(),
- pInterceptStub);
- }
-
- EnsureWritablePages(&pComInfo->m_pInterceptStub);
-
- if (pInterceptStub != NULL)
- {
- if (InterlockedCompareExchangeT(&pComInfo->m_pInterceptStub,
- (LPVOID)pInterceptStub->GetEntryPoint(),
- NULL) != NULL)
- {
- pInterceptStub->DecRef();
- }
- }
- else
- {
- pComInfo->m_pInterceptStub = (LPVOID)-1;
- }
- }
-#endif // _TARGET_X86_
-#endif // !FEATURE_CORECLR
*ppTarget = GetCOMIPFromRCW_GetTarget(pRetUnk, pComInfo);
_ASSERTE(*ppTarget != NULL);
@@ -1285,109 +1211,7 @@ FCIMPL2(void*, StubHelpers::GetDelegateTarget, DelegateObject *pThisUNSAFE, UINT
}
FCIMPLEND
-#ifndef FEATURE_CORECLR // CAS
-static void DoDeclarativeActionsForPInvoke(MethodDesc* pCurrent)
-{
- CONTRACTL
- {
- MODE_COOPERATIVE;
- GC_TRIGGERS;
- THROWS;
- SO_INTOLERANT;
- }
- CONTRACTL_END;
-
- MethodSecurityDescriptor MDSecDesc(pCurrent);
- MethodSecurityDescriptor::LookupOrCreateMethodSecurityDescriptor(&MDSecDesc);
-
- DeclActionInfo* pRuntimeDeclActionInfo = MDSecDesc.GetRuntimeDeclActionInfo();
- if (pRuntimeDeclActionInfo != NULL)
- {
- // Tell the debugger not to start on any managed code that we call in this method
- FrameWithCookie<DebuggerSecurityCodeMarkFrame> __dbgSecFrame;
-
- Security::DoDeclarativeActions(pCurrent, pRuntimeDeclActionInfo, NULL, &MDSecDesc);
-
- // Pop the debugger frame
- __dbgSecFrame.Pop();
- }
-}
-#endif // FEATURE_CORECLR
-
-#ifndef FEATURE_CORECLR
-#ifndef _WIN64
-FCIMPL3(void*, StubHelpers::GetFinalStubTarget, LPVOID pStubArg, LPVOID pUnmngThis, DWORD dwFlags)
-{
- CONTRACTL
- {
- FCALL_CHECK;
- PRECONDITION(SF_IsForwardStub(dwFlags));
- }
- CONTRACTL_END;
-
- if (SF_IsCALLIStub(dwFlags))
- {
- // stub argument is the target
- return pStubArg;
- }
- else if (SF_IsDelegateStub(dwFlags))
- {
- // stub argument is not used but we pass _methodPtrAux which is the target
- return pStubArg;
- }
- else if (SF_IsCOMStub(dwFlags))
- {
- // stub argument is a ComPlusCallMethodDesc
- ComPlusCallMethodDesc *pCMD = (ComPlusCallMethodDesc *)pStubArg;
- LPVOID *lpVtbl = *(LPVOID **)pUnmngThis;
- return lpVtbl[pCMD->m_pComPlusCallInfo->m_cachedComSlot];
- }
- else // P/Invoke
- {
- // secret stub argument is an NDirectMethodDesc
- NDirectMethodDesc *pNMD = (NDirectMethodDesc *)pStubArg;
- return pNMD->GetNativeNDirectTarget();
- }
-}
-FCIMPLEND
-#endif // !_WIN64
-
-FCIMPL1(void, StubHelpers::DemandPermission, NDirectMethodDesc *pNMD)
-{
- FCALL_CONTRACT;
- // ETWOnStartup (SecurityCatchCall, SecurityCatchCallEnd); // this is messing up HMF below
-
- if (pNMD != NULL)
- {
- g_IBCLogger.LogMethodDescAccess(pNMD);
-
- if (pNMD->IsInterceptedForDeclSecurity())
- {
- if (pNMD->IsInterceptedForDeclSecurityCASDemandsOnly() &&
- SecurityStackWalk::HasFlagsOrFullyTrusted(1 << SECURITY_UNMANAGED_CODE))
- {
- // Track perfmon counters. Runtime security checks.
- Security::IncrementSecurityPerfCounter();
- }
- else
- {
- HELPER_METHOD_FRAME_BEGIN_0();
- DoDeclarativeActionsForPInvoke(pNMD);
- HELPER_METHOD_FRAME_END();
- }
- }
- }
- else
- {
- // This is either CLR->COM or delegate P/Invoke (we don't call this helper for CALLI).
- HELPER_METHOD_FRAME_BEGIN_0();
- SecurityStackWalk::SpecialDemand(SSWT_DECLARATIVE_DEMAND, SECURITY_UNMANAGED_CODE);
- HELPER_METHOD_FRAME_END();
- }
-}
-FCIMPLEND
-#endif // !FEATURE_CORECLR
FCIMPL2(void, StubHelpers::ThrowInteropParamException, UINT resID, UINT paramIdx)
{