60 references to GetMethodTable
System.Private.CoreLib (60)
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (1)
1120MethodTable* mt = RuntimeHelpers.GetMethodTable(exception);
src\libraries\System.Private.CoreLib\src\System\Array.cs (4)
367MethodTable* pMT = RuntimeHelpers.GetMethodTable(sourceArray); 368if (MethodTable.AreSameType(pMT, RuntimeHelpers.GetMethodTable(destinationArray)) && 396MethodTable* pMT = RuntimeHelpers.GetMethodTable(sourceArray); 397if (MethodTable.AreSameType(pMT, RuntimeHelpers.GetMethodTable(destinationArray)) &&
src\System\Array.CoreCLR.cs (19)
67MethodTable* pMT = RuntimeHelpers.GetMethodTable(sourceArray); 103void* srcTH = RuntimeHelpers.GetMethodTable(sourceArray)->ElementType; 104void* destTH = RuntimeHelpers.GetMethodTable(destinationArray)->ElementType; 153MethodTable* pDestArrayMT = RuntimeHelpers.GetMethodTable(destinationArray); 157Debug.Assert(!RuntimeHelpers.GetMethodTable(sourceArray)->GetArrayElementTypeHandle().AsMethodTable()->IsValueType); 177else if (obj is null || RuntimeHelpers.GetMethodTable(obj) != pDestMT) 195MethodTable* pSrcArrayMT = RuntimeHelpers.GetMethodTable(sourceArray); 199Debug.Assert(!RuntimeHelpers.GetMethodTable(destinationArray)->GetArrayElementTypeHandle().AsMethodTable()->IsValueType); 217void* destTH = RuntimeHelpers.GetMethodTable(destinationArray)->ElementType; 241nuint srcElSize = RuntimeHelpers.GetMethodTable(sourceArray)->ComponentSize; 242nuint destElSize = RuntimeHelpers.GetMethodTable(destinationArray)->ComponentSize; 416MethodTable* pMT = RuntimeHelpers.GetMethodTable(array); 444MethodTable* pMT = RuntimeHelpers.GetMethodTable(array); 475if (RuntimeHelpers.GetMethodTable(this)->IsMultiDimensionalArray) 491if (RuntimeHelpers.GetMethodTable(this)->IsMultiDimensionalArray) 517MethodTable* pMethodTable = RuntimeHelpers.GetMethodTable(this); 621MethodTable* thisMT = RuntimeHelpers.GetMethodTable(this); 622return (IntPtr)thisMT->ElementType == (IntPtr)RuntimeHelpers.GetMethodTable(value); 630MethodTable* pArrayMT = RuntimeHelpers.GetMethodTable(this);
src\System\Delegate.CoreCLR.cs (2)
453MethodTable* pMTa = RuntimeHelpers.GetMethodTable(a); 454MethodTable* pMTb = RuntimeHelpers.GetMethodTable(b);
src\System\Enum.CoreCLR.cs (1)
32CorElementType elementType = InternalGetCorElementType(RuntimeHelpers.GetMethodTable(this));
src\System\Object.CoreCLR.cs (1)
33if (RuntimeHelpers.GetMethodTable(clone)->ContainsGCPointers)
src\System\Runtime\CompilerServices\CastHelpers.cs (15)
36void* mt = RuntimeHelpers.GetMethodTable(obj); 69MethodTable* mt = RuntimeHelpers.GetMethodTable(obj); 134if (obj == null || RuntimeHelpers.GetMethodTable(obj) == toTypeHnd) 137MethodTable* mt = RuntimeHelpers.GetMethodTable(obj)->ParentMethodTable; 183CastResult result = CastCache.TryGet(s_table!, (nuint)RuntimeHelpers.GetMethodTable(obj), (nuint)toTypeHnd); 207void* mt = RuntimeHelpers.GetMethodTable(obj); 232CastResult result = CastCache.TryGet(s_table!, (nuint)RuntimeHelpers.GetMethodTable(obj), (nuint)toTypeHnd); 249MethodTable* mt = RuntimeHelpers.GetMethodTable(obj); 311if (obj == null || RuntimeHelpers.GetMethodTable(obj) == toTypeHnd) 324MethodTable* mt = RuntimeHelpers.GetMethodTable(obj); 371if (RuntimeHelpers.GetMethodTable(obj) == toTypeHnd) 398void* elementType = RuntimeHelpers.GetMethodTable(array)->ElementType; 415void* elementType = RuntimeHelpers.GetMethodTable(array)->ElementType; 420if (elementType != RuntimeHelpers.GetMethodTable(obj)) 442CastResult result = CastCache.TryGet(s_table!, (nuint)RuntimeHelpers.GetMethodTable(obj), (nuint)elementType);
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (7)
46MethodTable* pMT = GetMethodTable(obj); 152MethodTable* pMT = GetMethodTable(o1); 159if (pMT != GetMethodTable(o2)) 267MethodTable* pMT = GetMethodTable(obj); 284return GetMethodTable(array)->ComponentSize; 299int rank = GetMethodTable(array)->MultiDimensionalArrayRank; 310return GetMethodTable(obj)->HasComponentSize;
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (3)
248MethodTable* pMT = RuntimeHelpers.GetMethodTable(structure); 278MethodTable* pMT = RuntimeHelpers.GetMethodTable(structure); 334=> (obj == null) || !RuntimeHelpers.GetMethodTable(obj)->ContainsGCPointers;
src\System\Runtime\InteropServices\MemoryMarshal.CoreCLR.cs (1)
44return ref Unsafe.AddByteOffset(ref Unsafe.As<RawData>(array).Data, (nuint)RuntimeHelpers.GetMethodTable(array)->BaseSize - (nuint)(2 * sizeof(IntPtr)));
src\System\StubHelpers.cs (3)
1543MethodTable* pMT = RuntimeHelpers.GetMethodTable(obj); 1562MethodTable* pMT = RuntimeHelpers.GetMethodTable(obj); 1581MethodTable* pMT = RuntimeHelpers.GetMethodTable(obj);
src\System\ValueType.cs (3)
41if (CanCompareBitsOrUseFastGetHashCode(RuntimeHelpers.GetMethodTable(obj))) // MethodTable kept alive by access to object below 46RuntimeHelpers.GetMethodTable(this)->GetNumInstanceFieldBytes()); 106MethodTable* pMT = RuntimeHelpers.GetMethodTable(this);