45 references to AsMethodTable
System.Private.CoreLib (45)
src\System\Array.CoreCLR.cs (7)
86MethodTable* pMTsrc = srcTH.AsMethodTable(); 87MethodTable* pMTdest = destTH.AsMethodTable(); 160MethodTable* pElementMethodTable = arrayElementTypeHandle.AsMethodTable(); 200MethodTable* pElementMethodTable = arrayElementTypeHandle.AsMethodTable(); 226if (pElementMethodTable != TypeHandle.TypeHandleOf<object>().AsMethodTable() // Everything is compatible with Object 307private unsafe MethodTable* ElementMethodTable => RuntimeHelpers.GetMethodTable(this)->GetArrayElementTypeHandle().AsMethodTable(); 327MethodTable* pElemMT = thElem.AsMethodTable();
src\System\Enum.CoreCLR.cs (2)
21CorElementType elementType = rt.GetNativeTypeHandle().AsMethodTable()->GetPrimitiveCorElementType(); 71RuntimeType? underlyingType = s_underlyingTypes[(int)enumType.GetNativeTypeHandle().AsMethodTable()->GetPrimitiveCorElementType()];
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (6)
39if (elementTH.IsTypeDesc || !elementTH.AsMethodTable()->IsPrimitive) // Enum is included 53Debug.Assert(!elementTH.AsMethodTable()->ContainsGCPointers); 103MethodTable* targetMT = th.AsMethodTable(); 1134/// Only if this returns <see langword="false"/> it is safe to call <see cref="AsMethodTable"/>. 1222&& CastHelpers.IsNullableForType(destTH.AsMethodTable(), srcTH.AsMethodTable()))
src\System\RuntimeHandles.cs (9)
55: h.AsMethodTable()->AuxiliaryData->ExposedClassObject) ?? GetRuntimeTypeFromHandleSlow(handle); 294object result = InternalAlloc(type.GetNativeTypeHandle().AsMethodTable()); 476return new RuntimeMethodHandleInternal(GetMethodAt(typeHandle.AsMethodTable(), slot)); 553bool success = GetFields(typeHandle.AsMethodTable(), buffer, ref countLocal) != Interop.BOOL.FALSE; 573GetInterfaces(typeHandle.AsMethodTable(), ObjectHandleOnStack.Create(ref result)); 670if (th.IsTypeDesc || th.AsMethodTable()->IsArray) 675void* name = GetUtf8NameInternal(th.AsMethodTable()); 1203MethodTable* pMT = destNullableType.GetNativeTypeHandle().AsMethodTable(); 1670return GetStaticFieldForGenericType(field, th.AsMethodTable());
src\System\RuntimeType.BoxCache.cs (1)
45_pMT = handle.AsMethodTable();
src\System\RuntimeType.CoreCLR.cs (17)
1736MethodTable* pParentMT = typeHandle.AsMethodTable()->ParentMethodTable; 3340if (th.IsTypeDesc || th.AsMethodTable()->IsArray) 3356GetGuid(th.AsMethodTable(), &result); 3387bool isValueType = th.AsMethodTable()->IsValueType; 3399bool isValueType = !th.IsTypeDesc && th.AsMethodTable()->IsValueType; 3415bool isEnum = th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.TypeHandle.TypeHandleOf<Enum>().AsMethodTable(); 3429bool isEnum = !th.IsTypeDesc && th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.TypeHandle.TypeHandleOf<Enum>().AsMethodTable(); 3441bool isInterface = !th.IsTypeDesc && th.AsMethodTable()->IsInterface; 3453bool isByRefLike = !th.IsTypeDesc && th.AsMethodTable()->IsByRefLike; 3463bool isDelegate = !th.IsTypeDesc && th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.TypeHandle.TypeHandleOf<MulticastDelegate>().AsMethodTable(); 3474bool isConstructedGenericType = !th.IsTypeDesc && th.AsMethodTable()->IsConstructedGenericType; 3486bool isGenericType = !th.IsTypeDesc && th.AsMethodTable()->HasInstantiation; 3498bool isGenericTypeDefinition = !th.IsTypeDesc && th.AsMethodTable()->IsGenericTypeDefinition; 3651bool isNullable = !th.IsTypeDesc && th.AsMethodTable()->IsNullable;
src\System\String.CoreCLR.cs (1)
33return FastAllocateString(TypeHandle.TypeHandleOf<string>().AsMethodTable(), length);
src\System\TypedReference.CoreCLR.cs (2)
56? TypeHandle.TypeHandleOf<UIntPtr>().AsMethodTable() 57: typeHandle.AsMethodTable();