summaryrefslogtreecommitdiff
path: root/src/vm/virtualcallstub.cpp
diff options
context:
space:
mode:
authordanmosemsft <danmose@microsoft.com>2017-02-15 06:20:22 (GMT)
committerdanmosemsft <danmose@microsoft.com>2017-02-15 06:26:06 (GMT)
commitfbbc3f800b105c79c24125685bb1d4e817c4ed28 (patch)
tree11005ade1f4a0a5f3fd10140fef567ba709d6d11 /src/vm/virtualcallstub.cpp
parentd3392e5684483ae5518dcaa775c8f86dc1b08ec6 (diff)
downloadcoreclr-fbbc3f800b105c79c24125685bb1d4e817c4ed28.zip
coreclr-fbbc3f800b105c79c24125685bb1d4e817c4ed28.tar.gz
coreclr-fbbc3f800b105c79c24125685bb1d4e817c4ed28.tar.bz2
Remove never defined FEATURE_REMOTING
Diffstat (limited to 'src/vm/virtualcallstub.cpp')
-rw-r--r--src/vm/virtualcallstub.cpp207
1 files changed, 0 insertions, 207 deletions
diff --git a/src/vm/virtualcallstub.cpp b/src/vm/virtualcallstub.cpp
index 5fc66f6..6681b31 100644
--- a/src/vm/virtualcallstub.cpp
+++ b/src/vm/virtualcallstub.cpp
@@ -15,9 +15,6 @@
// ============================================================================
#include "common.h"
-#ifdef FEATURE_REMOTING
-#include "remoting.h"
-#endif
#include "array.h"
#ifdef FEATURE_PREJIT
#include "compile.h"
@@ -1971,16 +1968,6 @@ PCODE VirtualCallStubManager::ResolveWorker(StubCallSite* pCallSite,
// <token, TPMT, target> entry where target is in AD1, and then matching against
// this entry from AD2 which happens to be using the same token, perhaps for a
// completely different interface.
-#ifdef FEATURE_REMOTING
- if (token.IsTypedToken() && objectType->IsTransparentProxy())
- {
- MethodTable * pItfMT = GetTypeFromToken(token);
- if (pItfMT->GetDomain() != SharedDomain::GetDomain())
- {
- insertKind = DispatchCache::IK_NONE;
- }
- }
-#endif
}
if (insertKind != DispatchCache::IK_NONE)
@@ -2110,44 +2097,6 @@ VirtualCallStubManager::Resolver(
// NOTE: CERs are not hardened against transparent proxy types,
// so no need to worry about throwing an exception from here.
-#ifdef FEATURE_REMOTING
- if (pMT->IsTransparentProxy())
- {
- if (IsInterfaceToken(token))
- {
- MethodTable * pItfMT = GetTypeFromToken(token);
- DispatchSlot ds(pItfMT->FindDispatchSlot(token.GetSlotNumber()));
- if (pItfMT->HasInstantiation())
- {
- MethodDesc * pTargetMD = ds.GetMethodDesc();
- if (!pTargetMD->HasMethodInstantiation())
- {
- MethodDesc * pInstMD = MethodDesc::FindOrCreateAssociatedMethodDesc(
- pTargetMD,
- pItfMT,
- FALSE, // forceBoxedEntryPoint
- Instantiation(), // methodInst
- FALSE, // allowInstParam
- TRUE); // forceRemotableMethod
- *ppTarget = CRemotingServices::GetStubForInterfaceMethod(pInstMD);
- return TRUE;
- }
- }
- *ppTarget = ds.GetTarget();
- }
- else
- {
- CONSISTENCY_CHECK(IsClassToken(token));
- // All we do here is call the TP thunk stub.
- DispatchSlot thunkSlot(CTPMethodTable::GetMethodTable()->FindDispatchSlot(token.GetTypeID(), token.GetSlotNumber()));
- CONSISTENCY_CHECK(!thunkSlot.IsNull());
- *ppTarget = thunkSlot.GetTarget();
- }
- return TRUE;
- }
-
- CONSISTENCY_CHECK(!pMT->IsTransparentProxy());
-#endif // FEATURE_REMOTING
LOG((LF_LOADER, LL_INFO10000, "SD: VCSM::Resolver: (start) looking up %s method in %s\n",
token.IsThisToken() ? "this" : "interface",
@@ -2455,151 +2404,6 @@ PCODE VirtualCallStubManager::CacheLookup(size_t token, UINT16 tokenHash, Method
return (PCODE)(pElem != NULL ? pElem->target : NULL);
}
-#ifdef FEATURE_REMOTING
-//----------------------------------------------------------------------------
-// This is used by TransparentProxyWorkerStub to take a stub address (token),
-// and MethodTable and return the target. This is the fast version that only
-// checks the cache and returns NULL if a target is not found.
-//
-PCODE VSD_GetTargetForTPWorkerQuick(TransparentProxyObject * orTP, size_t token)
-{
- CONTRACTL {
- NOTHROW;
- GC_NOTRIGGER;
- SO_TOLERANT;
- PRECONDITION(CheckPointer(orTP));
- PRECONDITION(orTP->IsTransparentProxy());
- } CONTRACTL_END
-
- GCX_FORBID();
-
- DispatchToken tok;
-
- // If we have a 16-bit number in the token then we have a slot number
- if (((UINT16)token) == token)
- {
- tok = DispatchToken::CreateDispatchToken((UINT32)token);
- }
- // Otherwise, we have a MethodDesc
- else
- {
- UINT32 typeID = 0;
- MethodDesc * pMD = (MethodDesc *) token;
-
- if (pMD->IsInterface())
- {
- typeID = pMD->GetMethodTable()->LookupTypeID();
- // If this type has never had a TypeID assigned, then it couldn't possibly
- // be in the cache. We do this instead of calling GetTypeID because that can
- // throw, and this method is not protected from that.
- if (typeID == TypeIDProvider::INVALID_TYPE_ID)
- {
- return NULL;
- }
-
-#ifdef FAT_DISPATCH_TOKENS
- if (DispatchToken::RequiresDispatchTokenFat(typeID, pMD->GetSlot()))
- {
- tok = pMD->GetMethodTable()->GetLoaderAllocator()->TryLookupDispatchToken(typeID, pMD->GetSlot());
- if (!tok.IsValid())
- {
- return NULL;
- }
- }
- else
-#endif
- {
- tok = DispatchToken::CreateDispatchToken(typeID, pMD->GetSlot());
- }
- }
- else
- {
- // On AMD64 a non-virtual call on an in context transparent proxy
- // results in us reaching here with (pMD->IsInterface == FALSE)
- return pMD->GetSingleCallableAddrOfCode();
- }
- }
-
- return VirtualCallStubManager::CacheLookup(tok.To_SIZE_T(), DispatchCache::INVALID_HASH, orTP->GetMethodTableBeingProxied());
-}
-
-//----------------------------------------------------------------------------
-// This is used by TransparentProxyWorkerStub to take a stub address (token),
-// and MethodTable and return the target. This is the slow version that can throw
-// On x86 we construct a HelperMethodFrame, while on the 64 bit platforms we are
-// called by ResolveWorkerStatic which already has constructed a frame
-//
-PCODE VSD_GetTargetForTPWorker(TransitionBlock * pTransitionBlock, size_t token)
-{
- CONTRACTL {
- THROWS;
- GC_TRIGGERS;
- SO_TOLERANT;
- INJECT_FAULT(COMPlusThrowOM(););
- PRECONDITION(CheckPointer(pTransitionBlock));
- } CONTRACTL_END
-
- MAKE_CURRENT_THREAD_AVAILABLE();
-
- DispatchToken tok;
- MethodDesc *pRepresentativeMD = NULL;
- PCODE pRet = NULL;
-
- BEGIN_SO_INTOLERANT_CODE(CURRENT_THREAD);
-
- FrameWithCookie<StubDispatchFrame> frame(pTransitionBlock);
- StubDispatchFrame * pSDFrame = &frame;
-
- MethodTable * pMT = CTPMethodTable::GetMethodTableBeingProxied(pSDFrame->GetThis());
-
- // If we have a 16-bit number in the token then we have a slot number
- if (((UINT16)token) == token) {
- tok = DispatchToken::CreateDispatchToken((UINT32)token);
- pRepresentativeMD = VirtualCallStubManager::GetRepresentativeMethodDescFromToken(tok.To_SIZE_T(), pMT);
- }
- // Otherwise, we have a MethodDesc
- else {
- // The token will be calculated after we erect a GC frame.
- pRepresentativeMD = (MethodDesc *)token;
- }
- PREFIX_ASSUME(pRepresentativeMD != NULL);
-
- // Get the current appdomain
- AppDomain *pAD = (AppDomain *) CURRENT_THREAD->GetDomain();
-
- // Get the virtual stub manager for this AD. We pick the current
- // AD because when the AD is unloaded the cache entry will be cleared.
- // If we happen to be calling from shared to shared, it's no big
- // deal because we'll just come through here again and add a new
- // cache entry. We can't choose the manager based on the return
- // address because this could be tail-called or called indirectly
- // via helper and so the return address won't be recognized.
- VirtualCallStubManager *pMgr = pAD->GetLoaderAllocator()->GetVirtualCallStubManager();
- CONSISTENCY_CHECK(CheckPointer(pMgr));
-
- pSDFrame->SetFunction(pRepresentativeMD);
- pSDFrame->Push(CURRENT_THREAD);
- INSTALL_UNWIND_AND_CONTINUE_HANDLER_NO_PROBE;
-
- // If we didn't properly create a token above, it's because we needed to wait until
- // the helper frame was created (GetTypeID is a throwing operation).
- if (!tok.IsValid()) {
- tok = pAD->GetLoaderAllocator()->GetDispatchToken(pRepresentativeMD->GetMethodTable()->GetTypeID(),
- pRepresentativeMD->GetSlot());
- }
- CONSISTENCY_CHECK(tok.IsValid());
-
- pRet = pMgr->GetTarget(tok.To_SIZE_T(), pMT);
- CONSISTENCY_CHECK(pRet != NULL);
-
- UNINSTALL_UNWIND_AND_CONTINUE_HANDLER_NO_PROBE;
- pSDFrame->Pop(CURRENT_THREAD);
-
- END_SO_INTOLERANT_CODE;
-
- return pRet;
-}
-#endif // FEATURE_REMOTING
//----------------------------------------------------------------------------
/* static */
@@ -2702,17 +2506,6 @@ VirtualCallStubManager::TraceResolver(
MethodTable *pMT = pObj->GetMethodTable();
CONSISTENCY_CHECK(CheckPointer(pMT));
-#ifdef FEATURE_REMOTING
- if (pMT->IsTransparentProxy())
- {
-#ifdef DACCESS_COMPILE
- DacNotImpl();
-#else
- trace->InitForFramePush(GetEEFuncEntryPoint(TransparentProxyStubPatchLabel));
-#endif
- return TRUE;
- }
-#endif
DispatchSlot slot(pMT->FindDispatchSlot(token));