diff options
author | Jan Kotas <jkotas@microsoft.com> | 2018-11-09 17:49:12 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-09 17:49:12 -0800 |
commit | ff5723233e6b4df6fe441b2ba453506f860aebe9 (patch) | |
tree | 3c2eea0456a47012ef7488fdd3a82e349d098b94 /src/vm/methodtable.cpp | |
parent | 3464b60b85c8e10d69d8da86d2eb3f9e7aaa7c4b (diff) | |
download | coreclr-ff5723233e6b4df6fe441b2ba453506f860aebe9.tar.gz coreclr-ff5723233e6b4df6fe441b2ba453506f860aebe9.tar.bz2 coreclr-ff5723233e6b4df6fe441b2ba453506f860aebe9.zip |
Delete dead/unreachable code related to remoting (#20880)
Diffstat (limited to 'src/vm/methodtable.cpp')
-rw-r--r-- | src/vm/methodtable.cpp | 65 |
1 files changed, 9 insertions, 56 deletions
diff --git a/src/vm/methodtable.cpp b/src/vm/methodtable.cpp index c97dd10178..aa4fc8c003 100644 --- a/src/vm/methodtable.cpp +++ b/src/vm/methodtable.cpp @@ -5,12 +5,6 @@ // File: methodtable.cpp // - -// - -// -// ============================================================================ - #include "common.h" #include "clsload.hpp" @@ -773,13 +767,6 @@ PTR_MethodTable InterfaceInfo_t::GetApproxMethodTable(Module * pContainingModule MethodTable *pServerMT = (*pServer)->GetMethodTable(); PREFIX_ASSUME(pServerMT != NULL); - if (pServerMT->IsTransparentProxy()) - { - // If pServer is a TP, then the interface method desc is the one to - // use to dispatch the call. - RETURN(pItfMD); - } - #ifdef FEATURE_ICASTABLE // In case of ICastable, instead of trying to find method implementation in the real object type // we call pObj.GetValueInternal() and call GetMethodDescForInterfaceMethod() again with whatever type it returns. @@ -1532,7 +1519,6 @@ BOOL MethodTable::CanCastToInterface(MethodTable *pTargetMT, TypeHandlePairList INSTANCE_CHECK; PRECONDITION(CheckPointer(pTargetMT)); PRECONDITION(pTargetMT->IsInterface()); - PRECONDITION(!IsTransparentProxy()); PRECONDITION(IsRestored_NoLogging()); } CONTRACTL_END @@ -1706,7 +1692,6 @@ BOOL MethodTable::CanCastToNonVariantInterface(MethodTable *pTargetMT) PRECONDITION(CheckPointer(pTargetMT)); PRECONDITION(pTargetMT->IsInterface()); PRECONDITION(!pTargetMT->HasVariance()); - PRECONDITION(!IsTransparentProxy()); PRECONDITION(IsRestored_NoLogging()); } CONTRACTL_END @@ -1731,7 +1716,6 @@ TypeHandle::CastResult MethodTable::CanCastToInterfaceNoGC(MethodTable *pTargetM SO_TOLERANT; PRECONDITION(CheckPointer(pTargetMT)); PRECONDITION(pTargetMT->IsInterface()); - PRECONDITION(!IsTransparentProxy()); PRECONDITION(IsRestored_NoLogging()); } CONTRACTL_END @@ -3896,8 +3880,7 @@ void MethodTable::CallFinalizer(Object *obj) THROWS; GC_TRIGGERS; MODE_COOPERATIVE; - PRECONDITION(obj->GetMethodTable()->HasFinalizer() || - obj->GetMethodTable()->IsTransparentProxy()); + PRECONDITION(obj->GetMethodTable()->HasFinalizer()); } CONTRACTL_END; @@ -4008,7 +3991,7 @@ OBJECTREF MethodTable::GetManagedClassObject() GC_TRIGGERS; MODE_COOPERATIVE; INJECT_FAULT(COMPlusThrowOM()); - PRECONDITION(!IsTransparentProxy() && !IsArray()); // Arrays and remoted objects can't go through this path. + PRECONDITION(!IsArray()); // Arrays can't go through this path. POSTCONDITION(GetWriteableData()->m_hExposedClassObject != 0); //REENTRANT } @@ -4024,9 +4007,6 @@ OBJECTREF MethodTable::GetManagedClassObject() // Make sure that we have been restored CheckRestore(); - if (IsTransparentProxy()) // Extra protection in a retail build against doing this on a transparent proxy. - return NULL; - REFLECTCLASSBASEREF refClass = NULL; GCPROTECT_BEGIN(refClass); refClass = (REFLECTCLASSBASEREF) AllocateObject(g_pRuntimeTypeClass); @@ -5214,9 +5194,6 @@ void MethodTableWriteableData::Fixup(DataImage *image, MethodTable *pMT, BOOL ne MethodTableWriteableData *pNewNgenPrivateMT = (MethodTableWriteableData*) image->GetImagePointer(this); _ASSERTE(pNewNgenPrivateMT != NULL); - pNewNgenPrivateMT->m_dwFlags &= ~(enum_flag_RemotingConfigChecked | - enum_flag_CriticalTypePrepared); - if (needsRestore) pNewNgenPrivateMT->m_dwFlags |= (enum_flag_UnrestoredTypeKey | enum_flag_Unrestored | @@ -8013,14 +7990,7 @@ BOOL MethodTable::SanityCheck() if (m_pEEClass.IsNull()) { - if (IsAsyncPinType()) - { - return TRUE; - } - else - { - return FALSE; - } + return FALSE; } EEClass * pClass = GetClass(); @@ -8033,7 +8003,7 @@ BOOL MethodTable::SanityCheck() if (GetNumGenericArgs() != 0) return (pCanonMT->GetClass() == pClass); else - return (pCanonMT == this) || IsArray() || IsTransparentProxy(); + return (pCanonMT == this) || IsArray(); } //========================================================================================== @@ -10008,28 +9978,14 @@ LPCWSTR MethodTable::GetPathForErrorMessages() } } - -bool MethodTable::ClassRequiresUnmanagedCodeCheck() -{ - LIMITED_METHOD_CONTRACT; - - return false; -} - - - BOOL MethodTable::Validate() { LIMITED_METHOD_CONTRACT; ASSERT_AND_CHECK(SanityCheck()); - -#ifdef _DEBUG - if (m_pWriteableData.IsNull()) - { - _ASSERTE(IsAsyncPinType()); - return TRUE; - } + +#ifdef _DEBUG + ASSERT_AND_CHECK(!m_pWriteableData.IsNull()); MethodTableWriteableData *pWriteableData = m_pWriteableData.GetValue(); DWORD dwLastVerifiedGCCnt = pWriteableData->m_dwLastVerifedGCCnt; @@ -10043,12 +9999,9 @@ BOOL MethodTable::Validate() if (IsArray()) { - if (!IsAsyncPinType()) + if (!SanityCheck()) { - if (!SanityCheck()) - { - ASSERT_AND_CHECK(!"Detected use of a corrupted OBJECTREF. Possible GC hole."); - } + ASSERT_AND_CHECK(!"Detected use of a corrupted OBJECTREF. Possible GC hole."); } } else if (!IsCanonicalMethodTable()) |