148 references to MethodTable
System.Private.CoreLib (148)
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (3)
1065
if (ShouldTypedClauseCatchThisException(exception, (
MethodTable
*)ehClause._pTargetType, !frameIter.IsRuntimeWrappedExceptions))
1129
private static bool ShouldTypedClauseCatchThisException(object exception,
MethodTable
* pClauseType, bool tryUnwrapException)
1143
MethodTable
* mt = RuntimeHelpers.GetMethodTable(exception);
src\Internal\Runtime\CompilerHelpers\ThrowHelpers.cs (8)
15
private static partial void ThrowAmbiguousResolutionException(
MethodTable
* targetType,
MethodTable
* interfaceType, void* methodDesc);
24
ThrowAmbiguousResolutionException((
MethodTable
*)targetType, (
MethodTable
*)interfaceType, method);
29
private static partial void ThrowEntryPointNotFoundException(
MethodTable
* targetType,
MethodTable
* interfaceType, void* methodDesc);
38
ThrowEntryPointNotFoundException((
MethodTable
*)targetType, (
MethodTable
*)interfaceType, method);
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\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (9)
15
private unsafe
MethodTable
* _methodTable;
53
_methodTable = (
MethodTable
*)fieldType.TypeHandle.Value;
60
_methodTable = (
MethodTable
*)fieldType.TypeHandle.Value;
66
_methodTable = (
MethodTable
*)fieldType.TypeHandle.Value;
71
_methodTable = (
MethodTable
*)fieldType.TypeHandle.Value;
81
_methodTable = (
MethodTable
*)typeof(IntPtr).TypeHandle.Value;
95
_methodTable = (
MethodTable
*)fieldType.TypeHandle.Value;
100
_methodTable = (
MethodTable
*)fieldType.TypeHandle.Value;
109
_methodTable = (
MethodTable
*)typeof(IntPtr).TypeHandle.Value;
src\System\Array.CoreCLR.cs (17)
70
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(sourceArray);
166
MethodTable
* pMTsrc = srcTH.AsMethodTable();
167
MethodTable
* pMTdest = destTH.AsMethodTable();
234
MethodTable
* pDestArrayMT = RuntimeHelpers.GetMethodTable(destinationArray);
240
MethodTable
* pDestMT = destTH.AsMethodTable();
276
MethodTable
* pSrcArrayMT = RuntimeHelpers.GetMethodTable(sourceArray);
282
MethodTable
* pSrcMT = srcTH.AsMethodTable();
356
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(array);
384
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(array);
457
MethodTable
* pMethodTable = RuntimeHelpers.GetMethodTable(this);
473
MethodTable
* pElementMethodTable = arrayElementTypeHandle.AsMethodTable();
499
MethodTable
* pMethodTable = RuntimeHelpers.GetMethodTable(this);
513
MethodTable
* pElementMethodTable = arrayElementTypeHandle.AsMethodTable();
573
MethodTable
* pValueMethodTable = RuntimeHelpers.GetMethodTable(value);
662
MethodTable
* thisMT = RuntimeHelpers.GetMethodTable(this);
671
MethodTable
* pArrayMT = RuntimeHelpers.GetMethodTable(this);
678
MethodTable
* pElemMT = thElem.AsMethodTable();
src\System\Delegate.CoreCLR.cs (5)
486
private static extern unsafe void* GetMulticastInvoke(
MethodTable
* pMT);
489
private static unsafe partial void* GetMulticastInvokeSlow(
MethodTable
* pMT);
493
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(this);
506
private static extern unsafe void* GetInvokeMethod(
MethodTable
* pMT);
510
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(this);
src\System\GC.CoreCLR.cs (1)
370
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(obj);
src\System\IO\Stream.CoreCLR.cs (5)
13
private static partial bool HasOverriddenSlow(
MethodTable
* pMT, [MarshalAs(UnmanagedType.Bool)] bool isRead);
17
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(this);
25
static bool HasOverriddenReadSlow(
MethodTable
* pMT)
31
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(this);
39
static bool HasOverriddenWriteSlow(
MethodTable
* pMT)
src\System\Object.CoreCLR.cs (1)
16
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(this);
src\System\Runtime\CompilerServices\CastHelpers.cs (20)
92
MethodTable
* mt = RuntimeHelpers.GetMethodTable(obj);
96
MethodTable
** interfaceMap = mt->InterfaceMap;
160
MethodTable
* mt = RuntimeHelpers.GetMethodTable(obj)->ParentMethodTable;
274
MethodTable
* mt = RuntimeHelpers.GetMethodTable(obj);
281
MethodTable
** interfaceMap = mt->InterfaceMap;
349
MethodTable
* mt = RuntimeHelpers.GetMethodTable(obj);
393
private static ref byte Unbox(
MethodTable
* toTypeHnd, object obj)
542
internal static bool IsNullableForType(
MethodTable
* typeMT,
MethodTable
* boxedMT)
553
MethodTable
*pMTNullableArg = **typeMT->PerInstInfo;
570
private static void Unbox_Nullable_NotIsNullableForType(ref byte destPtr,
MethodTable
* typeMT, object obj)
582
internal static void Unbox_Nullable(ref byte destPtr,
MethodTable
* typeMT, object? obj)
616
internal static object? ReboxFromNullable(
MethodTable
* srcMT, object src)
627
MethodTable
* dstMT = srcMT->InstantiationArg0();
643
private static ref byte Unbox_Helper(
MethodTable
* pMT1, object obj)
648
MethodTable
* pMT2 = RuntimeHelpers.GetMethodTable(obj);
664
private static void Unbox_TypeTest_Helper(
MethodTable
*pMT1,
MethodTable
*pMT2)
678
private static void Unbox_TypeTest(
MethodTable
*pMT1,
MethodTable
*pMT2)
src\System\Runtime\CompilerServices\InitHelpers.cs (6)
14
private static partial void InitClassHelper(
MethodTable
* mt);
18
internal static void InitClassSlow(
MethodTable
* mt)
24
private static void InitClass(
MethodTable
* mt)
33
private static void InitInstantiatedClass(
MethodTable
* mt, MethodDesc* methodDesc)
35
MethodTable
*pTemplateMT = methodDesc->MethodTable;
36
MethodTable
*pMT;
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (27)
36
MethodTable
* pMT = GetMethodTable(array);
103
MethodTable
* targetMT = th.AsMethodTable();
145
MethodTable
* pMT = GetMethodTable(obj);
274
MethodTable
* pMT = GetMethodTable(o1);
395
MethodTable
* pMT = GetMethodTable(obj);
442
/// Boxes a given value using an input <see cref="
MethodTable
"/> to determine its type.
444
/// <param name="methodTable">The <see cref="
MethodTable
"/> pointer to use to create the boxed instance.</param>
449
internal static extern unsafe object? Box(
MethodTable
* methodTable, ref byte data);
463
internal static unsafe
MethodTable
* GetMethodTable(object obj) => GetMethodTable(obj);
467
internal static unsafe partial bool AreTypesEquivalent(
MethodTable
* pMTa,
MethodTable
* pMTb);
630
public
MethodTable
* MethodTable => GetMethodDescChunk()->MethodTable;
636
public
MethodTable
* MethodTable;
682
public
MethodTable
* ParentMethodTable;
714
public
MethodTable
*** PerInstInfo;
720
public
MethodTable
** InterfaceMap;
818
internal static bool AreSameType(
MethodTable
* mt1,
MethodTable
* mt2) => mt1 == mt2;
888
/// <remarks>This method should only be called when the current <see cref="
MethodTable
"/> instance represents an array or string type.</remarks>
911
public extern
MethodTable
* GetMethodTableMatchingParentClass(
MethodTable
* parent);
914
public extern
MethodTable
* InstantiationArg0();
954
internal unsafe
MethodTable
* _methodTable;
1049
/// A type handle, which can wrap either a pointer to a <c>TypeDesc</c> or to a <see cref="
MethodTable
"/>.
1082
/// Gets the <see cref="
MethodTable
"/> pointer wrapped by the current instance.
1086
public
MethodTable
* AsMethodTable()
1090
return (
MethodTable
*)m_asTAddr;
src\System\Runtime\CompilerServices\StaticsHelpers.cs (10)
17
private static partial void GetThreadStaticsByMethodTable(ByteRefOnStack result,
MethodTable
* pMT, [MarshalAs(UnmanagedType.Bool)] bool gcStatics);
24
private static ref byte GetNonGCStaticBaseSlow(
MethodTable
* mt)
31
private static ref byte GetNonGCStaticBase(
MethodTable
* mt)
54
private static ref byte GetGCStaticBaseSlow(
MethodTable
* mt)
61
private static ref byte GetGCStaticBase(
MethodTable
* mt)
91
return ref Unsafe.Subtract(ref RuntimeHelpers.GetRawData(obj), sizeof(
MethodTable
*));
157
private static ref byte GetNonGCThreadStaticBaseSlow(
MethodTable
* mt)
166
private static ref byte GetGCThreadStaticBaseSlow(
MethodTable
* mt)
221
private static ref byte GetNonGCThreadStaticBase(
MethodTable
* mt)
231
private static ref byte GetGCThreadStaticBase(
MethodTable
* mt)
src\System\Runtime\CompilerServices\VirtualDispatchHelpers.cs (2)
18
public
MethodTable
* _objectMethodTable;
23
public VirtualResolutionData(
MethodTable
* objectMethodTable, IntPtr classHandle, IntPtr methodHandle)
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (2)
249
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(structure);
279
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(structure);
src\System\RuntimeHandles.cs (15)
58
internal static unsafe RuntimeType GetRuntimeType(
MethodTable
* pMT)
272
internal static unsafe object InternalAlloc(
MethodTable
* pMT)
288
private static unsafe partial void InternalAlloc(
MethodTable
* pMT, ObjectHandleOnStack result);
300
private static unsafe partial void InternalAllocNoChecks(
MethodTable
* pMT, ObjectHandleOnStack result);
440
private static unsafe partial IntPtr GetMethodAt(
MethodTable
* pMT, int slot);
518
private static partial Interop.BOOL GetFields(
MethodTable
* pMT, Span<IntPtr> data, ref int usedCount);
539
private static unsafe partial void GetInterfaces(
MethodTable
* pMT, ObjectHandleOnStack result);
641
private static extern unsafe void* GetUtf8NameInternal(
MethodTable
* pMT);
1067
private static extern unsafe
MethodTable
* GetMethodTable(RuntimeMethodHandleInternal method);
1072
MethodTable
* pMT = GetMethodTable(method);
1163
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(src);
1178
MethodTable
* pMT = destNullableType.GetNativeTypeHandle().AsMethodTable();
1486
private static extern
MethodTable
* GetApproxDeclaringMethodTable(RuntimeFieldHandleInternal field);
1491
MethodTable
* pMT = GetApproxDeclaringMethodTable(field);
1629
private static extern unsafe RuntimeFieldHandleInternal GetStaticFieldForGenericType(RuntimeFieldHandleInternal field,
MethodTable
* pMT);
src\System\RuntimeType.BoxCache.cs (1)
26
private readonly
MethodTable
* _pMT;
src\System\RuntimeType.CoreCLR.cs (2)
1779
MethodTable
* pParentMT = typeHandle.AsMethodTable()->ParentMethodTable;
3403
private static unsafe partial void GetGuid(
MethodTable
* pMT, Guid* result);
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\TypedReference.CoreCLR.cs (1)
55
MethodTable
* pMethodTable = typeHandle.IsTypeDesc
src\System\ValueType.cs (6)
73
private static unsafe bool CanCompareBitsOrUseFastGetHashCode(
MethodTable
* pMT)
87
private static unsafe partial bool CanCompareBitsOrUseFastGetHashCodeHelper(
MethodTable
* pMT);
106
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(this);
123
switch (GetHashCodeStrategy(pMT, ObjectHandleOnStack.Create(ref thisRef), out uint fieldOffset, out uint fieldSize, out
MethodTable
* fieldMT))
166
MethodTable
* pMT, ObjectHandleOnStack objHandle, out uint fieldOffset, out uint fieldSize, out
MethodTable
* fieldMT);