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