74 references to MethodTable
System.Private.CoreLib (74)
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (3)
1042if (ShouldTypedClauseCatchThisException(exception, (MethodTable*)ehClause._pTargetType, !frameIter.IsRuntimeWrappedExceptions)) 1106private static bool ShouldTypedClauseCatchThisException(object exception, MethodTable* pClauseType, bool tryUnwrapException) 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\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (8)
15private unsafe MethodTable* _methodTable; 55_methodTable = (MethodTable*)fieldType.TypeHandle.Value; 61_methodTable = (MethodTable*)fieldType.TypeHandle.Value; 66_methodTable = (MethodTable*)fieldType.TypeHandle.Value; 76_methodTable = (MethodTable*)typeof(IntPtr).TypeHandle.Value; 90_methodTable = (MethodTable*)fieldType.TypeHandle.Value; 95_methodTable = (MethodTable*)fieldType.TypeHandle.Value; 104_methodTable = (MethodTable*)typeof(IntPtr).TypeHandle.Value;
src\System\Array.CoreCLR.cs (12)
67MethodTable* pMT = RuntimeHelpers.GetMethodTable(sourceArray); 153MethodTable* pDestArrayMT = RuntimeHelpers.GetMethodTable(destinationArray); 159MethodTable* pDestMT = destTH.AsMethodTable(); 195MethodTable* pSrcArrayMT = RuntimeHelpers.GetMethodTable(sourceArray); 201MethodTable* pSrcMT = srcTH.AsMethodTable(); 416MethodTable* pMT = RuntimeHelpers.GetMethodTable(array); 444MethodTable* pMT = RuntimeHelpers.GetMethodTable(array); 517MethodTable* pMethodTable = RuntimeHelpers.GetMethodTable(this); 533MethodTable* pElementMethodTable = arrayElementTypeHandle.AsMethodTable(); 621MethodTable* thisMT = RuntimeHelpers.GetMethodTable(this); 630MethodTable* pArrayMT = RuntimeHelpers.GetMethodTable(this); 637MethodTable* pElemMT = thElem.AsMethodTable();
src\System\Delegate.CoreCLR.cs (2)
453MethodTable* pMTa = RuntimeHelpers.GetMethodTable(a); 454MethodTable* pMTb = RuntimeHelpers.GetMethodTable(b);
src\System\Enum.CoreCLR.cs (3)
18private static extern unsafe CorElementType InternalGetCorElementType(MethodTable* pMT); 24CorElementType elementType = InternalGetCorElementType((MethodTable*)rt.GetUnderlyingNativeHandle()); 74RuntimeType? underlyingType = s_underlyingTypes[(int)InternalGetCorElementType((MethodTable*)enumType.GetUnderlyingNativeHandle())];
src\System\Runtime\CompilerServices\CastHelpers.cs (7)
69MethodTable* mt = RuntimeHelpers.GetMethodTable(obj); 73MethodTable** interfaceMap = mt->InterfaceMap; 137MethodTable* mt = RuntimeHelpers.GetMethodTable(obj)->ParentMethodTable; 171Debug.Assert(!((MethodTable*)toTypeHnd)->HasTypeEquivalence); 249MethodTable* mt = RuntimeHelpers.GetMethodTable(obj); 256MethodTable** interfaceMap = mt->InterfaceMap; 324MethodTable* mt = RuntimeHelpers.GetMethodTable(obj);
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (23)
46MethodTable* pMT = GetMethodTable(obj); 152MethodTable* pMT = GetMethodTable(o1); 267MethodTable* pMT = GetMethodTable(obj); 314/// Boxes a given value using an input <see cref="MethodTable"/> to determine its type. 316/// <param name="methodTable">The <see cref="MethodTable"/> pointer to use to create the boxed instance.</param> 321internal static extern unsafe object? Box(MethodTable* methodTable, ref byte data); 324internal static extern unsafe void Unbox_Nullable(ref byte destination, MethodTable* toTypeHnd, object? obj); 339internal static unsafe MethodTable* GetMethodTable(object obj) 344return (MethodTable*)Unsafe.Add(ref Unsafe.As<byte, IntPtr>(ref obj.GetRawData()), -1); 350internal static unsafe partial bool AreTypesEquivalent(MethodTable* pMTa, MethodTable* pMTb); 439MethodTable* pMT = handle.AsMethodTable(); 449if (MethodTable.AreSameType(pMT, (MethodTable*)RuntimeTypeHandle.ToIntPtr(typeof(void).TypeHandle))) 553public MethodTable* ParentMethodTable; 581public MethodTable** InterfaceMap; 651internal static bool AreSameType(MethodTable* mt1, MethodTable* mt2) => mt1 == mt2; 707/// <remarks>This method should only be called when the current <see cref="MethodTable"/> instance represents an array or string type.</remarks> 743/// A type handle, which can wrap either a pointer to a <c>TypeDesc</c> or to a <see cref="MethodTable"/>. 776/// Gets the <see cref="MethodTable"/> pointer wrapped by the current instance. 780public MethodTable* AsMethodTable() 784return (MethodTable*)m_asTAddr;
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (2)
248MethodTable* pMT = RuntimeHelpers.GetMethodTable(structure); 278MethodTable* pMT = RuntimeHelpers.GetMethodTable(structure);
src\System\StubHelpers.cs (3)
1543MethodTable* pMT = RuntimeHelpers.GetMethodTable(obj); 1562MethodTable* pMT = RuntimeHelpers.GetMethodTable(obj); 1581MethodTable* pMT = RuntimeHelpers.GetMethodTable(obj);
src\System\TypedReference.CoreCLR.cs (1)
32MethodTable* 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);