summaryrefslogtreecommitdiff
path: root/src/vm
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2018-11-09 17:49:12 -0800
committerGitHub <noreply@github.com>2018-11-09 17:49:12 -0800
commitff5723233e6b4df6fe441b2ba453506f860aebe9 (patch)
tree3c2eea0456a47012ef7488fdd3a82e349d098b94 /src/vm
parent3464b60b85c8e10d69d8da86d2eb3f9e7aaa7c4b (diff)
downloadcoreclr-ff5723233e6b4df6fe441b2ba453506f860aebe9.tar.gz
coreclr-ff5723233e6b4df6fe441b2ba453506f860aebe9.tar.bz2
coreclr-ff5723233e6b4df6fe441b2ba453506f860aebe9.zip
Delete dead/unreachable code related to remoting (#20880)
Diffstat (limited to 'src/vm')
-rw-r--r--src/vm/amd64/cgenamd64.cpp2
-rw-r--r--src/vm/amd64/cgencpu.h1
-rw-r--r--src/vm/appdomain.cpp63
-rw-r--r--src/vm/appdomain.hpp14
-rw-r--r--src/vm/arm/cgencpu.h58
-rw-r--r--src/vm/arm/stubs.cpp61
-rw-r--r--src/vm/callhelpers.cpp2
-rw-r--r--src/vm/class.cpp5
-rw-r--r--src/vm/class.h8
-rw-r--r--src/vm/classnames.h21
-rw-r--r--src/vm/clrex.cpp6
-rw-r--r--src/vm/comcallablewrapper.cpp73
-rw-r--r--src/vm/comdelegate.cpp189
-rw-r--r--src/vm/cominterfacemarshaler.cpp152
-rw-r--r--src/vm/cominterfacemarshaler.h11
-rw-r--r--src/vm/commodule.cpp7
-rw-r--r--src/vm/comtoclrcall.cpp4
-rw-r--r--src/vm/comwaithandle.cpp2
-rw-r--r--src/vm/crossgencompile.cpp5
-rw-r--r--src/vm/dataimage.cpp99
-rw-r--r--src/vm/eeconfig.cpp9
-rw-r--r--src/vm/eeconfig.h14
-rw-r--r--src/vm/excep.cpp18
-rw-r--r--src/vm/field.cpp6
-rw-r--r--src/vm/field.h28
-rw-r--r--src/vm/finalizerthread.cpp2
-rw-r--r--src/vm/generics.cpp17
-rw-r--r--src/vm/i386/cgenx86.cpp2
-rw-r--r--src/vm/i386/excepx86.cpp6
-rw-r--r--src/vm/i386/jitinterfacex86.cpp8
-rw-r--r--src/vm/i386/stublinkerx86.cpp25
-rw-r--r--src/vm/i386/stublinkerx86.h65
-rw-r--r--src/vm/interopconverter.cpp38
-rw-r--r--src/vm/interopconverter.h13
-rw-r--r--src/vm/interoputil.cpp134
-rw-r--r--src/vm/interoputil.h10
-rw-r--r--src/vm/interpreter.cpp5
-rw-r--r--src/vm/invokeutil.cpp4
-rw-r--r--src/vm/jithelpers.cpp50
-rw-r--r--src/vm/jitinterface.cpp73
-rw-r--r--src/vm/marshalnative.cpp49
-rw-r--r--src/vm/marshalnative.h1
-rw-r--r--src/vm/memberload.cpp17
-rw-r--r--src/vm/method.cpp67
-rw-r--r--src/vm/method.hpp2
-rw-r--r--src/vm/methodtable.cpp65
-rw-r--r--src/vm/methodtable.h193
-rw-r--r--src/vm/methodtable.inl47
-rw-r--r--src/vm/multicorejit.h10
-rw-r--r--src/vm/object.cpp24
-rw-r--r--src/vm/object.h10
-rw-r--r--src/vm/precode.cpp47
-rw-r--r--src/vm/precode.h19
-rw-r--r--src/vm/prestub.cpp13
-rw-r--r--src/vm/proftoeeinterfaceimpl.cpp2
-rw-r--r--src/vm/rcwwalker.cpp2
-rw-r--r--src/vm/runtimecallablewrapper.cpp4
-rw-r--r--src/vm/stackwalk.cpp2
-rw-r--r--src/vm/stdinterfaces.cpp89
-rw-r--r--src/vm/stdinterfaces.h16
-rw-r--r--src/vm/stdinterfaces_internal.h20
-rw-r--r--src/vm/stdinterfaces_wrapper.cpp126
-rw-r--r--src/vm/stubhelpers.cpp2
-rw-r--r--src/vm/stubmgr.cpp71
-rw-r--r--src/vm/typehandle.cpp13
-rw-r--r--src/vm/typehandle.h2
-rw-r--r--src/vm/virtualcallstub.cpp12
67 files changed, 199 insertions, 2036 deletions
diff --git a/src/vm/amd64/cgenamd64.cpp b/src/vm/amd64/cgenamd64.cpp
index b770401891..25e0ba4aaa 100644
--- a/src/vm/amd64/cgenamd64.cpp
+++ b/src/vm/amd64/cgenamd64.cpp
@@ -863,7 +863,7 @@ EXTERN_C PCODE VirtualMethodFixupWorker(TransitionBlock * pTransitionBlock, CORC
_ASSERTE(pThisPtr != NULL);
VALIDATEOBJECT(pThisPtr);
- MethodTable * pMT = pThisPtr->GetTrueMethodTable();
+ MethodTable * pMT = pThisPtr->GetMethodTable();
WORD slotNumber = pThunk->slotNum;
_ASSERTE(slotNumber != (WORD)-1);
diff --git a/src/vm/amd64/cgencpu.h b/src/vm/amd64/cgencpu.h
index ab049a49e2..22ed3642b6 100644
--- a/src/vm/amd64/cgencpu.h
+++ b/src/vm/amd64/cgencpu.h
@@ -54,7 +54,6 @@ EXTERN_C void FastCallFinalizeWorker(Object *obj, PCODE funcPtr);
#define USE_INDIRECT_CODEHEADER // use CodeHeader, RealCodeHeader construct
#define HAS_NDIRECT_IMPORT_PRECODE 1
-//#define HAS_REMOTING_PRECODE 1 // TODO: Implement
#define HAS_FIXUP_PRECODE 1
#define HAS_FIXUP_PRECODE_CHUNKS 1
#define FIXUP_PRECODE_PREALLOCATE_DYNAMIC_METHOD_JUMP_STUBS 1
diff --git a/src/vm/appdomain.cpp b/src/vm/appdomain.cpp
index b95e216be7..a3a2602a30 100644
--- a/src/vm/appdomain.cpp
+++ b/src/vm/appdomain.cpp
@@ -1974,68 +1974,6 @@ MethodTable* AppDomain::GetLicenseInteropHelperMethodTable()
}
return m_pLicenseInteropHelperMT;
}
-
-COMorRemotingFlag AppDomain::GetComOrRemotingFlag()
-{
- CONTRACTL
- {
- NOTHROW;
- GC_TRIGGERS;
- MODE_ANY;
- }
- CONTRACTL_END;
-
- // 0. check if the value is already been set
- if (m_COMorRemotingFlag != COMorRemoting_NotInitialized)
- return m_COMorRemotingFlag;
-
- // 1. check whether the process is AppX
- if (AppX::IsAppXProcess())
- {
- // do not use Remoting in AppX
- m_COMorRemotingFlag = COMorRemoting_COM;
- return m_COMorRemotingFlag;
- }
-
- // 2. check the xml file
- m_COMorRemotingFlag = GetPreferComInsteadOfManagedRemotingFromConfigFile();
- if (m_COMorRemotingFlag != COMorRemoting_NotInitialized)
- {
- return m_COMorRemotingFlag;
- }
-
- // 3. check the global setting
- if (NULL != g_pConfig && g_pConfig->ComInsteadOfManagedRemoting())
- {
- m_COMorRemotingFlag = COMorRemoting_COM;
- }
- else
- {
- m_COMorRemotingFlag = COMorRemoting_Remoting;
- }
-
- return m_COMorRemotingFlag;
-}
-
-BOOL AppDomain::GetPreferComInsteadOfManagedRemoting()
-{
- WRAPPER_NO_CONTRACT;
-
- return (GetComOrRemotingFlag() == COMorRemoting_COM);
-}
-
-COMorRemotingFlag AppDomain::GetPreferComInsteadOfManagedRemotingFromConfigFile()
-{
- CONTRACTL
- {
- NOTHROW;
- GC_TRIGGERS;
- MODE_ANY;
- }
- CONTRACTL_END;
-
- return COMorRemoting_COM;
-}
#endif // FEATURE_COMINTEROP
#endif // CROSSGEN_COMPILE
@@ -3881,7 +3819,6 @@ AppDomain::AppDomain()
m_pRCWCache = NULL;
m_pRCWRefCache = NULL;
m_pLicenseInteropHelperMT = NULL;
- m_COMorRemotingFlag = COMorRemoting_NotInitialized;
memset(m_rpCLRTypes, 0, sizeof(m_rpCLRTypes));
#endif // FEATURE_COMINTEROP
diff --git a/src/vm/appdomain.hpp b/src/vm/appdomain.hpp
index 73639cccea..a443c8c962 100644
--- a/src/vm/appdomain.hpp
+++ b/src/vm/appdomain.hpp
@@ -75,17 +75,7 @@ extern INT64 g_PauseTime; // Total time in millisecond the CLR has been paused
#ifdef FEATURE_COMINTEROP
class ComCallWrapperCache;
struct SimpleComCallWrapper;
-
class RCWRefCache;
-
-// This enum is used to specify whether user want COM or remoting
-enum COMorRemotingFlag {
- COMorRemoting_NotInitialized = 0,
- COMorRemoting_COM = 1, // COM will be used both cross-domain and cross-runtime
- COMorRemoting_Remoting = 2, // Remoting will be used cross-domain; cross-runtime will use Remoting only if it looks like it's expected (default)
- COMorRemoting_LegacyMode = 3 // Remoting will be used both cross-domain and cross-runtime
-};
-
#endif // FEATURE_COMINTEROP
#ifdef _MSC_VER
@@ -2575,8 +2565,6 @@ public:
void RemoveWinRTFactoryObjects(LPVOID pCtxCookie);
MethodTable *LoadCOMClass(GUID clsid, BOOL bLoadRecord = FALSE, BOOL* pfAssemblyInReg = NULL);
- COMorRemotingFlag GetComOrRemotingFlag();
- BOOL GetPreferComInsteadOfManagedRemoting();
OBJECTREF GetMissingObject(); // DispatchInfo will call function to retrieve the Missing.Value object.
#endif // FEATURE_COMINTEROP
@@ -3020,7 +3008,6 @@ private:
EEClassFactoryInfoHashTable *m_pRefClassFactHash; // Hash table that maps a class factory info to a COM comp.
#ifdef FEATURE_COMINTEROP
DispIDCache *m_pRefDispIDCache;
- COMorRemotingFlag m_COMorRemotingFlag;
OBJECTHANDLE m_hndMissing; //Handle points to Missing.Value Object which is used for [Optional] arg scenario during IDispatch CCW Call
MethodTable* m_rpCLRTypes[WinMDAdapter::RedirectedTypeIndex_Count];
@@ -3176,7 +3163,6 @@ private:
EEClassFactoryInfoHashTable* SetupClassFactHash();
#ifdef FEATURE_COMINTEROP
DispIDCache* SetupRefDispIDCache();
- COMorRemotingFlag GetPreferComInsteadOfManagedRemotingFromConfigFile();
#endif // FEATURE_COMINTEROP
void InitializeDefaultDomainManager ();
diff --git a/src/vm/arm/cgencpu.h b/src/vm/arm/cgencpu.h
index 62891170c4..360cbe6b18 100644
--- a/src/vm/arm/cgencpu.h
+++ b/src/vm/arm/cgencpu.h
@@ -1333,64 +1333,6 @@ struct ThisPtrRetBufPrecode {
typedef DPTR(ThisPtrRetBufPrecode) PTR_ThisPtrRetBufPrecode;
-#ifdef HAS_REMOTING_PRECODE
-
-// Precode with embedded remoting interceptor
-struct RemotingPrecode {
-
- static const int Type = 0x02;
-
- // push {r1,lr}
- // ldr r1, [pc, #16] ; =m_pPrecodeRemotingThunk
- // blx r1
- // pop {r1,lr}
- // ldr pc, [pc, #12] ; =m_pLocalTarget
- // nop ; padding for alignment
- // dcd m_pMethodDesc
- // dcd m_pPrecodeRemotingThunk
- // dcd m_pLocalTarget
- WORD m_rgCode[8];
- TADDR m_pMethodDesc;
- TADDR m_pPrecodeRemotingThunk;
- TADDR m_pLocalTarget;
-
- void Init(MethodDesc* pMD, LoaderAllocator *pLoaderAllocator = NULL);
-
- TADDR GetMethodDesc()
- {
- LIMITED_METHOD_DAC_CONTRACT;
- return m_pMethodDesc;
- }
-
- PCODE GetTarget()
- {
- LIMITED_METHOD_DAC_CONTRACT;
- return m_pLocalTarget;
- }
-
- BOOL SetTargetInterlocked(TADDR target, TADDR expected)
- {
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- }
- CONTRACTL_END;
-
- EnsureWritableExecutablePages(&m_pLocalTarget);
- return FastInterlockCompareExchange((LONG*)&m_pLocalTarget, (LONG)target, (LONG)expected) == (LONG)expected;
- }
-
-#ifdef FEATURE_PREJIT
- void Fixup(DataImage *image, ZapNode *pCodeNode);
-#endif
-};
-typedef DPTR(RemotingPrecode) PTR_RemotingPrecode;
-
-EXTERN_C void PrecodeRemotingThunk();
-
-#endif // HAS_REMOTING_PRECODE
-
//**********************************************************************
// Miscellaneous
//**********************************************************************
diff --git a/src/vm/arm/stubs.cpp b/src/vm/arm/stubs.cpp
index d2ee3b7c3e..01d8f319d4 100644
--- a/src/vm/arm/stubs.cpp
+++ b/src/vm/arm/stubs.cpp
@@ -883,67 +883,6 @@ void ThisPtrRetBufPrecode::Init(MethodDesc* pMD, LoaderAllocator *pLoaderAllocat
}
-#ifdef HAS_REMOTING_PRECODE
-
-void RemotingPrecode::Init(MethodDesc* pMD, LoaderAllocator *pLoaderAllocator)
-{
- WRAPPER_NO_CONTRACT;
-
- int n = 0;
-
- m_rgCode[n++] = 0xb502; // push {r1,lr}
- m_rgCode[n++] = 0x4904; // ldr r1, [pc, #16] ; =m_pPrecodeRemotingThunk
- m_rgCode[n++] = 0x4788; // blx r1
- m_rgCode[n++] = 0xe8bd; // pop {r1,lr}
- m_rgCode[n++] = 0x4002;
- m_rgCode[n++] = 0xf8df; // ldr pc, [pc, #12] ; =m_pLocalTarget
- m_rgCode[n++] = 0xf00c;
- m_rgCode[n++] = 0xbf00; // nop ; padding for alignment
-
- _ASSERTE(n == _countof(m_rgCode));
-
- m_pMethodDesc = (TADDR)pMD;
- m_pPrecodeRemotingThunk = GetEEFuncEntryPoint(PrecodeRemotingThunk);
- m_pLocalTarget = GetPreStubEntryPoint();
-}
-
-#ifdef FEATURE_NATIVE_IMAGE_GENERATION
-void RemotingPrecode::Fixup(DataImage *image, ZapNode *pCodeNode)
-{
- WRAPPER_NO_CONTRACT;
-
- if (pCodeNode)
- image->FixupFieldToNode(this, offsetof(RemotingPrecode, m_pLocalTarget),
- pCodeNode,
- THUMB_CODE,
- IMAGE_REL_BASED_PTR);
- else
- image->FixupFieldToNode(this, offsetof(RemotingPrecode, m_pLocalTarget),
- image->GetHelperThunk(CORINFO_HELP_EE_PRESTUB),
- 0,
- IMAGE_REL_BASED_PTR);
-
- image->FixupFieldToNode(this, offsetof(RemotingPrecode, m_pPrecodeRemotingThunk),
- image->GetHelperThunk(CORINFO_HELP_EE_REMOTING_THUNK),
- 0,
- IMAGE_REL_BASED_PTR);
-
- image->FixupField(this, offsetof(RemotingPrecode, m_pMethodDesc),
- (void*)GetMethodDesc(),
- 0,
- IMAGE_REL_BASED_PTR);
-}
-#endif // FEATURE_NATIVE_IMAGE_GENERATION
-
-void CTPMethodTable::ActivatePrecodeRemotingThunk()
-{
- // Nothing to do for ARM version of remoting precode (we don't burn the TP MethodTable pointer into
- // PrecodeRemotingThunk directly).
-}
-
-#endif // HAS_REMOTING_PRECODE
-
-
#ifndef CROSSGEN_COMPILE
/*
Rough pseudo-code of interface dispatching:
diff --git a/src/vm/callhelpers.cpp b/src/vm/callhelpers.cpp
index b11f9d73e9..61d6865ff7 100644
--- a/src/vm/callhelpers.cpp
+++ b/src/vm/callhelpers.cpp
@@ -660,7 +660,7 @@ void CallDefaultConstructor(OBJECTREF ref)
}
CONTRACTL_END;
- MethodTable *pMT = ref->GetTrueMethodTable();
+ MethodTable *pMT = ref->GetMethodTable();
PREFIX_ASSUME(pMT != NULL);
diff --git a/src/vm/class.cpp b/src/vm/class.cpp
index 08d0015424..8c51e6384f 100644
--- a/src/vm/class.cpp
+++ b/src/vm/class.cpp
@@ -174,11 +174,6 @@ void EEClass::Destruct(MethodTable * pOwningMT)
delete pDelegateEEClass->m_pUMThunkMarshInfo;
}
- // We should never get here for thunking proxy because we do not destroy
- // default appdomain and mscorlib.dll module during shutdown
- _ASSERTE(!pOwningMT->IsTransparentProxy());
-
-
#ifdef FEATURE_COMINTEROP
if (GetSparseCOMInteropVTableMap() != NULL && !pOwningMT->IsZapped())
delete GetSparseCOMInteropVTableMap();
diff --git a/src/vm/class.h b/src/vm/class.h
index 608870efcd..34aac07e3e 100644
--- a/src/vm/class.h
+++ b/src/vm/class.h
@@ -880,11 +880,6 @@ public:
WRAPPER_NO_CONTRACT;
return IsTdSequentialLayout(GetAttrClass());
}
- BOOL IsSerializable()
- {
- WRAPPER_NO_CONTRACT;
- return IsTdSerializable(GetAttrClass());
- }
BOOL IsBeforeFieldInit()
{
WRAPPER_NO_CONTRACT;
@@ -1590,9 +1585,6 @@ public:
#endif // DACCESS_COMPILE
}
- // Cached class level reliability contract info, see ConstrainedExecutionRegion.cpp for details.
- DWORD GetReliabilityContract();
-
#if defined(UNIX_AMD64_ABI)
// Get number of eightbytes used by a struct passed in registers.
diff --git a/src/vm/classnames.h b/src/vm/classnames.h
index f62f4a8e19..f7b0ce7596 100644
--- a/src/vm/classnames.h
+++ b/src/vm/classnames.h
@@ -93,19 +93,13 @@
#define g_ExceptionClassName "System.Exception"
#define g_ExecutionEngineExceptionClassName "System.ExecutionEngineException"
-#define g_MarshalByRefObjectClassName "System.MarshalByRefObject"
-
#define g_ThreadStaticAttributeClassName "System.ThreadStaticAttribute"
-#define g_StringFreezingAttributeClassName "System.Runtime.CompilerServices.StringFreezingAttribute"
#define g_TypeIdentifierAttributeClassName "System.Runtime.InteropServices.TypeIdentifierAttribute"
#define g_ObjectClassName "System.Object"
#define g_ObjectName "Object"
#define g_OutOfMemoryExceptionClassName "System.OutOfMemoryException"
-#define g_PermissionTokenFactoryName "System.Security.PermissionTokenFactory"
-#define g_PolicyExceptionClassName "System.Security.Policy.PolicyException"
-
#define g_ReflectionClassName "System.RuntimeType"
#define g_ReflectionConstructorName "System.Reflection.RuntimeConstructorInfo"
#define g_ReflectionEventInfoName "System.Reflection.EventInfo"
@@ -134,7 +128,6 @@
#define g_RuntimeMethodHandleInternalName "RuntimeMethodHandleInternal"
#define g_RuntimeTypeHandleClassName "System.RuntimeTypeHandle"
-#define g_SecurityPermissionClassName "System.Security.Permissions.SecurityPermission"
#define g_StackOverflowExceptionClassName "System.StackOverflowException"
#define g_StringBufferClassName "System.Text.StringBuilder"
#define g_StringBufferName "StringBuilder"
@@ -143,7 +136,6 @@
#define g_SharedStaticsClassName "System.SharedStatics"
#define g_ThreadClassName "System.Threading.Thread"
-#define g_TransparentProxyName "__TransparentProxy"
#define g_TypeClassName "System.Type"
#define g_VariantClassName "System.Variant"
@@ -160,21 +152,8 @@
#define g_CompilerServicesTypeDependencyAttribute "System.Runtime.CompilerServices.TypeDependencyAttribute"
-#define g_SecurityCriticalAttribute "System.Security.SecurityCriticalAttribute"
-#define g_SecurityTransparentAttribute "System.Security.SecurityTransparentAttribute"
-
-#define g_SecuritySafeCriticalAttribute "System.Security.SecuritySafeCriticalAttribute"
-
-#if defined(FEATURE_CORESYSTEM)
-#define g_SecurityAPTCA "System.Security.AllowPartiallyTrustedCallersAttribute"
-#define g_SecurityPartialTrustVisibilityLevel "System.Security.PartialTrustVisibilityLevel"
-#define g_PartialTrustVisibilityLevel "PartialTrustVisibilityLevel"
-#endif // defined(FEATURE_CORESYSTEM)
-
#define g_ReferenceAssemblyAttribute "System.Runtime.CompilerServices.ReferenceAssemblyAttribute"
#define g_CriticalFinalizerObjectName "CriticalFinalizerObject"
-#define g_AssemblySignatureKeyAttribute "System.Reflection.AssemblySignatureKeyAttribute"
-
#endif //!__CLASSNAMES_H__
diff --git a/src/vm/clrex.cpp b/src/vm/clrex.cpp
index 930ac5d6d1..6b2878667b 100644
--- a/src/vm/clrex.cpp
+++ b/src/vm/clrex.cpp
@@ -1538,7 +1538,7 @@ OBJECTREF EEArgumentException::CreateThrowable()
MethodTable *pMT = MscorlibBinder::GetException(m_kind);
prot.pThrowable = AllocateObject(pMT);
- MethodDesc* pMD = MemberLoader::FindMethod(prot.pThrowable->GetTrueMethodTable(),
+ MethodDesc* pMD = MemberLoader::FindMethod(prot.pThrowable->GetMethodTable(),
COR_CTOR_METHOD_NAME, &gsig_IM_Str_Str_RetVoid);
if (!pMD)
@@ -1685,7 +1685,7 @@ OBJECTREF EETypeLoadException::CreateThrowable()
gc.pNewException = AllocateObject(pMT);
- MethodDesc* pMD = MemberLoader::FindMethod(gc.pNewException->GetTrueMethodTable(),
+ MethodDesc* pMD = MemberLoader::FindMethod(gc.pNewException->GetMethodTable(),
COR_CTOR_METHOD_NAME, &gsig_IM_Str_Str_Str_Int_RetVoid);
if (!pMD)
@@ -1879,7 +1879,7 @@ OBJECTREF EEFileLoadException::CreateThrowable()
gc.pFusLogString = StringObject::NewString(logText);
gc.pNewException = AllocateObject(MscorlibBinder::GetException(m_kind));
- MethodDesc* pMD = MemberLoader::FindMethod(gc.pNewException->GetTrueMethodTable(),
+ MethodDesc* pMD = MemberLoader::FindMethod(gc.pNewException->GetMethodTable(),
COR_CTOR_METHOD_NAME, &gsig_IM_Str_Str_Int_RetVoid);
if (!pMD)
diff --git a/src/vm/comcallablewrapper.cpp b/src/vm/comcallablewrapper.cpp
index 49802ff9d0..36208244a8 100644
--- a/src/vm/comcallablewrapper.cpp
+++ b/src/vm/comcallablewrapper.cpp
@@ -1811,11 +1811,6 @@ inline bool IsIDispatch(REFIID riid)
IS_KNOWN_INTERFACE_CONTRACT(IID_IDispatch);
RETURN IS_EQUAL_GUID(riid, 0x00020400,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
}
-inline bool IsIManagedObject(REFIID riid)
-{
- IS_KNOWN_INTERFACE_CONTRACT(IID_IManagedObject);
- RETURN IS_EQUAL_GUID(riid, 0xC3FCC19E,0xA970,0x11D2,0x8B,0x5A,0x00,0xA0,0xC9,0xB7,0xC9,0xC4);
-}
inline bool IsGUID_NULL(REFIID riid)
{
IS_KNOWN_INTERFACE_CONTRACT(GUID_NULL);
@@ -1854,7 +1849,6 @@ IUnknown* SimpleComCallWrapper::QIStandardInterface(REFIID riid)
// IID_IDispatchEx A6EF9860-C720-11d0-9337-00A0C90DCAA9
// IID_IProvideClassInfo B196B283-BAB4-101A-B69C-00AA00341D07
// IID_IConnectionPointContainer B196B284-BAB4-101A-B69C-00AA00341D07
- // IID_IManagedObject c3fcc19e-a970-11d2-8b5a-00a0c9b7c9c4
// IID_IObjectSafety CB5BDC81-93C1-11cf-8F20-00805F2CD064
// IID_ISupportErrorInfo DF0B3D60-548F-101B-8E65-08002B2BD119
// IID_IStringable.................96369F54-8EB6-48f0-ABCE-C1B211E627C3
@@ -1900,17 +1894,6 @@ IUnknown* SimpleComCallWrapper::QIStandardInterface(REFIID riid)
}
break;
- CASE_IID_INLINE( enum_IManagedObject ,0xc3fcc19e,0xa970,0x11d2,0x8b,0x5a,0x00,0xa0,0xc9,0xb7,0xc9,0xc4) // hit2, below, !=
- {
- // Check whether the type of the object wrapped by this CCW is exported to WinRT. This is the only
- // case where we are sure that it's not a classic COM interop scenario and we can fail the QI for
- // IManagedObject. Otherwise check the AppDomain setting.
- MethodTable *pClassMT = GetMethodTable();
- if (!pClassMT->IsExportedToWinRT() && !pClassMT->IsWinRTObjectType() && GetAppDomain()->GetPreferComInsteadOfManagedRemoting() == FALSE)
- RETURN QIStandardInterface(enum_IManagedObject);
- }
- break;
-
CASE_IID_INLINE( enum_IAgileObject ,0x94ea2b94,0xe9cc,0x49e0,0xc0,0xff,0xee,0x64,0xca,0x8f,0x5b,0x90)
{
// Don't implement IAgileObject if we are aggregated, if the object explicitly implements IMarshal, or if its ICustomQI returns
@@ -2873,7 +2856,7 @@ IUnknown* ComCallWrapper::GetBasicIP(bool inspectionOnly)
// when QIing for IUnknown or IDispatch.
// Whidbey Tactics has decided to make this opt-in rather than
// opt-out for now. Remove the check for the legacy switch.
- if ((g_pConfig == NULL || !g_pConfig->NewComVTableLayout()) && GetComCallWrapperTemplate()->SupportsIClassX())
+ if (GetComCallWrapperTemplate()->SupportsIClassX())
RETURN GetIClassXIP(inspectionOnly);
ComCallWrapper *pWrap = this;
@@ -3335,7 +3318,7 @@ MethodTable * ComCallWrapper::GetMethodTableOfObjectRef()
CONTRACTL_END;
GCX_COOP();
- return GetObjectRef()->GetTrueMethodTable();
+ return GetObjectRef()->GetMethodTable();
}
// static
@@ -3486,22 +3469,6 @@ IUnknown* ComCallWrapper::GetComIPFromCCW(ComCallWrapper *pWrap, REFIID riid, Me
// We don't do visibility checks on IUnknown.
RETURN pWrap->GetIDispatchIP();
}
- if (IsIManagedObject(riid))
- {
- // If we are aggregated and somehow the aggregator delegated a QI on
- // IManagedObject to us, fail the request so we don't accidently get a
- // COM+ caller linked directly to us.
- if (!pWrap->IsObjectTP() && pWrap->GetSimpleWrapper()->GetOuter() != NULL)
- RETURN NULL;
-
- if (pIntfMT == NULL)
- {
- SimpleComCallWrapper* pSimpleWrap = pWrap->GetSimpleWrapper();
- IUnknown * pIntf = pSimpleWrap->QIStandardInterface(riid);
- if (pIntf)
- RETURN pIntf;
- }
- }
signed imapIndex = -1;
if (pIntfMT == NULL)
@@ -5495,10 +5462,10 @@ BOOL ComCallWrapperTemplate::IsSafeTypeForMarshalling()
{
CONTRACTL
{
- NOTHROW;
- GC_TRIGGERS;
- MODE_PREEMPTIVE;
-}
+ NOTHROW;
+ GC_TRIGGERS;
+ MODE_PREEMPTIVE;
+ }
CONTRACTL_END;
if (m_flags & enum_IsSafeTypeForMarshalling)
@@ -6428,23 +6395,19 @@ void ComCallWrapperTemplate::DetermineComVisibility()
m_flags &= (~enum_InvisibleParent);
- // If the config switch is set, we ignore this.
- if ((g_pConfig == NULL) || (g_pConfig->LegacyComHierarchyVisibility() == FALSE))
- {
- // If there are no parents...leave it as false.
- if (m_pParent == NULL)
- return;
+ // If there are no parents...leave it as false.
+ if (m_pParent == NULL)
+ return;
- // If our parent has an invisible parent
- if (m_pParent->HasInvisibleParent())
- {
- m_flags |= enum_InvisibleParent;
- }
- // If our parent is invisible
- else if (!IsTypeVisibleFromCom(m_pParent->m_thClass))
- {
- m_flags |= enum_InvisibleParent;
- }
+ // If our parent has an invisible parent
+ if (m_pParent->HasInvisibleParent())
+ {
+ m_flags |= enum_InvisibleParent;
+ }
+ // If our parent is invisible
+ else if (!IsTypeVisibleFromCom(m_pParent->m_thClass))
+ {
+ m_flags |= enum_InvisibleParent;
}
}
diff --git a/src/vm/comdelegate.cpp b/src/vm/comdelegate.cpp
index 6d7c256147..124ebc4c6d 100644
--- a/src/vm/comdelegate.cpp
+++ b/src/vm/comdelegate.cpp
@@ -702,7 +702,7 @@ FCIMPL5(FC_BOOL_RET, COMDelegate::BindToMethodName,
// performance gain in some reflection emit scenarios.
MethodTable::AllowMethodDataCaching();
- TypeHandle targetType((gc.target != NULL) ? gc.target->GetTrueMethodTable() : NULL);
+ TypeHandle targetType((gc.target != NULL) ? gc.target->GetMethodTable() : NULL);
// get the invoke of the delegate
MethodTable * pDelegateType = gc.refThis->GetMethodTable();
MethodDesc* pInvokeMeth = COMDelegate::FindDelegateInvokeMethod(pDelegateType);
@@ -1630,13 +1630,10 @@ FCIMPL3(PCODE, COMDelegate::AdjustTarget, Object* refThisUNSAFE, Object* targetU
_ASSERTE(refThis);
_ASSERTE(method);
-
- MethodTable *pRealMT = target->GetTrueMethodTable();
MethodTable *pMT = target->GetMethodTable();
- _ASSERTE((NULL == pMT) || pMT->IsTransparentProxy() || !pRealMT->IsContextful());
- MethodDesc *pMeth = Entry2MethodDesc(method, pRealMT);
+ MethodDesc *pMeth = Entry2MethodDesc(method, pMT);
_ASSERTE(pMeth);
_ASSERTE(!pMeth->IsStatic());
@@ -1650,45 +1647,42 @@ FCIMPL3(PCODE, COMDelegate::AdjustTarget, Object* refThisUNSAFE, Object* targetU
isComObject = pMTTarg->IsComObjectType();
#endif // FEATURE_COMINTEROP
- if (!pMT->IsTransparentProxy())
- {
- MethodDesc *pCorrectedMethod = pMeth;
+ MethodDesc *pCorrectedMethod = pMeth;
- if (pMTMeth != pMTTarg)
+ if (pMTMeth != pMTTarg)
+ {
+ //They cast to an interface before creating the delegate, so we now need
+ //to figure out where this actually lives before we continue.
+ //<TODO>@perf: Grovelling with a signature is really slow. Speed this up.</TODO>
+ if (pCorrectedMethod->IsInterface())
{
- //They cast to an interface before creating the delegate, so we now need
- //to figure out where this actually lives before we continue.
- //<TODO>@perf: Grovelling with a signature is really slow. Speed this up.</TODO>
- if (pCorrectedMethod->IsInterface())
+ // No need to resolve the interface based method desc to a class based
+ // one for COM objects because we invoke directly thru the interface MT.
+ if (!isComObject)
{
- // No need to resolve the interface based method desc to a class based
- // one for COM objects because we invoke directly thru the interface MT.
- if (!isComObject)
- {
- // <TODO>it looks like we need to pass an ownerType in here.
- // Why can we take a delegate to an interface method anyway? </TODO>
- //
- pCorrectedMethod = pMTTarg->FindDispatchSlotForInterfaceMD(pCorrectedMethod).GetMethodDesc();
- _ASSERTE(pCorrectedMethod != NULL);
- }
+ // <TODO>it looks like we need to pass an ownerType in here.
+ // Why can we take a delegate to an interface method anyway? </TODO>
+ //
+ pCorrectedMethod = pMTTarg->FindDispatchSlotForInterfaceMD(pCorrectedMethod).GetMethodDesc();
+ _ASSERTE(pCorrectedMethod != NULL);
}
}
+ }
- // Use the Unboxing stub for value class methods, since the value
- // class is constructed using the boxed instance.
- if (pMTTarg->IsValueType() && !pCorrectedMethod->IsUnboxingStub())
- {
- // those should have been ruled out at jit time (code:COMDelegate::GetDelegateCtor)
- _ASSERTE((pMTMeth != g_pValueTypeClass) && (pMTMeth != g_pObjectClass));
- pCorrectedMethod->CheckRestore();
- pCorrectedMethod = pMTTarg->GetBoxedEntryPointMD(pCorrectedMethod);
- _ASSERTE(pCorrectedMethod != NULL);
- }
+ // Use the Unboxing stub for value class methods, since the value
+ // class is constructed using the boxed instance.
+ if (pMTTarg->IsValueType() && !pCorrectedMethod->IsUnboxingStub())
+ {
+ // those should have been ruled out at jit time (code:COMDelegate::GetDelegateCtor)
+ _ASSERTE((pMTMeth != g_pValueTypeClass) && (pMTMeth != g_pObjectClass));
+ pCorrectedMethod->CheckRestore();
+ pCorrectedMethod = pMTTarg->GetBoxedEntryPointMD(pCorrectedMethod);
+ _ASSERTE(pCorrectedMethod != NULL);
+ }
- if (pMeth != pCorrectedMethod)
- {
- method = pCorrectedMethod->GetMultiCallableAddrOfCode();
- }
+ if (pMeth != pCorrectedMethod)
+ {
+ method = pCorrectedMethod->GetMultiCallableAddrOfCode();
}
HELPER_METHOD_FRAME_END();
@@ -1733,22 +1727,15 @@ FCIMPL3(void, COMDelegate::DelegateConstruct, Object* refThisUNSAFE, Object* tar
_ASSERTE(isMemoryReadable(method, 1));
MethodTable *pMTTarg = NULL;
- MethodTable *pRealMT = NULL;
if (gc.target != NULL)
{
pMTTarg = gc.target->GetMethodTable();
- pRealMT = gc.target->GetTrueMethodTable();
}
- MethodDesc *pMethOrig = Entry2MethodDesc(method, pRealMT);
+ MethodDesc *pMethOrig = Entry2MethodDesc(method, pMTTarg);
MethodDesc *pMeth = pMethOrig;
- //
- // If target is a contextful class, then it must be a proxy
- //
- _ASSERTE((NULL == pMTTarg) || pMTTarg->IsTransparentProxy() || !pRealMT->IsContextful());
-
MethodTable* pDelMT = gc.refThis->GetMethodTable();
LOG((LF_STUBS, LL_INFO1000, "In DelegateConstruct: for delegate type %s binding to method %s::%s%s, static = %d\n",
@@ -1816,7 +1803,6 @@ FCIMPL3(void, COMDelegate::DelegateConstruct, Object* refThisUNSAFE, Object* tar
{
gc.refThis->SetMethodPtrAux(method);
}
-
}
else
{
@@ -1834,76 +1820,73 @@ FCIMPL3(void, COMDelegate::DelegateConstruct, Object* refThisUNSAFE, Object* tar
#ifdef FEATURE_COMINTEROP
isComObject = pMTTarg->IsComObjectType();
#endif // FEATURE_COMINTEROP
-
- if (!pMTTarg->IsTransparentProxy())
+
+ if (pMTMeth != pMTTarg)
{
- if (pMTMeth != pMTTarg)
+ // They cast to an interface before creating the delegate, so we now need
+ // to figure out where this actually lives before we continue.
+ // <TODO>@perf: We whould never be using this path to invoke on an interface -
+ // that should always be resolved when we are creating the delegate </TODO>
+ if (pMeth->IsInterface())
{
- // They cast to an interface before creating the delegate, so we now need
- // to figure out where this actually lives before we continue.
- // <TODO>@perf: We whould never be using this path to invoke on an interface -
- // that should always be resolved when we are creating the delegate </TODO>
- if (pMeth->IsInterface())
+ // No need to resolve the interface based method desc to a class based
+ // one for COM objects because we invoke directly thru the interface MT.
+ if (!isComObject)
{
- // No need to resolve the interface based method desc to a class based
- // one for COM objects because we invoke directly thru the interface MT.
- if (!isComObject)
+ // <TODO>it looks like we need to pass an ownerType in here.
+ // Why can we take a delegate to an interface method anyway? </TODO>
+ //
+ MethodDesc * pDispatchSlotMD = pMTTarg->FindDispatchSlotForInterfaceMD(pMeth).GetMethodDesc();
+ if (pDispatchSlotMD == NULL)
+ {
+ COMPlusThrow(kArgumentException, W("Arg_DlgtTargMeth"));
+ }
+
+ if (pMeth->HasMethodInstantiation())
+ {
+ pMeth = MethodDesc::FindOrCreateAssociatedMethodDesc(
+ pDispatchSlotMD,
+ pMTTarg,
+ (!pDispatchSlotMD->IsStatic() && pMTTarg->IsValueType()),
+ pMeth->GetMethodInstantiation(),
+ FALSE /* allowInstParam */);
+ }
+ else
{
- // <TODO>it looks like we need to pass an ownerType in here.
- // Why can we take a delegate to an interface method anyway? </TODO>
- //
- MethodDesc * pDispatchSlotMD = pMTTarg->FindDispatchSlotForInterfaceMD(pMeth).GetMethodDesc();
- if (pDispatchSlotMD == NULL)
- {
- COMPlusThrow(kArgumentException, W("Arg_DlgtTargMeth"));
- }
-
- if (pMeth->HasMethodInstantiation())
- {
- pMeth = MethodDesc::FindOrCreateAssociatedMethodDesc(
- pDispatchSlotMD,
- pMTTarg,
- (!pDispatchSlotMD->IsStatic() && pMTTarg->IsValueType()),
- pMeth->GetMethodInstantiation(),
- FALSE /* allowInstParam */);
- }
- else
- {
- pMeth = pDispatchSlotMD;
- }
+ pMeth = pDispatchSlotMD;
}
}
}
+ }
- g_IBCLogger.LogMethodTableAccess(pMTTarg);
+ g_IBCLogger.LogMethodTableAccess(pMTTarg);
- // Use the Unboxing stub for value class methods, since the value
- // class is constructed using the boxed instance.
- //
- // <NICE> We could get the JIT to recognise all delegate creation sequences and
- // ensure the thing is always an BoxedEntryPointStub anyway </NICE>
+ // Use the Unboxing stub for value class methods, since the value
+ // class is constructed using the boxed instance.
+ //
+ // <NICE> We could get the JIT to recognise all delegate creation sequences and
+ // ensure the thing is always an BoxedEntryPointStub anyway </NICE>
- if (pMTMeth->IsValueType() && !pMeth->IsUnboxingStub())
- {
- // If these are Object/ValueType.ToString().. etc,
- // don't need an unboxing Stub.
+ if (pMTMeth->IsValueType() && !pMeth->IsUnboxingStub())
+ {
+ // If these are Object/ValueType.ToString().. etc,
+ // don't need an unboxing Stub.
- if ((pMTMeth != g_pValueTypeClass)
- && (pMTMeth != g_pObjectClass))
- {
- pMeth->CheckRestore();
- pMeth = pMTTarg->GetBoxedEntryPointMD(pMeth);
- _ASSERTE(pMeth != NULL);
- }
- }
- // Only update the code address if we've decided to go to a different target...
- // <NICE> We should make sure the code address that the JIT provided to us is always the right one anyway,
- // so we don't have to do all this mucking about. </NICE>
- if (pMeth != pMethOrig)
+ if ((pMTMeth != g_pValueTypeClass)
+ && (pMTMeth != g_pObjectClass))
{
- method = pMeth->GetMultiCallableAddrOfCode();
+ pMeth->CheckRestore();
+ pMeth = pMTTarg->GetBoxedEntryPointMD(pMeth);
+ _ASSERTE(pMeth != NULL);
}
}
+ // Only update the code address if we've decided to go to a different target...
+ // <NICE> We should make sure the code address that the JIT provided to us is always the right one anyway,
+ // so we don't have to do all this mucking about. </NICE>
+ if (pMeth != pMethOrig)
+ {
+ method = pMeth->GetMultiCallableAddrOfCode();
+ }
}
if (gc.target == NULL)
@@ -1997,7 +1980,7 @@ MethodDesc *COMDelegate::GetMethodDesc(OBJECTREF orDelegate)
OBJECTREF orThis = thisDel->GetTarget();
if (orThis!=NULL)
{
- pMT = orThis->GetTrueMethodTable();
+ pMT = orThis->GetMethodTable();
}
pMethodHandle = Entry2MethodDesc(code, pMT);
diff --git a/src/vm/cominterfacemarshaler.cpp b/src/vm/cominterfacemarshaler.cpp
index 4a74ddd4d4..a206222d85 100644
--- a/src/vm/cominterfacemarshaler.cpp
+++ b/src/vm/cominterfacemarshaler.cpp
@@ -5,9 +5,6 @@
// File: ComInterfaceMarshaler.cpp
//
-//
-
-
#include "common.h"
#include "vars.hpp"
@@ -40,13 +37,10 @@ COMInterfaceMarshaler::COMInterfaceMarshaler()
m_pWrapperCache = RCWCache::GetRCWCache();
_ASSERTE(m_pWrapperCache);
-
+
m_pUnknown = NULL;
m_pIdentity = NULL;
- m_pIManaged = NULL;
-
- INDEBUG(m_fFlagsInited = false;)
- m_fIsRemote = false;
+
m_fIReference = false;
m_fIReferenceArray = false;
m_fNonRCWType = false;
@@ -70,13 +64,6 @@ COMInterfaceMarshaler::~COMInterfaceMarshaler()
MODE_ANY;
}
CONTRACTL_END;
-
- if (m_pIManaged)
- {
- ULONG cbRef = SafeRelease(m_pIManaged);
- LogInteropRelease(m_pIManaged, cbRef, "COMInterfaceMarshaler::~COMInterfaceMarshaler: Releasing IManaged interface");
- m_pIManaged = NULL;
- }
}
//--------------------------------------------------------------------------------
@@ -117,74 +104,6 @@ VOID COMInterfaceMarshaler::Init(IUnknown* pUnk, MethodTable* pClassMT, Thread *
}
}
-//--------------------------------------------------------------------------------
-// VOID COMInterfaceMarshaler::InitializeFlags()
-//--------------------------------------------------------------------------------
-VOID COMInterfaceMarshaler::InitializeFlags()
-{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- MODE_ANY;
- PRECONDITION(false == m_fFlagsInited);
- PRECONDITION(NULL == m_pIManaged);
- }
- CONTRACTL_END;
-
- HRESULT hr = S_OK;
-
- if (SupportsIInspectable() || GetAppDomain()->GetPreferComInsteadOfManagedRemoting())
- {
- // User has set flag / disable IManagedObject check or we know that the object supports IInspectable
- // so COM remoting will be used. We have to be careful here and only use the CF_SupportsIInspectable
- // flag that came in statically. All managed objects support IInspectable so performing the check
- // after CF_SupportsIInspectable has been updated based on QI(IID_IInspectable) would break classic
- // managed <-> managed COM interop scenarios.
- hr = E_NOINTERFACE;
- }
-
-
- if (SUCCEEDED(hr))
- {
- hr = SafeQueryInterface(m_pUnknown, IID_IManagedObject, (IUnknown**)&m_pIManaged);
- LogInteropQI(m_pUnknown, IID_IManagedObject, hr, "COMInterfaceMarshaler::InitializeFlags: QI for IManagedObject");
- }
-
- if (hr == S_OK)
- {
- _ASSERTE(m_pIManaged);
- BSTRHolder bstrProcessGUID;
-
- {
- GCX_PREEMP();
-
- INT_PTR pCCW;
- IfFailThrow(m_pIManaged->GetObjectIdentity(&bstrProcessGUID, (int*)&m_dwServerDomainId, (CCW_PTR)&pCCW));
-
- // we may get back a pointer-sized value but only the lower 32-bits are guaranteed to be valid and
- // contain syncblock index of the managed object
- m_dwServerSyncBlockIndex = (DWORD)pCCW;
- }
-
- // if hr2 != S_OK then we throw an exception
- // coz GetProcessID shouldn't fail..
- // one reason where it fails is JIT Activation of the object
- // failed
- _ASSERTE(bstrProcessGUID != NULL);
-
- // compare the strings to check if this is in-proc
- BSTR processGuid = GetProcessGUID();
-
- if (NULL == processGuid)
- ThrowOutOfMemory();
-
- m_fIsRemote = (wcscmp((WCHAR *)bstrProcessGUID, processGuid) != 0);
- }
-
- INDEBUG(m_fFlagsInited = true;)
-}
-
// Returns true if the type is WinRT-redirected and requires special marshaler functionality
// to convert an interface pointer to its corresponding managed instance.
static bool IsRedirectedToNonRCWType(MethodTable *pMT)
@@ -240,7 +159,7 @@ VOID COMInterfaceMarshaler::InitializeObjectClass(IUnknown *pIncomingIP)
// If we are not in an APPX process, and an object could have a strongly typed RCW as a COM CoClass,
// we prefer that to the WinRT class.This preserves compatibility for exisitng code.
// If we are in an APPX process we do not check for IProvideClassInfo.
- if (m_typeHandle.IsNull() && !AppX::IsAppXProcess() && !m_fIsRemote)
+ if (m_typeHandle.IsNull() && !AppX::IsAppXProcess())
{
EX_TRY
{
@@ -332,7 +251,6 @@ OBJECTREF COMInterfaceMarshaler::GetCCWObject()
THROWS;
GC_NOTRIGGER;
MODE_COOPERATIVE;
- PRECONDITION(!m_fIsRemote);
}
CONTRACTL_END;
@@ -350,37 +268,6 @@ OBJECTREF COMInterfaceMarshaler::GetCCWObject()
return oref;
}
-//--------------------------------------------------------------------
-// OBJECTREF COMInterfaceMarshaler::HandleInProcManagedComponents()
-//--------------------------------------------------------------------
-OBJECTREF COMInterfaceMarshaler::HandleInProcManagedComponent()
-{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- MODE_COOPERATIVE;
- PRECONDITION(!m_fIsRemote);
- }
- CONTRACTL_END;
-
- AppDomain* pCurrDomain = m_pThread->GetDomain();
-
- OBJECTREF oref = NULL;
- if (m_dwServerDomainId == pCurrDomain->GetId())
- {
- oref = GetCCWObject();
- }
- else
- {
- _ASSERTE(!"NYI");
- COMPlusThrowHR(COR_E_NOTSUPPORTED);
- }
-
- return oref;
-}
-
-
//--------------------------------------------------------------------------------
// void COMInterfaceMarshaler::CreateObjectRef(BOOL fDuplicate, OBJECTREF *pComObj)
// Creates an RCW of the proper type.
@@ -930,25 +817,6 @@ void COMInterfaceMarshaler::MarshalToNonRCWType(OBJECTREF *poref)
GCPROTECT_END();
}
-
-// OBJECTREF COMInterfaceMarshaler::HandleTPComponents()
-//--------------------------------------------------------------------------------
-
-OBJECTREF COMInterfaceMarshaler::HandleTPComponents()
-{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- MODE_COOPERATIVE;
- PRECONDITION(CheckPointer(m_pIManaged));
- }
- CONTRACTL_END;
-
-
- return NULL;
-}
-
//--------------------------------------------------------------------------------
// OBJECTREF COMInterfaceMarshaler::FindOrCreateObjectRef()
// Find the wrapper for this COM IP, might have to create one if not found.
@@ -1035,20 +903,6 @@ OBJECTREF COMInterfaceMarshaler::FindOrCreateObjectRefInternal(IUnknown **ppInco
}
// (II)
- // Initialize all our flags
- // this should setup all the info we need
- InitializeFlags();
-
- // (III)
- // check for IManaged interface
- if (m_pIManaged)
- {
- oref = HandleTPComponents();
- if (oref != NULL)
- return oref;
- }
-
- // (IV)
// okay let us create a wrapper and an instance for this IUnknown
// Find a suitable class to instantiate the instance
diff --git a/src/vm/cominterfacemarshaler.h b/src/vm/cominterfacemarshaler.h
index ee7ef74c52..9ad7cac993 100644
--- a/src/vm/cominterfacemarshaler.h
+++ b/src/vm/cominterfacemarshaler.h
@@ -51,8 +51,6 @@ public:
_ASSERTE(pCallback != NULL);
m_pCallback = pCallback;
}
-
- VOID InitializeFlags();
VOID InitializeObjectClass(IUnknown *pIncomingIP);
@@ -68,10 +66,6 @@ public:
private:
OBJECTREF GetCCWObject();
- OBJECTREF HandleInProcManagedComponent();
- OBJECTREF HandleTPComponents();
- OBJECTREF GetObjectForRemoteManagedComponent();
- OBJECTREF GetObjectForRemoteManagedComponentNoThrow();
OBJECTREF FindOrCreateObjectRefInternal(IUnknown **ppIncomingIP, MethodTable *pIncomingItfMT, bool bIncomingIPAddRefed);
VOID CreateObjectRef(BOOL fDuplicate, OBJECTREF *pComObj, IUnknown **ppIncomingIP, MethodTable *pIncomingItfMT, bool bIncomingIPAddRefed);
@@ -89,11 +83,8 @@ private:
IUnknown* m_pIdentity; // NOT AddRef'ed
TypeHandle m_typeHandle; // inited and computed if inited value is NULL. Need to represent all array information too.
TypeHandle m_itfTypeHandle; // an interface supported by the object as returned from GetRuntimeClassName
- IManagedObject* m_pIManaged; // AddRef'ed - computed info
Thread* m_pThread; // Current thread - avoid calling GetThread multiple times
-
- INDEBUG(bool m_fFlagsInited;)
- bool m_fIsRemote;
+
bool m_fIReference; // Is this an IReference<T> (ie, a WinRT "boxed" value type)
bool m_fIReferenceArray; // Is this an IReferenceArray<T> (ie, an array wrapped in a WinRT interface)
bool m_fNonRCWType; // Is this redirected to a non-RCW CLR type
diff --git a/src/vm/commodule.cpp b/src/vm/commodule.cpp
index 235b02a8ed..4d63e0c26f 100644
--- a/src/vm/commodule.cpp
+++ b/src/vm/commodule.cpp
@@ -1081,13 +1081,6 @@ Object* GetTypesInner(Module* pModule)
pMT = curClass.GetMethodTable();
PREFIX_ASSUME(pMT != NULL);
- if (pMT->IsTransparentProxy())
- {
- // Don't expose transparent proxy
- _ASSERTE(bSystemAssembly);
- continue;
- }
-
// Get the COM+ Class object
OBJECTREF refCurClass = pMT->GetManagedClassObject();
_ASSERTE("GetManagedClassObject failed." && refCurClass != NULL);
diff --git a/src/vm/comtoclrcall.cpp b/src/vm/comtoclrcall.cpp
index df1ba64a8e..5c275f025e 100644
--- a/src/vm/comtoclrcall.cpp
+++ b/src/vm/comtoclrcall.cpp
@@ -356,8 +356,8 @@ OBJECTREF COMToCLRGetObjectAndTarget_Virtual(ComCallWrapper * pWrap, MethodDesc
OBJECTREF pObject = pWrap->GetObjectRef();
MethodTable *pMT = pObject->GetMethodTable();
-
- if (pMT->IsTransparentProxy() || pRealMD->IsInterface())
+
+ if (pRealMD->IsInterface())
{
// For transparent proxies, we need to call on the interface method desc if
// this method represents an interface method and not an IClassX method.
diff --git a/src/vm/comwaithandle.cpp b/src/vm/comwaithandle.cpp
index 5e63ce21da..527d6c352a 100644
--- a/src/vm/comwaithandle.cpp
+++ b/src/vm/comwaithandle.cpp
@@ -88,8 +88,6 @@ void AcquireSafeHandleFromWaitHandle(WAITHANDLEREF wh)
PRECONDITION(wh != NULL);
} CONTRACTL_END;
- _ASSERTE(!wh->IsTransparentProxy());
-
SAFEHANDLEREF sh = wh->GetSafeHandle();
if (sh == NULL)
COMPlusThrow(kObjectDisposedException);
diff --git a/src/vm/crossgencompile.cpp b/src/vm/crossgencompile.cpp
index ce36eec1ab..cd45e1f1be 100644
--- a/src/vm/crossgencompile.cpp
+++ b/src/vm/crossgencompile.cpp
@@ -235,11 +235,6 @@ ClassID TypeHandleToClassID(TypeHandle th)
// Stubed-out implementations of functions that can do anything useful only when we are actually running managed code
//
-MethodTable *Object::GetTrueMethodTable()
-{
- UNREACHABLE();
-}
-
FuncPtrStubs::FuncPtrStubs()
: m_hashTableCrst(CrstFuncPtrStubs, CRST_UNSAFE_ANYMODE)
{
diff --git a/src/vm/dataimage.cpp b/src/vm/dataimage.cpp
index cea29a32ed..1abd57677f 100644
--- a/src/vm/dataimage.cpp
+++ b/src/vm/dataimage.cpp
@@ -1293,92 +1293,6 @@ public:
};
#endif // HAS_NDIRECT_IMPORT_PRECODE
-#ifdef HAS_REMOTING_PRECODE
-class ZapRemotingPrecode : public ZapNode
-{
- MethodDesc * m_pMD;
- DataImage::ItemKind m_kind;
- BOOL m_fIsPrebound;
-
-public:
- ZapRemotingPrecode(MethodDesc * pMethod, DataImage::ItemKind kind, BOOL fIsPrebound)
- : m_pMD(pMethod), m_kind(kind), m_fIsPrebound(fIsPrebound)
- {
- }
-
- virtual DWORD GetSize()
- {
- return sizeof(RemotingPrecode);
- }
-
- virtual UINT GetAlignment()
- {
- return PRECODE_ALIGNMENT;
- }
-
- virtual ZapNodeType GetType()
- {
- return NodeTypeForItemKind(m_kind);
- }
-
- virtual DWORD ComputeRVA(ZapWriter * pZapWriter, DWORD dwPos)
- {
- dwPos = AlignUp(dwPos, GetAlignment());
-
- // Alignment for straddlers
- if (AlignmentTrim(dwPos + offsetof(RemotingPrecode, m_pMethodDesc), RELOCATION_PAGE_SIZE) > RELOCATION_PAGE_SIZE - sizeof(TADDR))
- dwPos += GetAlignment();
-
- SetRVA(dwPos);
-
- dwPos += GetSize();
-
- return dwPos;
- }
-
- virtual void Save(ZapWriter * pZapWriter)
- {
- ZapImage * pImage = ZapImage::GetImage(pZapWriter);
-
- RemotingPrecode precode;
-
- precode.Init(m_pMD);
-
- SSIZE_T offset;
- ZapNode * pNode = pImage->m_pDataImage->GetNodeForStructure(m_pMD, &offset);
- pImage->WriteReloc(&precode, offsetof(RemotingPrecode, m_pMethodDesc),
- pNode, offset, IMAGE_REL_BASED_PTR);
-
- pImage->WriteReloc(&precode, offsetof(RemotingPrecode, m_callRel32),
- pImage->GetHelperThunk(CORINFO_HELP_EE_REMOTING_THUNK), 0, IMAGE_REL_BASED_REL32);
-
- if (m_fIsPrebound)
- {
- pImage->WriteReloc(&precode, offsetof(RemotingPrecode, m_rel32),
- pImage->m_pDataImage->GetCodeAddress(m_pMD), 0, IMAGE_REL_BASED_REL32);
- }
- else
- {
- pImage->WriteReloc(&precode, offsetof(RemotingPrecode, m_rel32),
- pImage->GetHelperThunk(CORINFO_HELP_EE_PRESTUB), 0, IMAGE_REL_BASED_REL32);
- }
-
- pZapWriter->Write(&precode, sizeof(precode));
- }
-
- BOOL IsPrebound(ZapImage * pImage)
- {
- // This will make sure that when IBC logging is on, the precode goes thru prestub.
- if (GetAppDomain()->ToCompilationDomain()->m_fForceInstrument)
- return FALSE;
-
- // Prebind the remoting precode if possible
- return pImage->m_pDataImage->CanDirectCall(m_pMD, CORINFO_ACCESS_THIS);
- }
-
-};
-#endif // HAS_REMOTING_PRECODE
-
void DataImage::SavePrecode(PVOID ptr, MethodDesc * pMD, PrecodeType t, ItemKind kind, BOOL fIsPrebound)
{
ZapNode * pNode = NULL;
@@ -1396,19 +1310,6 @@ void DataImage::SavePrecode(PVOID ptr, MethodDesc * pMD, PrecodeType t, ItemKind
break;
#endif // HAS_NDIRECT_IMPORT_PRECODE
-#ifdef HAS_REMOTING_PRECODE
- case PRECODE_REMOTING:
- pNode = new (GetHeap()) ZapRemotingPrecode(pMD, kind, fIsPrebound);
-
- GetHelperThunk(CORINFO_HELP_EE_REMOTING_THUNK);
-
- if (!fIsPrebound)
- {
- GetHelperThunk(CORINFO_HELP_EE_PRESTUB);
- }
- break;
-#endif // HAS_REMOTING_PRECODE
-
default:
_ASSERTE(!"Unexpected precode type");
break;
diff --git a/src/vm/eeconfig.cpp b/src/vm/eeconfig.cpp
index 0b3e413a0e..f48ba439f5 100644
--- a/src/vm/eeconfig.cpp
+++ b/src/vm/eeconfig.cpp
@@ -222,9 +222,6 @@ HRESULT EEConfig::Init()
fLegacyNullReferenceExceptionPolicy = false;
fLegacyUnhandledExceptionPolicy = false;
- fLegacyComHierarchyVisibility = false;
- fLegacyComVTableLayout = false;
- fNewComVTableLayout = false;
#ifdef FEATURE_CORRUPTING_EXCEPTIONS
// By default, there is not pre-V4 CSE policy
@@ -347,9 +344,6 @@ HRESULT EEConfig::Init()
testThreadAbort = 0;
#endif
-#ifdef FEATURE_COMINTEROP
- m_fComInsteadOfManagedRemoting = false;
-#endif
m_fInteropValidatePinnedObjects = false;
m_fInteropLogArguments = false;
@@ -1177,9 +1171,6 @@ HRESULT EEConfig::sync()
#endif //_DEBUG
-#ifdef FEATURE_COMINTEROP
- m_fComInsteadOfManagedRemoting = (CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_ComInsteadOfManagedRemoting) != 0);
-#endif // FEATURE_COMINTEROP
m_fInteropValidatePinnedObjects = (CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_InteropValidatePinnedObjects) != 0);
m_fInteropLogArguments = (CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_InteropLogArguments) != 0);
diff --git a/src/vm/eeconfig.h b/src/vm/eeconfig.h
index 68f160edea..2c6622faa2 100644
--- a/src/vm/eeconfig.h
+++ b/src/vm/eeconfig.h
@@ -321,18 +321,11 @@ public:
bool LegacyNullReferenceExceptionPolicy(void) const {LIMITED_METHOD_CONTRACT; return fLegacyNullReferenceExceptionPolicy; }
bool LegacyUnhandledExceptionPolicy(void) const {LIMITED_METHOD_CONTRACT; return fLegacyUnhandledExceptionPolicy; }
- bool LegacyComHierarchyVisibility(void) const {LIMITED_METHOD_CONTRACT; return fLegacyComHierarchyVisibility; }
- bool LegacyComVTableLayout(void) const {LIMITED_METHOD_CONTRACT; return fLegacyComVTableLayout; }
- bool NewComVTableLayout(void) const {LIMITED_METHOD_CONTRACT; return fNewComVTableLayout; }
-
#ifdef FEATURE_CORRUPTING_EXCEPTIONS
// Returns a bool to indicate if the legacy CSE (pre-v4) behaviour is enabled or not
bool LegacyCorruptedStateExceptionsPolicy(void) const {LIMITED_METHOD_CONTRACT; return fLegacyCorruptedStateExceptionsPolicy; }
#endif // FEATURE_CORRUPTING_EXCEPTIONS
-#ifdef FEATURE_COMINTEROP
- bool ComInsteadOfManagedRemoting() const {LIMITED_METHOD_CONTRACT; return m_fComInsteadOfManagedRemoting; }
-#endif //FEATURE_COMINTEROP
bool InteropValidatePinnedObjects() const { LIMITED_METHOD_CONTRACT; return m_fInteropValidatePinnedObjects; }
bool InteropLogArguments() const { LIMITED_METHOD_CONTRACT; return m_fInteropLogArguments; }
@@ -865,10 +858,6 @@ private: //----------------------------------------------------------------
bool fLegacyCorruptedStateExceptionsPolicy;
#endif // FEATURE_CORRUPTING_EXCEPTIONS
- bool fLegacyComHierarchyVisibility; // Old behavior allowing QIs for classes with invisible parents
- bool fLegacyComVTableLayout; // Old behavior passing out IClassX interface for IUnknown and IDispatch.
- bool fNewComVTableLayout; // New behavior passing out Basic interface for IUnknown and IDispatch.
-
LPUTF8 pszBreakOnClassLoad; // Halt just before loading this class
#ifdef TEST_DATA_CONSISTENCY
@@ -879,9 +868,6 @@ private: //----------------------------------------------------------------
// the environment variable TestDataConsistency
#endif
-#ifdef FEATURE_COMINTEROP
- bool m_fComInsteadOfManagedRemoting; // When communicating with a cross app domain CCW, use COM instead of managed remoting.
-#endif
bool m_fInteropValidatePinnedObjects; // After returning from a M->U interop call, validate GC heap around objects pinned by IL stubs.
bool m_fInteropLogArguments; // Log all pinned arguments passed to an interop call
diff --git a/src/vm/excep.cpp b/src/vm/excep.cpp
index 6577f6a194..86e771c93c 100644
--- a/src/vm/excep.cpp
+++ b/src/vm/excep.cpp
@@ -2265,7 +2265,7 @@ void StackTraceInfo::SaveStackTrace(BOOL bAllowAllocMem, OBJECTHANDLE hThrowable
_ASSERTE(! bSkipLastElement || ! bReplaceStack);
bool fSuccess = false;
- MethodTable* pMT = ObjectFromHandle(hThrowable)->GetTrueMethodTable();
+ MethodTable* pMT = ObjectFromHandle(hThrowable)->GetMethodTable();
// Check if the flag indicating foreign exception raise has been setup or not,
// and then reset it so that subsequent processing of managed frames proceeds
@@ -2751,7 +2751,7 @@ VOID DECLSPEC_NORETURN RaiseTheException(OBJECTREF throwable, BOOL rethrow
STATIC_CONTRACT_MODE_COOPERATIVE;
LOG((LF_EH, LL_INFO100, "RealCOMPlusThrow throwing %s\n",
- throwable->GetTrueMethodTable()->GetDebugClassName()));
+ throwable->GetMethodTable()->GetDebugClassName()));
if (throwable == NULL)
{
@@ -2837,7 +2837,7 @@ HRESULT GetHRFromThrowable(OBJECTREF throwable)
STATIC_CONTRACT_MODE_ANY;
HRESULT hr = E_FAIL;
- MethodTable *pMT = throwable->GetTrueMethodTable();
+ MethodTable *pMT = throwable->GetMethodTable();
// Only Exception objects have a HResult field
// So don't fetch the field unless we have an exception
@@ -2909,7 +2909,7 @@ VOID DECLSPEC_NORETURN RaiseTheExceptionInternalOnly(OBJECTREF throwable, BOOL r
#ifdef _DEBUG
// If ThreadAbort exception is thrown, the thread should be marked with AbortRequest.
// If not, we may see unhandled exception.
- if (param.throwable->GetTrueMethodTable() == g_pThreadAbortExceptionClass)
+ if (param.throwable->GetMethodTable() == g_pThreadAbortExceptionClass)
{
_ASSERTE(GetThread()->IsAbortRequested()
#ifdef _TARGET_X86_
@@ -3821,7 +3821,7 @@ BOOL IsExceptionOfType(RuntimeExceptionKind reKind, OBJECTREF *pThrowable)
if (*pThrowable == NULL)
return FALSE;
- MethodTable *pThrowableMT = (*pThrowable)->GetTrueMethodTable();
+ MethodTable *pThrowableMT = (*pThrowable)->GetMethodTable();
// IsExceptionOfType is supported for mscorlib exception types only
_ASSERTE(reKind <= kLastExceptionInMscorlib);
@@ -4767,7 +4767,7 @@ BOOL UpdateCurrentThrowable(PEXCEPTION_RECORD pExceptionRecord)
// to inspect the thread to see what the throwable is on an unhandled
// exception.. (but clearly it needs to be fixed asap)
// We have the same problem in EEPolicy::LogFatalError().
- LOG((LF_EH, LL_INFO100, "UpdateCurrentThrowable: setting throwable to %s\n", (oThrowable == NULL) ? "NULL" : oThrowable->GetTrueMethodTable()->GetDebugClassName()));
+ LOG((LF_EH, LL_INFO100, "UpdateCurrentThrowable: setting throwable to %s\n", (oThrowable == NULL) ? "NULL" : oThrowable->GetMethodTable()->GetDebugClassName()));
pThread->SafeSetThrowables(oThrowable);
#endif // WIN64EXCEPTIONS
}
@@ -5557,8 +5557,8 @@ DefaultCatchHandler(PEXCEPTION_POINTERS pExceptionPointers,
#endif
GCPROTECT_BEGIN(throwable);
- //BOOL IsStackOverflow = (throwable->GetTrueMethodTable() == g_pStackOverflowExceptionClass);
- BOOL IsOutOfMemory = (throwable->GetTrueMethodTable() == g_pOutOfMemoryExceptionClass);
+ //BOOL IsStackOverflow = (throwable->GetMethodTable() == g_pStackOverflowExceptionClass);
+ BOOL IsOutOfMemory = (throwable->GetMethodTable() == g_pOutOfMemoryExceptionClass);
// Notify the AppDomain that we have taken an unhandled exception. Can't notify of stack overflow -- guard
// page is not yet reset.
@@ -5765,7 +5765,7 @@ BOOL NotifyAppDomainsOfUnhandledException(
#endif
GCPROTECT_BEGIN(throwable);
- //BOOL IsStackOverflow = (throwable->GetTrueMethodTable() == g_pStackOverflowExceptionClass);
+ //BOOL IsStackOverflow = (throwable->GetMethodTable() == g_pStackOverflowExceptionClass);
// Notify the AppDomain that we have taken an unhandled exception. Can't notify of stack overflow -- guard
// page is not yet reset.
diff --git a/src/vm/field.cpp b/src/vm/field.cpp
index 4c4d89a670..443ada6689 100644
--- a/src/vm/field.cpp
+++ b/src/vm/field.cpp
@@ -386,12 +386,6 @@ void FieldDesc::SetInstanceField(OBJECTREF o, const VOID * pInVal)
}
CONTRACTL_END
-
- // Check whether we are setting a field value on a proxy or a marshalbyref
- // class. If so, then ask remoting services to set the value on the
- // instance
-
-
#ifdef _DEBUG
//
// assert that o is derived from MT of enclosing class
diff --git a/src/vm/field.h b/src/vm/field.h
index a09b4050fa..eb304f2e1c 100644
--- a/src/vm/field.h
+++ b/src/vm/field.h
@@ -759,34 +759,6 @@ public:
return IsFdPrivate(GetFieldProtection());
}
- BOOL IsNotSerialized()
- {
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- SO_TOLERANT;
- MODE_ANY;
- }
- CONTRACTL_END;
-
- MethodTable *pMT = GetApproxEnclosingMethodTable();
- if (pMT->IsSerializable() && !IsStatic())
- return pMT->IsFieldNotSerialized(pMT->GetIndexForFieldDesc(this));
- return IsFdNotSerialized(GetAttributes());
- }
-
- // Only safe to call this for non-static fields on serializable types.
- BOOL IsOptionallySerialized()
- {
- WRAPPER_NO_CONTRACT;
-
- _ASSERTE(!IsStatic() && GetApproxEnclosingMethodTable()->IsSerializable());
-
- MethodTable *pMT = GetApproxEnclosingMethodTable();
- return pMT->IsFieldOptionallySerialized(pMT->GetIndexForFieldDesc(this));
- }
-
IMDInternalImport *GetMDImport()
{
LIMITED_METHOD_DAC_CONTRACT;
diff --git a/src/vm/finalizerthread.cpp b/src/vm/finalizerthread.cpp
index 9e2e8d06e2..271e91bcfc 100644
--- a/src/vm/finalizerthread.cpp
+++ b/src/vm/finalizerthread.cpp
@@ -91,7 +91,7 @@ void CallFinalizer(Object* obj)
{
_ASSERTE(obj->GetMethodTable() == pMT);
- _ASSERTE(pMT->HasFinalizer() || pMT->IsTransparentProxy());
+ _ASSERTE(pMT->HasFinalizer());
LogFinalization(obj);
MethodTable::CallFinalizer(obj);
diff --git a/src/vm/generics.cpp b/src/vm/generics.cpp
index 5e972d7a9b..06cde91394 100644
--- a/src/vm/generics.cpp
+++ b/src/vm/generics.cpp
@@ -453,23 +453,6 @@ ClassLoader::CreateTypeHandleForNonCanonicalGenericInstantiation(
// All flags on m_pNgenPrivateData data apart
// are initially false for a dynamically generated instantiation.
- //
- // Last time this was checked this included
- // enum_flag_RemotingConfigChecked
- // enum_flag_RequiresManagedActivation
- // enum_flag_Unrestored
- // enum_flag_CriticalTypePrepared
-#ifdef FEATURE_PREJIT
- // enum_flag_NGEN_IsFixedUp
- // enum_flag_NGEN_NeedsRestoreCached
- // enum_flag_NGEN_NeedsRestore
-#endif // FEATURE_PREJIT
-
- if (pOldMT->RequiresManagedActivation())
- {
- // Will also set enum_flag_RemotingConfigChecked
- pMT->SetRequiresManagedActivation();
- }
if (fContainsGenericVariables)
pMT->SetContainsGenericVariables();
diff --git a/src/vm/i386/cgenx86.cpp b/src/vm/i386/cgenx86.cpp
index c3f76c8b52..43604ebffb 100644
--- a/src/vm/i386/cgenx86.cpp
+++ b/src/vm/i386/cgenx86.cpp
@@ -1553,7 +1553,7 @@ EXTERN_C PVOID STDCALL VirtualMethodFixupWorker(Object * pThisPtr, CORCOMPILE_V
_ASSERTE(pThisPtr != NULL);
VALIDATEOBJECT(pThisPtr);
- MethodTable * pMT = pThisPtr->GetTrueMethodTable();
+ MethodTable * pMT = pThisPtr->GetMethodTable();
WORD slotNumber = pThunk->slotNum;
_ASSERTE(slotNumber != (WORD)-1);
diff --git a/src/vm/i386/excepx86.cpp b/src/vm/i386/excepx86.cpp
index d4079f4f00..97b4087797 100644
--- a/src/vm/i386/excepx86.cpp
+++ b/src/vm/i386/excepx86.cpp
@@ -757,7 +757,7 @@ CPFH_RealFirstPassHandler( // ExceptionContinueSearch, etc.
const char * eClsName = "!EXCEPTION_COMPLUS";
if (e != 0)
{
- eClsName = e->GetTrueMethodTable()->GetDebugClassName();
+ eClsName = e->GetMethodTable()->GetDebugClassName();
}
LOG((LF_EH, LL_INFO100, "CPFH_RealFirstPassHandler: exception: 0x%08X, class: '%s', IP: 0x%p\n",
exceptionCode, eClsName, pContext ? GetIP(pContext) : NULL));
@@ -2516,7 +2516,7 @@ StackWalkAction COMPlusThrowCallback( // SWA value
if (throwable != NULL)
{
throwable = PossiblyUnwrapThrowable(throwable, pCf->GetAssembly());
- thrownType = TypeHandle(throwable->GetTrueMethodTable());
+ thrownType = TypeHandle(throwable->GetMethodTable());
}
}
@@ -2893,7 +2893,7 @@ StackWalkAction COMPlusUnwindCallback (CrawlFrame *pCf, ThrowCallbackType *pData
if (throwable != NULL)
{
throwable = PossiblyUnwrapThrowable(throwable, pCf->GetAssembly());
- thrownType = TypeHandle(throwable->GetTrueMethodTable());
+ thrownType = TypeHandle(throwable->GetMethodTable());
}
}
#ifdef DEBUGGING_SUPPORTED
diff --git a/src/vm/i386/jitinterfacex86.cpp b/src/vm/i386/jitinterfacex86.cpp
index 58294ff3e7..7be22f79a5 100644
--- a/src/vm/i386/jitinterfacex86.cpp
+++ b/src/vm/i386/jitinterfacex86.cpp
@@ -368,14 +368,6 @@ HCIMPL1(Object*, AllocObjectWrapper, MethodTable *pMT)
HCIMPLEND
/*********************************************************************/
-// This is a frameless helper for allocating an object whose type derives
-// from marshalbyref. We check quickly to see if it is configured to
-// have remote activation. If not, we use the superfast allocator to
-// allocate the object. Otherwise, we take the slow path of allocating
-// the object via remoting services.
-
-
-/*********************************************************************/
extern "C" void* g_TailCallFrameVptr;
void* g_TailCallFrameVptr;
diff --git a/src/vm/i386/stublinkerx86.cpp b/src/vm/i386/stublinkerx86.cpp
index ac5006eb8f..7dfa083532 100644
--- a/src/vm/i386/stublinkerx86.cpp
+++ b/src/vm/i386/stublinkerx86.cpp
@@ -6577,31 +6577,6 @@ void NDirectImportPrecode::Init(MethodDesc* pMD, LoaderAllocator *pLoaderAllocat
#endif // HAS_NDIRECT_IMPORT_PRECODE
-#ifdef HAS_REMOTING_PRECODE
-
-void RemotingPrecode::Init(MethodDesc* pMD, LoaderAllocator *pLoaderAllocator /* = NULL */)
-{
- WRAPPER_NO_CONTRACT;
-
- IN_WIN64(m_movR10 = X86_INSTR_MOV_R10_IMM64); // mov r10, pMethodDesc
- IN_WIN32(m_movEAX = X86_INSTR_MOV_EAX_IMM32); // mov eax, pMethodDesc
- m_pMethodDesc = (TADDR)pMD;
- m_type = PRECODE_REMOTING; // nop
- m_call = X86_INSTR_CALL_REL32;
- m_jmp = X86_INSTR_JMP_REL32; // jmp rel32
-
- if (pLoaderAllocator != NULL)
- {
- m_callRel32 = rel32UsingJumpStub(&m_callRel32,
- GetEEFuncEntryPoint(PrecodeRemotingThunk), NULL /* pMD */, pLoaderAllocator);
- m_rel32 = rel32UsingJumpStub(&m_rel32,
- GetPreStubEntryPoint(), NULL /* pMD */, pLoaderAllocator);
- }
-}
-
-#endif // HAS_REMOTING_PRECODE
-
-
#ifdef HAS_FIXUP_PRECODE
void FixupPrecode::Init(MethodDesc* pMD, LoaderAllocator *pLoaderAllocator, int iMethodDescChunkIndex /*=0*/, int iPrecodeChunkIndex /*=0*/)
{
diff --git a/src/vm/i386/stublinkerx86.h b/src/vm/i386/stublinkerx86.h
index 44bfc79fd2..31bc10460b 100644
--- a/src/vm/i386/stublinkerx86.h
+++ b/src/vm/i386/stublinkerx86.h
@@ -601,71 +601,6 @@ typedef DPTR(NDirectImportPrecode) PTR_NDirectImportPrecode;
#endif // HAS_NDIRECT_IMPORT_PRECODE
-#ifdef HAS_REMOTING_PRECODE
-
-// Precode with embedded remoting interceptor
-struct RemotingPrecode {
-
-#ifdef _WIN64
- static const int Type = XXX; // NYI
- // mov r10,pMethodDesc
- // call PrecodeRemotingThunk
- // jmp Prestub/Stub/NativeCode
-#else
- static const int Type = 0x90;
- // mov eax,pMethodDesc
- // nop
- // call PrecodeRemotingThunk
- // jmp Prestub/Stub/NativeCode
-#endif // _WIN64
-
- IN_WIN64(USHORT m_movR10;)
- IN_WIN32(BYTE m_movEAX;)
- TADDR m_pMethodDesc;
- BYTE m_type;
- BYTE m_call;
- INT32 m_callRel32;
- BYTE m_jmp;
- INT32 m_rel32;
-
- void Init(MethodDesc* pMD, LoaderAllocator *pLoaderAllocator = NULL);
-
- TADDR GetMethodDesc()
- {
- LIMITED_METHOD_CONTRACT;
- SUPPORTS_DAC;
-
- return m_pMethodDesc;
- }
-
- PCODE GetTarget()
- {
- LIMITED_METHOD_DAC_CONTRACT;
-
- return rel32Decode(PTR_HOST_MEMBER_TADDR(RemotingPrecode, this, m_rel32));
- }
-
- BOOL SetTargetInterlocked(TADDR target, TADDR expected)
- {
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- }
- CONTRACTL_END;
-
- EnsureWritableExecutablePages(&m_rel32);
- return rel32SetInterlocked(&m_rel32, target, expected, (MethodDesc*)GetMethodDesc());
- }
-};
-IN_WIN64(static_assert_no_msg(offsetof(RemotingPrecode, m_movR10) == OFFSETOF_PRECODE_TYPE);)
-IN_WIN64(static_assert_no_msg(offsetof(RemotingPrecode, m_type) == OFFSETOF_PRECODE_TYPE_MOV_R10);)
-IN_WIN32(static_assert_no_msg(offsetof(RemotingPrecode, m_type) == OFFSETOF_PRECODE_TYPE);)
-typedef DPTR(RemotingPrecode) PTR_RemotingPrecode;
-
-#endif // HAS_REMOTING_PRECODE
-
-
#ifdef HAS_FIXUP_PRECODE
// Fixup precode is used in ngen images when the prestub does just one time fixup.
diff --git a/src/vm/interopconverter.cpp b/src/vm/interopconverter.cpp
index e98d4addc9..c681023bc9 100644
--- a/src/vm/interopconverter.cpp
+++ b/src/vm/interopconverter.cpp
@@ -21,42 +21,6 @@
#include "winrttypenameconverter.h"
#include "typestring.h"
-struct MshlPacket
-{
- DWORD size;
-};
-
-// if the object we are creating is a proxy to another appdomain, want to create the wrapper for the
-// new object in the appdomain of the proxy target
-IUnknown* GetIUnknownForMarshalByRefInServerDomain(OBJECTREF* poref)
-{
- CONTRACT (IUnknown*)
- {
- THROWS;
- GC_TRIGGERS;
- MODE_COOPERATIVE;
- PRECONDITION(CheckPointer(poref));
- PRECONDITION((*poref)->GetTrueMethodTable()->IsMarshaledByRef());
- POSTCONDITION(CheckPointer(RETVAL));
- }
- CONTRACT_END;
-
- Context *pContext = NULL;
-
-
- if (pContext == NULL)
- pContext = GetCurrentContext();
-
- _ASSERTE(pContext->GetDomain() == GetCurrentContext()->GetDomain());
-
- CCWHolder pWrap = ComCallWrapper::InlineGetWrapper(poref);
-
- IUnknown* pUnk = ComCallWrapper::GetComIPFromCCW(pWrap, IID_IUnknown, NULL);
-
- RETURN pUnk;
-}
-
-
//--------------------------------------------------------------------------------
// IUnknown *GetComIPFromObjectRef(OBJECTREF *poref, MethodTable *pMT, ...)
// Convert ObjectRef to a COM IP, based on MethodTable* pMT.
@@ -595,7 +559,7 @@ void GetObjectRefFromComIP(OBJECTREF* pObjOut, IUnknown **ppUnk, MethodTable *pM
StackSString ssObjClsName;
StackSString ssDestClsName;
- (*pObjOut)->GetTrueMethodTable()->_GetFullyQualifiedNameForClass(ssObjClsName);
+ (*pObjOut)->GetMethodTable()->_GetFullyQualifiedNameForClass(ssObjClsName);
pMTClass->_GetFullyQualifiedNameForClass(ssDestClsName);
COMPlusThrow(kInvalidCastException, IDS_EE_CANNOTCAST,
diff --git a/src/vm/interopconverter.h b/src/vm/interopconverter.h
index 21368dd8a3..4464330a8b 100644
--- a/src/vm/interopconverter.h
+++ b/src/vm/interopconverter.h
@@ -111,19 +111,6 @@ enum ComIpType
//--------------------------------------------------------------------------------
-// GetIUnknownForMarshalByRefInServerDomain
-// setup a CCW for Transparent proxy/marshalbyref in the server domain
-// either the object is in-proc & the domains match, or its out-of proc
-// and we don't care about appdomains
-IUnknown* GetIUnknownForMarshalByRefInServerDomain(OBJECTREF* poref);
-
-//--------------------------------------------------------------------------------
-// GetIUnknownForTransparentProxy
-// delegates the call to the managed implementation in the real proxy
-
-IUnknown* GetIUnknownForTransparentProxy(OBJECTREF* poref, BOOL fIsBeingMarshalled);
-
-//--------------------------------------------------------------------------------
// IUnknown *GetComIPFromObjectRef(OBJECTREF *poref, MethodTable *pMT, ...);
// Convert ObjectRef to a COM IP, based on MethodTable* pMT.
IUnknown *GetComIPFromObjectRef(OBJECTREF *poref, MethodTable *pMT, BOOL bSecurityCheck = TRUE, BOOL bEnableCustomizedQueryInterface = TRUE);
diff --git a/src/vm/interoputil.cpp b/src/vm/interoputil.cpp
index cc3f0ec071..094b5f31d6 100644
--- a/src/vm/interoputil.cpp
+++ b/src/vm/interoputil.cpp
@@ -533,19 +533,6 @@ BOOL IsManagedObject(IUnknown *pIUnknown)
// We found an existing CCW hence this is a managed exception.
return TRUE;
}
-
- // QI IManagedObject. Note AppX doesn't support IManagedObject
- if (!AppX::IsAppXProcess())
- {
- SafeComHolder<IManagedObject> pManagedObject = NULL;
- HRESULT hrLocal = SafeQueryInterface(pIUnknown, IID_IManagedObject, (IUnknown**)&pManagedObject);
- LogInteropQI(pIUnknown, IID_IManagedObject, hrLocal, "QI to determine if IErrorInfo is a managed exception");
- if(SUCCEEDED(hrLocal))
- {
- return TRUE;
- }
-
- }
return FALSE;
}
@@ -1615,7 +1602,7 @@ BOOL CanCastComObject(OBJECTREF obj, MethodTable * pTargetMT)
}
else
{
- return obj->GetTrueMethodTable()->CanCastToClass(pTargetMT);
+ return obj->GetMethodTable()->CanCastToClass(pTargetMT);
}
}
@@ -2050,51 +2037,6 @@ HRESULT SafeQueryInterfacePreemp(IUnknown* pUnk, REFIID riid, IUnknown** pResUnk
#ifdef FEATURE_COMINTEROP
-// process unique GUID, every process has a unique GUID
-static Volatile<BSTR> bstrProcessGUID = NULL;
-
-// Global process GUID to identify the process
-BSTR GetProcessGUID()
-{
- CONTRACT (BSTR)
- {
- NOTHROW;
- GC_NOTRIGGER;
- MODE_ANY;
- POSTCONDITION(CheckPointer(RETVAL, NULL_OK));
- }
- CONTRACT_END;
-
- // See if we were beaten to it.
- if (bstrProcessGUID.Load() == NULL)
- {
- // setup a process unique GUID
- GUID processGUID = GUID_NULL;
- HRESULT hr = CoCreateGuid(&processGUID);
- _ASSERTE(hr == S_OK);
- if (hr != S_OK)
- RETURN NULL;
-
- // This is a global memory alloc that will live as long as the process.
- NewArrayHolder<WCHAR> guidstr = new (nothrow) WCHAR[48];
- if (!guidstr)
- RETURN NULL;
-
- int cbLen = GuidToLPWSTR (processGUID, guidstr, 46);
- _ASSERTE(cbLen <= 46);
-
- // Save this new stub on the DelegateEEClass.
- if (FastInterlockCompareExchangePointer(bstrProcessGUID.GetPointer(), guidstr.GetValue(), NULL ) == NULL)
- {
- guidstr.SuppressRelease();
- }
-
- }
-
- RETURN bstrProcessGUID;
-}
-
-
#ifndef CROSSGEN_COMPILE
//--------------------------------------------------------------------------------
@@ -2230,7 +2172,7 @@ NOINLINE ComCallWrapper* GetCCWFromIUnknown_CrossDomain(IUnknown* pUnk, ComCallW
// We ignore PreferComInsteadOfManagedRemoting/ICustomQueryInterface if the CCW is from
// the current domain (we never create RCWs pointing to CCWs in the same domain).
- if (pDomain && pDomain->GetPreferComInsteadOfManagedRemoting())
+ if (pDomain)
{
return NULL;
}
@@ -4014,7 +3956,7 @@ BOOL IsComTargetValidForType(REFLECTCLASSBASEREF* pRefClassObj, OBJECTREF* pTarg
MethodTable* pInvokedMT = (*pRefClassObj)->GetType().GetMethodTable();
- MethodTable* pTargetMT = (*pTarget)->GetTrueMethodTable();
+ MethodTable* pTargetMT = (*pTarget)->GetMethodTable();
_ASSERTE(pTargetMT);
PREFIX_ASSUME(pInvokedMT != NULL);
@@ -6636,7 +6578,7 @@ void UnmarshalObjectFromInterface(OBJECTREF *ppObjectDest, IUnknown **ppUnkSrc,
// We only verify that the object supports the interface for non-WinRT scenarios because we
// believe that the likelihood of improperly constructed programs is significantly lower
// with WinRT and the Object::SupportsInterface check is very expensive.
- if (!(*ppObjectDest)->IsTransparentProxy() && !Object::SupportsInterface(*ppObjectDest, pItfMT))
+ if (!Object::SupportsInterface(*ppObjectDest, pItfMT))
{
COMPlusThrowInvalidCastException(ppObjectDest, TypeHandle(pItfMT));
}
@@ -6832,74 +6774,6 @@ TypeHandle GetClassFromIInspectable(IUnknown* pUnk, bool *pfSupportsIInspectable
RETURN classTypeHandle;
}
-//--------------------------------------------------------------------------
-// switch objects for this wrapper
-// used by JIT&ObjectPooling to ensure a deactivated CCW can point to a new object
-// during reactivate
-//--------------------------------------------------------------------------
-BOOL ReconnectWrapper(OBJECTREF* pOldRef, OBJECTREF* pNewRef)
-{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- MODE_COOPERATIVE;
- PRECONDITION(CheckPointer(pOldRef));
- PRECONDITION(CheckPointer(pNewRef));
- }
- CONTRACTL_END;
-
- if (!(*pOldRef)->IsTransparentProxy())
- {
- COMPlusThrowArgumentException(W("oldtp"), W("Argument_NotATP"));
- }
- else if (!(*pNewRef)->IsTransparentProxy())
- {
- COMPlusThrowArgumentException(W("newtp"), W("Argument_NotATP"));
- }
-
- _ASSERTE((*pOldRef)->GetTrueMethodTable() == (*pNewRef)->GetTrueMethodTable());
-
- // grab the sync block for the current object
- SyncBlock* pOldSyncBlock = (*pOldRef)->GetSyncBlock();
- _ASSERTE(pOldSyncBlock);
-
- // get the wrapper for the old object
- InteropSyncBlockInfo* pInteropInfo = pOldSyncBlock->GetInteropInfo();
- ComCallWrapper* pCCW = pInteropInfo->GetCCW();
- if (pCCW == NULL)
- COMPlusThrowArgumentException(W("oldtp"), W("Argument_NoUnderlyingCCW"));
-
- // get the syncblock for the new object and allocate an InteropSyncBlockInfo structure
- SyncBlock* pNewSyncBlock = (*pNewRef)->GetSyncBlock();
- _ASSERTE(pNewSyncBlock != NULL);
-
- NewHolder<InteropSyncBlockInfo> pNewInteropInfo = new InteropSyncBlockInfo();
- bool check = pNewSyncBlock->SetInteropInfo(pNewInteropInfo);
-
- //
- // Now we switch
- //
-
- // First, prevent the old object from getting to the CCW
- pInteropInfo->SetCCW(NULL);
-
- // Next, point the CCW at the new object
- StoreObjectInHandle(pCCW->GetObjectHandle(), (*pNewRef));
-
- // Finally, point the new object at the CCW
- pNewSyncBlock->GetInteropInfo()->SetCCW(pCCW);
-
- // store other information about the new server
- SimpleComCallWrapper* pSimpleWrap = pCCW->GetSimpleWrapper();
- _ASSERTE(pSimpleWrap);
- pSimpleWrap->ReInit(pNewSyncBlock);
-
- if (check)
- pNewInteropInfo.SuppressRelease();
-
- return TRUE;
-}
ABI::Windows::Foundation::IUriRuntimeClass *CreateWinRTUri(LPCWSTR wszUri, INT32 cchUri)
{
diff --git a/src/vm/interoputil.h b/src/vm/interoputil.h
index 50abc39791..02c0a9b792 100644
--- a/src/vm/interoputil.h
+++ b/src/vm/interoputil.h
@@ -457,16 +457,6 @@ TypeHandle GetClassFromIInspectable(IUnknown* pUnk, bool *pfSupportsIInspectable
// Build a WinRT URI for a given raw URI
ABI::Windows::Foundation::IUriRuntimeClass *CreateWinRTUri(LPCWSTR wszUri, INT32 cchUri);
-// Global process GUID to identify the process
-BSTR GetProcessGUID();
-
-//--------------------------------------------------------------------------
- // switch objects for this wrapper
-// used by JIT&ObjectPooling to ensure a deactivated CCW can point to a new object
-// during reactivate
-//--------------------------------------------------------------------------
-BOOL ReconnectWrapper(OBJECTREF* pOldRef, OBJECTREF* pNewRef);
-
// Generates GUIDs for parameterized WinRT types.
class WinRTGuidGenerator
{
diff --git a/src/vm/interpreter.cpp b/src/vm/interpreter.cpp
index 61bab6d855..f435cdacb2 100644
--- a/src/vm/interpreter.cpp
+++ b/src/vm/interpreter.cpp
@@ -7563,9 +7563,6 @@ void Interpreter::StFld()
}
else
{
-#ifdef _DEBUG
- if (obj->IsTransparentProxy()) NYI_INTERP("Stores to thunking objects.");
-#endif
BYTE* fldStart = dac_cast<PTR_BYTE>(OBJECTREFToObject(obj)) + sizeof(Object) + fldOffset;
// fldStart is now a vulnerable byref
GCX_FORBID();
@@ -9788,7 +9785,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T
pCode = methToCall->GetMultiCallableAddrOfVirtualizedCode(&objRef, methToCall->GetMethodTable());
GCPROTECT_END();
- exactMethToCall = Entry2MethodDesc(pCode, objRef->GetTrueMethodTable());
+ exactMethToCall = Entry2MethodDesc(pCode, objRef->GetMethodTable());
}
// Compile the target in advance of calling.
diff --git a/src/vm/invokeutil.cpp b/src/vm/invokeutil.cpp
index c638af4150..c5295c9022 100644
--- a/src/vm/invokeutil.cpp
+++ b/src/vm/invokeutil.cpp
@@ -745,7 +745,7 @@ OBJECTREF InvokeUtil::CreateClassLoadExcept(OBJECTREF* classes, OBJECTREF* excep
// Retrieve the resource string.
ResMgrGetString(W("ReflectionTypeLoad_LoadFailed"), &gc.str);
- MethodDesc* pMD = MemberLoader::FindMethod(gc.o->GetTrueMethodTable(),
+ MethodDesc* pMD = MemberLoader::FindMethod(gc.o->GetMethodTable(),
COR_CTOR_METHOD_NAME, &gsig_IM_ArrType_ArrException_Str_RetVoid);
if (!pMD)
@@ -792,7 +792,7 @@ OBJECTREF InvokeUtil::CreateTargetExcept(OBJECTREF* except) {
GCPROTECT_BEGIN(o);
ARG_SLOT args[2];
- MethodDesc* pMD = MemberLoader::FindMethod(o->GetTrueMethodTable(),
+ MethodDesc* pMD = MemberLoader::FindMethod(o->GetMethodTable(),
COR_CTOR_METHOD_NAME, &gsig_IM_Exception_RetVoid);
if (!pMD)
diff --git a/src/vm/jithelpers.cpp b/src/vm/jithelpers.cpp
index 624c62273a..165073b002 100644
--- a/src/vm/jithelpers.cpp
+++ b/src/vm/jithelpers.cpp
@@ -791,7 +791,7 @@ HCIMPL2(void*, JIT_GetFieldAddr, Object *obj, FieldDesc* pFD)
PRECONDITION(CheckPointer(pFD));
} CONTRACTL_END;
- if (obj == NULL || obj->IsTransparentProxy() || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
+ if (obj == NULL || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
{
ENDFORBIDGC();
return HCCALL2(JIT_GetFieldAddr_Framed, obj, pFD);
@@ -835,7 +835,7 @@ HCIMPL2(INT8, JIT_GetField8, Object *obj, FieldDesc *pFD)
{
FCALL_CONTRACT;
- if (obj == NULL || obj->IsTransparentProxy() || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
+ if (obj == NULL || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
{
ENDFORBIDGC();
return HCCALL2(JIT_GetField_Framed<INT8>, obj, pFD);
@@ -851,7 +851,7 @@ HCIMPL2(INT16, JIT_GetField16, Object *obj, FieldDesc *pFD)
{
FCALL_CONTRACT;
- if (obj == NULL || obj->IsTransparentProxy() || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
+ if (obj == NULL || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
{
ENDFORBIDGC();
return HCCALL2(JIT_GetField_Framed<INT16>, obj, pFD);
@@ -867,7 +867,7 @@ HCIMPL2(INT32, JIT_GetField32, Object *obj, FieldDesc *pFD)
{
FCALL_CONTRACT;
- if (obj == NULL || obj->IsTransparentProxy() || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
+ if (obj == NULL || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
{
ENDFORBIDGC();
return HCCALL2(JIT_GetField_Framed<INT32>, obj, pFD);
@@ -883,7 +883,7 @@ HCIMPL2(INT64, JIT_GetField64, Object *obj, FieldDesc *pFD)
{
FCALL_CONTRACT;
- if (obj == NULL || obj->IsTransparentProxy() || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
+ if (obj == NULL || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
{
ENDFORBIDGC();
return HCCALL2(JIT_GetField_Framed<INT64>, obj, pFD);
@@ -899,7 +899,7 @@ HCIMPL2(FLOAT, JIT_GetFieldFloat, Object *obj, FieldDesc *pFD)
{
FCALL_CONTRACT;
- if (obj == NULL || obj->IsTransparentProxy() || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
+ if (obj == NULL || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
{
ENDFORBIDGC();
return HCCALL2(JIT_GetField_Framed<FLOAT>, obj, pFD);
@@ -916,7 +916,7 @@ HCIMPL2(DOUBLE, JIT_GetFieldDouble, Object *obj, FieldDesc *pFD)
{
FCALL_CONTRACT;
- if (obj == NULL || obj->IsTransparentProxy() || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
+ if (obj == NULL || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
{
ENDFORBIDGC();
return HCCALL2(JIT_GetField_Framed<DOUBLE>, obj, pFD);
@@ -960,7 +960,7 @@ HCIMPL3(VOID, JIT_SetField8, Object *obj, FieldDesc *pFD, INT8 val)
{
FCALL_CONTRACT;
- if (obj == NULL || obj->IsTransparentProxy() || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
+ if (obj == NULL || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
{
ENDFORBIDGC();
return HCCALL3(JIT_SetField_Framed<INT8>, obj, pFD, val);
@@ -975,7 +975,7 @@ HCIMPL3(VOID, JIT_SetField16, Object *obj, FieldDesc *pFD, INT16 val)
{
FCALL_CONTRACT;
- if (obj == NULL || obj->IsTransparentProxy() || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
+ if (obj == NULL || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
{
ENDFORBIDGC();
return HCCALL3(JIT_SetField_Framed<INT16>, obj, pFD, val);
@@ -990,7 +990,7 @@ HCIMPL3(VOID, JIT_SetField32, Object *obj, FieldDesc *pFD, INT32 val)
{
FCALL_CONTRACT;
- if (obj == NULL || obj->IsTransparentProxy() || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
+ if (obj == NULL || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
{
ENDFORBIDGC();
return HCCALL3(JIT_SetField_Framed<INT32>, obj, pFD, val);
@@ -1005,7 +1005,7 @@ HCIMPL3(VOID, JIT_SetField64, Object *obj, FieldDesc *pFD, INT64 val)
{
FCALL_CONTRACT;
- if (obj == NULL || obj->IsTransparentProxy() || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
+ if (obj == NULL || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
{
ENDFORBIDGC();
return HCCALL3(JIT_SetField_Framed<INT64>, obj, pFD, val);
@@ -1020,7 +1020,7 @@ HCIMPL3(VOID, JIT_SetFieldFloat, Object *obj, FieldDesc *pFD, FLOAT val)
{
FCALL_CONTRACT;
- if (obj == NULL || obj->IsTransparentProxy() || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
+ if (obj == NULL || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
{
ENDFORBIDGC();
return HCCALL3(JIT_SetField_Framed<FLOAT>, obj, pFD, val);
@@ -1035,7 +1035,7 @@ HCIMPL3(VOID, JIT_SetFieldDouble, Object *obj, FieldDesc *pFD, DOUBLE val)
{
FCALL_CONTRACT;
- if (obj == NULL || obj->IsTransparentProxy() || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
+ if (obj == NULL || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
{
ENDFORBIDGC();
return HCCALL3(JIT_SetField_Framed<DOUBLE>, obj, pFD, val);
@@ -1080,7 +1080,7 @@ HCIMPL2(Object*, JIT_GetFieldObj, Object *obj, FieldDesc *pFD)
PRECONDITION(!pFD->IsPrimitive() && !pFD->IsByValue()); // Assert that we are called only for objects
} CONTRACTL_END;
- if (obj == NULL || obj->IsTransparentProxy() || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
+ if (obj == NULL || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
{
ENDFORBIDGC();
return HCCALL2(JIT_GetFieldObj_Framed, obj, pFD);
@@ -1124,7 +1124,7 @@ HCIMPL3(VOID, JIT_SetFieldObj, Object *obj, FieldDesc *pFD, Object *value)
PRECONDITION(!pFD->IsPrimitive() && !pFD->IsByValue()); // Assert that we are called only for objects
} CONTRACTL_END;
- if (obj == NULL || obj->IsTransparentProxy() || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
+ if (obj == NULL || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
{
ENDFORBIDGC();
return HCCALL3(JIT_SetFieldObj_Framed, obj, pFD, value);
@@ -1182,7 +1182,7 @@ HCIMPL4(VOID, JIT_GetFieldStruct, LPVOID retBuff, Object *obj, FieldDesc *pFD, M
_ASSERTE(pFieldMT->IsValueType());
- if (obj == NULL || obj->IsTransparentProxy() || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
+ if (obj == NULL || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
{
ENDFORBIDGC();
return HCCALL4(JIT_GetFieldStruct_Framed, retBuff, obj, pFD, pFieldMT);
@@ -1236,7 +1236,7 @@ HCIMPL4(VOID, JIT_SetFieldStruct, Object *obj, FieldDesc *pFD, MethodTable *pFie
_ASSERTE(pFieldMT->IsValueType());
- if (obj == NULL || obj->IsTransparentProxy() || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
+ if (obj == NULL || g_IBCLogger.InstrEnabled() || pFD->IsEnCNew())
{
ENDFORBIDGC();
return HCCALL4(JIT_SetFieldStruct_Framed, obj, pFD, pFieldMT, valuePtr);
@@ -2276,10 +2276,8 @@ TypeHandle::CastResult STDCALL ObjIsInstanceOfNoGC(Object *pObject, TypeHandle t
if (TypeHandle(pMT) == toTypeHnd)
return TypeHandle::CanCast;
- if (pMT->IsTransparentProxy() ||
- (toTypeHnd.IsInterface() && ( pMT->IsComObjectType() || pMT->IsICastable() ))
- )
- {
+ if ((toTypeHnd.IsInterface() && ( pMT->IsComObjectType() || pMT->IsICastable())))
+ {
return TypeHandle::MaybeCast;
}
@@ -4133,13 +4131,9 @@ NOINLINE HCIMPL3(CORINFO_MethodPtr, JIT_VirtualFunctionPointer_Framed, Object *
addr = (CORINFO_MethodPtr) pStaticMD->GetMultiCallableAddrOfVirtualizedCode(&objRef, staticTH);
_ASSERTE(addr);
- // The cache can be used only if MethodTable is a real one
- if (!objRef->IsTransparentProxy())
- {
- // This is not a critical entry - no need to specify appdomain affinity
- JitGenericHandleCacheKey key(objRef->GetMethodTable(), classHnd, methodHnd);
- AddToGenericHandleCache(&key, (HashDatum)addr);
- }
+ // This is not a critical entry - no need to specify appdomain affinity
+ JitGenericHandleCacheKey key(objRef->GetMethodTable(), classHnd, methodHnd);
+ AddToGenericHandleCache(&key, (HashDatum)addr);
}
HELPER_METHOD_FRAME_END();
diff --git a/src/vm/jitinterface.cpp b/src/vm/jitinterface.cpp
index 1b16b2f1dc..658e61017a 100644
--- a/src/vm/jitinterface.cpp
+++ b/src/vm/jitinterface.cpp
@@ -4229,80 +4229,9 @@ CorInfoInitClassResult CEEInfo::initClass(
result = CORINFO_INITCLASS_INITIALIZED;
goto exit;
}
-
-#ifdef FEATURE_MULTICOREJIT
- // Once multicore JIT is enabled in an AppDomain by calling SetProfileRoot, always use helper function to call class init, for consistency
- if (! GetAppDomain()->GetMulticoreJitManager().AllowCCtorsToRunDuringJITing())
- {
- result = CORINFO_INITCLASS_USE_HELPER;
-
- goto exit;
- }
-#endif
-
- // To preserve consistent behavior between ngen and not-ngenned states, do not eagerly
- // run class constructors for autongennable code.
- if (pTypeToInitMT->RunCCTorAsIfNGenImageExists())
- {
- result = CORINFO_INITCLASS_USE_HELPER;
- goto exit;
- }
-
- if (!pTypeToInitMT->GetClass()->IsBeforeFieldInit())
- {
- // Do not inline the access if we cannot initialize the class. Chances are that the class will get
- // initialized by the time the access is jitted.
- result = CORINFO_INITCLASS_USE_HELPER | CORINFO_INITCLASS_DONT_INLINE;
- goto exit;
- }
-
- if (speculative)
- {
- // Tell the JIT that we may be able to initialize the class when asked to.
- result = CORINFO_INITCLASS_SPECULATIVE;
- goto exit;
- }
-
- //
- // We cannot run the class constructor without first activating the
- // module containing the class. However, since the current module
- // we are compiling inside is not active, we don't want to do this.
- //
- // This should be an unusal case since normally the method's module should
- // be active during jitting.
- //
- // @TODO: We should check IsActivating() instead of IsActive() since we may
- // be running the Module::.cctor(). The assembly is not marked as active
- // until then.
- if (!methodBeingCompiled->GetLoaderModule()->GetDomainFile()->IsActive())
- {
- result = CORINFO_INITCLASS_USE_HELPER;
- goto exit;
- }
-
- //
- // Run the .cctor
- //
-
- EX_TRY
- {
- pTypeToInitMT->CheckRunClassInitThrowing();
- }
- EX_CATCH
- {
- } EX_END_CATCH(SwallowAllExceptions);
-
- if (pTypeToInitMT->IsClassInited())
- {
- result = CORINFO_INITCLASS_INITIALIZED;
- goto exit;
- }
#endif // CROSSGEN_COMPILE
- // Do not inline the access if we were unable to initialize the class. Chances are that the class will get
- // initialized by the time the access is jitted.
- result = (CORINFO_INITCLASS_USE_HELPER | CORINFO_INITCLASS_DONT_INLINE);
-
+ result = CORINFO_INITCLASS_USE_HELPER;
}
exit: ;
EE_TO_JIT_TRANSITION();
diff --git a/src/vm/marshalnative.cpp b/src/vm/marshalnative.cpp
index 2ce0bdaa4c..a356900756 100644
--- a/src/vm/marshalnative.cpp
+++ b/src/vm/marshalnative.cpp
@@ -1049,7 +1049,7 @@ FCIMPL1(IUnknown*, MarshalNative::GetRawIUnknownForComObjectNoAddRef, Object* or
if(!oref)
COMPlusThrowArgumentNull(W("o"));
- MethodTable* pMT = oref->GetTrueMethodTable();
+ MethodTable* pMT = oref->GetMethodTable();
PREFIX_ASSUME(pMT != NULL);
if(!pMT->IsComObjectType())
COMPlusThrow(kArgumentException, IDS_EE_SRC_OBJ_NOT_COMOBJECT);
@@ -1288,7 +1288,7 @@ FCIMPL2(IUnknown*, MarshalNative::CreateAggregatedObject, IUnknown* pOuter, Obje
if (oref == NULL)
COMPlusThrowArgumentNull(W("o"));
- MethodTable *pMT = oref->GetTrueMethodTable();
+ MethodTable *pMT = oref->GetMethodTable();
if (pMT->IsWinRTObjectType() || pMT->IsExportedToWinRT())
COMPlusThrowArgumentException(W("o"), W("Argument_ObjIsWinRTObject"));
@@ -1363,7 +1363,7 @@ FCIMPL1(FC_BOOL_RET, MarshalNative::IsComObject, Object* objUNSAFE)
if(!obj)
COMPlusThrowArgumentNull(W("o"));
- MethodTable* pMT = obj->GetTrueMethodTable();
+ MethodTable* pMT = obj->GetMethodTable();
PREFIX_ASSUME(pMT != NULL);
retVal = pMT->IsComObjectType();
@@ -1388,7 +1388,7 @@ FCIMPL1(INT32, MarshalNative::ReleaseComObject, Object* objUNSAFE)
if(!obj)
COMPlusThrowArgumentNull(W("o"));
- MethodTable* pMT = obj->GetTrueMethodTable();
+ MethodTable* pMT = obj->GetMethodTable();
PREFIX_ASSUME(pMT != NULL);
if(!pMT->IsComObjectType())
COMPlusThrow(kArgumentException, IDS_EE_SRC_OBJ_NOT_COMOBJECT);
@@ -1415,7 +1415,7 @@ FCIMPL1(void, MarshalNative::FinalReleaseComObject, Object* objUNSAFE)
if(!obj)
COMPlusThrowArgumentNull(W("o"));
- MethodTable* pMT = obj->GetTrueMethodTable();
+ MethodTable* pMT = obj->GetMethodTable();
PREFIX_ASSUME(pMT != NULL);
if(!pMT->IsComObjectType())
COMPlusThrow(kArgumentException, IDS_EE_SRC_OBJ_NOT_COMOBJECT);
@@ -2206,39 +2206,6 @@ FCIMPL1(Object*, MarshalNative::WrapIUnknownWithComObject, IUnknown* pUnk)
}
FCIMPLEND
-//+----------------------------------------------------------------------------
-//
-// Method: CLR_BOOL __stdcall MarshalNative::SwitchCCW(switchCCWArgs* pArgs)
-//
-// Synopsis: switch the wrapper from oldtp to newtp
-//
-
-//
-//+----------------------------------------------------------------------------
-
-FCIMPL2(FC_BOOL_RET, MarshalNative::SwitchCCW, Object* oldtpUNSAFE, Object* newtpUNSAFE)
-{
- FCALL_CONTRACT;
-
- BOOL retVal = FALSE;
- OBJECTREF oldtp = (OBJECTREF) oldtpUNSAFE;
- OBJECTREF newtp = (OBJECTREF) newtpUNSAFE;
- HELPER_METHOD_FRAME_BEGIN_RET_2(oldtp, newtp);
-
- if (oldtp == NULL)
- COMPlusThrowArgumentNull(W("oldtp"));
- if (newtp == NULL)
- COMPlusThrowArgumentNull(W("newtp"));
-
- // defined in interoputil.cpp
- retVal = ReconnectWrapper(&oldtp, &newtp);
-
- HELPER_METHOD_FRAME_END();
- FC_RETURN_BOOL(retVal);
-}
-FCIMPLEND
-
-
FCIMPL2(void, MarshalNative::ChangeWrapperHandleStrength, Object* orefUNSAFE, CLR_BOOL fIsWeak)
{
FCALL_CONTRACT;
@@ -2388,7 +2355,7 @@ void QCALLTYPE MarshalNative::GetInspectableIIDs(
if(orComObject == NULL)
COMPlusThrowArgumentNull(W("obj"));
- MethodTable* pMT = orComObject->GetTrueMethodTable();
+ MethodTable* pMT = orComObject->GetMethodTable();
PREFIX_ASSUME(pMT != NULL);
if(!pMT->IsComObjectType())
COMPlusThrow(kArgumentException, IDS_EE_SRC_OBJ_NOT_COMOBJECT);
@@ -2453,7 +2420,7 @@ void QCALLTYPE MarshalNative::GetCachedWinRTTypes(
// Validation: hadObj represents a non-NULL System.AppDomain instance
if(orDomain != NULL)
{
- MethodTable* pMT = orDomain->GetTrueMethodTable();
+ MethodTable* pMT = orDomain->GetMethodTable();
PREFIX_ASSUME(pMT != NULL);
if (!pMT->CanCastToClass(MscorlibBinder::GetClass(CLASS__APP_DOMAIN)))
// TODO: find better resource string
@@ -2507,7 +2474,7 @@ void QCALLTYPE MarshalNative::GetCachedWinRTTypeByIID(
// Validation: hadObj represents a non-NULL System.AppDomain instance
if(orDomain != NULL)
{
- MethodTable* pMT = orDomain->GetTrueMethodTable();
+ MethodTable* pMT = orDomain->GetMethodTable();
PREFIX_ASSUME(pMT != NULL);
if (!pMT->CanCastToClass(MscorlibBinder::GetClass(CLASS__APP_DOMAIN)))
// TODO: find better resource string
diff --git a/src/vm/marshalnative.h b/src/vm/marshalnative.h
index f5d4d04733..25c1dc3ab9 100644
--- a/src/vm/marshalnative.h
+++ b/src/vm/marshalnative.h
@@ -222,7 +222,6 @@ public:
static FCDECL1(int, GetComSlotForMethodInfo, ReflectMethodObject* pMethodUNSAFE);
- static FCDECL2(FC_BOOL_RET, SwitchCCW, Object* oldtpUNSAFE, Object* newtpUNSAFE);
static FCDECL1(Object*, WrapIUnknownWithComObject, IUnknown* pUnk);
static FCDECL2(void, ChangeWrapperHandleStrength, Object* orefUNSAFE, CLR_BOOL fIsWeak);
diff --git a/src/vm/memberload.cpp b/src/vm/memberload.cpp
index 86be548cd2..da026b1c5b 100644
--- a/src/vm/memberload.cpp
+++ b/src/vm/memberload.cpp
@@ -1076,7 +1076,6 @@ MemberLoader::FindMethod(
THROWS;
GC_TRIGGERS;
INJECT_FAULT(COMPlusThrowOM(););
- PRECONDITION(!pMT->IsTransparentProxy());
MODE_ANY;
} CONTRACT_END;
@@ -1198,7 +1197,6 @@ MemberLoader::FindMethod(MethodTable * pMT, LPCUTF8 pwzName, LPHARDCODEDMETASIG
THROWS;
GC_TRIGGERS;
INJECT_FAULT(COMPlusThrowOM(););
- PRECONDITION(!pMT->IsTransparentProxy());
MODE_ANY;
} CONTRACTL_END;
@@ -1215,7 +1213,6 @@ MemberLoader::FindMethod(MethodTable * pMT, mdMethodDef mb)
THROWS;
GC_TRIGGERS;
INJECT_FAULT(COMPlusThrowOM(););
- PRECONDITION(!pMT->IsTransparentProxy());
MODE_ANY;
} CONTRACTL_END;
@@ -1243,7 +1240,6 @@ MemberLoader::FindMethodByName(MethodTable * pMT, LPCUTF8 pszName, FM_Flags flag
THROWS;
GC_TRIGGERS;
INJECT_FAULT(COMPlusThrowOM(););
- PRECONDITION(!pMT->IsTransparentProxy());
PRECONDITION(!pMT->IsArray());
MODE_ANY;
} CONTRACTL_END;
@@ -1479,18 +1475,7 @@ MemberLoader::FindField(MethodTable * pMT, LPCUTF8 pszName, PCCOR_SIGNATURE pSig
// Retrieve the right comparition function to use.
UTF8StringCompareFuncPtr StrCompFunc = bCaseSensitive ? strcmp : stricmpUTF8;
-
- // The following assert is very important, but we need to special case it enough
- // to allow us access to the legitimate fields of a context proxy object.
- CONSISTENCY_CHECK(!pMT->IsTransparentProxy() ||
- !strcmp(pszName, "actualObject") ||
- !strcmp(pszName, "contextID") ||
- !strcmp(pszName, "_rp") ||
- !strcmp(pszName, "_stubData") ||
- !strcmp(pszName, "_pMT") ||
- !strcmp(pszName, "_pInterfaceMT") ||
- !strcmp(pszName, "_stub"));
-
+
// Array classes don't have fields, and don't have metadata
if (pMT->IsArray())
return NULL;
diff --git a/src/vm/method.cpp b/src/vm/method.cpp
index 963dce491a..939cf7790c 100644
--- a/src/vm/method.cpp
+++ b/src/vm/method.cpp
@@ -1943,23 +1943,12 @@ MethodDesc* MethodDesc::ResolveGenericVirtualMethod(OBJECTREF *orThis)
CONTRACT_END;
// Method table of target (might be instantiated)
- // Deliberately use GetMethodTable -- not GetTrueMethodTable
MethodTable *pObjMT = (*orThis)->GetMethodTable();
// This is the static method descriptor describing the call.
// It is not the destination of the call, which we must compute.
MethodDesc* pStaticMD = this;
- if (pObjMT->IsTransparentProxy())
- {
- // For transparent proxies get the client's view of the server type
- // unless we're calling through an interface (in which case we let the
- // server handle the resolution).
- if (pStaticMD->IsInterface())
- RETURN(pStaticMD);
- pObjMT = (*orThis)->GetTrueMethodTable();
- }
-
// Strip off the method instantiation if present
MethodDesc* pStaticMDWithoutGenericMethodArgs = pStaticMD->StripMethodInstantiation();
@@ -2005,7 +1994,6 @@ PCODE MethodDesc::GetSingleCallableAddrOfVirtualizedCode(OBJECTREF *orThis, Type
WRAPPER_NO_CONTRACT;
PRECONDITION(IsVtableMethod());
- // Deliberately use GetMethodTable -- not GetTrueMethodTable
MethodTable *pObjMT = (*orThis)->GetMethodTable();
if (HasMethodInstantiation())
@@ -2051,7 +2039,6 @@ PCODE MethodDesc::GetMultiCallableAddrOfVirtualizedCode(OBJECTREF *orThis, TypeH
CONTRACT_END;
// Method table of target (might be instantiated)
- // Deliberately use GetMethodTable -- not GetTrueMethodTable
MethodTable *pObjMT = (*orThis)->GetMethodTable();
// This is the static method descriptor describing the call.
@@ -2478,55 +2465,8 @@ BOOL MethodDesc::RequiresStableEntryPoint(BOOL fEstimateForChunk /*=FALSE*/)
return FALSE;
}
-//*******************************************************************************
-BOOL MethodDesc::IsClassConstructorTriggeredViaPrestub()
-{
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- MODE_ANY;
- }
- CONTRACTL_END;
-
- // FCalls do not need cctor triggers
- if (IsFCall())
- return FALSE;
-
- // NGened code has explicit cctor triggers
- if (IsZapped())
- return FALSE;
-
- // Domain neutral code has explicit cctor triggers
- if (IsDomainNeutral())
- return FALSE;
-
- MethodTable * pMT = GetMethodTable();
-
- // Shared generic code has explicit cctor triggers
- if (pMT->IsSharedByGenericInstantiations())
- return FALSE;
-
- bool fRunBeforeFieldInitCctorsLazily = true;
-
- // Always run beforefieldinit cctors lazily for optimized code. Running cctors lazily should be good for perf.
- // Variability between optimized and non-optimized code should reduce chance of people taking dependencies
- // on exact beforefieldinit cctors timing.
- if (fRunBeforeFieldInitCctorsLazily && pMT->GetClass()->IsBeforeFieldInit() && !CORDisableJITOptimizations(pMT->GetModule()->GetDebuggerInfoBits()))
- return FALSE;
-
- // To preserve consistent behavior between ngen and not-ngenned states, always
- // run class constructors lazily for autongennable code.
- if (pMT->RunCCTorAsIfNGenImageExists())
- return FALSE;
-
- return TRUE;
-}
-
#endif // !DACCESS_COMPILE
-
-
//*******************************************************************************
BOOL MethodDesc::MayHaveNativeCode()
{
@@ -5525,13 +5465,6 @@ PrecodeType MethodDesc::GetPrecodeType()
PrecodeType precodeType = PRECODE_INVALID;
-#ifdef HAS_REMOTING_PRECODE
- if (IsComPlusCall() && !IsStatic())
- {
- precodeType = PRECODE_REMOTING;
- }
- else
-#endif // HAS_REMOTING_PRECODE
#ifdef HAS_FIXUP_PRECODE
if (!RequiresMethodDescCallingConvention())
{
diff --git a/src/vm/method.hpp b/src/vm/method.hpp
index 0baf2a4934..fe552177c9 100644
--- a/src/vm/method.hpp
+++ b/src/vm/method.hpp
@@ -1305,8 +1305,6 @@ public:
ULONG GetRVA();
- BOOL IsClassConstructorTriggeredViaPrestub();
-
public:
// Returns preimplemented code of the method if method has one.
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())
diff --git a/src/vm/methodtable.h b/src/vm/methodtable.h
index b3e8b690bf..9b78ddade5 100644
--- a/src/vm/methodtable.h
+++ b/src/vm/methodtable.h
@@ -5,12 +5,6 @@
// File: methodtable.h
//
-
-//
-
-//
-// ============================================================================
-
#ifndef _METHODTABLE_H_
#define _METHODTABLE_H_
@@ -312,10 +306,7 @@ struct MethodTableWriteableData
// TO BE UPDATED IN ORDER TO ENSURE THAT METHODTABLES DUPLICATED FOR GENERIC INSTANTIATIONS
// CARRY THE CORRECT INITIAL FLAGS.
- enum_flag_RemotingConfigChecked = 0x00000001,
- enum_flag_RequiresManagedActivation = 0x00000002,
enum_flag_Unrestored = 0x00000004,
- enum_flag_CriticalTypePrepared = 0x00000008, // CriticalFinalizerObject derived type has had backout routines prepared
enum_flag_HasApproxParent = 0x00000010,
enum_flag_UnrestoredTypeKey = 0x00000020,
enum_flag_IsNotFullyLoaded = 0x00000040,
@@ -449,38 +440,6 @@ public:
}
#endif // FEATURE_PREJIT
- inline BOOL IsRemotingConfigChecked() const
- {
- LIMITED_METHOD_CONTRACT;
- return m_dwFlags & enum_flag_RemotingConfigChecked;
- }
- inline void SetRemotingConfigChecked()
- {
- WRAPPER_NO_CONTRACT;
- // remembers that we went through the rigorous
- // checks to decide whether this class should be
- // activated locally or remote
- FastInterlockOr(EnsureWritablePages((ULONG *)&m_dwFlags), enum_flag_RemotingConfigChecked);
- }
- inline void TrySetRemotingConfigChecked()
- {
- WRAPPER_NO_CONTRACT;
- // remembers that we went through the rigorous
- // checks to decide whether this class should be
- // activated locally or remote
- if (EnsureWritablePagesNoThrow(&m_dwFlags, sizeof(m_dwFlags)))
- FastInterlockOr((ULONG *)&m_dwFlags, enum_flag_RemotingConfigChecked);
- }
- inline BOOL RequiresManagedActivation() const
- {
- LIMITED_METHOD_CONTRACT;
- return m_dwFlags & enum_flag_RequiresManagedActivation;
- }
- inline void SetRequiresManagedActivation()
- {
- WRAPPER_NO_CONTRACT;
- FastInterlockOr(EnsureWritablePages((ULONG *) &m_dwFlags), enum_flag_RequiresManagedActivation|enum_flag_RemotingConfigChecked);
- }
inline LOADERHANDLE GetExposedClassObjectHandle() const
{
@@ -519,19 +478,6 @@ public:
MethodTableWriteableData::enum_flag_HasApproxParent);
}
- // Have the backout methods (Finalizer, Dispose, ReleaseHandle etc.) been prepared for this type? This currently only happens
- // for types derived from CriticalFinalizerObject.
- inline BOOL CriticalTypeHasBeenPrepared() const
- {
- LIMITED_METHOD_CONTRACT;
- return m_dwFlags & enum_flag_CriticalTypePrepared;
- }
- inline void SetCriticalTypeHasBeenPrepared()
- {
- WRAPPER_NO_CONTRACT;
- FastInterlockOr(EnsureWritablePages((ULONG*)&m_dwFlags), enum_flag_CriticalTypePrepared);
- }
-
inline CrossModuleGenericsStaticsInfo * GetCrossModuleGenericsStaticsInfo()
{
LIMITED_METHOD_DAC_CONTRACT;
@@ -985,8 +931,6 @@ public:
// uniquely identifes this type in the Domain table
DWORD GetClassIndex();
- bool ClassRequiresUnmanagedCodeCheck();
-
private:
#if defined(UNIX_AMD64_ABI_ITF)
@@ -1712,7 +1656,7 @@ public:
unsigned GetNumParentVirtuals()
{
LIMITED_METHOD_CONTRACT;
- if (IsInterface() || IsTransparentProxy()) {
+ if (IsInterface()) {
return 0;
}
MethodTable *pMTParent = GetParentMethodTable();
@@ -1940,20 +1884,6 @@ public:
DWORD GetIndexForFieldDesc(FieldDesc *pField);
- //-------------------------------------------------------------------
- // REMOTING and THUNKING.
- //
- // We find a lot of information from the VTable. But sometimes the VTable is a
- // thunking layer rather than the true type's VTable. For instance, context
- // proxies use a single VTable for proxies to all the types we've loaded.
- // The following service adjusts a MethodTable based on the supplied instance. As
- // we add new thunking layers, we just need to teach this service how to navigate
- // through them.
- inline BOOL IsTransparentProxy()
- {
- return FALSE;
- }
-
BOOL IsMarshaledByRef()
{
return FALSE;
@@ -2604,29 +2534,6 @@ public:
return GetFlag(enum_flag_HasCriticalFinalizer);
}
- // Have the backout methods (Finalizer, Dispose, ReleaseHandle etc.) been prepared for this type? This currently only happens
- // for types derived from CriticalFinalizerObject.
- BOOL CriticalTypeHasBeenPrepared()
- {
- LIMITED_METHOD_CONTRACT;
- _ASSERTE(HasCriticalFinalizer());
- return GetWriteableData()->CriticalTypeHasBeenPrepared();
- }
-
- void SetCriticalTypeHasBeenPrepared()
- {
- CONTRACTL
- {
- THROWS;
- GC_NOTRIGGER;
- MODE_ANY;
- }
- CONTRACTL_END;
-
- _ASSERTE(HasCriticalFinalizer());
- GetWriteableDataForWrite()->SetCriticalTypeHasBeenPrepared();
- }
-
//-------------------------------------------------------------------
// STATIC FIELDS
//
@@ -2986,13 +2893,6 @@ public:
BOOL HasRCWPerTypeData();
#endif // FEATURE_COMINTEROP
- // The following two methods produce correct results only if this type is
- // marked Serializable (verified by assert in checked builds) and the field
- // in question was introduced in this type (the index is the FieldDesc
- // index).
- BOOL IsFieldNotSerialized(DWORD dwFieldIndex);
- BOOL IsFieldOptionallySerialized(DWORD dwFieldIndex);
-
//-------------------------------------------------------------------
// DICTIONARIES FOR GENERIC INSTANTIATIONS
//
@@ -3131,27 +3031,7 @@ public:
inline DWORD GetAttrClass();
- inline BOOL IsSerializable();
inline BOOL HasFieldsWhichMustBeInited();
- inline BOOL SupportsAutoNGen();
- inline BOOL RunCCTorAsIfNGenImageExists();
-
- //-------------------------------------------------------------------
- // SECURITY SEMANTICS
- //
-
- void SetIsAsyncPinType()
- {
- LIMITED_METHOD_CONTRACT;
- _ASSERTE(GetFlag(enum_flag_Category_Mask) == 0);
- SetFlag(enum_flag_Category_AsyncPin);
- }
-
- BOOL IsAsyncPinType()
- {
- LIMITED_METHOD_DAC_CONTRACT;
- return GetFlag(enum_flag_Category_Mask) == enum_flag_Category_AsyncPin;
- }
inline BOOL IsPreRestored() const
{
@@ -3216,65 +3096,6 @@ public:
}
//-------------------------------------------------------------------
- // Remoting related
- //
- inline BOOL IsRemotingConfigChecked()
- {
- WRAPPER_NO_CONTRACT;
- return GetWriteableData()->IsRemotingConfigChecked();
- }
- inline void SetRemotingConfigChecked()
- {
- CONTRACTL
- {
- THROWS;
- GC_NOTRIGGER;
- MODE_ANY;
- }
- CONTRACTL_END;
-
- GetWriteableDataForWrite()->SetRemotingConfigChecked();
- }
- inline void TrySetRemotingConfigChecked()
- {
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- MODE_ANY;
- SO_TOLERANT;
- }
- CONTRACTL_END;
-
- GetWriteableDataForWrite()->TrySetRemotingConfigChecked();
- }
- inline BOOL RequiresManagedActivation()
- {
- WRAPPER_NO_CONTRACT;
- return GetWriteableData()->RequiresManagedActivation();
- }
- inline void SetRequiresManagedActivation()
- {
- CONTRACTL
- {
- THROWS;
- GC_NOTRIGGER;
- MODE_ANY;
- }
- CONTRACTL_END;
-
- GetWriteableDataForWrite()->SetRequiresManagedActivation();
- }
-
- // Determines whether the type may require managed activation. The actual answer is known later
- // once the remoting config is checked.
- inline BOOL MayRequireManagedActivation()
- {
- LIMITED_METHOD_CONTRACT;
- return IsMarshaledByRef();
- }
-
- //-------------------------------------------------------------------
// The GUID Info
// Used by COM interop to get GUIDs (IIDs and CLSIDs)
@@ -3898,10 +3719,8 @@ private:
enum_flag_Category_Class = 0x00000000,
enum_flag_Category_Unused_1 = 0x00010000,
-
- enum_flag_Category_MarshalByRef_Mask= 0x000E0000,
- enum_flag_Category_MarshalByRef = 0x00020000,
- enum_flag_Category_Contextful = 0x00030000, // sub-category of MarshalByRef
+ enum_flag_Category_Unused_2 = 0x00020000,
+ enum_flag_Category_Unused_3 = 0x00030000,
enum_flag_Category_ValueType = 0x00040000,
enum_flag_Category_ValueType_Mask = 0x000C0000,
@@ -3915,9 +3734,9 @@ private:
enum_flag_Category_IfArrayThenSzArray = 0x00020000, // sub-category of Array
enum_flag_Category_Interface = 0x000C0000,
- enum_flag_Category_Unused_2 = 0x000D0000,
- enum_flag_Category_TransparentProxy = 0x000E0000,
- enum_flag_Category_AsyncPin = 0x000F0000,
+ enum_flag_Category_Unused_4 = 0x000D0000,
+ enum_flag_Category_Unused_5 = 0x000E0000,
+ enum_flag_Category_Unused_6 = 0x000F0000,
enum_flag_Category_ElementTypeMask = 0x000E0000, // bits that matter for element type mask
diff --git a/src/vm/methodtable.inl b/src/vm/methodtable.inl
index 52c52c8e1e..88ce26cffd 100644
--- a/src/vm/methodtable.inl
+++ b/src/vm/methodtable.inl
@@ -79,7 +79,6 @@ inline PTR_EEClass MethodTable::GetClass()
{
LIMITED_METHOD_DAC_CONTRACT;
- _ASSERTE_IMPL(!IsAsyncPinType());
_ASSERTE_IMPL(GetClass_NoLogging() != NULL);
g_IBCLogger.LogEEClassAndMethodTableAccess(this);
@@ -323,13 +322,6 @@ inline DWORD MethodTable::GetAttrClass()
}
//==========================================================================================
-inline BOOL MethodTable::IsSerializable()
-{
- WRAPPER_NO_CONTRACT;
- return GetClass()->IsSerializable();
-}
-
-//==========================================================================================
inline BOOL MethodTable::SupportsGenericInterop(TypeHandle::InteropKind interopKind,
MethodTable::Mode mode /*= modeAll*/)
{
@@ -364,24 +356,6 @@ inline BOOL MethodTable::HasFieldsWhichMustBeInited()
}
//==========================================================================================
-inline BOOL MethodTable::SupportsAutoNGen()
-{
- LIMITED_METHOD_CONTRACT;
- return FALSE;
-}
-
-//==========================================================================================
-inline BOOL MethodTable::RunCCTorAsIfNGenImageExists()
-{
- LIMITED_METHOD_CONTRACT;
-#ifdef FEATURE_CORESYSTEM
- return TRUE; // On our coresystem builds we will always be using triton in the customer scenario.
-#else
- return FALSE;
-#endif
-}
-
-//==========================================================================================
inline BOOL MethodTable::IsAbstract()
{
WRAPPER_NO_CONTRACT;
@@ -482,30 +456,9 @@ inline BOOL MethodTable::GetGuidForWinRT(GUID *pGuid)
return bRes;
}
-
#endif // FEATURE_COMINTEROP
//==========================================================================================
-// The following two methods produce correct results only if this type is
-// marked Serializable (verified by assert in checked builds) and the field
-// in question was introduced in this type (the index is the FieldDesc
-// index).
-inline BOOL MethodTable::IsFieldNotSerialized(DWORD dwFieldIndex)
-{
- LIMITED_METHOD_CONTRACT;
- _ASSERTE(IsSerializable());
- return FALSE;
-}
-
-//==========================================================================================
-inline BOOL MethodTable::IsFieldOptionallySerialized(DWORD dwFieldIndex)
-{
- LIMITED_METHOD_CONTRACT;
- _ASSERTE(IsSerializable());
- return FALSE;
-}
-
-//==========================================================================================
// Is pParentMT System.Enum? (Cannot be called before System.Enum is loaded.)
inline BOOL MethodTable::IsEnum()
{
diff --git a/src/vm/multicorejit.h b/src/vm/multicorejit.h
index 047ba01a5f..9e4180e14e 100644
--- a/src/vm/multicorejit.h
+++ b/src/vm/multicorejit.h
@@ -191,16 +191,6 @@ public:
return m_ProfileSession;
}
- // Once multicore JIT is enabled in an AppDomain, do not allow Cctors to run during JITting for consistency
- // Called from CEEInfo::initClass
- inline bool AllowCCtorsToRunDuringJITing() const
- {
- LIMITED_METHOD_CONTRACT;
-
- return m_fSetProfileRootCalled == 0;
- }
-
-
// Check for environment variable to automatically start multicore JIT
void AutoStartProfile(AppDomain * pDomain);
diff --git a/src/vm/object.cpp b/src/vm/object.cpp
index ca54ba2848..0d0d2de1a3 100644
--- a/src/vm/object.cpp
+++ b/src/vm/object.cpp
@@ -140,24 +140,6 @@ BOOL Object::ValidateObjectWithPossibleAV()
#ifndef DACCESS_COMPILE
-MethodTable *Object::GetTrueMethodTable()
-{
- CONTRACT(MethodTable*)
- {
- MODE_COOPERATIVE;
- GC_NOTRIGGER;
- NOTHROW;
- SO_TOLERANT;
- POSTCONDITION(CheckPointer(RETVAL));
- }
- CONTRACT_END;
-
- MethodTable *mt = GetMethodTable();
-
-
- RETURN mt;
-}
-
TypeHandle Object::GetTrueTypeHandle()
{
CONTRACTL
@@ -172,7 +154,7 @@ TypeHandle Object::GetTrueTypeHandle()
if (m_pMethTab->IsArray())
return ((ArrayBase*) this)->GetTypeHandle();
else
- return TypeHandle(GetTrueMethodTable());
+ return TypeHandle(GetMethodTable());
}
// There are cases where it is not possible to get a type handle during a GC.
@@ -268,7 +250,7 @@ TypeHandle Object::GetGCSafeTypeHandleIfPossible() const
GC_TRIGGERS;
INJECT_FAULT(COMPlusThrowOM());
PRECONDITION(CheckPointer(pInterfaceMT));
- PRECONDITION(pObj->GetTrueMethodTable()->IsRestored_NoLogging());
+ PRECONDITION(pObj->GetMethodTable()->IsRestored_NoLogging());
PRECONDITION(pInterfaceMT->IsInterface());
}
CONTRACTL_END
@@ -281,7 +263,7 @@ TypeHandle Object::GetGCSafeTypeHandleIfPossible() const
pInterfaceMT->CheckRestore();
// Check to see if the static class definition indicates we implement the interface.
- MethodTable * pMT = pObj->GetTrueMethodTable();
+ MethodTable * pMT = pObj->GetMethodTable();
if (pMT->CanCastToInterface(pInterfaceMT))
{
bSupportsItf = TRUE;
diff --git a/src/vm/object.h b/src/vm/object.h
index 9c8d0f10a9..ba97df33ac 100644
--- a/src/vm/object.h
+++ b/src/vm/object.h
@@ -184,14 +184,6 @@ class Object
}
#endif //!DACCESS_COMPILE
- // An object might be a proxy of some sort, with a thunking VTable. If so, we can
- // advance to the true method table or class.
- BOOL IsTransparentProxy()
- {
- LIMITED_METHOD_CONTRACT;
- return FALSE;
- }
-
#define MARKED_BIT 0x1
PTR_MethodTable GetMethodTable() const
@@ -218,8 +210,6 @@ class Object
return dac_cast<DPTR(PTR_MethodTable)>(PTR_HOST_MEMBER_TADDR(Object, this, m_pMethTab));
}
- MethodTable *GetTrueMethodTable();
-
TypeHandle GetTypeHandle();
TypeHandle GetTrueTypeHandle();
diff --git a/src/vm/precode.cpp b/src/vm/precode.cpp
index 7b4c1de516..9f3d37ca8b 100644
--- a/src/vm/precode.cpp
+++ b/src/vm/precode.cpp
@@ -32,9 +32,6 @@ BOOL Precode::IsValidType(PrecodeType t)
#ifdef HAS_NDIRECT_IMPORT_PRECODE
case PRECODE_NDIRECT_IMPORT:
#endif // HAS_NDIRECT_IMPORT_PRECODE
-#ifdef HAS_REMOTING_PRECODE
- case PRECODE_REMOTING:
-#endif // HAS_REMOTING_PRECODE
#ifdef HAS_FIXUP_PRECODE
case PRECODE_FIXUP:
#endif // HAS_FIXUP_PRECODE
@@ -60,10 +57,6 @@ SIZE_T Precode::SizeOf(PrecodeType t)
case PRECODE_NDIRECT_IMPORT:
return sizeof(NDirectImportPrecode);
#endif // HAS_NDIRECT_IMPORT_PRECODE
-#ifdef HAS_REMOTING_PRECODE
- case PRECODE_REMOTING:
- return sizeof(RemotingPrecode);
-#endif // HAS_REMOTING_PRECODE
#ifdef HAS_FIXUP_PRECODE
case PRECODE_FIXUP:
return sizeof(FixupPrecode);
@@ -94,11 +87,6 @@ PCODE Precode::GetTarget()
case PRECODE_STUB:
target = AsStubPrecode()->GetTarget();
break;
-#ifdef HAS_REMOTING_PRECODE
- case PRECODE_REMOTING:
- target = AsRemotingPrecode()->GetTarget();
- break;
-#endif // HAS_REMOTING_PRECODE
#ifdef HAS_FIXUP_PRECODE
case PRECODE_FIXUP:
target = AsFixupPrecode()->GetTarget();
@@ -139,11 +127,6 @@ MethodDesc* Precode::GetMethodDesc(BOOL fSpeculative /*= FALSE*/)
pMD = AsNDirectImportPrecode()->GetMethodDesc();
break;
#endif // HAS_NDIRECT_IMPORT_PRECODE
-#ifdef HAS_REMOTING_PRECODE
- case PRECODE_REMOTING:
- pMD = AsRemotingPrecode()->GetMethodDesc();
- break;
-#endif // HAS_REMOTING_PRECODE
#ifdef HAS_FIXUP_PRECODE
case PRECODE_FIXUP:
pMD = AsFixupPrecode()->GetMethodDesc();
@@ -404,11 +387,6 @@ void Precode::Init(PrecodeType t, MethodDesc* pMD, LoaderAllocator *pLoaderAlloc
((NDirectImportPrecode*)this)->Init(pMD, pLoaderAllocator);
break;
#endif // HAS_NDIRECT_IMPORT_PRECODE
-#ifdef HAS_REMOTING_PRECODE
- case PRECODE_REMOTING:
- ((RemotingPrecode*)this)->Init(pMD, pLoaderAllocator);
- break;
-#endif // HAS_REMOTING_PRECODE
#ifdef HAS_FIXUP_PRECODE
case PRECODE_FIXUP:
((FixupPrecode*)this)->Init(pMD, pLoaderAllocator);
@@ -473,12 +451,6 @@ BOOL Precode::SetTargetInterlocked(PCODE target, BOOL fOnlyRedirectFromPrestub)
ret = AsStubPrecode()->SetTargetInterlocked(target, expected);
break;
-#ifdef HAS_REMOTING_PRECODE
- case PRECODE_REMOTING:
- ret = AsRemotingPrecode()->SetTargetInterlocked(target, expected);
- break;
-#endif // HAS_REMOTING_PRECODE
-
#ifdef HAS_FIXUP_PRECODE
case PRECODE_FIXUP:
ret = AsFixupPrecode()->SetTargetInterlocked(target, expected);
@@ -679,7 +651,7 @@ void Precode::Save(DataImage *image)
#endif
#if defined(_TARGET_X86_) || defined(_TARGET_AMD64_)
- // StubPrecode and RemotingPrecode may have straddlers (relocations crossing pages) on x86 and x64. We need
+ // StubPrecode may have straddlers (relocations crossing pages) on x86 and x64. We need
// to insert padding to eliminate it. To do that, we need to save these using custom ZapNode that can only
// be implemented in dataimage.cpp or zapper due to factoring of the header files.
BOOL fIsPrebound = IsPrebound(image);
@@ -727,11 +699,6 @@ void Precode::Fixup(DataImage *image, MethodDesc * pMD)
AsNDirectImportPrecode()->Fixup(image);
break;
#endif // HAS_NDIRECT_IMPORT_PRECODE
-#ifdef HAS_REMOTING_PRECODE
- case PRECODE_REMOTING:
- AsRemotingPrecode()->Fixup(image, pCodeNode);
- break;
-#endif // HAS_REMOTING_PRECODE
#ifdef HAS_FIXUP_PRECODE
case PRECODE_FIXUP:
AsFixupPrecode()->Fixup(image, pMD);
@@ -748,19 +715,7 @@ BOOL Precode::IsPrebound(DataImage *image)
{
WRAPPER_NO_CONTRACT;
-#ifdef HAS_REMOTING_PRECODE
- // This will make sure that when IBC logging is on, the precode goes thru prestub.
- if (GetAppDomain()->ToCompilationDomain()->m_fForceInstrument)
- return FALSE;
-
- if (GetType() != PRECODE_REMOTING)
- return FALSE;
-
- // Prebind the remoting precode if possible
- return image->CanDirectCall(GetMethodDesc(), CORINFO_ACCESS_THIS);
-#else
return FALSE;
-#endif
}
void Precode::SaveChunk::Save(DataImage* image, MethodDesc * pMD)
diff --git a/src/vm/precode.h b/src/vm/precode.h
index 1a61253921..fe55d6f954 100644
--- a/src/vm/precode.h
+++ b/src/vm/precode.h
@@ -22,9 +22,6 @@ enum PrecodeType {
#ifdef HAS_NDIRECT_IMPORT_PRECODE
PRECODE_NDIRECT_IMPORT = NDirectImportPrecode::Type,
#endif // HAS_NDIRECT_IMPORT_PRECODE
-#ifdef HAS_REMOTING_PRECODE
- PRECODE_REMOTING = RemotingPrecode::Type,
-#endif // HAS_REMOTING_PRECODE
#ifdef HAS_FIXUP_PRECODE
PRECODE_FIXUP = FixupPrecode::Type,
#endif // HAS_FIXUP_PRECODE
@@ -63,16 +60,6 @@ public:
private:
#endif // HAS_NDIRECT_IMPORT_PRECODE
-#ifdef HAS_REMOTING_PRECODE
- RemotingPrecode* AsRemotingPrecode()
- {
- LIMITED_METHOD_CONTRACT;
- SUPPORTS_DAC;
-
- return dac_cast<PTR_RemotingPrecode>(this);
- }
-#endif // HAS_REMOTING_PRECODE
-
#ifdef HAS_FIXUP_PRECODE
FixupPrecode* AsFixupPrecode()
{
@@ -220,12 +207,6 @@ public:
WRAPPER_NO_CONTRACT;
SUPPORTS_DAC;
-#ifdef HAS_REMOTING_PRECODE
- // Remoting precode is special case
- if (GetType() == PRECODE_REMOTING)
- return FALSE;
-#endif
-
return IsPointingTo(GetTarget(), pNativeCode);
}
diff --git a/src/vm/prestub.cpp b/src/vm/prestub.cpp
index b53f1360e4..b614e341a2 100644
--- a/src/vm/prestub.cpp
+++ b/src/vm/prestub.cpp
@@ -1528,7 +1528,7 @@ extern "C" PCODE STDCALL PreStubWorker(TransitionBlock * pTransitionBlock, Metho
if (curobj != NULL) // Check for virtual function called non-virtually on a NULL object
{
- pDispatchingMT = curobj->GetTrueMethodTable();
+ pDispatchingMT = curobj->GetMethodTable();
#ifdef FEATURE_ICASTABLE
if (pDispatchingMT->IsICastable())
@@ -1730,15 +1730,6 @@ PCODE MethodDesc::DoPrestub(MethodTable *pDispatchingMT)
pThread->HandleThreadAbort();
}
- /************************** CLASS CONSTRUCTOR ********************/
- // Make sure .cctor has been run
-
- if (IsClassConstructorTriggeredViaPrestub())
- {
- pMT->CheckRunClassInitThrowing();
- }
-
-
/*************************** CALL COUNTER ***********************/
// If we are counting calls for tiered compilation, leave the prestub
// in place so that we can continue intercepting method invocations.
@@ -2376,7 +2367,7 @@ EXTERN_C PCODE VirtualMethodFixupWorker(Object * pThisPtr, CORCOMPILE_VIRTUAL_I
_ASSERTE(pThisPtr != NULL);
VALIDATEOBJECT(pThisPtr);
- MethodTable * pMT = pThisPtr->GetTrueMethodTable();
+ MethodTable * pMT = pThisPtr->GetMethodTable();
WORD slotNumber = pThunk->slotNum;
_ASSERTE(slotNumber != (WORD)-1);
diff --git a/src/vm/proftoeeinterfaceimpl.cpp b/src/vm/proftoeeinterfaceimpl.cpp
index da160c9d0b..2238543066 100644
--- a/src/vm/proftoeeinterfaceimpl.cpp
+++ b/src/vm/proftoeeinterfaceimpl.cpp
@@ -2882,7 +2882,7 @@ HRESULT ProfToEEInterfaceImpl::GetArrayObjectInfoHelper(Object * pObj,
CONTRACTL_END;
// Must have an array.
- MethodTable * pMT = pObj->GetTrueMethodTable();
+ MethodTable * pMT = pObj->GetMethodTable();
if (!pMT->IsArray())
{
return E_INVALIDARG;
diff --git a/src/vm/rcwwalker.cpp b/src/vm/rcwwalker.cpp
index 7ecf2b68c5..a6dfd03ab3 100644
--- a/src/vm/rcwwalker.cpp
+++ b/src/vm/rcwwalker.cpp
@@ -266,7 +266,7 @@ STDMETHODIMP CLRServicesImpl::CreateManagedReference(IUnknown *pTarget, ICCW **p
//
// Figure out the right IVector<T1>/IVectorView<T2>
//
- MethodTable *pMT = gc.TargetObj->GetTrueMethodTable();
+ MethodTable *pMT = gc.TargetObj->GetMethodTable();
TypeHandle thArgs[2];
diff --git a/src/vm/runtimecallablewrapper.cpp b/src/vm/runtimecallablewrapper.cpp
index 6f833b0dcb..0832b5616b 100644
--- a/src/vm/runtimecallablewrapper.cpp
+++ b/src/vm/runtimecallablewrapper.cpp
@@ -3556,7 +3556,7 @@ MethodDesc *RCW::GetGetEnumeratorMethod()
MethodTable *pClsMT;
{
GCX_COOP();
- pClsMT = GetExposedObject()->GetTrueMethodTable();
+ pClsMT = GetExposedObject()->GetMethodTable();
}
SetGetEnumeratorMethod(pClsMT);
@@ -3929,7 +3929,7 @@ HRESULT RCW::CallQueryInterfaceUsingVariance(MethodTable *pMT, IUnknown **ppUnk)
{
GCX_COOP();
- pClassMT = GetExposedObject()->GetTrueMethodTable();
+ pClassMT = GetExposedObject()->GetMethodTable();
}
// Try interfaces that we know about from metadata
diff --git a/src/vm/stackwalk.cpp b/src/vm/stackwalk.cpp
index 345a67074d..1b1c2a2a08 100644
--- a/src/vm/stackwalk.cpp
+++ b/src/vm/stackwalk.cpp
@@ -2441,8 +2441,6 @@ StackWalkAction StackFrameIterator::NextRaw(void)
_ASSERTE(orUnwind != NULL);
VALIDATEOBJECTREF(orUnwind);
- _ASSERTE(!orUnwind->IsTransparentProxy());
-
if (orUnwind != NULL)
{
orUnwind->LeaveObjMonitorAtException();
diff --git a/src/vm/stdinterfaces.cpp b/src/vm/stdinterfaces.cpp
index 005748ce2d..cfcfd436a2 100644
--- a/src/vm/stdinterfaces.cpp
+++ b/src/vm/stdinterfaces.cpp
@@ -84,7 +84,6 @@ const SLOT * const g_rgStdVtables[] =
(SLOT*)&g_IMarshal.m_vtable,
(SLOT*)&g_ISupportsErrorInfo.m_vtable,
(SLOT*)&g_IErrorInfo.m_vtable,
- (SLOT*)&g_IManagedObject.m_vtable,
(SLOT*)&g_IConnectionPointContainer.m_vtable,
(SLOT*)&g_IObjectSafety.m_vtable,
(SLOT*)&g_IDispatchEx.m_vtable,
@@ -2663,94 +2662,6 @@ HRESULT __stdcall Marshal_DisconnectObject (IMarshal* pMarsh, ULONG dwReserved)
}
//------------------------------------------------------------------------------------------
-// IManagedObject methods for COM+ objects
-//------------------------------------------------------------------------------------------
-HRESULT __stdcall ManagedObject_GetObjectIdentity(IManagedObject *pManaged,
- BSTR* pBSTRGUID, DWORD* pAppDomainID,
- void** pCCW)
-{
- // NOTE: THIS METHOD CAN BE CALLED FROM ANY APP DOMAIN
-
- CONTRACTL
- {
- DISABLED(NOTHROW);
- GC_TRIGGERS;
- MODE_PREEMPTIVE;
- INJECT_FAULT(ThrowOutOfMemory());
- PRECONDITION(CheckPointer(pManaged));
- PRECONDITION(IsSimpleTearOff(pManaged));
- PRECONDITION(CheckPointer(pBSTRGUID, NULL_OK));
- PRECONDITION(CheckPointer(pAppDomainID, NULL_OK));
- PRECONDITION(CheckPointer(pCCW, NULL_OK));
- }
- CONTRACTL_END;
-
- if (pBSTRGUID == NULL || pAppDomainID == NULL || pCCW == NULL)
- return E_POINTER;
-
- HRESULT hr = S_OK;
- BEGIN_EXTERNAL_ENTRYPOINT(&hr)
- {
- *pCCW = 0;
- *pAppDomainID = 0;
-
- BSTR bstrProcGUID = GetProcessGUID();
- BSTR bstrRetGUID = ::SysAllocString((WCHAR *)bstrProcGUID);
-
- if (bstrRetGUID == NULL)
- ThrowOutOfMemory();
-
- *pBSTRGUID = bstrRetGUID;
-
- SimpleComCallWrapper *pSimpleWrap = SimpleComCallWrapper::GetWrapperFromIP(pManaged);
- _ASSERTE(GET_THREAD()->GetDomain()->GetId() == pSimpleWrap->GetDomainID());
-
- ComCallWrapper* pComCallWrap = pSimpleWrap->GetMainWrapper();
- _ASSERTE(pComCallWrap);
-
- GCX_COOP_THREAD_EXISTS(GET_THREAD());
- {
- OBJECTREF oref = pComCallWrap->GetObjectRef();
-
- // The parameter is typed as void** but due to the potential cross process (cross bitness)
- // nature of this call, only the lower 32-bits of the returned value are guaranteed to be
- // received by the caller. Instead of a CCW pointer which was the original intended use of
- // this parameter, we'll pass a syncblock index which is always DWORD sized. The parameter
- // is protocol-documented to be "implementation-specific, opaque value that helps identify
- // the managed object" so we can pass whatever we want without legal consequences.
- *pCCW = (void *)oref->GetSyncBlockIndex();
- }
-
- AppDomain* pDomain = GET_THREAD()->GetDomain();
- _ASSERTE(pDomain != NULL);
-
- *pAppDomainID = pDomain->GetId().m_dwId;
- }
- END_EXTERNAL_ENTRYPOINT;
-
- return hr;
-}
-
-
-HRESULT __stdcall ManagedObject_GetSerializedBuffer(IManagedObject *pManaged,
- BSTR* pBStr)
-{
- CONTRACTL
- {
- DISABLED(NOTHROW);
- GC_TRIGGERS;
- MODE_PREEMPTIVE;
- PRECONDITION(CheckPointer(pManaged));
- PRECONDITION(IsSimpleTearOff(pManaged));
- PRECONDITION(CheckPointer(pBStr, NULL_OK));
- }
- CONTRACTL_END;
-
- _ASSERTE(!"NYI");
- return E_NOTIMPL;
-}
-
-//------------------------------------------------------------------------------------------
// IConnectionPointContainer methods for COM+ objects
//------------------------------------------------------------------------------------------
diff --git a/src/vm/stdinterfaces.h b/src/vm/stdinterfaces.h
index 3ef26d1563..fd274d4bfc 100644
--- a/src/vm/stdinterfaces.h
+++ b/src/vm/stdinterfaces.h
@@ -80,7 +80,6 @@ enum Enum_StdInterfaces
enum_IMarshal,
enum_ISupportsErrorInfo,
enum_IErrorInfo,
- enum_IManagedObject,
enum_IConnectionPointContainer,
enum_IObjectSafety,
enum_IDispatchEx,
@@ -134,7 +133,6 @@ extern const StdInterfaceDesc<4> g_IProvideClassInfo;
extern const StdInterfaceDesc<9> g_IMarshal;
extern const StdInterfaceDesc<4> g_ISupportsErrorInfo;
extern const StdInterfaceDesc<8> g_IErrorInfo;
-extern const StdInterfaceDesc<5> g_IManagedObject;
extern const StdInterfaceDesc<5> g_IConnectionPointContainer;
extern const StdInterfaceDesc<5> g_IObjectSafety;
extern const StdInterfaceDesc<15> g_IDispatchEx;
@@ -402,20 +400,6 @@ HRESULT __stdcall Marshal_DisconnectObject_Wrapper (IMarshal* pMarsh, ULONG dwRe
//------------------------------------------------------------------------------------------
-// IManagedObject methods for COM+ objects
-
-interface IManagedObject;
-
-HRESULT __stdcall ManagedObject_GetObjectIdentity_Wrapper(IManagedObject *pManaged,
- BSTR* pBSTRGUID, DWORD* pAppDomainID,
- void** pCCW);
-
-
-HRESULT __stdcall ManagedObject_GetSerializedBuffer_Wrapper(IManagedObject *pManaged,
- BSTR* pBStr);
-
-
-//------------------------------------------------------------------------------------------
// IConnectionPointContainer methods for COM+ objects
interface IEnumConnectionPoints;
diff --git a/src/vm/stdinterfaces_internal.h b/src/vm/stdinterfaces_internal.h
index c19559b036..435d32e90f 100644
--- a/src/vm/stdinterfaces_internal.h
+++ b/src/vm/stdinterfaces_internal.h
@@ -312,26 +312,6 @@ HRESULT __stdcall Marshal_DisconnectObject (IMarshal* pMarsh, ULONG dwReserved);
//------------------------------------------------------------------------------------------
-// IManagedObject methods for COM+ objects
-
-interface IManagedObject;
-
-
-HRESULT __stdcall ManagedObject_RemoteDispatchAutoDone(IManagedObject *pManaged, BSTR bstr,
- BSTR* pBStrRet);
-
-HRESULT __stdcall ManagedObject_RemoteDispatchNotAutoDone(IManagedObject *pManaged, BSTR bstr,
- BSTR* pBStrRet);
-
-HRESULT __stdcall ManagedObject_GetObjectIdentity(IManagedObject *pManaged,
- BSTR* pBSTRGUID, DWORD* pAppDomainID,
- void** pCCW);
-
-
-HRESULT __stdcall ManagedObject_GetSerializedBuffer(IManagedObject *pManaged,
- BSTR* pBStr);
-
-//------------------------------------------------------------------------------------------
// IConnectionPointContainer methods for COM+ objects
interface IEnumConnectionPoints;
diff --git a/src/vm/stdinterfaces_wrapper.cpp b/src/vm/stdinterfaces_wrapper.cpp
index 62657519da..e806ef8973 100644
--- a/src/vm/stdinterfaces_wrapper.cpp
+++ b/src/vm/stdinterfaces_wrapper.cpp
@@ -43,7 +43,6 @@
interface IEnumConnectionPoints;
-interface IManagedObject;
// IUnknown is part of IDispatch
// Common vtables for well-known COM interfaces
@@ -128,19 +127,6 @@ const StdInterfaceDesc<8> g_IErrorInfo =
}
};
-// global IManagedObject vtable
-const StdInterfaceDesc<5> g_IManagedObject =
-{
- enum_IManagedObject,
- {
- (UINT_PTR*)Unknown_QueryInterface,
- (UINT_PTR*)Unknown_AddRefSpecial,
- (UINT_PTR*)Unknown_ReleaseSpecial,
- (UINT_PTR*)ManagedObject_GetSerializedBuffer_Wrapper,
- (UINT_PTR*)ManagedObject_GetObjectIdentity_Wrapper
- }
-};
-
// global IConnectionPointContainer vtable
const StdInterfaceDesc<5> g_IConnectionPointContainer =
{
@@ -2631,118 +2617,6 @@ HRESULT __stdcall Marshal_DisconnectObject_Wrapper(IMarshal* pMarsh, ULONG dwRes
return hr;
}
-
-// ---------------------------------------------------------------------------
-// Interface IManagedObject
-
-struct GetObjectIdentityArgs
-{
- IManagedObject *pUnk;
- BSTR* pBSTRGUID;
- DWORD* pAppDomainID;
- void** pCCW;
- HRESULT* hr;
-};
-
-VOID __stdcall ManagedObject_GetObjectIdentity_CallBack(LPVOID ptr)
-{
- CONTRACTL
- {
- NOTHROW;
- GC_TRIGGERS;
- MODE_PREEMPTIVE;
- PRECONDITION(CheckPointer(ptr));
- }
- CONTRACTL_END;
-
- GetObjectIdentityArgs* pArgs = (GetObjectIdentityArgs*)ptr;
- ComCallWrapper* pWrap = MapIUnknownToWrapper(pArgs->pUnk);
- if (IsCurrentDomainValid(pWrap))
- {
- *(pArgs->hr) = ManagedObject_GetObjectIdentity(pArgs->pUnk, pArgs->pBSTRGUID, pArgs->pAppDomainID,
- pArgs->pCCW);
- }
- else
- {
- AppDomainDoCallBack(pWrap, ManagedObject_GetObjectIdentity_CallBack, pArgs, pArgs->hr);
- }
-}
-
-HRESULT __stdcall ManagedObject_GetObjectIdentity_Wrapper(IManagedObject *pUnk, BSTR* pBSTRGUID, DWORD* pAppDomainID, void** pCCW)
-{
- SetupForComCallHR();
-
- CONTRACTL
- {
- NOTHROW;
- GC_TRIGGERS;
- MODE_PREEMPTIVE;
- SO_TOLERANT;
- PRECONDITION(CheckPointer(pUnk));
- PRECONDITION(CheckPointer(pBSTRGUID, NULL_OK));
- PRECONDITION(CheckPointer(pAppDomainID, NULL_OK));
- PRECONDITION(CheckPointer(pCCW, NULL_OK));
- }
- CONTRACTL_END;
-
- HRESULT hr = S_OK;
- GetObjectIdentityArgs args = {pUnk, pBSTRGUID, pAppDomainID, pCCW, &hr};
- ManagedObject_GetObjectIdentity_CallBack(&args);
- return hr;
-}
-
-struct GetSerializedBufferArgs
-{
- IManagedObject *pUnk;
- BSTR* pBStr;
- HRESULT* hr;
-};
-
-VOID __stdcall ManagedObject_GetSerializedBuffer_CallBack(LPVOID ptr)
-{
- CONTRACTL
- {
- NOTHROW;
- GC_TRIGGERS;
- MODE_PREEMPTIVE;
- PRECONDITION(CheckPointer(ptr));
- }
- CONTRACTL_END;
-
- GetSerializedBufferArgs* pArgs = (GetSerializedBufferArgs*)ptr;
- ComCallWrapper* pWrap = MapIUnknownToWrapper(pArgs->pUnk);
- if (IsCurrentDomainValid(pWrap))
- {
- *(pArgs->hr) = ManagedObject_GetSerializedBuffer(pArgs->pUnk, pArgs->pBStr);
- }
- else
- {
- AppDomainDoCallBack(pWrap, ManagedObject_GetSerializedBuffer_CallBack, pArgs, pArgs->hr);
- }
-}
-
-HRESULT __stdcall ManagedObject_GetSerializedBuffer_Wrapper(IManagedObject *pUnk, BSTR* pBStr)
-{
- SetupForComCallHR();
-
- CONTRACTL
- {
- NOTHROW;
- GC_TRIGGERS;
- MODE_PREEMPTIVE;
- SO_TOLERANT;
- PRECONDITION(CheckPointer(pUnk));
- PRECONDITION(CheckPointer(pBStr, NULL_OK));
- }
- CONTRACTL_END;
-
- HRESULT hr = S_OK;
- GetSerializedBufferArgs args = {pUnk, pBStr, &hr};
- ManagedObject_GetSerializedBuffer_CallBack(&args);
- return hr;
-}
-
-
// ---------------------------------------------------------------------------
// Interface IConnectionPointContainer
diff --git a/src/vm/stubhelpers.cpp b/src/vm/stubhelpers.cpp
index 1b168b9cce..42e90cd637 100644
--- a/src/vm/stubhelpers.cpp
+++ b/src/vm/stubhelpers.cpp
@@ -971,7 +971,7 @@ FCIMPL2(IInspectable *, StubHelpers::GetOuterInspectable, Object *pThisUNSAFE, M
OBJECTREF pThis = ObjectToOBJECTREF(pThisUNSAFE);
- if (pThis->GetTrueMethodTable() != pCtorMD->GetMethodTable())
+ if (pThis->GetMethodTable() != pCtorMD->GetMethodTable())
{
// this is a composition scenario
HELPER_METHOD_FRAME_BEGIN_RET_1(pThis);
diff --git a/src/vm/stubmgr.cpp b/src/vm/stubmgr.cpp
index 58c0fa34f5..9237eeb4b5 100644
--- a/src/vm/stubmgr.cpp
+++ b/src/vm/stubmgr.cpp
@@ -1060,17 +1060,6 @@ BOOL PrecodeStubManager::DoTraceStub(PCODE stubStartAddress,
return TRUE;
#endif // HAS_NDIRECT_IMPORT_PRECODE
-#ifdef HAS_REMOTING_PRECODE
- case PRECODE_REMOTING:
-#ifndef DACCESS_COMPILE
- trace->InitForManagerPush(GetEEFuncEntryPoint(PrecodeRemotingThunk), this);
-#else
- trace->InitForOther(NULL);
-#endif
- LOG_TRACE_DESTINATION(trace, stubStartAddress, "PrecodeStubManager::DoTraceStub - remoting");
- return TRUE;
-#endif // HAS_REMOTING_PRECODE
-
#ifdef HAS_FIXUP_PRECODE
case PRECODE_FIXUP:
break;
@@ -1136,64 +1125,8 @@ BOOL PrecodeStubManager::TraceManager(Thread *thread,
}
CONTRACTL_END;
- BOOL bRet = FALSE;
-
-#ifdef HAS_REMOTING_PRECODE
- PCODE ip = GetIP(pContext);
-
- if (ip == GetEEFuncEntryPoint(PrecodeRemotingThunk))
- {
- BYTE** pStack = (BYTE**)GetSP(pContext);
-
- // Aligning down will handle differences in layout of virtual and nonvirtual remoting precodes
-#ifdef _TARGET_ARM_
- // The offset here is Lr-7. 6 for the size of the Precode struct, 1 for THUMB_CODE alignment.
- Precode* pPrecode = (Precode*)(pContext->Lr - 7);
-
- _ASSERTE(pPrecode->GetType() == PRECODE_REMOTING);
-
- // We need to tell the debugger where we're returning to just in case
- // the debugger can't continue on.
- *pRetAddr = pStack[1];
-
- Object* pThis = (Object*)(size_t)pContext->R0;
-#else
- Precode* pPrecode = (Precode*)ALIGN_DOWN(pStack[0] - sizeof(INT32)
- - offsetof(RemotingPrecode,m_callRel32),
- PRECODE_ALIGNMENT);
-
- _ASSERTE(pPrecode->GetType() == PRECODE_REMOTING);
-
- // We need to tell the debugger where we're returning to just in case
- // the debugger can't continue on.
- *pRetAddr = pStack[1];
-
- Object* pThis = (Object*)(size_t)pContext->Ecx;
-#endif
-
- if (pThis != NULL && pThis->IsTransparentProxy())
- {
- // We have proxy in the way.
-#ifdef DACCESS_COMPILE
- DacNotImpl();
-#else
- trace->InitForFramePush(GetEEFuncEntryPoint(TransparentProxyStubPatchLabel));
-#endif
- }
- else
- {
- // No proxy in the way. Follow the target.
- trace->InitForStub(pPrecode->GetTarget());
- }
- bRet = TRUE;
- }
- else
-#endif // HAS_REMOTING_PRECODE
- {
- _ASSERTE(!"Unexpected call to PrecodeStubManager::TraceManager");
- }
-
- return bRet;
+ _ASSERTE(!"Unexpected call to PrecodeStubManager::TraceManager");
+ return FALSE;
}
#endif
diff --git a/src/vm/typehandle.cpp b/src/vm/typehandle.cpp
index 0b3f81f1ce..1d34f07890 100644
--- a/src/vm/typehandle.cpp
+++ b/src/vm/typehandle.cpp
@@ -488,12 +488,6 @@ BOOL TypeHandle::IsAbstract() const
return GetMethodTable()->IsAbstract();
}
-DWORD TypeHandle::IsTransparentProxy() const
-{
- WRAPPER_NO_CONTRACT;
- return FALSE;
-}
-
bool TypeHandle::IsHFA() const
{
WRAPPER_NO_CONTRACT;
@@ -732,9 +726,6 @@ BOOL TypeHandle::CanCastTo(TypeHandle type, TypeHandlePairList *pVisited) const
if (type.IsTypeDesc())
return(false);
- if (AsMethodTable()->IsTransparentProxy())
- return (false);
-
return AsMethodTable()->CanCastToClassOrInterface(type.AsMethodTable(), pVisited);
}
@@ -752,9 +743,6 @@ TypeHandle::CastResult TypeHandle::CanCastToNoGC(TypeHandle type) const
if (type.IsTypeDesc())
return(CannotCast);
- if (AsMethodTable()->IsTransparentProxy())
- return (CannotCast);
-
return AsMethodTable()->CanCastToClassOrInterfaceNoGC(type.AsMethodTable());
}
#include <optdefault.h>
@@ -1254,7 +1242,6 @@ OBJECTREF TypeHandle::GetManagedClassObject() const
if (!IsTypeDesc())
{
- _ASSERT(AsMethodTable()->IsTransparentProxy() == false);
return AsMethodTable()->GetManagedClassObject();
}
else
diff --git a/src/vm/typehandle.h b/src/vm/typehandle.h
index 3364d76e48..3ac1f304cf 100644
--- a/src/vm/typehandle.h
+++ b/src/vm/typehandle.h
@@ -364,8 +364,6 @@ public:
return *this == TypeHandle(g_pObjectClass);
}
- DWORD IsTransparentProxy() const;
-
// Retrieve the key corresponding to this handle
TypeKey GetTypeKey() const;
diff --git a/src/vm/virtualcallstub.cpp b/src/vm/virtualcallstub.cpp
index 5dc59b1c4f..657200b2ee 100644
--- a/src/vm/virtualcallstub.cpp
+++ b/src/vm/virtualcallstub.cpp
@@ -1574,7 +1574,7 @@ PCODE VSD_ResolveWorker(TransitionBlock * pTransitionBlock,
pSDFrame->SetCallSite(NULL, (TADDR)callSite.GetIndirectCell());
DispatchToken representativeToken(token);
- MethodTable * pRepresentativeMT = pObj->GetTrueMethodTable();
+ MethodTable * pRepresentativeMT = pObj->GetMethodTable();
if (representativeToken.IsTypedToken())
{
pRepresentativeMT = CURRENT_THREAD->GetDomain()->LookupType(representativeToken.GetTypeID());
@@ -1802,8 +1802,7 @@ PCODE VirtualCallStubManager::ResolveWorker(StubCallSite* pCallSite,
patch = Resolver(objectType, token, protectedObj, &target);
#if defined(_DEBUG)
- if ( !objectType->IsTransparentProxy() &&
- !objectType->IsComObjectType() &&
+ if ( !objectType->IsComObjectType() &&
!objectType->IsICastable())
{
CONSISTENCY_CHECK(!MethodTable::GetMethodDescForSlotAddress(target)->IsGenericMethodDefinition());
@@ -2430,11 +2429,6 @@ VirtualCallStubManager::GetTarget(
PRECONDITION(CheckPointer(pMT));
} CONTRACTL_END
- // ToDo: add this after checking that reflection
- // doesn't send us a TransparentProxy
- //
- // CONSISTENCY_CHECK(!pMT->IsTransparentProxy());
-
g_external_call++;
if (token.IsThisToken())
@@ -4035,8 +4029,6 @@ MethodDesc *VirtualCallStubManagerManager::Entry2MethodDesc(
// Do the full resolve
size_t token = VirtualCallStubManager::GetTokenFromStubQuick(pMgr, stubStartAddress, sk);
- CONSISTENCY_CHECK(!pMT->IsTransparentProxy());
-
PCODE target = NULL;
// TODO: passing NULL as protectedObj here can lead to incorrect behavior for ICastable objects
// We need to review if this is the case and refactor this code if we want ICastable to become officially supported