79 references to GetMethodTable
System.Private.CoreLib (79)
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (1)
1143
MethodTable* mt = RuntimeHelpers.
GetMethodTable
(exception);
src\libraries\System.Private.CoreLib\src\System\Array.cs (4)
365
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(sourceArray);
366
if (MethodTable.AreSameType(pMT, RuntimeHelpers.
GetMethodTable
(destinationArray)) &&
394
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(sourceArray);
395
if (MethodTable.AreSameType(pMT, RuntimeHelpers.
GetMethodTable
(destinationArray)) &&
src\System\Array.CoreCLR.cs (21)
70
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(sourceArray);
158
TypeHandle srcTH = RuntimeHelpers.
GetMethodTable
(sourceArray)->GetArrayElementTypeHandle();
159
TypeHandle destTH = RuntimeHelpers.
GetMethodTable
(destinationArray)->GetArrayElementTypeHandle();
234
MethodTable* pDestArrayMT = RuntimeHelpers.
GetMethodTable
(destinationArray);
238
Debug.Assert(!RuntimeHelpers.
GetMethodTable
(sourceArray)->GetArrayElementTypeHandle().AsMethodTable()->IsValueType);
258
else if (obj is null || RuntimeHelpers.
GetMethodTable
(obj) != pDestMT)
276
MethodTable* pSrcArrayMT = RuntimeHelpers.
GetMethodTable
(sourceArray);
280
Debug.Assert(!RuntimeHelpers.
GetMethodTable
(destinationArray)->GetArrayElementTypeHandle().AsMethodTable()->IsValueType);
298
void* destTH = RuntimeHelpers.
GetMethodTable
(destinationArray)->ElementType;
322
nuint srcElSize = RuntimeHelpers.
GetMethodTable
(sourceArray)->ComponentSize;
323
nuint destElSize = RuntimeHelpers.
GetMethodTable
(destinationArray)->ComponentSize;
356
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(array);
384
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(array);
415
if (RuntimeHelpers.
GetMethodTable
(this)->IsMultiDimensionalArray)
431
if (RuntimeHelpers.
GetMethodTable
(this)->IsMultiDimensionalArray)
457
MethodTable* pMethodTable = RuntimeHelpers.
GetMethodTable
(this);
499
MethodTable* pMethodTable = RuntimeHelpers.
GetMethodTable
(this);
573
MethodTable* pValueMethodTable = RuntimeHelpers.
GetMethodTable
(value);
662
MethodTable* thisMT = RuntimeHelpers.
GetMethodTable
(this);
663
return (IntPtr)thisMT->ElementType == (IntPtr)RuntimeHelpers.
GetMethodTable
(value);
671
MethodTable* pArrayMT = RuntimeHelpers.
GetMethodTable
(this);
src\System\Delegate.CoreCLR.cs (2)
493
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(this);
510
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(this);
src\System\Enum.CoreCLR.cs (1)
29
CorElementType elementType = RuntimeHelpers.
GetMethodTable
(this)->GetPrimitiveCorElementType();
src\System\GC.CoreCLR.cs (1)
370
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(obj);
src\System\IO\Stream.CoreCLR.cs (2)
17
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(this);
31
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(this);
src\System\Object.CoreCLR.cs (2)
16
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(this);
39
if (RuntimeHelpers.
GetMethodTable
(clone)->ContainsGCPointers)
src\System\Runtime\CompilerServices\CastHelpers.cs (22)
23
ThrowInvalidCastException(RuntimeHelpers.
GetMethodTable
(fromType), toTypeHnd);
59
void* mt = RuntimeHelpers.
GetMethodTable
(obj);
92
MethodTable* mt = RuntimeHelpers.
GetMethodTable
(obj);
157
if (obj == null || RuntimeHelpers.
GetMethodTable
(obj) == toTypeHnd)
160
MethodTable* mt = RuntimeHelpers.
GetMethodTable
(obj)->ParentMethodTable;
208
CastResult result = CastCache.TryGet(s_table!, (nuint)RuntimeHelpers.
GetMethodTable
(obj), (nuint)toTypeHnd);
232
void* mt = RuntimeHelpers.
GetMethodTable
(obj);
257
CastResult result = CastCache.TryGet(s_table!, (nuint)RuntimeHelpers.
GetMethodTable
(obj), (nuint)toTypeHnd);
274
MethodTable* mt = RuntimeHelpers.
GetMethodTable
(obj);
336
if (obj == null || RuntimeHelpers.
GetMethodTable
(obj) == toTypeHnd)
349
MethodTable* mt = RuntimeHelpers.
GetMethodTable
(obj);
396
if (RuntimeHelpers.
GetMethodTable
(obj) == toTypeHnd)
423
void* elementType = RuntimeHelpers.
GetMethodTable
(array)->ElementType;
440
void* elementType = RuntimeHelpers.
GetMethodTable
(array)->ElementType;
445
if (elementType != RuntimeHelpers.
GetMethodTable
(obj))
467
CastResult result = CastCache.TryGet(s_table!, (nuint)RuntimeHelpers.
GetMethodTable
(obj), (nuint)elementType);
496
void* elementType = RuntimeHelpers.
GetMethodTable
(array)->ElementType;
497
Debug.Assert(elementType != RuntimeHelpers.
GetMethodTable
(obj)); // Should be handled by caller
499
CastResult result = CastCache.TryGet(s_table!, (nuint)RuntimeHelpers.
GetMethodTable
(obj), (nuint)elementType);
574
if (typeMT != RuntimeHelpers.
GetMethodTable
(obj))
597
if (!IsNullableForType(typeMT, RuntimeHelpers.
GetMethodTable
(obj)))
648
MethodTable* pMT2 = RuntimeHelpers.
GetMethodTable
(obj);
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (9)
36
MethodTable* pMT =
GetMethodTable
(array);
145
MethodTable* pMT =
GetMethodTable
(obj);
274
MethodTable* pMT =
GetMethodTable
(o1);
281
if (pMT !=
GetMethodTable
(o2))
395
MethodTable* pMT =
GetMethodTable
(obj);
412
return
GetMethodTable
(array)->ComponentSize;
427
int rank =
GetMethodTable
(array)->MultiDimensionalArrayRank;
438
return
GetMethodTable
(obj)->HasComponentSize;
463
internal static unsafe MethodTable* GetMethodTable(object obj) =>
GetMethodTable
(obj);
src\System\Runtime\CompilerServices\VirtualDispatchHelpers.cs (3)
69
s_virtualFunctionPointerCache.TrySet(new VirtualResolutionData(RuntimeHelpers.
GetMethodTable
(obj), classHandle, methodHandle), result);
77
if (s_virtualFunctionPointerCache.TryGet(new VirtualResolutionData(RuntimeHelpers.
GetMethodTable
(obj), classHandle, methodHandle), out IntPtr result))
90
if (s_virtualFunctionPointerCache.TryGet(new VirtualResolutionData(RuntimeHelpers.
GetMethodTable
(obj), classHandle, methodHandle), out IntPtr result))
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (3)
249
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(structure);
279
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(structure);
335
=> (obj == null) || !RuntimeHelpers.
GetMethodTable
(obj)->ContainsGCPointers;
src\System\Runtime\InteropServices\MemoryMarshal.CoreCLR.cs (1)
44
return ref Unsafe.AddByteOffset(ref Unsafe.As<RawData>(array).Data, (nuint)RuntimeHelpers.
GetMethodTable
(array)->BaseSize - (nuint)(2 * sizeof(IntPtr)));
src\System\RuntimeHandles.cs (1)
1163
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(src);
src\System\StubHelpers.cs (3)
1512
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(obj);
1531
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(obj);
1550
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(obj);
src\System\ValueType.cs (3)
41
if (CanCompareBitsOrUseFastGetHashCode(RuntimeHelpers.
GetMethodTable
(obj))) // MethodTable kept alive by access to object below
46
RuntimeHelpers.
GetMethodTable
(this)->GetNumInstanceFieldBytes());
106
MethodTable* pMT = RuntimeHelpers.
GetMethodTable
(this);