Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7d196a3
Remove verifier element type API and rename primitive-value-type cate…
Copilot May 7, 2026
0af6cad
Rename enum category in cDAC contracts/docs and clean related comments
Copilot May 7, 2026
fbca1de
Address review feedback on enum/primitive category values and comments
Copilot May 7, 2026
2bdd2da
Refine RuntimeHelpers primitive checks after review tool feedback
Copilot May 7, 2026
4a179b3
Clarify primitive/enum mask behavior comment in MethodTable
Copilot May 7, 2026
53d2152
Apply latest enum/primitive review suggestions across runtime and cDAC
Copilot May 7, 2026
6ce3aae
Clarify IsTruePrimitive comment wording in MethodTable
Copilot May 7, 2026
4ec0818
Update src/coreclr/System.Private.CoreLib/src/System/Runtime/Compiler…
jkotas May 7, 2026
f3b8238
Update src/coreclr/System.Private.CoreLib/src/System/Runtime/Compiler…
jkotas May 7, 2026
257cd43
Add IsPrimitive(), refactor SetInternalCorElementType, delete SetIsTr…
Copilot May 7, 2026
ceafd3d
Fix SetFlag type in SetInternalCorElementType default case
Copilot May 7, 2026
1647dbe
Apply suggestion from @jkotas
jkotas May 7, 2026
2a130cb
Apply suggestion from @jkotas
jkotas May 7, 2026
8179e5f
Apply suggestion from @jkotas
jkotas May 7, 2026
9bc8857
Change IsTruePrimitive and IsPrimitive return types from BOOL to bool
Copilot May 7, 2026
22fcaef
Apply MethodTable bool signature and parameter naming suggestions
Copilot May 7, 2026
58de251
Revert category flag names to PrimitiveValueType/TruePrimitive and fi…
Copilot May 7, 2026
492ea1e
Apply suggestion from @jkotas
jkotas May 7, 2026
4b6ba08
Apply suggestion from @jkotas
jkotas May 7, 2026
1e0c510
Apply suggestion from @jkotas
jkotas May 7, 2026
64a71ba
Apply suggestion from @jkotas
jkotas May 7, 2026
e7ac939
Apply suggestions from code review
jkotas May 7, 2026
8d0b204
Apply suggestion from @jkotas
jkotas May 7, 2026
eba9e49
Potential fix for pull request finding
jkotas May 7, 2026
53ca4a8
Apply suggestion from @jkotas
jkotas May 7, 2026
6e6336a
Apply suggestion from @jkotas
jkotas May 7, 2026
5f72765
Apply suggestion from @jkotas
jkotas May 7, 2026
12c5281
Apply suggestion from @jkotas
jkotas May 7, 2026
b7b9de7
Update enum_flag_Category_PrimitiveValueType comment to 'Enum or true…
Copilot May 7, 2026
cf223a5
Update primitive category comments
Copilot May 7, 2026
fe05de3
Rename enum_flag_Category_PrimitiveValueType to enum_flag_Category_En…
Copilot May 7, 2026
99c07d8
Add explanatory comment to IsPrimitive() about ElementTypeMask behavior
Copilot May 7, 2026
8739054
Restore ELEMENT_TYPE_I for runtime handle types without setting categ…
Copilot May 7, 2026
4688e6d
Revert "Restore ELEMENT_TYPE_I for runtime handle types without setti…
Copilot May 7, 2026
25a3420
Fix runtime handle types by setting ELEMENT_TYPE_I with Category_Enum…
Copilot May 7, 2026
ac9f6f6
Revert "Fix runtime handle types by setting ELEMENT_TYPE_I with Categ…
Copilot May 7, 2026
d0a71b8
Fix JIT assertion for runtime handle types by allowing pointer-sized …
Copilot May 7, 2026
51d25a5
Fix runtime handle types by setting ELEMENT_TYPE_VALUETYPE for non-pr…
Copilot May 7, 2026
1e2f63b
Fix runtime handle types by returning CORINFO_TYPE_VALUECLASS from ge…
Copilot May 7, 2026
256d425
Revert assertion relaxation in importer.cpp as the fix in getTypeForP…
Copilot May 7, 2026
7c775d2
Revert getTypeForPrimitiveValueClass change as it causes test failures
Copilot May 7, 2026
8cd4494
Handle runtime handle internal types as TYP_I_IMPL in JIT lvaInitVarDsc
Copilot May 10, 2026
09d4978
Revert "Handle runtime handle internal types as TYP_I_IMPL in JIT lva…
jkotas May 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions docs/design/datacontracts/RuntimeTypeSystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -835,20 +835,16 @@ Contracts used:
// if typedesc: check for CorElementType.ValueType
}

// Enums have Category_PrimitiveValueType in their MethodTable flags and their
// Enums have Category_Enum in their MethodTable flags and their
// InternalCorElementType is a primitive type (I1, U1, I2, U2, I4, U4, I8, U8),
// not ValueType. Regular primitive value types (IntPtr/UIntPtr) have Category_TruePrimitive.
// not ValueType. Regular primitive value types (Int32, etc.) have Category_TruePrimitive.
public bool IsEnum(TypeHandle typeHandle)
{
if (!typeHandle.IsMethodTable())
Comment thread
jkotas marked this conversation as resolved.
return false;

CorElementType sigType = GetSignatureCorElementType(typeHandle);
if (sigType != CorElementType.ValueType)
return false;

CorElementType internalType = (CorElementType)GetClassData(typeHandle).InternalCorElementType;
return internalType != CorElementType.ValueType;
MethodTable methodTable = _methodTables[typeHandle.Address];
return methodTable.Flags.GetFlag(WFLAGS_HIGH.Category_Mask) == WFLAGS_HIGH.Category_Enum;
}

// return true if the TypeHandle represents an array, and set the rank to either 0 (if the type is not an array), or the rank number if it is.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -850,8 +850,8 @@ internal unsafe struct MethodTable
private const uint enum_flag_Category_ValueType = 0x00040000;
private const uint enum_flag_Category_Nullable = 0x00050000;
private const uint enum_flag_Category_IsPrimitiveMask = 0x000E0000;
private const uint enum_flag_Category_PrimitiveValueType = 0x00060000; // sub-category of ValueType, Enum or primitive value type
private const uint enum_flag_Category_TruePrimitive = 0x00070000; // sub-category of ValueType, Primitive (ELEMENT_TYPE_I, etc.)
private const uint enum_flag_Category_Enum = 0x00060000; // sub-category of ValueType
private const uint enum_flag_Category_TruePrimitive = 0x00070000; // sub-category of ValueType. (Int32, etc.)
private const uint enum_flag_Category_Array = 0x00080000;
private const uint enum_flag_Category_Array_Mask = 0x000C0000;
private const uint enum_flag_Category_ValueType_Mask = 0x000C0000;
Expand Down Expand Up @@ -955,7 +955,7 @@ public int MultiDimensionalArrayRank
public bool IsByRefLike => (Flags & (enum_flag_HasComponentSize | enum_flag_IsByRefLike)) == enum_flag_IsByRefLike;

// Warning! UNLIKE the similarly named Reflection api, this method also returns "true" for Enums.
public bool IsPrimitive => (Flags & enum_flag_Category_IsPrimitiveMask) == enum_flag_Category_PrimitiveValueType;
public bool IsPrimitive => (Flags & enum_flag_Category_IsPrimitiveMask) == enum_flag_Category_Enum;

public bool IsTruePrimitive => (Flags & enum_flag_Category_Mask) is enum_flag_Category_TruePrimitive;

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/arraynative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ FCIMPL1(INT32, ArrayNative::GetCorElementTypeOfElementType, ArrayBase* arrayUNSA

_ASSERTE(arrayUNSAFE != NULL);

return arrayUNSAFE->GetArrayElementTypeHandle().GetVerifierCorElementType();
return arrayUNSAFE->GetArrayElementTypeHandle().GetInternalCorElementType();
}
FCIMPLEND

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/callingconvention.h
Original file line number Diff line number Diff line change
Expand Up @@ -2435,7 +2435,7 @@ inline BOOL HasRetBuffArgUnmanagedFixup(MetaSig * pSig)
{
WRAPPER_NO_CONTRACT;
// We cannot just pSig->GetReturnType() here since it will return ELEMENT_TYPE_VALUETYPE for enums
CorElementType type = pSig->GetRetTypeHandleThrowing().GetVerifierCorElementType();
CorElementType type = pSig->GetRetTypeHandleThrowing().GetInternalCorElementType();
return type == ELEMENT_TYPE_VALUETYPE;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@ void ClassLoader::LoadExactParents(MethodTable* pMT)
/*static*/
CorElementType ClassLoader::GetReducedTypeElementType(TypeHandle hType)
{
CorElementType elemType = hType.GetVerifierCorElementType();
CorElementType elemType = hType.GetInternalCorElementType();
switch (elemType)
{
case ELEMENT_TYPE_U1:
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/comdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2511,7 +2511,7 @@ static bool IsLocationAssignable(TypeHandle fromHandle, TypeHandle toHandle, boo
else
{
// they are not compatible yet enums can go into each other if their underlying element type is the same
if (toHandle.GetVerifierCorElementType() == fromHandle.GetVerifierCorElementType()
if (toHandle.GetInternalCorElementType() == fromHandle.GetInternalCorElementType()
&& (toHandle.IsEnum() || fromHandle.IsEnum()))
return true;

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/customattribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static HRESULT ParseCaType(

if (!th.IsNull() && th.IsEnum())
{
pCaType->enumType = (CorSerializationType)th.GetVerifierCorElementType();
pCaType->enumType = (CorSerializationType)th.GetInternalCorElementType();

// The assembly qualified name of th might not equal pCaType->szEnumName.
// e.g. th could be "MyEnum, MyAssembly, Version=4.0.0.0" while
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/vm/invokeutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void InvokeUtil::CopyArg(TypeHandle th, PVOID argRef, ArgDestination *argDest) {
CONTRACTL_END;

void *pArgDst = argDest->GetDestinationAddress();
CorElementType type = th.GetVerifierCorElementType();
CorElementType type = th.GetInternalCorElementType();

switch (type) {
#ifdef TARGET_RISCV64
Expand Down Expand Up @@ -500,7 +500,7 @@ void InvokeUtil::ValidField(TypeHandle th, OBJECTREF* value)
if (th.IsEnum())
COMPlusThrow(kArgumentException,W("Arg_ObjObj"));

type = th.GetVerifierCorElementType();
type = th.GetInternalCorElementType();
if (IsPrimitiveType(type))
{
if (CanPrimitiveWiden(type, oType))
Expand Down
21 changes: 7 additions & 14 deletions src/coreclr/vm/jitinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,7 @@ CorInfoType CEEInfo::asCorInfoType(CorElementType eeType,
// Enums are exactly like primitives, even from a verification standpoint,
// so we zap the type handle in this case.
//
// However RuntimeTypeHandle etc. are reported as E_T_INT (or something like that)
// but don't count as primitives as far as verification is concerned...
//
// To make things stranger, TypedReference returns true for "IsTruePrimitive".
// However the JIT likes us to report the type handle in that case.
if (!typeHnd.IsTypeDesc() && (
(typeHnd.AsMethodTable()->IsTruePrimitive() && typeHnd != TypeHandle(g_TypedReferenceMT))
|| typeHnd.AsMethodTable()->IsEnum()) )
if (!typeHnd.IsTypeDesc() && typeHnd.AsMethodTable()->IsPrimitive())
Comment thread
jkotas marked this conversation as resolved.
Comment thread
jkotas marked this conversation as resolved.
{
typeHndUpdated = TypeHandle();
Comment thread
jkotas marked this conversation as resolved.
}
Expand Down Expand Up @@ -4067,7 +4060,7 @@ CorInfoType CEEInfo::getTypeForPrimitiveValueClass(
TypeHandle th(clsHnd);
_ASSERTE (!th.IsGenericVariable());

CorElementType elementType = th.GetVerifierCorElementType();
CorElementType elementType = th.GetInternalCorElementType();
if (CorIsPrimitiveType(elementType))
{
result = asCorInfoType(elementType);
Expand Down Expand Up @@ -4445,7 +4438,7 @@ static bool isExactTypeHelper(TypeHandle th)
th = pMT->GetArrayElementTypeHandle();

// Arrays of primitives are interchangeable with arrays of enums of the same underlying type.
if (CorTypeInfo::IsPrimitiveType(th.GetVerifierCorElementType()))
if (CorTypeInfo::IsPrimitiveType(th.GetInternalCorElementType()))
return false;
}

Expand Down Expand Up @@ -5052,7 +5045,7 @@ void CEEInfo::getCallInfo(
if (pMD->GetSlot() == CoreLibBinder::GetMethod(METHOD__OBJECT__GET_HASH_CODE)->GetSlot())
{
// Pretend this was a "constrained. UnderlyingType" instruction prefix
constrainedType = TypeHandle(CoreLibBinder::GetElementType(constrainedType.GetVerifierCorElementType()));
constrainedType = TypeHandle(CoreLibBinder::GetElementType(constrainedType.GetInternalCorElementType()));

constrainedResolvedTokenCopy = *pConstrainedResolvedToken;
pConstrainedResolvedToken = &constrainedResolvedTokenCopy;
Expand Down Expand Up @@ -7232,7 +7225,7 @@ static bool getILIntrinsicImplementationForInterlocked(MethodDesc * ftn,
}
else
{
CorElementType elementType = typeHandle.GetVerifierCorElementType();
CorElementType elementType = typeHandle.GetInternalCorElementType();
if (!CorTypeInfo::IsPrimitiveType(elementType) ||
elementType == ELEMENT_TYPE_R4 ||
elementType == ELEMENT_TYPE_R8)
Expand Down Expand Up @@ -7401,7 +7394,7 @@ static bool getILIntrinsicImplementationForRuntimeHelpers(
Instantiation inst = ftn->GetMethodInstantiation();

_ASSERTE(inst.GetNumArgs() == 1);
CorElementType et = inst[0].GetVerifierCorElementType();
CorElementType et = inst[0].GetInternalCorElementType();
if (et == ELEMENT_TYPE_I4 ||
et == ELEMENT_TYPE_U4 ||
et == ELEMENT_TYPE_I2 ||
Expand Down Expand Up @@ -7430,7 +7423,7 @@ static bool getILIntrinsicImplementationForRuntimeHelpers(
Instantiation inst = ftn->GetMethodInstantiation();

_ASSERTE(inst.GetNumArgs() == 1);
CorElementType et = inst[0].GetVerifierCorElementType();
CorElementType et = inst[0].GetInternalCorElementType();
if (et == ELEMENT_TYPE_I4 ||
et == ELEMENT_TYPE_U4 ||
et == ELEMENT_TYPE_I2 ||
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/marshalnative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ extern "C" BOOL QCALLTYPE MarshalNative_HasLayout(QCall::TypeHandle t, BOOL* pIs
{
// Enums don't have native layout info, but they marshal identically
// to their underlying primitive type.
th = CoreLibBinder::GetElementType(th.GetVerifierCorElementType());
th = CoreLibBinder::GetElementType(th.GetInternalCorElementType());
}

if (th.HasLayout())
Expand Down
63 changes: 9 additions & 54 deletions src/coreclr/vm/methodtable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3087,7 +3087,7 @@ namespace
STANDARD_VM_CONTRACT;

PTR_MethodTable fieldType = pFieldDesc->GetFieldTypeHandleThrowing().GetMethodTable();
CorElementType corType = fieldType->GetVerifierCorElementType();
CorElementType corType = fieldType->GetInternalCorElementType();

if (corType == ELEMENT_TYPE_VALUETYPE)
{
Expand Down Expand Up @@ -4969,9 +4969,8 @@ CorElementType MethodTable::GetInternalCorElementType()
ret = ELEMENT_TYPE_VALUETYPE;
break;

case enum_flag_Category_PrimitiveValueType:
// This path should only be taken for the builtin CoreLib types
// and primitive valuetypes
case enum_flag_Category_Enum:
// enum_flag_Category_ElementTypeMask maps both Category_TruePrimitive and Category_Enum here.
ret = GetClass()->GetInternalCorElementType();
_ASSERTE((ret != ELEMENT_TYPE_CLASS) &&
(ret != ELEMENT_TYPE_VALUETYPE));
Expand All @@ -4994,48 +4993,6 @@ CorElementType MethodTable::GetInternalCorElementType()
return ret;
}

//==========================================================================================
CorElementType MethodTable::GetVerifierCorElementType()
{
LIMITED_METHOD_CONTRACT;
SUPPORTS_DAC;

// This should not touch the EEClass, at least not in the
// common cases of ELEMENT_TYPE_CLASS and ELEMENT_TYPE_VALUETYPE.
CorElementType ret;

switch (GetFlag(enum_flag_Category_ElementTypeMask))
{
case enum_flag_Category_Array:
ret = ELEMENT_TYPE_ARRAY;
break;

case enum_flag_Category_Array | enum_flag_Category_IfArrayThenSzArray:
ret = ELEMENT_TYPE_SZARRAY;
break;

case enum_flag_Category_ValueType:
ret = ELEMENT_TYPE_VALUETYPE;
break;

case enum_flag_Category_PrimitiveValueType:
//
// This is the only difference from MethodTable::GetInternalCorElementType()
//
if (IsTruePrimitive() || IsEnum())
ret = GetClass()->GetInternalCorElementType();
else
ret = ELEMENT_TYPE_VALUETYPE;
break;

default:
ret = ELEMENT_TYPE_CLASS;
break;
}

return ret;
}

//==========================================================================================
CorElementType MethodTable::GetSignatureCorElementType()
{
Expand All @@ -5058,7 +5015,7 @@ CorElementType MethodTable::GetSignatureCorElementType()

case enum_flag_Category_ValueType:
case enum_flag_Category_Nullable:
case enum_flag_Category_PrimitiveValueType:
case enum_flag_Category_Enum:
ret = ELEMENT_TYPE_VALUETYPE;
break;

Expand All @@ -5077,28 +5034,26 @@ CorElementType MethodTable::GetSignatureCorElementType()
#ifndef DACCESS_COMPILE

//==========================================================================================
void MethodTable::SetInternalCorElementType (CorElementType _NormType)
void MethodTable::SetInternalCorElementType(CorElementType elemType, bool isTruePrimitive)
{
WRAPPER_NO_CONTRACT;

switch (_NormType)
switch (elemType)
{
case ELEMENT_TYPE_CLASS:
_ASSERTE(!IsArray());
// Nothing to do
break;
case ELEMENT_TYPE_VALUETYPE:
SetFlag(enum_flag_Category_ValueType);
_ASSERTE(GetFlag(enum_flag_Category_Mask) == enum_flag_Category_ValueType);
break;
default:
SetFlag(enum_flag_Category_PrimitiveValueType);
_ASSERTE(GetFlag(enum_flag_Category_Mask) == enum_flag_Category_PrimitiveValueType);
SetFlag(isTruePrimitive ? enum_flag_Category_TruePrimitive : enum_flag_Category_Enum);
break;
}

GetClass()->SetInternalCorElementType(_NormType);
_ASSERTE(GetInternalCorElementType() == _NormType);
GetClass()->SetInternalCorElementType(elemType);
_ASSERTE(GetInternalCorElementType() == elemType);
}

#endif // !DACCESS_COMPILE
Expand Down
26 changes: 11 additions & 15 deletions src/coreclr/vm/methodtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -2769,30 +2769,26 @@ class MethodTable
//
// #KindsOfElementTypes
// GetInternalCorElementType() retrieves the internal representation of the type. It's not always
// appropriate to use this. For example, we treat enums as their underlying type or some structs are
// optimized to be ints. To get the signature type or the verifier type (same as signature except for
// enums are normalized to the primitive type that underlies them), use the APIs in Typehandle.h
// appropriate to use this. It treats enums as their underlying type. To get the signature
// type, use the APIs in Typehandle.h.
//
// * code:TypeHandle.GetSignatureCorElementType()
// * code:TypeHandle.GetVerifierCorElementType()
// * code:TypeHandle.GetInternalCorElementType()
CorElementType GetInternalCorElementType();
void SetInternalCorElementType(CorElementType _NormType);

// See code:TypeHandle::GetVerifierCorElementType for description
CorElementType GetVerifierCorElementType();
void SetInternalCorElementType(CorElementType elemType, bool isTruePrimitive = false);

// See code:TypeHandle::GetSignatureCorElementType for description
CorElementType GetSignatureCorElementType();

// A true primitive is one who's GetVerifierCorElementType() ==
// A true primitive is one whose GetInternalCorElementType() ==
// ELEMENT_TYPE_I,
// ELEMENT_TYPE_I4,
// ELEMENT_TYPE_TYPEDBYREF etc.
// Note that GetIntenalCorElementType might return these same values for some additional
// types such as Enums and some structs.
BOOL IsTruePrimitive();
void SetIsTruePrimitive();
// Note that IsTruePrimitive returns false for enum types.
bool IsTruePrimitive();

// Like IsTruePrimitive but also returns true for enum types.
bool IsPrimitive();

// Is this delegate? Returns false for System.Delegate and System.MulticastDelegate.
inline BOOL IsDelegate()
Expand Down Expand Up @@ -3793,8 +3789,8 @@ public :
enum_flag_Category_ValueType = 0x00040000, // [cDAC] [RuntimeTypeSystem]: Contract depends on this value
enum_flag_Category_ValueType_Mask = 0x000C0000,
enum_flag_Category_Nullable = 0x00050000, // sub-category of ValueType. [cDAC] [RuntimeTypeSystem]: Contract depends on this value
enum_flag_Category_PrimitiveValueType=0x00060000, // sub-category of ValueType, Enum or primitive value type. [cDAC] [RuntimeTypeSystem]: Contract depends on this value
Comment thread
jkotas marked this conversation as resolved.
enum_flag_Category_TruePrimitive = 0x00070000, // sub-category of ValueType, Primitive (ELEMENT_TYPE_I, etc.). [cDAC] [RuntimeTypeSystem]: Contract depends on this value
enum_flag_Category_Enum = 0x00060000, // sub-category of ValueType. [cDAC] [RuntimeTypeSystem]: Contract depends on this value
enum_flag_Category_TruePrimitive = 0x00070000, // sub-category of ValueType. (Int32, etc.). [cDAC] [RuntimeTypeSystem]: Contract depends on this value

enum_flag_Category_Array = 0x00080000, // [cDAC] [RuntimeTypeSystem]: Contract depends on this value
enum_flag_Category_Array_Mask = 0x000C0000, // [cDAC] [RuntimeTypeSystem]: Contract depends on this value
Expand Down
7 changes: 4 additions & 3 deletions src/coreclr/vm/methodtable.inl
Original file line number Diff line number Diff line change
Expand Up @@ -324,17 +324,18 @@ inline DWORD MethodTable::GetRank()
}

//==========================================================================================
inline BOOL MethodTable::IsTruePrimitive()
inline bool MethodTable::IsTruePrimitive()
{
LIMITED_METHOD_DAC_CONTRACT;
return GetFlag(enum_flag_Category_Mask) == enum_flag_Category_TruePrimitive;
}

//==========================================================================================
inline void MethodTable::SetIsTruePrimitive()
inline bool MethodTable::IsPrimitive()
{
LIMITED_METHOD_DAC_CONTRACT;
SetFlag(enum_flag_Category_TruePrimitive);
// enum_flag_Category_ElementTypeMask maps both Category_TruePrimitive and Category_Enum here.
return GetFlag(enum_flag_Category_ElementTypeMask) == enum_flag_Category_Enum;
}
Comment thread
jkotas marked this conversation as resolved.

//==========================================================================================
Expand Down
Loading
Loading