392 references to MethodTable
System.Private.CoreLib (392)
_generated\2\LibraryImports.g.cs (1)
131internal static unsafe extern partial void RhAllocateNewArray(global::Internal.Runtime.MethodTable* pArrayEEType, uint numElements, uint flags, void* pResult);
Internal\IntrinsicSupport\ComparerHelpers.cs (3)
21MethodTable* objectType = t.ToMethodTable(); 22MethodTable* icomparableType = typeof(IComparable<>).TypeHandle.ToMethodTable(); 26MethodTable* interfaceType = objectType->InterfaceMap[i];
Internal\IntrinsicSupport\EqualityComparerHelpers.cs (3)
24MethodTable* objectType = t.ToMethodTable(); 25MethodTable* iequatableType = typeof(IEquatable<>).TypeHandle.ToMethodTable(); 29MethodTable* interfaceType = objectType->InterfaceMap[i];
Internal\Reflection\Augments\ReflectionAugments.cs (1)
49MethodTable* eeType = type.ToMethodTableMayBeNull();
Internal\Reflection\Core\Execution\ExecutionDomain.cs (3)
110internal static unsafe RuntimeTypeInfo GetRuntimeTypeInfo(MethodTable* pEEType) 158static RuntimeTypeInfo GetConstructedGenericTypeForHandle(MethodTable* pEEType) 173static RuntimeTypeInfo GetFunctionPointerTypeForHandle(MethodTable* pEEType)
Internal\Runtime\Augments\RuntimeAugments.cs (16)
74internal static void EnsureMethodTableSafeToAllocate(MethodTable* mt) 78Debug.Assert(MethodTable.Of<object>()->NumVtableSlots > 0); 96MethodTable* mt = typeHandleForArrayType.ToMethodTable(); 145MethodTable* elementMT = array.ElementMethodTable; 229return new RuntimeTypeHandle((MethodTable*)ldTokenResult); 267return RuntimeExports.RhBox(MethodTable.Of<IntPtr>(), ref address); 392MethodTable* elementType = parameterTypeHandle.ToMethodTable()->RelatedParameterType; 438MethodTable* dstEEType = dstType.ToMethodTable(); 439MethodTable* srcEEType = srcType.ToMethodTable(); 452MethodTable* eeType = typeHandle.ToMethodTable(); 494MethodTable* eeType = typeHandle.ToMethodTable(); 501MethodTable* eeType = typeHandle.ToMethodTable(); 508MethodTable* eeType = typeHandle.ToMethodTable(); 541MethodTable* genericContextPtr = default; 626MethodTable* srcEEType = srcObject.GetMethodTable(); 640MethodTable* theT = nullableType.ToMethodTable()->NullableType;
Internal\Runtime\CompilerHelpers\InteropHelpers.cs (3)
614if (!RuntimeImports.AreTypesAssignable(pMarshallerType.ToMethodTable(), MethodTable.Of<ICustomMarshaler>())) 625if (!RuntimeImports.AreTypesAssignable(marshaller.GetMethodTable(), MethodTable.Of<ICustomMarshaler>())) 638public MethodTable* CallingAssemblyType;
Internal\Runtime\CompilerHelpers\RuntimeInteropData.cs (1)
55MethodTable* structureMT = structureTypeHandle.ToMethodTable();
Internal\Runtime\CompilerHelpers\SharedCodeHelpers.cs (5)
18public static unsafe MethodTable* GetOrdinalInterface(MethodTable* pType, ushort interfaceIndex) 24public static unsafe MethodTable* GetCurrentSharedThunkContext() 26return (MethodTable*)RuntimeImports.GetCurrentInteropThunkContext(); 29public static unsafe MethodTable* GetClassHandleFromMethodParam(IntPtr pDictionary)
Internal\Runtime\CompilerServices\OpenMethodResolver.cs (1)
35private readonly MethodTable* _declaringType;
Internal\Runtime\FrozenObjectHeapManager.cs (6)
29MethodTable* pMT = MethodTable.Of<T>(); 33private object? TryAllocateObject(MethodTable* type, nuint objectSize) 157public HalfBakedObject* TryAllocateObject(MethodTable* type, nuint objectSize) 203private MethodTable* _methodTable; 204public void SetMethodTable(MethodTable* methodTable) => _methodTable = methodTable;
Internal\Runtime\MethodTable.Runtime.cs (6)
15internal MethodTable* GetArrayEEType() 17return MethodTable.Of<Array>(); 26internal static bool AreSameType(MethodTable* mt1, MethodTable* mt2) 40return IsPrimitive && (IsGenericTypeDefinition || NonArrayBaseType != MethodTable.Of<ValueType>()); 50&& NonArrayBaseType == MethodTable.Of<ValueType>();
Internal\Runtime\ThreadStatics.cs (2)
40TypeManagerHandle typeManager = MethodTable.Of<object>()->TypeManager; 140return RuntimeImports.RhNewObject((MethodTable*)gcDesc);
src\runtime\src\coreclr\nativeaot\Common\src\Internal\Runtime\CompilerHelpers\StartupCodeHelpers.cs (9)
135Debug.Assert(length % (MethodTable.SupportsRelativePointers ? sizeof(int) : sizeof(nint)) == 0); 174Debug.Assert(length % (MethodTable.SupportsRelativePointers ? sizeof(int) : sizeof(nint)) == 0); 178pCurrent += MethodTable.SupportsRelativePointers ? sizeof(int) : sizeof(nint)) 180var initializer = MethodTable.SupportsRelativePointers ? (delegate*<void>)ReadRelPtr32(pCurrent) : *(delegate*<void>*)pCurrent; 192object[] spine = new object[length / (MethodTable.SupportsRelativePointers ? sizeof(int) : sizeof(nint))]; 199block += MethodTable.SupportsRelativePointers ? sizeof(int) : sizeof(nint)) 205IntPtr* pBlock = MethodTable.SupportsRelativePointers ? (IntPtr*)ReadRelPtr32(block) : *(IntPtr**)block; 206nint blockAddr = MethodTable.SupportsRelativePointers ? (nint)ReadRelPtr32(pBlock) : *pBlock; 226void* pPreInitDataAddr = MethodTable.SupportsRelativePointers ? ReadRelPtr32((int*)pBlock + 1) : (void*)*(pBlock + 1);
src\runtime\src\coreclr\nativeaot\Common\src\Internal\Runtime\MethodTable.cs (33)
142public MethodTable* _pBaseType; 146public MethodTable* _pRelatedParameterType; 162internal static extern MethodTable* Of<T>(); 471internal MethodTable* GenericDefinition 480return GetField<Pointer<MethodTable>>(offset).Value; 482return GetField<RelativePointer<MethodTable>>(offset).Value; 529MethodTable* pListStart = arity == 1 ? (MethodTable*)pField : *(MethodTable**)pField; 535RelativePointer<MethodTable>* pListStart = arity == 1 ? 536(RelativePointer<MethodTable>*)pField : (RelativePointer<MethodTable>*)((RelativePointer*)pField)->Value; 680return new MethodTableList((MethodTable*)pStart); 681return new MethodTableList((RelativePointer<MethodTable>*)pStart); 685internal MethodTable* FunctionPointerReturnType 795return BaseSize - ((uint)sizeof(ObjHeader) + (uint)sizeof(MethodTable*) + ValueTypeFieldPadding); 799internal MethodTable** InterfaceMap 805return (MethodTable**)((byte*)Unsafe.AsPointer(ref this) + sizeof(MethodTable) + sizeof(void*) * _usNumVtableSlots); 863internal MethodTable* BaseType 889internal MethodTable* NonArrayBaseType 900internal MethodTable* NullableType 923internal MethodTable* RelatedParameterType 942return (IntPtr*)((byte*)Unsafe.AsPointer(ref this) + sizeof(MethodTable)); 986internal MethodTable* DynamicTemplateType 991return GetField<Pointer<MethodTable>>(EETypeField.ETF_DynamicTemplateType).Value; 1154uint cbOffset = (uint)(sizeof(MethodTable) + (IntPtr.Size * _usNumVtableSlots)); 1157cbOffset += (uint)(sizeof(MethodTable*) * NumInterfaces); 1365public MethodTableList(MethodTable* pFirst) 1372public MethodTableList(RelativePointer<MethodTable>* pFirst) 1379public MethodTable* this[int index] 1384return (((RelativePointer<MethodTable>*)((nint)_pFirst - IsRelative)) + index)->Value; 1386return *((MethodTable**)_pFirst + index);
src\runtime\src\coreclr\nativeaot\Common\src\Internal\Runtime\TypeLoader\ExternalReferencesTable.cs (1)
70if (MethodTable.SupportsRelativePointers)
src\runtime\src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\CachedInterfaceDispatch.cs (11)
50MethodTable* pInstanceType = pObject.GetMethodTable(); 65private static IntPtr RhResolveDispatch(object pObject, MethodTable* interfaceType, ushort slot) 76private static IntPtr RhResolveDispatchOnType(MethodTable* pInstanceType, MethodTable* pInterfaceType, ushort slot) 86private static IntPtr RhResolveStaticDispatchOnType(MethodTable* pInstanceType, MethodTable* pInterfaceType, ushort slot, MethodTable** ppGenericContext) 96private static IntPtr RhResolveDynamicInterfaceCastableDispatchOnType(MethodTable* pInstanceType, MethodTable* pInterfaceType, ushort slot, MethodTable** ppGenericContext) 123MethodTable* pInstanceType = pObject.GetMethodTable();
src\runtime\src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\DispatchResolve.cs (15)
13public static IntPtr FindInterfaceMethodImplementationTarget(MethodTable* pTgtType, 14MethodTable* pItfType, 17/* out */ MethodTable** ppGenericContext) 23MethodTable* pCur = pTgtType; 80private static bool FindImplSlotForCurrentType(MethodTable* pTgtType, 81MethodTable* pItfType, 85MethodTable** ppGenericContext) 124private static bool FindImplSlotInSimpleMap(MethodTable* pTgtType, 125MethodTable* pItfType, 128MethodTable** ppGenericContext, 133MethodTable* pItfOpenGenericType = null; 192MethodTable* pCurEntryType = 226MethodTable* pCurEntryGenericType = pCurEntryType->GenericDefinition; 260private static unsafe MethodTable* GetGenericContextSource(MethodTable* pTgtType, DispatchMap.DispatchMapEntry* pEntry)
src\runtime\src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (4)
349internal static Exception GetClasslibExceptionFromEEType(ExceptionIDs id, MethodTable* pEEType) 404public static void FailedAllocation(MethodTable* pEEType, bool fIsOverflow) 1070if (ShouldTypedClauseCatchThisException(exception, (MethodTable*)ehClause._pTargetType, !frameIter.IsRuntimeWrappedExceptions)) 1134private static bool ShouldTypedClauseCatchThisException(object exception, MethodTable* pClauseType, bool tryUnwrapException)
src\runtime\src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\InternalCalls.cs (7)
27public MethodTable* InterfaceType; 96internal static extern unsafe object RhpNewFast(MethodTable* pEEType); // BEWARE: not for finalizable objects! 100internal static extern unsafe object RhpNewFinalizable(MethodTable* pEEType); 104internal static extern unsafe object RhpNewArrayFast(MethodTable* pEEType, nint length); 155internal static extern unsafe IntPtr RhpSearchDispatchCellCache(IntPtr pCell, MethodTable* pInstanceType); 159internal static extern unsafe IntPtr RhpUpdateDispatchCellCache(IntPtr pCell, IntPtr pTargetCode, MethodTable* pInstanceType, ref DispatchCellInfo newCellInfo); 167internal static extern unsafe void* RhpGetClasslibFunctionFromEEType(MethodTable* pEEType, ClassLibFunctionId id);
src\runtime\src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\MethodTable.Runtime.cs (3)
35return (IntPtr)InternalCalls.RhpGetClasslibFunctionFromEEType((MethodTable*)Unsafe.AsPointer(ref this), id); 43internal static unsafe bool IsSystemObject(MethodTable* pEEType) 52internal static unsafe bool IsValidArrayBaseType(MethodTable* pEEType)
src\runtime\src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\RuntimeExports.cs (16)
22public static unsafe object RhNewObject(MethodTable* pEEType) 59public static unsafe object RhNewArray(MethodTable* pEEType, nint length) 77public static unsafe object RhNewVariableSizeObject(MethodTable* pEEType, int length) 101internal static unsafe IntPtr RhGetNewObjectHelper(MethodTable* pEEType) 116return (IntPtr)(delegate*<MethodTable*, object>)&InternalCalls.RhpNewFinalizable; 118return (IntPtr)(delegate*<MethodTable*, object>)&InternalCalls.RhpNewFast; 121public static unsafe object RhBox(MethodTable* pEEType, ref byte data) 172public static unsafe object RhBoxAny(ref byte data, MethodTable* pEEType) 184private static unsafe bool UnboxAnyTypeCompare(MethodTable* pEEType, MethodTable* ptrUnboxToEEType) 215public static unsafe ref byte RhUnbox2(MethodTable* pUnboxToEEType, object obj) 225public static unsafe void RhUnboxNullable(ref byte data, MethodTable* pUnboxToEEType, object obj) 234public static unsafe void RhUnboxTypeTest(MethodTable* pType, MethodTable* pBoxType) 245public static unsafe void RhUnbox(object? obj, ref byte data, MethodTable* pUnboxToEEType) 260MethodTable* pEEType = obj.GetMethodTable();
src\runtime\src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\TypeCast.cs (69)
66public static unsafe object? IsInstanceOfAny(MethodTable* pTargetType, object? obj) 70MethodTable* mt = obj.GetMethodTable(); 96public static unsafe object? IsInstanceOfInterface(MethodTable* pTargetType, object? obj) 105MethodTable* mt = obj.GetMethodTable(); 109MethodTable** interfaceMap = mt->InterfaceMap; 175private static unsafe object? IsInstanceOfInterface_Helper(MethodTable* pTargetType, object? obj) 185public static unsafe object? IsInstanceOfClass(MethodTable* pTargetType, object? obj) 208MethodTable* mt = obj.GetMethodTable()->NonArrayBaseType; 248public static unsafe bool IsInstanceOfException(MethodTable* pTargetType, object? obj) 255MethodTable* pObjType = obj.GetMethodTable(); 278public static unsafe object CheckCastAny(MethodTable* pTargetType, object obj) 284MethodTable* mt = obj.GetMethodTable(); 305public static unsafe object CheckCastInterface(MethodTable* pTargetType, object obj) 314MethodTable* mt = obj.GetMethodTable(); 321MethodTable** interfaceMap = mt->InterfaceMap; 375private static unsafe object CheckCastInterface_Helper(MethodTable* pTargetType, object obj) 390public static unsafe object CheckCastClass(MethodTable* pTargetType, object obj) 407private static unsafe object CheckCastClassSpecial(MethodTable* pTargetType, object obj) 414MethodTable* mt = obj.GetMethodTable(); 470private static unsafe bool IsInstanceOfInterfaceViaIDynamicInterfaceCastable(MethodTable* pTargetType, object obj, bool throwing) 475internal static unsafe bool IsDerived(MethodTable* pDerivedType, MethodTable* pBaseType) 502private static unsafe bool ImplementsInterface(MethodTable* pObjType, MethodTable* pTargetType, EETypePairList* pVisited) 509MethodTable** interfaceMap = pObjType->InterfaceMap; 512MethodTable* pInterfaceType = interfaceMap[i]; 530MethodTable* pTargetGenericType = pTargetType->GenericDefinition; 540MethodTable* pInterfaceType = interfaceMap[i]; 549MethodTable* pInterfaceGenericType = pInterfaceType->GenericDefinition; 582private static unsafe bool TypesAreCompatibleViaGenericVariance(MethodTable* pSourceType, MethodTable* pTargetType, EETypePairList* pVisited) 584MethodTable* pTargetGenericType = pTargetType->GenericDefinition; 585MethodTable* pSourceGenericType = pSourceType->GenericDefinition; 639MethodTable* pTargetArgType = targetInstantiation[i]; 640MethodTable* pSourceArgType = sourceInstantiation[i]; 722MethodTable* arrayElemType = array.GetMethodTable()->RelatedParameterType; 754public static unsafe ref object? LdelemaRef(object?[] array, nint index, MethodTable* elementType) 777MethodTable* arrayElemType = array.GetMethodTable()->RelatedParameterType; 797MethodTable* elementType = array.GetMethodTable()->RelatedParameterType; 816if (array.GetMethodTable() == MethodTable.Of<object[]>()) 824private static unsafe void StelemRef_Helper(ref object? element, MethodTable* elementType, object obj) 836private static unsafe void StelemRef_Helper_NoCacheLookup(ref object? element, MethodTable* elementType, object obj) 849private static unsafe object IsInstanceOfArray(MethodTable* pTargetType, object obj) 851MethodTable* pObjType = obj.GetMethodTable(); 887private static unsafe object CheckCastArray(MethodTable* pTargetEEType, object obj) 902private static unsafe object IsInstanceOfVariantType(MethodTable* pTargetType, object obj) 914private static unsafe object CheckCastVariantType(MethodTable* pTargetType, object obj) 926internal static unsafe EETypeElementType GetNormalizedIntegralArrayElementType(MethodTable* type) 947private static unsafe object ThrowInvalidCastException(MethodTable* pMT) 954private MethodTable* _eetype1; 955private MethodTable* _eetype2; 958public EETypePairList(MethodTable* pEEType1, MethodTable* pEEType2, EETypePairList* pNext) 965public static bool Exists(EETypePairList* pList, MethodTable* pEEType1, MethodTable* pEEType2) 986public static unsafe bool AreTypesAssignable(MethodTable* pSourceType, MethodTable* pTargetType) 1002MethodTable* pNullableType = pTargetType->NullableType; 1012public static unsafe bool AreTypesAssignableInternal(MethodTable* pSourceType, MethodTable* pTargetType, AssignmentVariation variation, EETypePairList* pVisited) 1029private static unsafe bool CacheMiss(MethodTable* pSourceType, MethodTable* pTargetType, AssignmentVariation variation, EETypePairList* pVisited) 1056internal static unsafe bool AreTypesAssignableInternalUncached(MethodTable* pSourceType, MethodTable* pTargetType, AssignmentVariation variation, EETypePairList* pVisited) 1099MethodTable* pSourceRelatedParameterType = pSourceType->RelatedParameterType; 1207private static unsafe object? IsInstanceOfAny_NoCacheLookup(MethodTable* pTargetType, object obj) 1209MethodTable* pSourceType = obj.GetMethodTable(); 1246private static unsafe object CheckCastAny_NoCacheLookup(MethodTable* pTargetType, object obj) 1248MethodTable* pSourceType = obj.GetMethodTable();
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (1)
298private static unsafe Continuation AllocContinuation(Continuation prevContinuation, MethodTable* contMT)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Array.cs (12)
373MethodTable* pMT = RuntimeHelpers.GetMethodTable(sourceArray); 374if (MethodTable.AreSameType(pMT, RuntimeHelpers.GetMethodTable(destinationArray)) && 408MethodTable* pMT = RuntimeHelpers.GetMethodTable(sourceArray); 409if (MethodTable.AreSameType(pMT, RuntimeHelpers.GetMethodTable(destinationArray)) && 464MethodTable* pMT = RuntimeHelpers.GetMethodTable(sourceArray); 536MethodTable* pDestArrayMT = RuntimeHelpers.GetMethodTable(destinationArray); 537MethodTable* pDestMT = destinationArray.ElementMethodTable; 581MethodTable* pSrcArrayMT = RuntimeHelpers.GetMethodTable(sourceArray); 582MethodTable* pSrcMT = sourceArray.ElementMethodTable; 606MethodTable* pDestMT = destinationArray.ElementMethodTable; 669MethodTable* pMT = RuntimeHelpers.GetMethodTable(array); 697MethodTable* pMT = RuntimeHelpers.GetMethodTable(array);
System\Activator.NativeAot.cs (1)
56t = RawCalliHelper.Call<T>(allocator, (nint)MethodTable.Of<T>());
System\Array.NativeAot.cs (14)
20using MethodTable = Internal.Runtime.MethodTable; 47private static unsafe MethodTable* GetSystemArrayEEType() 49return MethodTable.Of<Array>(); 124MethodTable* eeType = arrayType.TypeHandle.ToMethodTable(); 130internal static unsafe Array NewMultiDimArray(MethodTable* eeType, int* pLengths, int rank) 178internal static unsafe Array Ctor(MethodTable* pEEType, int nDimensions, int* pDimensions) 211internal static unsafe Array CtorRare(MethodTable* pEEType, int nDimensions, int* pDimensions) 225MethodTable* elementType = pEEType->RelatedParameterType; 258MethodTable* pElementEEType = ElementMethodTable; 294MethodTable* sourceElementEEType = sourceArray.ElementMethodTable; 295MethodTable* destinationElementEEType = destinationArray.ElementMethodTable; 388MethodTable* pElementEEType = ElementMethodTable; 406MethodTable* pElementEEType = ElementMethodTable; 436internal unsafe MethodTable* ElementMethodTable => this.GetMethodTable()->RelatedParameterType;
System\Attribute.NativeAot.cs (3)
19internal virtual unsafe int __GetFieldHelper(int index, out MethodTable* mt) 41int fieldOffset = __GetFieldHelper(i, out MethodTable* fieldType); 68int fieldOffset = __GetFieldHelper(i, out MethodTable* fieldType);
System\Delegate.cs (2)
389MethodTable* delegateEEType = typeHandle.ToMethodTable(); 415internal static unsafe Delegate CreateDelegate(MethodTable* delegateEEType, IntPtr ldftnResult, object thisObject, bool isStatic, bool isOpen)
System\EETypePtr.cs (3)
18using MethodTable = Internal.Runtime.MethodTable; 25private MethodTable* _value; 27internal EETypePtr(MethodTable* value)
System\Enum.NativeAot.cs (2)
65internal static unsafe object ToObject(MethodTable* mt, long value) 90MethodTable* eeType = value.GetMethodTable();
System\GC.NativeAot.cs (2)
842RuntimeImports.RhAllocateNewArray(MethodTable.Of<T[]>(), (uint)length, (uint)flags, &array); 869RuntimeImports.RhAllocateNewArray(MethodTable.Of<T[]>(), (uint)length, (uint)flags, &array);
System\InvokeUtils.cs (12)
9using MethodTable = Internal.Runtime.MethodTable; 43internal static object? CheckArgument(object? srcObject, MethodTable* dstEEType, CheckArgumentSemantics semantics, BinderBundle? binderBundle) 58throw CreateChangeTypeException(MethodTable.Of<object>(), dstEEType, semantics); 68MethodTable* srcEEType = srcObject.GetMethodTable(); 82internal static object? CheckArgumentConversions(object srcObject, MethodTable* dstEEType, CheckArgumentSemantics semantics, BinderBundle? binderBundle) 102private static Exception ConvertOrWidenPrimitivesEnumsAndPointersIfPossible(object srcObject, MethodTable* dstEEType, CheckArgumentSemantics semantics, out object? dstObject) 104MethodTable* srcEEType = srcObject.GetMethodTable(); 375private static Exception ConvertPointerIfPossible(object srcObject, MethodTable* dstEEType, CheckArgumentSemantics semantics, out object dstPtr) 396private static Exception CreateChangeTypeException(MethodTable* srcEEType, MethodTable* dstEEType, CheckArgumentSemantics semantics) 411internal static ArgumentException CreateChangeTypeArgumentException(MethodTable* srcEEType, MethodTable* dstEEType, bool destinationIsByRef = false)
System\Object.NativeAot.cs (1)
19internal MethodTable* m_pEEType;
System\Reflection\DynamicInvokeInfo.cs (18)
27private readonly MethodTable* _returnType; 47internal ArgumentInfo(Transform transform, MethodTable* type) 54internal MethodTable* Type { get; } 86MethodTable* eeArgumentType = argumentType.TypeHandle.ToMethodTable(); 132MethodTable* eeReturnType = returnType.TypeHandle.ToMethodTable(); 222MethodTable.Of<IntPtr>() : _returnType); 290MethodTable.Of<IntPtr>() : _returnType); 356MethodTable.Of<IntPtr>() : _returnType); 578MethodTable* nullableType = argumentInfo.Type->NullableType; 607MethodTable.Of<IntPtr>() : argumentInfo.Type); 624MethodTable* srcEEType = arg.GetMethodTable(); 625MethodTable* dstEEType = argumentInfo.Type; 688MethodTable.Of<IntPtr>() : argumentInfo.Type); 692MethodTable* srcEEType = arg.GetMethodTable(); 693MethodTable* dstEEType = argumentInfo.Type; 763(transform & Transform.FunctionPointer) != 0 ? MethodTable.Of<IntPtr>() : argumentInfo.Type, 798(transform & Transform.FunctionPointer) != 0 ? MethodTable.Of<IntPtr>() : argumentInfo.Type, 828obj = RuntimeExports.RhBox(MethodTable.Of<IntPtr>(), ref byref);
System\Runtime\CompilerServices\RuntimeHelpers.NativeAot.cs (8)
54MethodTable* eeType = obj.GetMethodTable(); 185MethodTable* pMT = GetMethodTable(obj); 203internal static unsafe MethodTable* GetMethodTable(this object obj) => obj.GetMethodTable(); 205internal static unsafe ref MethodTable* GetMethodTableRef(this object obj) 321MethodTable* mt = type.TypeHandle.ToMethodTable(); 334if (RuntimeImports.AreTypesAssignable(mt, MethodTable.Of<Delegate>())) 374MethodTable* mt = type.ToMethodTable(); 406MethodTable* mt = type.ToMethodTable();
System\Runtime\InteropServices\ComWrappers.NativeAot.cs (1)
26if (!RuntimeImports.RhRegisterRefCountedHandleCallback((nint)callback, MethodTable.Of<ManagedObjectWrapperHolder>()))
System\Runtime\InteropServices\IDynamicInterfaceCastable.cs (7)
21internal static nint GetDynamicInterfaceImplementation(IDynamicInterfaceCastable instance, MethodTable* interfaceType, ushort slot) 24MethodTable* implType = handle.ToMethodTable(); 34MethodTable* genericContext = null; 60private static void ThrowInvalidCastException(object instance, MethodTable* interfaceType) 65private static void ThrowInvalidOperationException(MethodTable* resolvedImplType) 70private static void GetInterfaceImplementationFailure(object instance, MethodTable* interfaceType, MethodTable* resolvedImplType)
System\Runtime\InteropServices\Marshal.NativeAot.cs (3)
65MethodTable* structureMT = structure.GetMethodTable(); 102RuntimeImports.AreTypesAssignable(MethodTable.Of<Delegate>(), structureTypeHandle.ToMethodTable())) 122MethodTable* structureMT = structure.GetMethodTable();
System\Runtime\InteropServices\PInvokeMarshal.cs (1)
234if (delegateType.ToMethodTable()->BaseType != MethodTable.Of<MulticastDelegate>())
System\Runtime\RuntimeImports.cs (22)
229internal static unsafe partial void RhAllocateNewArray(MethodTable* pArrayEEType, uint numElements, uint flags, void* pResult); 375internal static extern unsafe bool AreTypesAssignable(MethodTable* pSourceType, MethodTable* pTargetType); 389internal static extern unsafe object RhBoxAny(ref byte pData, MethodTable* pEEType); 393internal static extern unsafe object RhNewObject(MethodTable* pEEType); 397internal static extern unsafe Array RhNewArray(MethodTable* pEEType, nint length); 401internal static extern unsafe Array RhNewVariableSizeObject(MethodTable* pEEType, int length); 405internal static extern unsafe IntPtr RhGetNewObjectHelper(MethodTable* pEEType); 409internal static extern unsafe void RhUnbox(object? obj, ref byte data, MethodTable* pUnboxToEEType); 437internal static extern unsafe int RhGetGCDescSize(MethodTable* eeType); 441internal static extern unsafe IntPtr RhNewInterfaceDispatchCell(MethodTable* pEEType, int slotNumber); 445internal static extern unsafe IntPtr RhResolveDispatch(object pObject, MethodTable* pInterfaceType, ushort slot); 453internal static extern unsafe IntPtr RhResolveDispatchOnType(MethodTable* instanceType, MethodTable* interfaceType, ushort slot); 457internal static extern unsafe IntPtr RhResolveStaticDispatchOnType(MethodTable* instanceType, MethodTable* interfaceType, ushort slot, MethodTable** pGenericContext); 461internal static extern unsafe IntPtr RhResolveDynamicInterfaceCastableDispatchOnType(MethodTable* instanceType, MethodTable* interfaceType, ushort slot, MethodTable** pGenericContext); 485internal static extern unsafe bool RhRegisterRefCountedHandleCallback(IntPtr pCalloutMethod, MethodTable* pTypeFilter); 489internal static extern unsafe void RhUnregisterRefCountedHandleCallback(IntPtr pCalloutMethod, MethodTable* pTypeFilter);
System\Runtime\TypeLoaderExports.cs (1)
111=> RuntimeAugments.TypeLoaderCallbacks.ResolveGenericVirtualMethodTarget(new RuntimeTypeHandle((MethodTable*)context), *(RuntimeMethodHandle*)&signature));
System\RuntimeType.NativeAot.cs (37)
24private MethodTable* _pUnderlyingEEType; 27internal RuntimeType(MethodTable* pEEType) 38internal void DangerousSetUnderlyingEEType(MethodTable* pEEType) 49internal MethodTable* ToMethodTableMayBeNull() => _pUnderlyingEEType; 127MethodTable* pEEType = _pUnderlyingEEType; 212MethodTable* pEEType = _pUnderlyingEEType; 222MethodTable* pEEType = _pUnderlyingEEType; 233MethodTable* pEEType = _pUnderlyingEEType; 242MethodTable* pEEType = _pUnderlyingEEType; 252MethodTable* pEEType = _pUnderlyingEEType; 263MethodTable* pEEType = _pUnderlyingEEType; 274MethodTable* pEEType = _pUnderlyingEEType; 283MethodTable* pEEType = _pUnderlyingEEType; 291MethodTable* pEEType = _pUnderlyingEEType; 299MethodTable* pEEType = _pUnderlyingEEType; 307MethodTable* pEEType = _pUnderlyingEEType; 315MethodTable* pEEType = _pUnderlyingEEType; 323MethodTable* pEEType = _pUnderlyingEEType; 333MethodTable* pEEType = _pUnderlyingEEType; 338MethodTable* pBaseType = pEEType->NonArrayBaseType; 360MethodTable* pEEType = _pUnderlyingEEType; 382MethodTable* pEEType = _pUnderlyingEEType; 393MethodTable* pEEType = _pUnderlyingEEType; 404MethodTable* pEEType = _pUnderlyingEEType; 415MethodTable* pEEType = _pUnderlyingEEType; 424MethodTable* pEEType = _pUnderlyingEEType; 438MethodTable* pEEType = _pUnderlyingEEType; 501MethodTable* pEEType = _pUnderlyingEEType; 510MethodTable* pEEType = _pUnderlyingEEType; 520MethodTable* pEEType = _pUnderlyingEEType; 531MethodTable* pEEType = _pUnderlyingEEType; 542MethodTable* pEEType = _pUnderlyingEEType; 553MethodTable* pEEType = _pUnderlyingEEType; 564MethodTable* pEEType = _pUnderlyingEEType; 573MethodTable* pEEType = _pUnderlyingEEType; 598MethodTable* pEEType = _pUnderlyingEEType; 641MethodTable* pEEType = _pUnderlyingEEType;
System\RuntimeTypeHandle.cs (4)
21internal unsafe RuntimeTypeHandle(MethodTable* pEEType) 101internal MethodTable* ToMethodTable() 103return (MethodTable*)_value; 115internal static unsafe RuntimeTypeHandle GetRuntimeTypeHandleFromMethodTable(MethodTable* pMT)
System\String.NativeAot.cs (2)
24private static extern unsafe string FastAllocateString(MethodTable *pMT, nint length); 32string newStr = FastAllocateString(MethodTable.Of<string>(), length);
System\Threading\ObjectHeader.cs (8)
47private static unsafe int* GetHeaderPtr(MethodTable** ppMethodTable) 62fixed (MethodTable** ppMethodTable = &o.GetMethodTableRef()) 98fixed (MethodTable** ppMethodTable = &o.GetMethodTableRef()) 201fixed (MethodTable** ppMethodTable = &o.GetMethodTableRef()) 307fixed (MethodTable** ppMethodTable = &obj.GetMethodTableRef()) 357fixed (MethodTable** ppMethodTable = &obj.GetMethodTableRef()) 445fixed (MethodTable** ppMethodTable = &obj.GetMethodTableRef()) 494fixed (MethodTable** ppMethodTable = &obj.GetMethodTableRef())
System\Type.NativeAot.cs (3)
26internal static unsafe RuntimeType? GetTypeFromMethodTableMaybeNull(MethodTable* pMT) => (pMT == null) ? null : GetTypeFromMethodTable(pMT); 30internal static unsafe RuntimeType GetTypeFromMethodTable(MethodTable* pMT) 43private static unsafe RuntimeType GetTypeFromMethodTableSlow(MethodTable* pMT)
System\TypedReference.cs (1)
53MethodTable* mt = handle.ToMethodTable();
System\ValueType.cs (4)
43internal virtual unsafe int __GetFieldHelper(int index, out MethodTable* mt) 83int fieldOffset = __GetFieldHelper(i, out MethodTable* fieldType); 124private static unsafe ReadOnlySpan<byte> GetSpanForField(MethodTable* type, ref byte data) 136int fieldOffset = __GetFieldHelper(i, out MethodTable* fieldType);