191 references to MethodTable
System.Private.CoreLib (191)
LibraryImports.g.cs (29)
15
private static extern partial void ThrowAmbiguousResolutionException(global::System.Runtime.CompilerServices.
MethodTable
* targetType, global::System.Runtime.CompilerServices.
MethodTable
* interfaceType, void* methodDesc);
23
private static extern partial void ThrowEntryPointNotFoundException(global::System.Runtime.CompilerServices.
MethodTable
* targetType, global::System.Runtime.CompilerServices.
MethodTable
* interfaceType, void* methodDesc);
83
private static unsafe extern partial void Ctor(global::System.Runtime.CompilerServices.
MethodTable
* pArrayMT, uint dwNumArgs, int* pArgList, global::System.Runtime.CompilerServices.ObjectHandleOnStack retArray);
213
private static unsafe extern partial void* GetMulticastInvokeSlow(global::System.Runtime.CompilerServices.
MethodTable
* pMT);
633
private static partial bool HasOverriddenSlow(global::System.Runtime.CompilerServices.
MethodTable
* pMT, bool isRead)
649
static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.
MethodTable
* __pMT_native, int __isRead_native);
1867
private static extern partial void InitClassHelper(global::System.Runtime.CompilerServices.
MethodTable
* mt);
1939
internal static unsafe partial bool AreTypesEquivalent(global::System.Runtime.CompilerServices.
MethodTable
* pMTa, global::System.Runtime.CompilerServices.
MethodTable
* pMTb)
1952
static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.
MethodTable
* __pMTa_native, global::System.Runtime.CompilerServices.
MethodTable
* __pMTb_native);
2029
private static partial void GetThreadStaticsByMethodTable(global::System.Runtime.CompilerServices.ByteRefOnStack result, global::System.Runtime.CompilerServices.
MethodTable
* pMT, bool gcStatics)
2040
static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.ByteRefOnStack __result_native, global::System.Runtime.CompilerServices.
MethodTable
* __pMT_native, int __gcStatics_native);
2673
private static unsafe extern partial void InternalAlloc(global::System.Runtime.CompilerServices.
MethodTable
* pMT, global::System.Runtime.CompilerServices.ObjectHandleOnStack result);
2681
private static unsafe extern partial void InternalAllocNoChecks(global::System.Runtime.CompilerServices.
MethodTable
* pMT, global::System.Runtime.CompilerServices.ObjectHandleOnStack result);
2713
private static unsafe extern partial nint GetMethodAt(global::System.Runtime.CompilerServices.
MethodTable
* pMT, int slot);
2729
private static partial global::Interop.BOOL GetFields(global::System.Runtime.CompilerServices.
MethodTable
* pMT, global::System.Span<nint> data, ref int usedCount)
2742
static extern unsafe global::Interop.BOOL __PInvoke(global::System.Runtime.CompilerServices.
MethodTable
* __pMT_native, nint* __data_native, int* __usedCount_native);
2751
private static unsafe extern partial void GetInterfaces(global::System.Runtime.CompilerServices.
MethodTable
* pMT, global::System.Runtime.CompilerServices.ObjectHandleOnStack result);
3250
private static unsafe extern partial void GetGuid(global::System.Runtime.CompilerServices.
MethodTable
* pMT, global::System.Guid* result);
3641
private static unsafe partial bool CanCompareBitsOrUseFastGetHashCodeHelper(global::System.Runtime.CompilerServices.
MethodTable
* pMT)
3654
static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.
MethodTable
* __pMT_native);
3663
private static unsafe partial global::System.ValueType.ValueTypeHashCodeStrategy GetHashCodeStrategy(global::System.Runtime.CompilerServices.
MethodTable
* pMT, global::System.Runtime.CompilerServices.ObjectHandleOnStack objHandle, out uint fieldOffset, out uint fieldSize, out global::System.Runtime.CompilerServices.
MethodTable
* fieldMT)
3670
fixed (global::System.Runtime.CompilerServices.
MethodTable
** __fieldMT_native = &fieldMT)
3680
static extern unsafe global::System.ValueType.ValueTypeHashCodeStrategy __PInvoke(global::System.Runtime.CompilerServices.
MethodTable
* __pMT_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __objHandle_native, uint* __fieldOffset_native, uint* __fieldSize_native, global::System.Runtime.CompilerServices.
MethodTable
** __fieldMT_native);
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (3)
1050
if (ShouldTypedClauseCatchThisException(exception, (
MethodTable
*)ehClause._pTargetType, !frameIter.IsRuntimeWrappedExceptions))
1114
private static bool ShouldTypedClauseCatchThisException(object exception,
MethodTable
* pClauseType, bool tryUnwrapException)
1128
MethodTable
* mt = RuntimeHelpers.GetMethodTable(exception);
src\Internal\Runtime\CompilerHelpers\ThrowHelpers.cs (8)
16
private static partial void ThrowAmbiguousResolutionException(
MethodTable
* targetType,
MethodTable
* interfaceType, void* methodDesc);
26
ThrowAmbiguousResolutionException((
MethodTable
*)targetType, (
MethodTable
*)interfaceType, method);
32
private static partial void ThrowEntryPointNotFoundException(
MethodTable
* targetType,
MethodTable
* interfaceType, void* methodDesc);
42
ThrowEntryPointNotFoundException((
MethodTable
*)targetType, (
MethodTable
*)interfaceType, method);
src\libraries\System.Private.CoreLib\src\System\Array.cs (12)
373
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(sourceArray);
374
if (
MethodTable
.AreSameType(pMT, RuntimeHelpers.GetMethodTable(destinationArray)) &&
408
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(sourceArray);
409
if (
MethodTable
.AreSameType(pMT, RuntimeHelpers.GetMethodTable(destinationArray)) &&
464
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(sourceArray);
536
MethodTable
* pDestArrayMT = RuntimeHelpers.GetMethodTable(destinationArray);
537
MethodTable
* pDestMT = destinationArray.ElementMethodTable;
581
MethodTable
* pSrcArrayMT = RuntimeHelpers.GetMethodTable(sourceArray);
582
MethodTable
* pSrcMT = sourceArray.ElementMethodTable;
606
MethodTable
* pDestMT = destinationArray.ElementMethodTable;
669
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(array);
697
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(array);
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 (13)
43
private static unsafe partial void Ctor(
MethodTable
* pArrayMT, uint dwNumArgs, int* pArgList, ObjectHandleOnStack retArray);
50
internal static unsafe Array Ctor(
MethodTable
* pArrayMT, uint dwNumArgs, int* pArgList)
91
MethodTable
* pMTsrc = srcTH.AsMethodTable();
92
MethodTable
* pMTdest = destTH.AsMethodTable();
149
MethodTable
* pMethodTable = RuntimeHelpers.GetMethodTable(this);
165
MethodTable
* pElementMethodTable = arrayElementTypeHandle.AsMethodTable();
191
MethodTable
* pMethodTable = RuntimeHelpers.GetMethodTable(this);
205
MethodTable
* pElementMethodTable = arrayElementTypeHandle.AsMethodTable();
265
MethodTable
* pValueMethodTable = RuntimeHelpers.GetMethodTable(value);
313
private unsafe
MethodTable
* ElementMethodTable => RuntimeHelpers.GetMethodTable(this)->GetArrayElementTypeHandle().AsMethodTable();
317
MethodTable
* thisMT = RuntimeHelpers.GetMethodTable(this);
326
MethodTable
* pArrayMT = RuntimeHelpers.GetMethodTable(this);
333
MethodTable
* pElemMT = thElem.AsMethodTable();
src\System\Delegate.CoreCLR.cs (5)
487
private static extern unsafe void* GetMulticastInvoke(
MethodTable
* pMT);
491
private static unsafe partial void* GetMulticastInvokeSlow(
MethodTable
* pMT);
495
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(this);
509
private static extern unsafe void* GetInvokeMethod(
MethodTable
* pMT);
513
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(this);
src\System\GC.CoreCLR.cs (2)
360
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(obj);
378
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(obj);
src\System\IO\Stream.CoreCLR.cs (5)
15
private static partial bool HasOverriddenSlow(
MethodTable
* pMT, [MarshalAs(UnmanagedType.Bool)] bool isRead);
19
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(this);
27
static bool HasOverriddenReadSlow(
MethodTable
* pMT)
33
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(this);
41
static bool HasOverriddenWriteSlow(
MethodTable
* pMT)
src\System\Object.CoreCLR.cs (1)
16
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(this);
src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (4)
251
private static unsafe Continuation AllocContinuation(Continuation prevContinuation,
MethodTable
* contMT)
264
private static unsafe Continuation AllocContinuationMethod(Continuation prevContinuation,
MethodTable
* contMT, int keepAliveOffset, MethodDesc* method)
274
private static unsafe Continuation AllocContinuationClass(Continuation prevContinuation,
MethodTable
* contMT, int keepAliveOffset,
MethodTable
* methodTable)
src\System\Runtime\CompilerServices\CastHelpers.cs (22)
108
MethodTable
* mt = RuntimeHelpers.GetMethodTable(obj);
112
MethodTable
** interfaceMap = mt->InterfaceMap;
177
MethodTable
* mt = RuntimeHelpers.GetMethodTable(obj)->ParentMethodTable;
295
MethodTable
* mt = RuntimeHelpers.GetMethodTable(obj);
302
MethodTable
** interfaceMap = mt->InterfaceMap;
372
MethodTable
* mt = RuntimeHelpers.GetMethodTable(obj);
417
private static ref byte Unbox(
MethodTable
* toTypeHnd, object obj)
551
internal static object? Box_Nullable(
MethodTable
* srcMT, ref byte nullableData)
559
MethodTable
* dstMT = srcMT->InstantiationArg0();
568
internal static object Box(
MethodTable
* typeMT, ref byte unboxedData)
612
internal static bool IsNullableForType(
MethodTable
* typeMT,
MethodTable
* boxedMT)
623
MethodTable
*pMTNullableArg = **typeMT->PerInstInfo;
641
private static void Unbox_Nullable_NotIsNullableForType(ref byte destPtr,
MethodTable
* typeMT, object obj)
654
internal static void Unbox_Nullable(ref byte destPtr,
MethodTable
* typeMT, object? obj)
689
internal static object? ReboxFromNullable(
MethodTable
* srcMT, object src)
698
private static ref byte Unbox_Helper(
MethodTable
* pMT1, object obj)
703
MethodTable
* pMT2 = RuntimeHelpers.GetMethodTable(obj);
720
private static void Unbox_TypeTest_Helper(
MethodTable
*pMT1,
MethodTable
*pMT2)
735
private static void Unbox_TypeTest(
MethodTable
*pMT1,
MethodTable
*pMT2)
src\System\Runtime\CompilerServices\InitHelpers.cs (6)
16
private static partial void InitClassHelper(
MethodTable
* mt);
21
internal static void InitClassSlow(
MethodTable
* mt)
28
private static void InitClass(
MethodTable
* mt)
38
private static void InitInstantiatedClass(
MethodTable
* mt, MethodDesc* methodDesc)
40
MethodTable
*pTemplateMT = methodDesc->MethodTable;
41
MethodTable
*pMT;
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (27)
37
MethodTable
* pMT = GetMethodTable(array);
104
MethodTable
* targetMT = th.AsMethodTable();
146
MethodTable
* pMT = GetMethodTable(obj);
276
MethodTable
* pMT = GetMethodTable(o1);
399
MethodTable
* pMT = GetMethodTable(obj);
446
/// Boxes a given value using an input <see cref="
MethodTable
"/> to determine its type.
448
/// <param name="methodTable">The <see cref="
MethodTable
"/> pointer to use to create the boxed instance.</param>
453
internal static unsafe object? Box(
MethodTable
* methodTable, ref byte data) =>
469
internal static unsafe
MethodTable
* GetMethodTable(object obj) => GetMethodTable(obj);
474
internal static unsafe partial bool AreTypesEquivalent(
MethodTable
* pMTa,
MethodTable
* pMTb);
732
public
MethodTable
* MethodTable => GetMethodDescChunk()->MethodTable;
738
public
MethodTable
* MethodTable;
784
public
MethodTable
* ParentMethodTable;
816
public
MethodTable
*** PerInstInfo;
822
public
MethodTable
** InterfaceMap;
924
internal static bool AreSameType(
MethodTable
* mt1,
MethodTable
* mt2) => mt1 == mt2;
1004
/// <remarks>This method should only be called when the current <see cref="
MethodTable
"/> instance represents an array or string type.</remarks>
1028
public extern
MethodTable
* GetMethodTableMatchingParentClass(
MethodTable
* parent);
1032
public extern
MethodTable
* InstantiationArg0();
1103
internal
MethodTable
* _methodTable;
1202
/// A type handle, which can wrap either a pointer to a <c>TypeDesc</c> or to a <see cref="
MethodTable
"/>.
1236
/// Gets the <see cref="
MethodTable
"/> pointer wrapped by the current instance.
1241
public
MethodTable
* AsMethodTable()
1245
return (
MethodTable
*)m_asTAddr;
src\System\Runtime\CompilerServices\StaticsHelpers.cs (10)
19
private static partial void GetThreadStaticsByMethodTable(ByteRefOnStack result,
MethodTable
* pMT, [MarshalAs(UnmanagedType.Bool)] bool gcStatics);
27
private static ref byte GetNonGCStaticBaseSlow(
MethodTable
* mt)
35
private static ref byte GetNonGCStaticBase(
MethodTable
* mt)
60
private static ref byte GetGCStaticBaseSlow(
MethodTable
* mt)
68
private static ref byte GetGCStaticBase(
MethodTable
* mt)
99
return ref Unsafe.Subtract(ref RuntimeHelpers.GetRawData(obj), sizeof(
MethodTable
*));
166
private static ref byte GetNonGCThreadStaticBaseSlow(
MethodTable
* mt)
176
private static ref byte GetGCThreadStaticBaseSlow(
MethodTable
* mt)
232
private static ref byte GetNonGCThreadStaticBase(
MethodTable
* mt)
243
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\RuntimeHandles.cs (18)
71
internal static unsafe RuntimeType GetRuntimeType(
MethodTable
* pMT)
287
internal static unsafe object InternalAlloc(
MethodTable
* pMT)
304
private static unsafe partial void InternalAlloc(
MethodTable
* pMT, ObjectHandleOnStack result);
309
internal static object InternalAllocNoChecks(
MethodTable
* pMT)
314
static object InternalAllocNoChecksWorker(
MethodTable
* pMT)
324
private static unsafe partial void InternalAllocNoChecks(
MethodTable
* pMT, ObjectHandleOnStack result);
328
private static extern object? InternalAllocNoChecks_FastPath(
MethodTable
* pMT);
471
private static unsafe partial IntPtr GetMethodAt(
MethodTable
* pMT, int slot);
550
private static partial Interop.BOOL GetFields(
MethodTable
* pMT, Span<IntPtr> data, ref int usedCount);
572
private static unsafe partial void GetInterfaces(
MethodTable
* pMT, ObjectHandleOnStack result);
675
private static extern unsafe void* GetUtf8NameInternal(
MethodTable
* pMT);
1128
private static extern unsafe
MethodTable
* GetMethodTable(RuntimeMethodHandleInternal method);
1133
MethodTable
* pMT = GetMethodTable(method);
1227
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(src);
1242
MethodTable
* pMT = destNullableType.GetNativeTypeHandle().AsMethodTable();
1565
private static extern
MethodTable
* GetApproxDeclaringMethodTable(RuntimeFieldHandleInternal field);
1570
MethodTable
* pMT = GetApproxDeclaringMethodTable(field);
1712
private static extern unsafe RuntimeFieldHandleInternal GetStaticFieldForGenericType(RuntimeFieldHandleInternal field,
MethodTable
* pMT);
src\System\RuntimeType.BoxCache.cs (1)
27
private readonly
MethodTable
* _pMT;
src\System\RuntimeType.CoreCLR.cs (2)
1788
MethodTable
* pParentMT = typeHandle.AsMethodTable()->ParentMethodTable;
3420
private static unsafe partial void GetGuid(
MethodTable
* pMT, Guid* result);
src\System\String.CoreCLR.cs (1)
16
internal static extern unsafe string FastAllocateString(
MethodTable
*pMT, nint length);
src\System\StubHelpers.cs (4)
993
RuntimeType marshalerType = RuntimeTypeHandle.GetRuntimeType((
MethodTable
*)pMT);
2043
internal static unsafe void NonBlittableStructureArrayConvertToUnmanaged(Array* managedArray, byte* pNative,
MethodTable
* pInterfaceMT, int nativeSize, Exception* pException)
2066
internal static unsafe void NonBlittableStructureArrayConvertToManaged(Array* managedArray, byte* pNative,
MethodTable
* pInterfaceMT, int nativeSize, Exception* pException)
2089
internal static unsafe void NonBlittableStructureArrayFree(byte* pArray, nuint numElements,
MethodTable
* pInterfaceMT, int nativeSize, Exception* pException)
src\System\TypedReference.CoreCLR.cs (1)
39
MethodTable
* pMethodTable = typeHandle.IsTypeDesc
src\System\ValueType.cs (6)
74
private static unsafe bool CanCompareBitsOrUseFastGetHashCode(
MethodTable
* pMT)
89
private static unsafe partial bool CanCompareBitsOrUseFastGetHashCodeHelper(
MethodTable
* pMT);
108
MethodTable
* pMT = RuntimeHelpers.GetMethodTable(this);
125
switch (GetHashCodeStrategy(pMT, ObjectHandleOnStack.Create(ref thisRef), out uint fieldOffset, out uint fieldSize, out
MethodTable
* fieldMT))
169
MethodTable
* pMT, ObjectHandleOnStack objHandle, out uint fieldOffset, out uint fieldSize, out
MethodTable
* fieldMT);