74 references to MethodTable
System.Private.CoreLib (74)
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (3)
1042
if (ShouldTypedClauseCatchThisException(exception, (
MethodTable
*)ehClause._pTargetType, !frameIter.IsRuntimeWrappedExceptions))
1106
private static bool ShouldTypedClauseCatchThisException(object exception,
MethodTable
* pClauseType, bool tryUnwrapException)
1120
MethodTable
* mt = RuntimeHelpers.GetMethodTable(exception);
src\libraries\System.Private.CoreLib\src\System\Array.cs (4)
367
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(sourceArray);
368
if (
MethodTable
.AreSameType(pMT, RuntimeHelpers.GetMethodTable(destinationArray)) &&
396
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(sourceArray);
397
if (
MethodTable
.AreSameType(pMT, RuntimeHelpers.GetMethodTable(destinationArray)) &&
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (8)
15
private 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)
67
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(sourceArray);
153
MethodTable
* pDestArrayMT = RuntimeHelpers.GetMethodTable(destinationArray);
159
MethodTable
* pDestMT = destTH.AsMethodTable();
195
MethodTable
* pSrcArrayMT = RuntimeHelpers.GetMethodTable(sourceArray);
201
MethodTable
* pSrcMT = srcTH.AsMethodTable();
416
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(array);
444
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(array);
517
MethodTable
* pMethodTable = RuntimeHelpers.GetMethodTable(this);
533
MethodTable
* pElementMethodTable = arrayElementTypeHandle.AsMethodTable();
621
MethodTable
* thisMT = RuntimeHelpers.GetMethodTable(this);
630
MethodTable
* pArrayMT = RuntimeHelpers.GetMethodTable(this);
637
MethodTable
* pElemMT = thElem.AsMethodTable();
src\System\Delegate.CoreCLR.cs (2)
453
MethodTable
* pMTa = RuntimeHelpers.GetMethodTable(a);
454
MethodTable
* pMTb = RuntimeHelpers.GetMethodTable(b);
src\System\Enum.CoreCLR.cs (3)
18
private static extern unsafe CorElementType InternalGetCorElementType(
MethodTable
* pMT);
24
CorElementType elementType = InternalGetCorElementType((
MethodTable
*)rt.GetUnderlyingNativeHandle());
74
RuntimeType? underlyingType = s_underlyingTypes[(int)InternalGetCorElementType((
MethodTable
*)enumType.GetUnderlyingNativeHandle())];
src\System\Runtime\CompilerServices\CastHelpers.cs (7)
69
MethodTable
* mt = RuntimeHelpers.GetMethodTable(obj);
73
MethodTable
** interfaceMap = mt->InterfaceMap;
137
MethodTable
* mt = RuntimeHelpers.GetMethodTable(obj)->ParentMethodTable;
171
Debug.Assert(!((
MethodTable
*)toTypeHnd)->HasTypeEquivalence);
249
MethodTable
* mt = RuntimeHelpers.GetMethodTable(obj);
256
MethodTable
** interfaceMap = mt->InterfaceMap;
324
MethodTable
* mt = RuntimeHelpers.GetMethodTable(obj);
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (23)
46
MethodTable
* pMT = GetMethodTable(obj);
152
MethodTable
* pMT = GetMethodTable(o1);
267
MethodTable
* 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>
321
internal static extern unsafe object? Box(
MethodTable
* methodTable, ref byte data);
324
internal static extern unsafe void Unbox_Nullable(ref byte destination,
MethodTable
* toTypeHnd, object? obj);
339
internal static unsafe
MethodTable
* GetMethodTable(object obj)
344
return (
MethodTable
*)Unsafe.Add(ref Unsafe.As<byte, IntPtr>(ref obj.GetRawData()), -1);
350
internal static unsafe partial bool AreTypesEquivalent(
MethodTable
* pMTa,
MethodTable
* pMTb);
439
MethodTable
* pMT = handle.AsMethodTable();
449
if (
MethodTable
.AreSameType(pMT, (
MethodTable
*)RuntimeTypeHandle.ToIntPtr(typeof(void).TypeHandle)))
553
public
MethodTable
* ParentMethodTable;
581
public
MethodTable
** InterfaceMap;
651
internal 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.
780
public
MethodTable
* AsMethodTable()
784
return (
MethodTable
*)m_asTAddr;
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (2)
248
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(structure);
278
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(structure);
src\System\StubHelpers.cs (3)
1543
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(obj);
1562
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(obj);
1581
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(obj);
src\System\TypedReference.CoreCLR.cs (1)
32
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);