ExtOut("NumThreadStaticFields: %x\n", vMethodTableFields.wNumThreadStaticFields);
}
-
- if (vMethodTableFields.wContextStaticsSize)
- {
- ExtOut("ContextStaticOffset: %x\n", vMethodTableFields.wContextStaticOffset);
- ExtOut("ContextStaticsSize: %x\n", vMethodTableFields.wContextStaticsSize);
- }
-
-
if (vMethodTableFields.wNumInstanceFields + vMethodTableFields.wNumStaticFields > 0)
{
DisplayFields(methodTable, &mtdata, &vMethodTableFields, NULL, TRUE, FALSE);
ExtOut(" <<\n");
}
-void DisplayContextStatic (DacpFieldDescData *pFD, size_t offset, BOOL fIsShared)
-{
- ExtOut("\nDisplay of context static variables is not implemented yet\n");
- /*
- int numDomain;
- DWORD_PTR *domainList = NULL;
- GetDomainList (domainList, numDomain);
- ToDestroy des0 ((void**)&domainList);
- AppDomain vAppDomain;
- Context vContext;
-
- ExtOut(" >> Domain:Value");
- for (int i = 0; i < numDomain; i ++)
- {
- DWORD_PTR dwAddr = domainList[i];
- if (dwAddr == 0) {
- continue;
- }
- vAppDomain.Fill (dwAddr);
- if (vAppDomain.m_pDefaultContext == 0)
- continue;
- dwAddr = (DWORD_PTR)vAppDomain.m_pDefaultContext;
- vContext.Fill (dwAddr);
-
- if (fIsShared)
- dwAddr = (DWORD_PTR)vContext.m_pSharedStaticData;
- else
- dwAddr = (DWORD_PTR)vContext.m_pUnsharedStaticData;
- if (dwAddr == 0)
- continue;
- dwAddr += offsetof(STATIC_DATA, dataPtr);
- dwAddr += offset;
- if (safemove (dwAddr, dwAddr) == 0)
- continue;
- if (dwAddr == 0)
- // We have not initialized this yet.
- continue;
-
- dwAddr += pFD->dwOffset;
- if (pFD->Type == ELEMENT_TYPE_CLASS
- || pFD->Type == ELEMENT_TYPE_VALUETYPE)
- {
- if (safemove (dwAddr, dwAddr) == 0)
- continue;
- }
- if (dwAddr == 0)
- // We have not initialized this yet.
- continue;
- ExtOut(" %p:", (ULONG64)domainList[i]);
- DisplayDataMember (pFD, dwAddr, FALSE);
- }
- ExtOut(" <<\n");
- */
-}
-
const char * ElementTypeName(unsigned type)
{
switch (type) {
dwAddr = vFieldDesc.NextField;
DWORD offset = vFieldDesc.dwOffset;
- if(!((vFieldDesc.bIsThreadLocal || vFieldDesc.bIsContextLocal || fIsShared) && vFieldDesc.bIsStatic))
+ if(!((vFieldDesc.bIsThreadLocal || fIsShared) && vFieldDesc.bIsStatic))
{
if (!bValueClass)
{
ExtOut("%2s ", (IsElementValueType(vFieldDesc.Type)) ? "1" : "0");
- if (vFieldDesc.bIsStatic && (vFieldDesc.bIsThreadLocal || vFieldDesc.bIsContextLocal))
+ if (vFieldDesc.bIsStatic && vFieldDesc.bIsThreadLocal)
{
numStaticFields ++;
if (fIsShared)
DisplayThreadStatic(&vModule, pMTD, &vFieldDesc, fIsShared);
}
}
- else if (vFieldDesc.bIsContextLocal)
- {
- DisplayContextStatic(&vFieldDesc,
- pMTFD->wContextStaticOffset,
- fIsShared);
- }
}
}
pCurrentFieldData->m_vmFieldDesc.SetHostPtr(pFD);
pCurrentFieldData->m_fFldStorageAvailable = FALSE;
pCurrentFieldData->m_fFldIsTLS = FALSE;
- pCurrentFieldData->m_fFldIsContextStatic = FALSE;
pCurrentFieldData->m_fFldIsRVA = FALSE;
pCurrentFieldData->m_fFldIsCollectibleStatic = FALSE;
}
// completely DACized
pCurrentFieldData->m_vmFieldDesc.SetHostPtr(pFD);
pCurrentFieldData->m_fFldIsTLS = (pFD->IsThreadStatic() == TRUE);
- pCurrentFieldData->m_fFldIsContextStatic = (pFD->IsContextStatic() == TRUE);
pCurrentFieldData->m_fFldIsRVA = (pFD->IsRVA() == TRUE);
pCurrentFieldData->m_fFldIsCollectibleStatic = (pFD->IsStatic() == TRUE &&
pFD->GetEnclosingMethodTable()->Collectible());
pCurrentFieldData->SetStaticAddress(PTR_TO_TADDR(addr));
}
}
- else if (pFD->IsThreadStatic() || pFD->IsContextStatic() ||
+ else if (pFD->IsThreadStatic() ||
pCurrentFieldData->m_fFldIsCollectibleStatic)
{
// this is a special type of static that must be queried using DB_IPCE_GET_SPECIAL_STATIC
pFieldData->m_fFldIsTLS = (pFD->IsThreadStatic() == TRUE);
pFieldData->m_fldMetadataToken = pFD->GetMemberDef();
pFieldData->m_fFldIsRVA = (pFD->IsRVA() == TRUE);
- pFieldData->m_fFldIsContextStatic = (pFD->IsContextStatic() == TRUE);
pFieldData->m_fFldIsCollectibleStatic = FALSE;
pFieldData->m_fFldStorageAvailable = true;
if (pFieldData->m_fFldIsStatic)
{
//EnC is only supported on regular static fields
- _ASSERTE(!pFieldData->m_fFldIsContextStatic);
_ASSERTE(!pFieldData->m_fFldIsTLS);
_ASSERTE(!pFieldData->m_fFldIsRVA);
return hr;
}
}
- else if (!pFieldData->m_fFldIsTLS && !pFieldData->m_fFldIsContextStatic)
+ else if (!pFieldData->m_fFldIsTLS)
{
// Statics never move, so we always address them using their absolute address.
_ASSERTE(pFieldData->OkToGetOrSetStaticAddress());
// Thread-local and context-local statics cannot be added with EnC, so we shouldn't be here
// if this is an EnC field is thread- or context-local.
_ASSERTE(!pFieldData->m_fFldIsTLS );
- _ASSERTE(!pFieldData->m_fFldIsContextStatic );
}
else
{
bool fIsBoxed = (fIsValueClass &&
!pFieldData->m_fFldIsRVA &&
!pFieldData->m_fFldIsPrimitive &&
- !pFieldData->m_fFldIsTLS &&
- !pFieldData->m_fFldIsContextStatic);
+ !pFieldData->m_fFldIsTLS);
TargetBuffer remoteValue(pRmtStaticValue, CordbValue::GetSizeForType(pType, fIsBoxed ? kBoxed : kUnboxed));
ICorDebugValue * pValue;
bool m_fFldIsStatic; // true if static field, false if instance field
bool m_fFldIsRVA; // true if static relative to module address
bool m_fFldIsTLS; // true if thread-specific static
- bool m_fFldIsContextStatic; // true if context-specific static
bool m_fFldIsPrimitive; // Only true if this is a value type masquerading as a primitive.
bool m_fFldIsCollectibleStatic; // true if this is a static field on a collectible type
inline
BOOL FieldData::OkToGetOrSetInstanceOffset()
{
- return (!m_fFldIsStatic && !m_fFldIsRVA && !m_fFldIsTLS && !m_fFldIsContextStatic &&
+ return (!m_fFldIsStatic && !m_fFldIsRVA && !m_fFldIsTLS &&
m_fFldStorageAvailable && (m_pFldStaticAddress == NULL));
}
_ASSERTE(!m_fFldIsStatic);
_ASSERTE(!m_fFldIsRVA);
_ASSERTE(!m_fFldIsTLS);
- _ASSERTE(!m_fFldIsContextStatic);
_ASSERTE(m_fFldStorageAvailable);
_ASSERTE(m_pFldStaticAddress == NULL);
m_fldInstanceOffset = offset;
inline
BOOL FieldData::OkToGetOrSetStaticAddress()
{
- return (m_fFldIsStatic && !m_fFldIsTLS && !m_fFldIsContextStatic &&
+ return (m_fFldIsStatic && !m_fFldIsTLS &&
m_fFldStorageAvailable && (m_fldInstanceOffset == 0));
}
{
_ASSERTE(m_fFldIsStatic);
_ASSERTE(!m_fFldIsTLS);
- _ASSERTE(!m_fFldIsContextStatic);
_ASSERTE(m_fFldStorageAvailable);
_ASSERTE(m_fldInstanceOffset == 0);
m_pFldStaticAddress = TADDR(addr);
_ASSERTE(!m_fFldIsStatic);
_ASSERTE(!m_fFldIsRVA);
_ASSERTE(!m_fFldIsTLS);
- _ASSERTE(!m_fFldIsContextStatic);
_ASSERTE(m_fFldStorageAvailable);
_ASSERTE(m_pFldStaticAddress == NULL);
return m_fldInstanceOffset;
{
_ASSERTE(m_fFldIsStatic);
_ASSERTE(!m_fFldIsTLS);
- _ASSERTE(!m_fFldIsContextStatic);
_ASSERTE(m_fFldStorageAvailable || (m_pFldStaticAddress == NULL));
_ASSERTE(m_fldInstanceOffset == 0);
return m_pFldStaticAddress;
IDS_CLASSLOAD_STATICVIRTUAL "Method '%3' in type '%1' from assembly '%2' cannot be a static and a virtual."
IDS_CLASSLOAD_REDUCEACCESS "Derived method '%3' in type '%1' from assembly '%2' cannot reduce access."
IDS_CLASSLOAD_BADPINVOKE "Could not get PINVOKE information for method '%3' in type '%1' from assembly '%2'."
- IDS_CLASSLOAD_COLLECTIBLESPECIALSTATICS "Collectible type '%1' may not have Thread or Context static members."
IDS_CLASSLOAD_VALUECLASSTOOLARGE "Array of type '%1' from assembly '%2' cannot be created because base value type is too large."
IDS_CLASSLOAD_NOTIMPLEMENTED "Method '%3' in type '%1' from assembly '%2' does not have an implementation."
#define IDS_CLASSLOAD_MI_MISSING_SIG_DECL 0x17a7
#define IDS_CLASSLOAD_TOOMANYGENERICARGS 0x17ab
-#define IDS_CLASSLOAD_COLLECTIBLESPECIALSTATICS 0x17ad
#define IDS_COMPLUS_ERROR 0x17ae
#define IDS_FATAL_ERROR 0x17af
#define IDS_ERROR 0x17b0
m_pMarshalingData = NULL;
- m_dwContextStatics = 0;
#ifdef FEATURE_COMINTEROP
m_pMngStdInterfacesInfo = NULL;
m_pWinRtBinder = NULL;
#ifndef CROSSGEN_COMPILE
-DWORD BaseDomain::AllocateContextStaticsOffset(DWORD* pOffsetSlot)
-{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- }
- CONTRACTL_END;
-
- CrstHolder ch(&m_SpecialStaticsCrst);
-
- DWORD dwOffset = *pOffsetSlot;
-
- if (dwOffset == (DWORD)-1)
- {
- // Allocate the slot
- dwOffset = m_dwContextStatics++;
- *pOffsetSlot = dwOffset;
- }
-
- return dwOffset;
-}
-
void BaseDomain::ClearFusionContext()
{
CONTRACTL
PTR_CLRPrivBinderWinRT m_pWinRtBinder;
#endif // FEATURE_COMINTEROP
- // Number of allocated slots for context local statics of this domain
- DWORD m_dwContextStatics;
-
// Protects allocation of slot IDs for thread and context statics
static CrstStatic m_SpecialStaticsCrst;
public:
- // Lazily allocate offset for context static
- DWORD AllocateContextStaticsOffset(DWORD* pOffsetSlot);
-
-public:
// Only call this routine when you can guarantee there are no
// loads in progress.
void ClearFusionContext();
FALSE, // CCWTemplate
FALSE, // RCWPerTypeData
FALSE, // RemotingVtsInfo
- FALSE, // ContextStatic
FALSE); // TokenOverflow
// This is the offset of the beginning of the interface map
NULL,
NULL,
&genericsInfo,
- &bmtEnumFields,
- NULL);
+ &bmtEnumFields);
EX_TRY
{
&pByValueClassCache,
&bmtMFDescs,
&bmtFP,
- NULL, // not needed as thread or context static are not allowed in EnC
&totalDeclaredFieldSize);
}
EX_CATCH_THROWABLE(&pThrowable);
#define g_MarshalByRefObjectClassName "System.MarshalByRefObject"
#define g_ThreadStaticAttributeClassName "System.ThreadStaticAttribute"
-#define g_ContextStaticAttributeClassName "System.ContextStaticAttribute"
#define g_StringFreezingAttributeClassName "System.Runtime.CompilerServices.StringFreezingAttribute"
#define g_TypeIdentifierAttributeClassName "System.Runtime.InteropServices.TypeIdentifierAttribute"
#include "peimagelayout.inl"
// called from code:MethodTableBuilder::InitializeFieldDescs#InitCall
-VOID FieldDesc::Init(mdFieldDef mb, CorElementType FieldType, DWORD dwMemberAttrs, BOOL fIsStatic, BOOL fIsRVA, BOOL fIsThreadLocal, BOOL fIsContextLocal, LPCSTR pszFieldName)
+VOID FieldDesc::Init(mdFieldDef mb, CorElementType FieldType, DWORD dwMemberAttrs, BOOL fIsStatic, BOOL fIsRVA, BOOL fIsThreadLocal, LPCSTR pszFieldName)
{
LIMITED_METHOD_CONTRACT;
FieldType == ELEMENT_TYPE_PTR ||
FieldType == ELEMENT_TYPE_FNPTR
);
- _ASSERTE(fIsStatic || (!fIsRVA && !fIsThreadLocal && !fIsContextLocal));
- _ASSERTE(fIsRVA + fIsThreadLocal + fIsContextLocal <= 1);
+ _ASSERTE(fIsStatic || (!fIsRVA && !fIsThreadLocal));
+ _ASSERTE(fIsRVA + fIsThreadLocal <= 1);
m_requiresFullMbValue = 0;
SetMemberDef(mb);
BOOL fIsStatic,
BOOL fIsRVA,
BOOL fIsThreadLocal,
- BOOL fIsContextLocal,
LPCSTR pszFieldName);
enum {
return m_isThreadLocal;
}
- BOOL IsContextStatic() const // Static relative to a context
- {
- LIMITED_METHOD_DAC_CONTRACT;
-
- return FALSE;
- }
-
// Indicate that this field was added by EnC
// Must only be called on instances of EnCFieldDesc
void SetEnCNew()
// These are all copied across from the old MT, i.e. don't depend on the
// instantiation.
BOOL fHasRemotingVtsInfo = FALSE;
- BOOL fHasContextStatics = FALSE;
BOOL fHasGenericsStaticsInfo = pOldMT->HasGenericsStaticsInfo();
#ifdef FEATURE_COMINTEROP
// Collectible types have some special restrictions
if (pAllocator->IsCollectible())
{
- if (fHasContextStatics)
- {
- ClassLoader::ThrowTypeLoadException(pTypeKey, IDS_CLASSLOAD_COLLECTIBLESPECIALSTATICS);
- }
if (pOldMT->HasFixedAddressVTStatics())
{
ClassLoader::ThrowTypeLoadException(pTypeKey, IDS_CLASSLOAD_COLLECTIBLEFIXEDVTATTR);
fHasCCWTemplate,
fHasRCWPerTypeData,
fHasRemotingVtsInfo,
- fHasContextStatics,
pOldMT->HasTokenOverflow());
// We need space for the PerInstInfo, i.e. the generic dictionary pointers...
fieldFlags |= CORINFO_FLG_FIELD_INITCLASS;
}
else
- if (pField->IsContextStatic())
- {
- fieldAccessor = CORINFO_FIELD_STATIC_ADDR_HELPER;
-
- pResult->helper = CORINFO_HELP_GETSTATICFIELDADDR_CONTEXT;
- }
- else
{
// Regular or thread static
CORINFO_FIELD_ACCESSOR intrinsicAccessor;
//
if ((flags & CORINFO_ACCESS_ADDRESS) &&
!pField->IsThreadStatic() &&
- !pField->IsContextStatic() &&
(fieldAccessor != CORINFO_FIELD_STATIC_TLS))
{
fieldFlags |= CORINFO_FLG_FIELD_SAFESTATIC_BYREF_RETURN;
typedef DPTR(RemotingVtsInfo) PTR_RemotingVtsInfo;
-struct ContextStaticsBucket
-{
- // Offset which points to the CLS storage. Allocated lazily - -1 means no offset allocated yet.
- DWORD m_dwContextStaticsOffset;
- // Size of CLS fields
- WORD m_wContextStaticsSize;
-};
-typedef DPTR(ContextStaticsBucket) PTR_ContextStaticsBucket;
-
#ifdef FEATURE_COMINTEROP
struct RCWPerTypeData;
#endif // FEATURE_COMINTEROP
BOOL needsCCWTemplate,
BOOL needsRCWPerTypeData,
BOOL needsRemotingVtsInfo,
- BOOL needsContextStatic,
BOOL needsTokenOverflow);
inline DWORD GetOptionalMembersSize();
BOOL needsCCWTemplate,
BOOL needsRCWPerTypeData,
BOOL needsRemotingVtsInfo,
- BOOL needsContextStatic,
BOOL needsTokenOverflow)
{
LIMITED_METHOD_CONTRACT;
size += sizeof(UINT_PTR);
if (needsRemotingVtsInfo)
size += sizeof(UINT_PTR);
- if (needsContextStatic)
- size += sizeof(UINT_PTR);
if (dwMultipurposeSlotsMask & enum_flag_HasInterfaceMap)
size += sizeof(UINT_PTR);
if (needsTokenOverflow)
bmtGCSeriesInfo *bmtGCSeries,
bmtMethodImplInfo *bmtMethodImpl,
const bmtGenericsInfo *bmtGenerics,
- bmtEnumFieldInfo *bmtEnumFields,
- bmtContextStaticInfo *bmtCSInfo)
+ bmtEnumFieldInfo *bmtEnumFields)
{
LIMITED_METHOD_CONTRACT;
this->bmtAllocator = bmtAllocator;
this->bmtMethodImpl = bmtMethodImpl;
this->bmtGenerics = bmtGenerics;
this->bmtEnumFields = bmtEnumFields;
- this->bmtCSInfo = bmtCSInfo;
}
//*******************************************************************************
new (GetStackingAllocator()) bmtGCSeriesInfo(),
new (GetStackingAllocator()) bmtMethodImplInfo(),
bmtGenericsInfo,
- new (GetStackingAllocator()) bmtEnumFieldInfo(pModule->GetMDImport()),
- new (GetStackingAllocator()) bmtContextStaticInfo());
+ new (GetStackingAllocator()) bmtEnumFieldInfo(pModule->GetMDImport()));
//Initialize structs
// Go thru all fields and initialize their FieldDescs.
InitializeFieldDescs(GetApproxFieldDescListRaw(), pLayoutRawFieldInfos, bmtInternal, bmtGenerics,
bmtMetaData, bmtEnumFields, bmtError,
- &pByValueClassCache, bmtMFDescs, bmtFP, bmtCSInfo,
+ &pByValueClassCache, bmtMFDescs, bmtFP,
&totalDeclaredFieldSize);
// Place regular static fields
MethodTable *** pByValueClassCache,
bmtMethAndFieldDescs* bmtMFDescs,
bmtFieldPlacement* bmtFP,
- bmtContextStaticInfo* pbmtCSInfo,
unsigned* totalDeclaredSize)
{
CONTRACTL
MethodTable * pByValueClass = NULL;
BOOL fIsByValue = FALSE;
BOOL fIsThreadStatic = FALSE;
- static const BOOL fIsContextStatic = FALSE;
BOOL fHasRVA = FALSE;
MetaSig fsig(pMemberSignature,
// Do some sanity checks that we are not mixing context and thread
// relative statics.
- if (fHasRVA && (fIsThreadStatic || fIsContextStatic))
+ if (fHasRVA && fIsThreadStatic)
{
IfFailThrow(COR_E_TYPELOAD);
}
- if ((fIsContextStatic || bmtFP->fHasFixedAddressValueTypes) && GetAssembly()->IsCollectible())
+ if (bmtFP->fHasFixedAddressValueTypes && GetAssembly()->IsCollectible())
{
- if (bmtFP->fHasFixedAddressValueTypes)
- {
- BuildMethodTableThrowException(IDS_CLASSLOAD_COLLECTIBLEFIXEDVTATTR);
- }
- BuildMethodTableThrowException(IDS_CLASSLOAD_COLLECTIBLESPECIALSTATICS);
+ BuildMethodTableThrowException(IDS_CLASSLOAD_COLLECTIBLEFIXEDVTATTR);
}
}
fIsStatic,
fHasRVA,
fIsThreadStatic,
- fIsContextStatic,
pszFieldName
);
BOOL fHasGenericsStaticsInfo,
BOOL fNeedsRCWPerTypeData,
BOOL fNeedsRemotableMethodInfo,
- BOOL fNeedsRemotingVtsInfo,
- BOOL fHasContextStatics
+ BOOL fNeedsRemotingVtsInfo
#ifdef FEATURE_COMINTEROP
, BOOL fHasDynamicInterfaceMap
#endif
FALSE, // no CCW template needed for canonical instantiations
fNeedsRCWPerTypeData,
fNeedsRemotingVtsInfo,
- fHasContextStatics,
RidFromToken(GetCl()) >= METHODTABLE_TOKEN_OVERFLOW);
// Interface map starts here
: 0;
- BOOL fHasContextStatics = FALSE;
BOOL fNeedsRemotableMethodInfo=FALSE;
BOOL fNeedsRemotingVtsInfo = FALSE;
fNeedsRCWPerTypeData,
fNeedsRemotableMethodInfo,
fNeedsRemotingVtsInfo,
- fHasContextStatics,
#ifdef FEATURE_COMINTEROP
fHasDynamicInterfaceMap,
#endif
#endif //_DEBUG
}; // struct bmtGenericsInfo
-
- // information for Thread and Context Static. Filled by InitializedFieldDesc and used when
- // setting up a MethodTable
- struct bmtContextStaticInfo
- {
-
- inline bmtContextStaticInfo() { LIMITED_METHOD_CONTRACT; memset((void *)this, NULL, sizeof(*this)); }
- };
-
MethodTableBuilder(
MethodTable * pHalfBakedMT,
EEClass * pHalfBakedClass,
NULL,
NULL,
NULL,
- NULL,
NULL);
}
public:
bmtMethodImplInfo *bmtMethodImpl;
const bmtGenericsInfo *bmtGenerics;
bmtEnumFieldInfo *bmtEnumFields;
- bmtContextStaticInfo *bmtCSInfo;
void SetBMTData(
LoaderAllocator *bmtAllocator,
bmtGCSeriesInfo *bmtGCSeries,
bmtMethodImplInfo *bmtMethodImpl,
const bmtGenericsInfo *bmtGenerics,
- bmtEnumFieldInfo *bmtEnumFields,
- bmtContextStaticInfo *bmtCSInfo);
+ bmtEnumFieldInfo *bmtEnumFields);
// --------------------------------------------------------------------------------------------
// Returns the parent bmtRTType pointer. Can be null if no parent exists.
MethodTable***,
bmtMethAndFieldDescs*,
bmtFieldPlacement*,
- bmtContextStaticInfo*,
unsigned * totalDeclaredSize);
// --------------------------------------------------------------------------------------------
BOOL fHasGenericsStaticsInfo,
BOOL fNeedsRCWPerTypeData,
BOOL fNeedsRemotableMethodInfo,
- BOOL fNeedsRemotingVtsInfo,
- BOOL fHasContextStatics
+ BOOL fNeedsRemotingVtsInfo
#ifdef FEATURE_COMINTEROP
, BOOL bHasDynamicInterfaceMap
#endif
* +-- code:AppDomainBaseObject - The base object for the class AppDomain
* |
* +-- code:AssemblyBaseObject - The base object for the class Assembly
- * |
- * +-- code:ContextBaseObject - base object for class Context
*
*
* PLEASE NOTE THE FOLLOWING WHEN ADDING A NEW OBJECT TYPE:
{
};
-
-// ContextBaseObject
-// This class is the base class for Contexts
-//
-class ContextBaseObject : public Object
-{
- friend class Context;
- friend class MscorlibBinder;
-
- private:
- // READ ME:
- // Modifying the order or fields of this object may require other changes to the
- // classlib class definition of this object.
-
- OBJECTREF m_ctxProps; // array of name-value pairs of properties
- OBJECTREF m_dphCtx; // dynamic property holder
- OBJECTREF m_localDataStore; // context local store
- OBJECTREF m_serverContextChain; // server context sink chain
- OBJECTREF m_clientContextChain; // client context sink chain
- OBJECTREF m_exposedAppDomain; //appDomain ??
- PTRARRAYREF m_ctxStatics; // holder for context relative statics
-
- Context* m_internalContext; // Pointer to the VM context
-
- INT32 _ctxID;
- INT32 _ctxFlags;
- INT32 _numCtxProps; // current count of properties
-
- INT32 _ctxStaticsCurrentBucket;
- INT32 _ctxStaticsFreeIndex;
-
- protected:
- ContextBaseObject() { LIMITED_METHOD_CONTRACT; }
- ~ContextBaseObject() { LIMITED_METHOD_CONTRACT; }
-
- public:
-
- void SetInternalContext(Context* pCtx)
- {
- LIMITED_METHOD_CONTRACT;
- // either transitioning from NULL to non-NULL or vice versa.
- // But not setting NULL to NULL or non-NULL to non-NULL.
- _ASSERTE((m_internalContext == NULL) != (pCtx == NULL));
- m_internalContext = pCtx;
- }
-
- Context* GetInternalContext()
- {
- LIMITED_METHOD_CONTRACT;
- return m_internalContext;
- }
-
- OBJECTREF GetExposedDomain() { return m_exposedAppDomain; }
- OBJECTREF SetExposedDomain(OBJECTREF newDomain)
- {
- LIMITED_METHOD_CONTRACT;
- OBJECTREF oldDomain = m_exposedAppDomain;
- SetObjectReference( (OBJECTREF *)&m_exposedAppDomain, newDomain, GetAppDomain() );
- return oldDomain;
- }
-
- PTRARRAYREF GetContextStaticsHolder()
- {
- LIMITED_METHOD_CONTRACT;
- SUPPORTS_DAC;
- // The code that needs this should have faulted it in by now!
- _ASSERTE(m_ctxStatics != NULL);
-
- return m_ctxStatics;
- }
-};
-
-typedef DPTR(ContextBaseObject) PTR_ContextBaseObject;
-
// AppDomainBaseObject
// This class is the base class for application domains
//
typedef REF<MarshalByRefObjectBaseObject> MARSHALBYREFOBJECTBASEREF;
-typedef REF<ContextBaseObject> CONTEXTBASEREF;
-
typedef REF<AssemblyBaseObject> ASSEMBLYREF;
typedef REF<AssemblyNameBaseObject> ASSEMBLYNAMEREF;
typedef PTR_AppDomainBaseObject APPDOMAINREF;
typedef PTR_AssemblyBaseObject ASSEMBLYREF;
typedef PTR_AssemblyNameBaseObject ASSEMBLYNAMEREF;
-typedef PTR_ContextBaseObject CONTEXTBASEREF;
#ifndef DACCESS_COMPILE
typedef MarshalByRefObjectBaseObject* MARSHALBYREFOBJECTBASEREF;
{
if (pFD != NULL)
{
- if (pFD->IsRVA() || pFD->IsContextStatic())
+ if (pFD->IsRVA())
{
_ASSERTE(!"Fast getter for rare kinds of static fields");
}
//
if(!pFieldDesc->IsStatic() ||
!pFieldDesc->IsRVA() ||
- pFieldDesc->IsThreadStatic() ||
- pFieldDesc->IsContextStatic())
+ pFieldDesc->IsThreadStatic())
{
return E_INVALIDARG;
}
//
if(!pFieldDesc->IsStatic() ||
pFieldDesc->IsRVA() ||
- pFieldDesc->IsThreadStatic() ||
- pFieldDesc->IsContextStatic())
+ pFieldDesc->IsThreadStatic())
{
return E_INVALIDARG;
}
//
if(!pFieldDesc->IsStatic() ||
!pFieldDesc->IsThreadStatic() ||
- pFieldDesc->IsRVA() ||
- pFieldDesc->IsContextStatic())
+ pFieldDesc->IsRVA())
{
return E_INVALIDARG;
}
*pFieldInfo = COR_PRF_FIELD_NOT_A_STATIC;
- if (pFieldDesc->IsContextStatic())
- {
- *pFieldInfo = (COR_PRF_STATIC_TYPE)(*pFieldInfo | COR_PRF_FIELD_CONTEXT_STATIC);
- }
-
if (pFieldDesc->IsRVA())
{
*pFieldInfo = (COR_PRF_STATIC_TYPE)(*pFieldInfo | COR_PRF_FIELD_RVA_STATIC);