summaryrefslogtreecommitdiff
path: root/src/vm/methodtable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/methodtable.cpp')
-rw-r--r--src/vm/methodtable.cpp191
1 files changed, 2 insertions, 189 deletions
diff --git a/src/vm/methodtable.cpp b/src/vm/methodtable.cpp
index 6fee50b9b1..21fab720f2 100644
--- a/src/vm/methodtable.cpp
+++ b/src/vm/methodtable.cpp
@@ -40,9 +40,6 @@
#include "eventtrace.h"
#include "fieldmarshaler.h"
-#ifdef FEATURE_REMOTING
-#include "remoting.h"
-#endif
#include "eeprofinterfaces.h"
#include "dllimportcallback.h"
@@ -60,8 +57,6 @@
#include "zapsig.h"
#endif //FEATURE_PREJIT
-#include "hostexecutioncontext.h"
-
#ifdef FEATURE_COMINTEROP
#include "comcallablewrapper.h"
#include "clrtocomcall.h"
@@ -78,9 +73,6 @@
#include "genericdict.h"
#include "typestring.h"
#include "typedesc.h"
-#ifdef FEATURE_REMOTING
-#include "crossdomaincalls.h"
-#endif
#include "array.h"
#ifdef FEATURE_INTERPRETER
@@ -625,7 +617,7 @@ void MethodTable::SetComObjectType()
#endif // FEATURE_COMINTEROP
-#if defined(FEATURE_TYPEEQUIVALENCE) || defined(FEATURE_REMOTING)
+#if defined(FEATURE_TYPEEQUIVALENCE)
void MethodTable::SetHasTypeEquivalence()
{
LIMITED_METHOD_CONTRACT;
@@ -969,56 +961,6 @@ MethodTable* CreateMinimalMethodTable(Module* pContainingModule,
return pMT;
}
-#ifdef FEATURE_REMOTING
-//==========================================================================================
-void MethodTable::SetupRemotableMethodInfo(AllocMemTracker *pamTracker)
-{
- CONTRACTL
- {
- THROWS;
- GC_NOTRIGGER;
- MODE_ANY;
- }
- CONTRACTL_END;
- // Make RMI for a method table.
- CrossDomainOptimizationInfo *pRMIBegin = NULL;
- if (GetNumMethods() > 0)
- {
- SIZE_T requiredSize = CrossDomainOptimizationInfo::SizeOf(GetNumVtableSlots());
- pRMIBegin = (CrossDomainOptimizationInfo*) pamTracker->Track(GetLoaderAllocator()->GetLowFrequencyHeap()->AllocMem(S_SIZE_T(requiredSize)));
- _ASSERTE(IS_ALIGNED(pRMIBegin, sizeof(void*)));
- }
- *(GetRemotableMethodInfoPtr()) = pRMIBegin;
-}
-
-//==========================================================================================
-PTR_RemotingVtsInfo MethodTable::AllocateRemotingVtsInfo(AllocMemTracker *pamTracker, DWORD dwNumFields)
-{
- CONTRACTL
- {
- THROWS;
- GC_NOTRIGGER;
- MODE_ANY;
- }
- CONTRACTL_END;
-
- // Size the data structure to contain enough bit flags for all the
- // instance fields.
- DWORD cbInfo = RemotingVtsInfo::GetSize(dwNumFields);
- RemotingVtsInfo *pInfo = (RemotingVtsInfo*)pamTracker->Track(GetLoaderAllocator()->GetLowFrequencyHeap()->AllocMem(S_SIZE_T(cbInfo)));
-
- // Note: Memory allocated on loader heap is zero filled
- // ZeroMemory(pInfo, cbInfo);
-
-#ifdef _DEBUG
- pInfo->m_dwNumFields = dwNumFields;
-#endif
-
- *(GetRemotingVtsInfoPtr()) = pInfo;
-
- return pInfo;
-}
-#endif // FEATURE_REMOTING
#ifdef FEATURE_COMINTEROP
#ifndef CROSSGEN_COMPILE
@@ -3038,7 +2980,7 @@ bool MethodTable::ClassifyEightBytesWithNativeLayout(SystemVStructRegisterPassin
}
// Assigns the classification types to the array with eightbyte types.
-void MethodTable::AssignClassifiedEightByteTypes(SystemVStructRegisterPassingHelperPtr helperPtr, unsigned int nestingLevel)
+void MethodTable::AssignClassifiedEightByteTypes(SystemVStructRegisterPassingHelperPtr helperPtr, unsigned int nestingLevel) const
{
static const size_t CLR_SYSTEMV_MAX_BYTES_TO_PASS_IN_REGISTERS = CLR_SYSTEMV_MAX_EIGHTBYTES_COUNT_TO_PASS_IN_REGISTERS * SYSTEMV_EIGHT_BYTE_SIZE_IN_BYTES;
static_assert_no_msg(CLR_SYSTEMV_MAX_BYTES_TO_PASS_IN_REGISTERS == SYSTEMV_MAX_NUM_FIELDS_IN_REGISTER_PASSED_STRUCT);
@@ -3965,10 +3907,6 @@ void MethodTable::CallFinalizer(Object *obj)
return;
}
-#ifdef FEATURE_CAS_POLICY
- // Notify the host to setup the restricted context before finalizing each object
- HostExecutionContextManager::SetHostRestrictedContext();
-#endif // FEATURE_CAS_POLICY
// Determine if the object has a critical or normal finalizer.
BOOL fCriticalFinalizer = pMT->HasCriticalFinalizer();
@@ -4293,25 +4231,6 @@ void MethodTable::Save(DataImage *image, DWORD profilingFlags)
}
#endif // FEATURE_COMINTEROP
-#ifdef FEATURE_REMOTING
- if (HasRemotableMethodInfo())
- {
- if (GetNumMethods() > 0)
- {
- // The CrossDomainOptimizationInfo was populated earlier in Module::PrepareTypesForSave
- CrossDomainOptimizationInfo* pRMI = GetRemotableMethodInfo();
- SIZE_T sizeToBeSaved = CrossDomainOptimizationInfo::SizeOf(this);
- image->StoreStructure(pRMI, sizeToBeSaved,
- DataImage::ITEM_CROSS_DOMAIN_INFO);
- }
- }
-
- // Store any optional VTS (Version Tolerant Serialization) info.
- if (HasRemotingVtsInfo())
- image->StoreStructure(GetRemotingVtsInfo(),
- RemotingVtsInfo::GetSize(GetNumIntroducedInstanceFields()),
- DataImage::ITEM_VTS_INFO);
-#endif //FEATURE_REMOTING
#ifdef _DEBUG
if (GetDebugClassName() != NULL && !image->IsStored(GetDebugClassName()))
@@ -4457,19 +4376,6 @@ void MethodTable::Save(DataImage *image, DWORD profilingFlags)
// MethodTable WriteableData
-#ifdef FEATURE_REMOTING
- // Store any context static info.
- if (HasContextStatics())
- {
- DataImage::ItemKind kindWriteable = DataImage::ITEM_METHOD_TABLE_DATA_COLD_WRITEABLE;
- if ((profilingFlags & (1 << WriteMethodTableWriteableData)) != 0)
- kindWriteable = DataImage::ITEM_METHOD_TABLE_DATA_HOT_WRITEABLE;
-
- image->StoreStructure(GetContextStaticsBucket(),
- sizeof(ContextStaticsBucket),
- kindWriteable);
- }
-#endif // FEATURE_REMOTING
PTR_Const_MethodTableWriteableData pWriteableData = GetWriteableData_NoLogging();
_ASSERTE(pWriteableData != NULL);
@@ -4709,11 +4615,6 @@ BOOL MethodTable::IsWriteable()
{
STANDARD_VM_CONTRACT;
- // Overlapped method table is written into in hosted scenarios
- // (see code:CorHost2::GetHostOverlappedExtensionSize)
- if (MscorlibBinder::IsClass(this, CLASS__OVERLAPPEDDATA))
- return TRUE;
-
#ifdef FEATURE_COMINTEROP
// Dynamic expansion of interface map writes into method table
// (see code:MethodTable::AddDynamicInterface)
@@ -4933,27 +4834,6 @@ void MethodTable::Fixup(DataImage *image)
}
#endif // FEATURE_COMINTEROP
-#ifdef FEATURE_REMOTING
- if (HasRemotableMethodInfo())
- {
- CrossDomainOptimizationInfo **pRMI = GetRemotableMethodInfoPtr();
- if (*pRMI != NULL)
- {
- image->FixupPointerField(this, (BYTE *)pRMI - (BYTE *)this);
- }
- }
-
- // Optional VTS (Version Tolerant Serialization) fixups.
- if (HasRemotingVtsInfo())
- {
- RemotingVtsInfo **ppVtsInfo = GetRemotingVtsInfoPtr();
- image->FixupPointerField(this, (BYTE *)ppVtsInfo - (BYTE *)this);
-
- RemotingVtsInfo *pVtsInfo = *ppVtsInfo;
- for (DWORD i = 0; i < RemotingVtsInfo::VTS_NUM_CALLBACK_TYPES; i++)
- image->FixupMethodDescPointer(pVtsInfo, &pVtsInfo->m_pCallbacks[i]);
- }
-#endif //FEATURE_REMOTING
//
// Fix flags
@@ -5180,16 +5060,6 @@ void MethodTable::Fixup(DataImage *image)
_ASSERTE(!NeedsCrossModuleGenericsStaticsInfo());
}
-#ifdef FEATURE_REMOTING
- if (HasContextStatics())
- {
- ContextStaticsBucket **ppInfo = GetContextStaticsBucketPtr();
- image->FixupPointerField(this, (BYTE *)ppInfo - (BYTE *)this);
-
- ContextStaticsBucket *pNewInfo = (ContextStaticsBucket*)image->GetImagePointer(*ppInfo);
- pNewInfo->m_dwContextStaticsOffset = (DWORD)-1;
- }
-#endif // FEATURE_REMOTING
LOG((LF_ZAP, LL_INFO10000, "MethodTable::Fixup %s (%p) complete\n", GetDebugClassName(), this));
@@ -6259,9 +6129,6 @@ MethodTable* MethodTable::GetComPlusParentMethodTable()
// Skip over System.__ComObject, expect System.MarshalByRefObject
pParent=pParent->GetParentMethodTable();
_ASSERTE(pParent != NULL);
-#ifdef FEATURE_REMOTING
- _ASSERTE(pParent->IsMarshaledByRef());
-#endif
_ASSERTE(pParent->GetParentMethodTable() != NULL);
_ASSERTE(pParent->GetParentMethodTable() == g_pObjectClass);
}
@@ -9742,66 +9609,12 @@ LPCWSTR MethodTable::GetPathForErrorMessages()
}
}
-#ifdef FEATURE_REMOTING
-//==========================================================================================
-// context static functions
-void MethodTable::SetupContextStatics(AllocMemTracker *pamTracker, WORD wContextStaticsSize)
-{
- STANDARD_VM_CONTRACT;
-
- ContextStaticsBucket* pCSInfo = (ContextStaticsBucket*) pamTracker->Track(GetLoaderAllocator()->GetLowFrequencyHeap()->AllocMem(S_SIZE_T(sizeof(ContextStaticsBucket))));
- *(GetContextStaticsBucketPtr()) = pCSInfo;
-
- pCSInfo->m_dwContextStaticsOffset = (DWORD)-1; // Initialized lazily
- pCSInfo->m_wContextStaticsSize = wContextStaticsSize;
-}
-
-#ifndef CROSSGEN_COMPILE
-//==========================================================================================
-DWORD MethodTable::AllocateContextStaticsOffset()
-{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- MODE_ANY;
- }
- CONTRACTL_END;
-
- g_IBCLogger.LogMethodTableWriteableDataWriteAccess(this);
-
- BaseDomain* pDomain = IsDomainNeutral() ? SystemDomain::System() : GetDomain();
-
- ContextStaticsBucket* pCSInfo = GetContextStaticsBucket();
- DWORD* pOffsetSlot = &pCSInfo->m_dwContextStaticsOffset;
-
- return pDomain->AllocateContextStaticsOffset(pOffsetSlot);
-}
-#endif // CROSSGEN_COMPILE
-
-#endif // FEATURE_REMOTING
bool MethodTable::ClassRequiresUnmanagedCodeCheck()
{
LIMITED_METHOD_CONTRACT;
-#ifdef FEATURE_CORECLR
return false;
-#else
- // all WinRT types have an imaginary [SuppressUnmanagedCodeSecurity] attribute on them
- if (IsProjectedFromWinRT())
- return false;
-
- // In AppX processes, there is only one full trust AppDomain, so there is never any need to do a security
- // callout on interop stubs
- if (AppX::IsAppXProcess())
- return false;
-
- return GetMDImport()->GetCustomAttributeByName(GetCl(),
- COR_SUPPRESS_UNMANAGED_CODE_CHECK_ATTRIBUTE_ANSI,
- NULL,
- NULL) == S_FALSE;
-#endif // FEATURE_CORECLR
}
#endif // !DACCESS_COMPILE