12 instantiations of TypeHandle
Microsoft.Diagnostics.DataContractReader.Contracts (12)
Contracts\ManagedTypeSource_1.cs (2)
99_typeHandleCache[fullyQualifiedName] = new TypeHandle(TargetPointer.Null); 251th = new TypeHandle(TargetPointer.Null);
Contracts\RuntimeTypeSystem_1.cs (7)
477return new TypeHandle(typeHandlePointer); 484return new TypeHandle(typeHandlePointer); 495return new TypeHandle(methodTablePointer); 504return new TypeHandle(methodTablePointer); 516return new TypeHandle(methodTablePointer); 1095return new TypeHandle(TargetPointer.Null); 1132return new TypeHandle(TargetPointer.Null);
Contracts\Signature\SignatureTypeProvider.cs (3)
79return typeHandlePtr == TargetPointer.Null ? new TypeHandle(TargetPointer.Null) : _runtimeTypeSystem.GetTypeHandle(typeHandlePtr); 87return typeHandlePtr == TargetPointer.Null ? new TypeHandle(TargetPointer.Null) : _runtimeTypeSystem.GetTypeHandle(typeHandlePtr); 95? new TypeHandle(TargetPointer.Null)
401 references to TypeHandle
Microsoft.Diagnostics.DataContractReader.Abstractions (68)
Contracts\IManagedTypeSource.cs (2)
19bool TryGetTypeHandle(string fullyQualifiedName, out TypeHandle typeHandle) => throw new NotImplementedException(); 20TypeHandle GetTypeHandle(string fullyQualifiedName) => throw new NotImplementedException();
Contracts\IRuntimeMutableTypeSystem.cs (1)
13IEnumerable<TargetPointer> EnumerateAddedFieldDescs(TypeHandle typeHandle, bool staticFields)
Contracts\IRuntimeTypeSystem.cs (63)
106TypeHandle GetTypeHandle(TargetPointer address) => throw new NotImplementedException(); 107TargetPointer GetModule(TypeHandle typeHandle) => throw new NotImplementedException(); 108TargetPointer GetLoaderModule(TypeHandle typeHandle) => throw new NotImplementedException(); 112TargetPointer GetCanonicalMethodTable(TypeHandle typeHandle) => throw new NotImplementedException(); 115TargetPointer GetClassPointer(TypeHandle typeHandle) => throw new NotImplementedException(); 117bool IsCanonicalMethodTable(TypeHandle typeHandle) => throw new NotImplementedException(); 118TargetPointer GetParentMethodTable(TypeHandle typeHandle) => throw new NotImplementedException(); 120TargetPointer GetMethodDescForSlot(TypeHandle methodTable, ushort slot) => throw new NotImplementedException(); 121IEnumerable<TargetPointer> GetIntroducedMethodDescs(TypeHandle methodTable) => throw new NotImplementedException(); 122TargetCodePointer GetSlot(TypeHandle typeHandle, uint slot) => throw new NotImplementedException(); 124uint GetBaseSize(TypeHandle typeHandle) => throw new NotImplementedException(); 125uint GetNumInstanceFieldBytes(TypeHandle typeHandle) => throw new NotImplementedException(); 127uint GetComponentSize(TypeHandle typeHandle) => throw new NotImplementedException(); 130bool IsFreeObjectMethodTable(TypeHandle typeHandle) => throw new NotImplementedException(); 132bool IsObject(TypeHandle typeHandle) => throw new NotImplementedException(); 133bool IsString(TypeHandle typeHandle) => throw new NotImplementedException(); 134bool IsObjRef(TypeHandle typeHandle) => throw new NotImplementedException(); 136bool ContainsGCPointers(TypeHandle typeHandle) => throw new NotImplementedException(); 138bool RequiresAlign8(TypeHandle typeHandle) => throw new NotImplementedException(); 140bool IsContinuationWithoutMetadata(TypeHandle typeHandle) => throw new NotImplementedException(); 146IEnumerable<(uint Offset, uint Size)> GetGCDescSeries(TypeHandle typeHandle, uint numComponents = 0) => throw new NotImplementedException(); 147bool IsDynamicStatics(TypeHandle typeHandle) => throw new NotImplementedException(); 148ushort GetNumInterfaces(TypeHandle typeHandle) => throw new NotImplementedException(); 151uint GetTypeDefToken(TypeHandle typeHandle) => throw new NotImplementedException(); 152ushort GetNumVtableSlots(TypeHandle typeHandle) => throw new NotImplementedException(); 153ushort GetNumMethods(TypeHandle typeHandle) => throw new NotImplementedException(); 156uint GetTypeDefTypeAttributes(TypeHandle typeHandle) => throw new NotImplementedException(); 157ushort GetNumInstanceFields(TypeHandle typeHandle) => throw new NotImplementedException(); 158ushort GetNumStaticFields(TypeHandle typeHandle) => throw new NotImplementedException(); 159ushort GetNumThreadStaticFields(TypeHandle typeHandle) => throw new NotImplementedException(); 160IEnumerable<TargetPointer> GetFieldDescList(TypeHandle typeHandle) => throw new NotImplementedException(); 162bool IsTrackedReferenceWithFinalizer(TypeHandle typeHandle) => throw new NotImplementedException(); 163TargetPointer GetGCStaticsBasePointer(TypeHandle typeHandle) => throw new NotImplementedException(); 164TargetPointer GetNonGCStaticsBasePointer(TypeHandle typeHandle) => throw new NotImplementedException(); 165TargetPointer GetGCThreadStaticsBasePointer(TypeHandle typeHandle, TargetPointer threadPtr) => throw new NotImplementedException(); 166TargetPointer GetNonGCThreadStaticsBasePointer(TypeHandle typeHandle, TargetPointer threadPtr) => throw new NotImplementedException(); 169ReadOnlySpan<TypeHandle> GetInstantiation(TypeHandle typeHandle) => throw new NotImplementedException(); 170public bool IsClassInited(TypeHandle typeHandle) => throw new NotImplementedException(); 171public bool IsInitError(TypeHandle typeHandle) => throw new NotImplementedException(); 172bool IsGenericTypeDefinition(TypeHandle typeHandle) => throw new NotImplementedException(); 173bool ContainsGenericVariables(TypeHandle typeHandle) => throw new NotImplementedException(); 174bool IsCollectible(TypeHandle typeHandle) => throw new NotImplementedException(); 176bool HasTypeParam(TypeHandle typeHandle) => throw new NotImplementedException(); 181CorElementType GetSignatureCorElementType(TypeHandle typeHandle) => throw new NotImplementedException(); 182bool IsValueType(TypeHandle typeHandle) => throw new NotImplementedException(); 187CorElementType GetInternalCorElementType(TypeHandle typeHandle) => throw new NotImplementedException(); 190bool IsEnum(TypeHandle typeHandle) => throw new NotImplementedException(); 193bool IsDelegate(TypeHandle typeHandle) => throw new NotImplementedException(); 196bool IsArray(TypeHandle typeHandle, out uint rank) => throw new NotImplementedException(); 197TypeHandle GetTypeParam(TypeHandle typeHandle) => throw new NotImplementedException(); 198TypeHandle GetConstructedType(TypeHandle typeHandle, CorElementType corElementType, int rank, ImmutableArray<TypeHandle> typeArguments, SignatureCallingConvention callConv = SignatureCallingConvention.Default) => throw new NotImplementedException(); 199TypeHandle GetPrimitiveType(CorElementType typeCode) => throw new NotImplementedException(); 200bool IsGenericVariable(TypeHandle typeHandle, out TargetPointer module, out uint token) => throw new NotImplementedException(); 201bool IsFunctionPointer(TypeHandle typeHandle, out ReadOnlySpan<TypeHandle> retAndArgTypes, out SignatureCallingConvention callConv) => throw new NotImplementedException(); 202bool IsPointer(TypeHandle typeHandle) => throw new NotImplementedException(); 203bool IsTypeDesc(TypeHandle typeHandle) => throw new NotImplementedException(); 213ReadOnlySpan<TypeHandle> GetGenericMethodInstantiation(MethodDescHandle methodDesc) => throw new NotImplementedException(); 281TargetPointer GetFieldDescByName(TypeHandle typeHandle, string fieldName) => throw new NotImplementedException();
Contracts\ISignature.cs (2)
12TypeHandle DecodeFieldSignature(BlobHandle blobHandle, ModuleHandle moduleHandle, TypeHandle ctx) => throw new NotImplementedException();
Microsoft.Diagnostics.DataContractReader.Contracts (184)
_generated\1\TypeNameResolver.g.cs (2)
11public static TypeHandle GetTypeHandle(Target target, string[] names) 15if (target.Contracts.ManagedTypeSource.TryGetTypeHandle(name, out TypeHandle th))
_generated\118\Microsoft_Diagnostics_DataContractReader_Data.NativeObjectWrapper.g.cs (1)
15public static TypeHandle TypeHandle(Target target)
Contracts\CodeVersions_1.cs (2)
157TypeHandle mt = rts.GetTypeHandle(mtAddr); 345TypeHandle typeHandle = rts.GetTypeHandle(mtAddr);
Contracts\ConditionalWeakTable_1.cs (1)
37TypeHandle entriesTypeHandle = _target.Contracts.RuntimeTypeSystem.GetTypeHandle(entriesMT);
Contracts\Exception_1.cs (1)
66TypeHandle stackTraceHandle = rtsContract.GetTypeHandle(mt);
Contracts\ExecutionManager\ExecutionManagerCore.cs (1)
541TypeHandle th = rts.GetTypeHandle(mtPtr);
Contracts\ManagedTypeSource_1.cs (9)
17private readonly Dictionary<string, TypeHandle> _typeHandleCache = new(); 84public TypeHandle GetTypeHandle(string fullyQualifiedName) 86if (!TryGetTypeHandle(fullyQualifiedName, out TypeHandle typeHandle)) 92public bool TryGetTypeHandle(string fullyQualifiedName, out TypeHandle typeHandle) 131TypeHandle ctx = rts.GetTypeHandle(enclosingMT); 166TypeHandle ctx = rts.GetTypeHandle(enclosingMT); 185if (!TryResolveType(fullyQualifiedName, out TypeHandle th, out _, out _)) 201if (!TryResolveType(managedFqName, out TypeHandle th, out MetadataReader? mdReader, out TypeDefinition typeDef)) 249private bool TryResolveType(string managedFqName, out TypeHandle th, [NotNullWhen(true)] out MetadataReader? mdReader, out TypeDefinition typeDef)
Contracts\Object_1.cs (1)
62TypeHandle typeHandle = typeSystemContract.GetTypeHandle(mt);
Contracts\RuntimeMutableTypeSystem_1.cs (1)
29IEnumerable<TargetPointer> IRuntimeMutableTypeSystem.EnumerateAddedFieldDescs(TypeHandle typeHandle, bool staticFields)
Contracts\RuntimeTypeSystem_1.cs (112)
33private readonly Dictionary<TypeKey, TypeHandle> _typeHandles = new(); 75public TypeKey(TypeHandle typeHandle, CorElementType elementType, int rank, ImmutableArray<TypeHandle> typeArgs, SignatureCallingConvention callConv = SignatureCallingConvention.Default) 83public TypeHandle TypeHandle { get; } 86public ImmutableArray<TypeHandle> TypeArgs { get; } 106foreach (TypeHandle th in TypeArgs) 354Instantiation = System.Array.Empty<TypeHandle>(); 358Instantiation = new TypeHandle[numGenericArgs]; 371public TypeHandle[] Instantiation { get; } 465public TypeHandle GetTypeHandle(TargetPointer typeHandlePointer) 518public TargetPointer GetModule(TypeHandle typeHandle) 545public TargetPointer GetCanonicalMethodTable(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? TargetPointer.Null : GetClassData(typeHandle).MethodTable; 546public bool IsCanonicalMethodTable(TypeHandle typeHandle) => typeHandle.IsMethodTable() && _methodTables[typeHandle.Address].IsCanonMT; 547public TargetPointer GetParentMethodTable(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? TargetPointer.Null : _methodTables[typeHandle.Address].ParentMethodTable; 549public uint GetBaseSize(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (uint)0 : _methodTables[typeHandle.Address].Flags.BaseSize; 551public uint GetNumInstanceFieldBytes(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (uint)0 : _methodTables[typeHandle.Address].Flags.BaseSize - GetClassData(typeHandle).BaseSizePadding; 553public uint GetComponentSize(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (uint)0 : _methodTables[typeHandle.Address].Flags.ComponentSize; 555public TargetPointer GetClassPointer(TypeHandle typeHandle) 566TypeHandle canonMTHandle = GetTypeHandle(canonMTPtr); 575private Data.EEClass GetClassData(TypeHandle typeHandle) 582public bool IsFreeObjectMethodTable(TypeHandle typeHandle) => FreeObjectMethodTablePointer == typeHandle.Address; 584public bool IsObject(TypeHandle typeHandle) => ObjectMethodTablePointer != TargetPointer.Null && ObjectMethodTablePointer == typeHandle.Address; 586public bool IsString(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[typeHandle.Address].Flags.IsString; 587public bool IsObjRef(TypeHandle typeHandle) 593public bool ContainsGCPointers(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[typeHandle.Address].Flags.ContainsGCPointers; 594public bool RequiresAlign8(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[typeHandle.Address].Flags.RequiresAlign8; 595public bool IsContinuationWithoutMetadata(TypeHandle typeHandle) => typeHandle.IsMethodTable() 601IEnumerable<(uint Offset, uint Size)> IRuntimeTypeSystem.GetGCDescSeries(TypeHandle typeHandle, uint numComponents) 675public bool IsDynamicStatics(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[typeHandle.Address].Flags.IsDynamicStatics; 676public ushort GetNumInterfaces(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : _methodTables[typeHandle.Address].NumInterfaces; 678public uint GetTypeDefToken(TypeHandle typeHandle) 685public ushort GetNumVtableSlots(TypeHandle typeHandle) 693public ushort GetNumMethods(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : GetClassData(typeHandle).NumMethods; 694public uint GetTypeDefTypeAttributes(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (uint)0 : GetClassData(typeHandle).CorTypeAttr; 695public ushort GetNumInstanceFields(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : GetClassData(typeHandle).NumInstanceFields; 696public ushort GetNumStaticFields(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : GetClassData(typeHandle).NumStaticFields; 697public ushort GetNumThreadStaticFields(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : GetClassData(typeHandle).NumThreadStaticFields; 698public IEnumerable<TargetPointer> GetFieldDescList(TypeHandle typeHandle) 710TypeHandle parentHandle = GetTypeHandle(parentMT); 719public bool IsTrackedReferenceWithFinalizer(TypeHandle typeHandle) => typeHandle.IsMethodTable() && _methodTables[typeHandle.Address].Flags.IsTrackedReferenceWithFinalizer; 720private TargetPointer GetDynamicStaticsInfo(TypeHandle typeHandle) 733private Data.ThreadStaticsInfo GetThreadStaticsInfo(TypeHandle typeHandle) 742public TargetPointer GetGCThreadStaticsBasePointer(TypeHandle typeHandle, TargetPointer threadPtr) 751public TargetPointer GetNonGCThreadStaticsBasePointer(TypeHandle typeHandle, TargetPointer threadPtr) 760public TargetPointer GetGCStaticsBasePointer(TypeHandle typeHandle) 769public TargetPointer GetNonGCStaticsBasePointer(TypeHandle typeHandle) 778public ReadOnlySpan<TypeHandle> GetInstantiation(TypeHandle typeHandle) 790public bool IsClassInited(TypeHandle typeHandle) 799public bool IsInitError(TypeHandle typeHandle) 812public TypeHandle[] TypeHandles { get; } 828TypeHandles = new TypeHandle[numberOfGenericArgs]; 836public bool IsGenericTypeDefinition(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[typeHandle.Address].Flags.IsGenericTypeDefinition; 837public bool ContainsGenericVariables(TypeHandle typeHandle) 852_ = IsFunctionPointer(typeHandle, out ReadOnlySpan<TypeHandle> signatureTypeArgs, out _); 853foreach (TypeHandle sigTypeArg in signatureTypeArgs) 865public bool IsCollectible(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[typeHandle.Address].Flags.IsCollectible; 866public bool HasTypeParam(TypeHandle typeHandle) 888public CorElementType GetSignatureCorElementType(TypeHandle typeHandle) 919public CorElementType GetInternalCorElementType(TypeHandle typeHandle) 932public bool IsValueType(TypeHandle typeHandle) 948public bool IsEnum(TypeHandle typeHandle) 960public bool IsDelegate(TypeHandle typeHandle) 970public bool IsArray(TypeHandle typeHandle, out uint rank) 995public TypeHandle GetTypeParam(TypeHandle typeHandle) 1021private TypeHandle GetRootTypeParam(TypeHandle typeHandle) 1023TypeHandle current = typeHandle; 1031private bool GenericInstantiationMatch(TypeHandle genericType, TypeHandle potentialMatch, ImmutableArray<TypeHandle> typeArguments) 1033ReadOnlySpan<TypeHandle> instantiation = GetInstantiation(potentialMatch); 1051private bool ArrayPtrMatch(TypeHandle elementType, CorElementType corElementType, int rank, TypeHandle potentialMatch) 1061private bool FnPtrMatch(TypeHandle candidate, ImmutableArray<TypeHandle> retAndArgTypes, SignatureCallingConvention callConv) 1063if (!IsFunctionPointer(candidate, out ReadOnlySpan<TypeHandle> candidateRetAndArgs, out SignatureCallingConvention candidateCallConv)) 1077private bool IsLoaded(TypeHandle typeHandle) 1092TypeHandle IRuntimeTypeSystem.GetConstructedType(TypeHandle typeHandle, CorElementType corElementType, int rank, ImmutableArray<TypeHandle> typeArguments, SignatureCallingConvention callConv) 1096if (_typeHandles.TryGetValue(new TypeKey(typeHandle, corElementType, rank, typeArguments, callConv), out TypeHandle existing)) 1106TypeHandle potentialMatch; 1139private TargetPointer FindFnPtrLoaderModule(ImmutableArray<TypeHandle> retAndArgTypes) 1147foreach (TypeHandle arg in retAndArgTypes) 1183TypeHandle IRuntimeTypeSystem.GetPrimitiveType(CorElementType typeCode) 1191public bool IsGenericVariable(TypeHandle typeHandle, out TargetPointer module, out uint token) 1213public bool IsFunctionPointer(TypeHandle typeHandle, out ReadOnlySpan<TypeHandle> retAndArgTypes, out SignatureCallingConvention callConv) 1232public bool IsPointer(TypeHandle typeHandle) 1242public bool IsTypeDesc(TypeHandle typeHandle) => typeHandle.IsTypeDesc(); 1244public TargetPointer GetLoaderModule(TypeHandle typeHandle) 1274public TypeHandle[] TypeHandles { get; } 1283TypeHandles = new TypeHandle[numberOfRetAndArgTypes]; 1355public ReadOnlySpan<TypeHandle> GetGenericMethodInstantiation(MethodDescHandle methodDescHandle) 1595private TargetPointer GetAddressOfSlot(TypeHandle typeHandle, uint slotNum) 1656TypeHandle mt = GetTypeHandle(mtAddr); 1715private IEnumerable<MethodDescHandle> GetIntroducedMethods(TypeHandle typeHandle) 1741IEnumerable<TargetPointer> IRuntimeTypeSystem.GetIntroducedMethodDescs(TypeHandle typeHandle) 1746TypeHandle canonMT = GetTypeHandle(GetCanonicalMethodTable(typeHandle)); 1755TargetPointer IRuntimeTypeSystem.GetMethodDescForSlot(TypeHandle typeHandle, ushort slot) 1761TypeHandle canonMT = GetTypeHandle(GetCanonicalMethodTable(typeHandle)); 1780private TargetPointer GetMethodDescForVtableSlot(TypeHandle typeHandle, ushort slot) 1788TypeHandle canonMT = GetTypeHandle(cannonMTPTr); 1801TypeHandle lookupMT = GetTypeHandle(lookupMTPtr); 1837TargetCodePointer IRuntimeTypeSystem.GetSlot(TypeHandle typeHandle, uint slot) 1899TypeHandle typeHandle = GetTypeHandle(methodTablePointer); 1987TypeHandle typeHandle = GetTypeHandle(methodTablePointer); 1995TypeHandle typeHandle = GetTypeHandle(methodTablePointer); 2047TargetPointer IRuntimeTypeSystem.GetFieldDescByName(TypeHandle typeHandle, string fieldName) 2105TypeHandle ctx = GetTypeHandle(enclosingMT);
Contracts\Signature\Signature_1.cs (9)
21private readonly Dictionary<ModuleHandle, SignatureTypeProvider<TypeHandle>> _thProviders = []; 33private SignatureTypeProvider<TypeHandle> GetTypeHandleProvider(ModuleHandle moduleHandle) 35if (_thProviders.TryGetValue(moduleHandle, out SignatureTypeProvider<TypeHandle>? thProvider)) 40SignatureTypeProvider<TypeHandle> newProvider = new(_target, moduleHandle); 45TypeHandle ISignature.DecodeFieldSignature(BlobHandle blobHandle, ModuleHandle moduleHandle, TypeHandle ctx) 47SignatureTypeProvider<TypeHandle> provider = GetTypeHandleProvider(moduleHandle); 51RuntimeSignatureDecoder<TypeHandle, TypeHandle> decoder = new(provider, _target, mdReader, ctx);
Contracts\Signature\SignatureTypeProvider.cs (31)
13public class SignatureTypeProvider<T> : IRuntimeSignatureTypeProvider<TypeHandle, T> 28public TypeHandle GetArrayType(TypeHandle elementType, ArrayShape shape) 31public TypeHandle GetByReferenceType(TypeHandle elementType) 34public TypeHandle GetFunctionPointerType(MethodSignature<TypeHandle> signature) 37public TypeHandle GetGenericInstantiation(TypeHandle genericType, ImmutableArray<TypeHandle> typeArguments) 40public TypeHandle GetGenericMethodParameter(T context, int index) 49public TypeHandle GetGenericTypeParameter(T context, int index) 51TypeHandle typeContext; 52if (typeof(T) == typeof(TypeHandle)) 54typeContext = (TypeHandle)(object)context!; 59public TypeHandle GetModifiedType(TypeHandle modifier, TypeHandle unmodifiedType, bool isRequired) 62public TypeHandle GetPinnedType(TypeHandle elementType) 65public TypeHandle GetPointerType(TypeHandle elementType) 68public TypeHandle GetPrimitiveType(PrimitiveTypeCode typeCode) 71public TypeHandle GetSZArrayType(TypeHandle elementType) 74public TypeHandle GetTypeFromDefinition(MetadataReader reader, TypeDefinitionHandle handle, byte rawTypeKind) 82public TypeHandle GetTypeFromReference(MetadataReader reader, TypeReferenceHandle handle, byte rawTypeKind) 90public TypeHandle GetTypeFromSpecification(MetadataReader reader, T context, TypeSpecificationHandle handle, byte rawTypeKind) 93public TypeHandle GetInternalType(TargetPointer typeHandlePointer) 98public TypeHandle GetInternalModifiedType(TargetPointer typeHandlePointer, TypeHandle unmodifiedType, bool isRequired)
Contracts\StackWalk\FrameHandling\FrameHelpers.cs (1)
119TypeHandle mtHandle = rtsContract.GetTypeHandle(stubDispatchFrame.RepresentativeMTPtr);
Contracts\StackWalk\GC\GcScanner.cs (1)
336TypeHandle typeHandle = rts.GetTypeHandle(methodTablePtr);
Contracts\StackWalk\GC\GcSignatureTypeProvider.cs (8)
31/// owning type's <see cref="TypeHandle"/> (used for VAR), and <see cref="MethodContext"/> 34internal readonly record struct GcSignatureContext(TypeHandle ClassContext, MethodDescHandle MethodContext); 90ReadOnlySpan<TypeHandle> instantiation = _target.Contracts.RuntimeTypeSystem.GetGenericMethodInstantiation(genericContext.MethodContext); 106TypeHandle classCtx = genericContext.ClassContext; 120ReadOnlySpan<TypeHandle> instantiation = rts.GetInstantiation(classCtx); 153/// resulting <see cref="TypeHandle"/>. Falls back to a <paramref name="rawTypeKind"/>-based 173/// Classify a resolved <see cref="TypeHandle"/>. Mirrors native 178private GcTypeKind ClassifyTypeHandle(TypeHandle typeHandle)
RuntimeTypeSystemHelpers\ExtensionMethods.cs (3)
10public static bool IsTypeDesc(this TypeHandle type) 15public static bool IsMethodTable(this TypeHandle type) 20public static TargetPointer TypeDescAddress(this TypeHandle type)
Microsoft.Diagnostics.DataContractReader.Legacy (149)
ClrDataFrame.cs (5)
415TypeHandle typeHandle = rts.GetTypeHandle(mtAddr); 751ReadOnlySpan<TypeHandle> methodInst = rts.GetGenericMethodInstantiation(mdh); 763TypeHandle declaringType = rts.GetTypeHandle(mtAddr); 764ReadOnlySpan<TypeHandle> typeInst = rts.GetInstantiation(declaringType); 770private static (uint Flags, int Size) ResolveGenericParam(IRuntimeTypeSystem rts, TypeHandle resolvedType)
ClrDataMethodDefinition.cs (1)
48TypeHandle mt = rts.GetTypeHandle(mtAddr);
ClrDataMethodInstance.cs (1)
66TypeHandle mainMT = rts.GetTypeHandle(mtAddr);
Dbi\DacDbiImpl.cs (80)
1442TypeHandle typeHandle = rts.GetTypeHandle(mtPtr); 1662Contracts.TypeHandle th = rts.GetTypeHandle(new TargetPointer(thExact)); 1820Contracts.TypeHandle th = rts.GetTypeHandle(new TargetPointer(vmTypeHandle)); 1847TypeHandle typeHandle = rts.GetTypeHandle(new TargetPointer(vmTypeHandle)); 1885TypeHandle thExactHandle = rts.GetTypeHandle(thExact); 1890TypeHandle thApprox = thExactHandle; 1941TypeHandle thExactHandle = rts.GetTypeHandle(vmThExact); 1942TypeHandle thApproxHandle = rts.GetTypeHandle(vmThApprox); 1976TypeHandle thExact, 1977TypeHandle thApprox, 2049TypeHandle enclosingTh = rts.GetTypeHandle(enclosingMT); 2149TypeHandle th = rts.GetTypeHandle(new TargetPointer(vmTypeHandle)); 2178TypeHandle th = rts.GetTypeHandle(mtAddr); 2301TypeHandle th = default; 2345private TypeHandle BasicTypeInfoToTypeHandle(IRuntimeTypeSystem rts, DebuggerIPCE_BasicTypeData* pData) 2348TypeHandle th; 2374private TypeHandle GetClassOrValueTypeHandle(IRuntimeTypeSystem rts, DebuggerIPCE_BasicTypeData* pData) 2385private TypeHandle LookupTypeDefOrRefInAssembly(IRuntimeTypeSystem rts, ulong vmAssembly, uint metadataToken) 2407private TypeHandle GetExactArrayTypeHandle(IRuntimeTypeSystem rts, DebuggerIPCE_ExpandedTypeData* pTopLevel, ArgInfoList* pArgInfo) 2411TypeHandle elementType = BasicTypeInfoToTypeHandle(rts, &pArgInfo->m_pList[0]); 2414return rts.GetConstructedType(elementType, et, rank, ImmutableArray<TypeHandle>.Empty); 2417private TypeHandle GetExactPtrOrByRefTypeHandle(IRuntimeTypeSystem rts, DebuggerIPCE_ExpandedTypeData* pTopLevel, ArgInfoList* pArgInfo) 2421TypeHandle referent = BasicTypeInfoToTypeHandle(rts, &pArgInfo->m_pList[0]); 2423return rts.GetConstructedType(referent, et, 0, ImmutableArray<TypeHandle>.Empty); 2426private TypeHandle GetExactClassTypeHandle(IRuntimeTypeSystem rts, DebuggerIPCE_ExpandedTypeData* pTopLevel, ArgInfoList* pArgInfo) 2430TypeHandle typeConstructor = LookupTypeDefOrRefInAssembly(rts, vmAssembly, metadataToken); 2436ImmutableArray<TypeHandle>.Builder builder = ImmutableArray.CreateBuilder<TypeHandle>(argCount); 2443private TypeHandle GetExactFnPtrTypeHandle(IRuntimeTypeSystem rts, ArgInfoList* pArgInfo) 2446ImmutableArray<TypeHandle>.Builder builder = ImmutableArray.CreateBuilder<TypeHandle>(argCount); 2475TypeHandle thRepMt = rts.GetTypeHandle(rts.GetMethodTable(pRepMethod)); 2481TypeHandle thSpecificClass = thRepMt; 2510TypeHandle thFromThis = rts.GetTypeHandle(new TargetPointer(genericsToken)); 2511TypeHandle thMatch = GetMethodTableMatchingParentClass(rts, thFromThis, thRepMt); 2534TypeHandle thSpecMethodMt = rts.GetTypeHandle(specMethodMtPtr); 2535TypeHandle thMatchingParent = GetMethodTableMatchingParentClass(rts, thSpecificClass, thSpecMethodMt); 2536ReadOnlySpan<TypeHandle> classInst = thMatchingParent.IsNull 2537? ReadOnlySpan<TypeHandle>.Empty 2539ReadOnlySpan<TypeHandle> methodInst = rts.GetGenericMethodInstantiation(pSpecificMethod); 2546TypeHandle thCanon = rts.GetTypeHandle(canonMtPtr); 2682TypeHandle typeHandle = rts.GetTypeHandle(new TargetPointer(vmTypeHandle)); 2683ReadOnlySpan<TypeHandle> instantiation = rts.GetInstantiation(typeHandle); 2759Contracts.TypeHandle typeHandle = rts.GetPrimitiveType((CorElementType)simpleType); 2815TypeHandle typeHandle = rts.GetTypeHandle(parentMT); 3495TypeHandle th = rts.GetTypeHandle(mt); 3505TypeHandle canonTh = rts.GetTypeHandle(canonMT); 3619TypeHandle typeHandle = rts.GetTypeHandle(new TargetPointer(id)); 3631TypeHandle parentHandle = rts.GetTypeHandle(parentMT); 3672TypeHandle enclosingTypeHandle = rts.GetTypeHandle(enclosingMT); 3687TypeHandle fieldTypeHandle = signature.DecodeFieldSignature(fieldDef.Signature, enclosingModuleHandle, enclosingTypeHandle); 3705TypeHandle mtHandle = (signatureType == CorElementType.Ptr || signatureType == CorElementType.FnPtr) 3770TypeHandle typeHandle = rts.GetTypeHandle(new TargetPointer((ulong)id)); 3779TypeHandle parentHandle = rts.GetTypeHandle(parentMT); 3823TypeHandle arrayOrStringTypeHandle = rts.GetTypeHandle(new TargetPointer(id)); 3828TypeHandle charTypeHandle = rts.GetPrimitiveType(CorElementType.Char); 3844TypeHandle componentTypeHandle = rts.GetTypeParam(arrayOrStringTypeHandle); 4259TypeHandle typeHandle = rts.GetTypeHandle(mtPtr); 4324TypeHandle typeHandle = rts.GetTypeHandle(mt); 4479private void FillExpandedTypeDataWithCanonFallback(IRuntimeTypeSystem rts, TypeHandle typeHandle, TypeHandle thCanon, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 4493private static bool HasSameTypeDefAs(IRuntimeTypeSystem rts, TypeHandle a, TypeHandle b) 4507private static TypeHandle GetMethodTableMatchingParentClass(IRuntimeTypeSystem rts, TypeHandle start, TypeHandle parent) 4509TypeHandle current = start; 4525private void TypeHandleToExpandedTypeInfoImpl(IRuntimeTypeSystem rts, AreValueTypesBoxed boxed, TypeHandle typeHandle, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 4572private static CorElementType GetElementType(IRuntimeTypeSystem rts, TypeHandle typeHandle) 4588private static TypeHandle UpCastTypeIfNeeded(IRuntimeTypeSystem rts, TypeHandle typeHandle) 4601private void FillArrayTypeInfo(IRuntimeTypeSystem rts, TypeHandle typeHandle, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 4606TypeHandle elemTypeHandle = rts.GetTypeParam(typeHandle); 4611private void FillPtrTypeInfo(IRuntimeTypeSystem rts, AreValueTypesBoxed boxed, TypeHandle typeHandle, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 4619TypeHandle paramTypeHandle = rts.GetTypeParam(typeHandle); 4625private void FillClassTypeInfo(IRuntimeTypeSystem rts, TypeHandle typeHandle, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 4633ReadOnlySpan<TypeHandle> instantiation = rts.GetInstantiation(typeHandle); 4648private void FillFnPtrTypeInfo(IRuntimeTypeSystem rts, AreValueTypesBoxed boxed, TypeHandle typeHandle, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 4663internal void FillBasicTypeInfo(IRuntimeTypeSystem rts, TypeHandle typeHandle, out DebuggerIPCE_BasicTypeData typeInfo) 4689ReadOnlySpan<TypeHandle> instantiation = rts.GetInstantiation(typeHandle);
Dbi\Helpers\HeapWalk.cs (1)
127TypeHandle handle = _rts.GetTypeHandle(mt);
SigFormat.cs (10)
21ReadOnlySpan<TypeHandle> typeInstantiation, 22ReadOnlySpan<TypeHandle> methodInstantiation, 39ReadOnlySpan<TypeHandle> typeInstantiation, 40ReadOnlySpan<TypeHandle> methodInstantiation, 98ReadOnlySpan<TypeHandle> typeInstantiation, 99ReadOnlySpan<TypeHandle> methodInstantiation, 160TypeHandle th = runtimeTypeSystem.GetTypeHandle(typeHandlePointer); 311private static void AddType(Target target, StringBuilder stringBuilder, TypeHandle typeHandle) 361ReadOnlySpan<TypeHandle> instantiation = runtimeTypeSystem.GetInstantiation(typeHandle); 417runtimeTypeSystem.IsFunctionPointer(typeHandle, out ReadOnlySpan<TypeHandle> retAndArgTypes, out SignatureCallingConvention callConv);
SOSDacImpl.cs (25)
1093TypeHandle ctx = rtsContract.GetTypeHandle(enclosingMT); 1101TypeHandle foundTypeHandle = signatureContract.DecodeFieldSignature(fieldDef.Signature, moduleHandle, ctx); 1118TypeHandle paramTypeHandle = rtsContract.GetTypeParam(foundTypeHandle); 2337TypeHandle typeHandle = rtsContract.GetTypeHandle(methodTableAddr); 2813Contracts.TypeHandle methodTable = contract.GetTypeHandle(mt.ToTargetPointer(_target)); 2886TypeHandle typeHandle = rtsContract.GetTypeHandle(mtAddress); 2926Contracts.TypeHandle methodTableHandle = contract.GetTypeHandle(eeClassReallyCanonMT.ToTargetPointer(_target)); 2956Contracts.TypeHandle methodTableHandle = typeSystemContract.GetTypeHandle(mt.ToTargetPointer(_target, overrideCheck: true)); 3028TypeHandle methodTableHandle = rts.GetTypeHandle(methodTable); // validate MT 3269Contracts.TypeHandle typeHandle = rts.GetTypeHandle(mt); 3341TypeHandle handle = runtimeTypeSystemContract.GetTypeHandle(mt); 3383TypeHandle element = runtimeTypeSystemContract.GetTypeParam(handle); 5435Contracts.TypeHandle typeHandle = rtsContract.GetTypeHandle(mt.ToTargetPointer(_target)); 5589TypeHandle typeHandle = rts.GetTypeHandle(mt); 5650TypeHandle typeHandle = rts.GetTypeHandle(ptr); 6009Contracts.TypeHandle methodTableHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 6295TypeHandle mtHandle = rtsContract.GetTypeHandle(mt); 6737Contracts.TypeHandle typeHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 6778Contracts.TypeHandle typeHandle = rtsContract.GetTypeHandle(methodTablePtr); 6831Contracts.TypeHandle methodTableHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 6865private readonly TypeHandle _methodTable; 6872public SOSMethodEnum(Target target, TypeHandle methodTable, ISOSMethodEnum? legacyMethodEnum) 6908TypeHandle typeHandle = _rts.GetTypeHandle(mtAddr); 6932TypeHandle typeHandle = _rts.GetTypeHandle(mtAddr); 7051TypeHandle methodTableHandle = rts.GetTypeHandle(mt.ToTargetPointer(_target));
SOSDacImpl.IXCLRDataProcess.cs (6)
302private IEnumerable<Contracts.TypeHandle> IterateTypeParams(Contracts.ModuleHandle moduleHandle) 349TypeHandle mainMT = _rts.GetTypeHandle(mtAddr); 363TypeHandle methodTypeHandle = _rts.GetTypeHandle(_rts.GetMethodTable(methodDesc)); 386foreach (Contracts.TypeHandle typeParam in IterateTypeParams(moduleHandle)) 400TypeHandle cmtHandle = _rts.GetTypeHandle(cmt); 429TypeHandle mt = rts.GetTypeHandle(mtAddr);
TypeNameBuilder.cs (20)
65public static void AppendMethodImpl(Target target, StringBuilder stringBuilder, Contracts.MethodDescHandle method, ReadOnlySpan<TypeHandle> typeInstantiation, TypeNameFormat format) 70TypeHandle th = default; 129ReadOnlySpan<TypeHandle> genericMethodInstantiation = runtimeTypeSystem.GetGenericMethodInstantiation(method); 149ReadOnlySpan<TypeHandle> typeInstantiationSigFormat = default; 165public static TypeHandle GetExactOwningType(IRuntimeTypeSystem runtimeTypeSystem, TypeHandle possiblyDerivedType, MethodDescHandle method) 167TypeHandle approxOwner = runtimeTypeSystem.GetTypeHandle(runtimeTypeSystem.GetMethodTable(method)); 191public static void AppendType(Target target, StringBuilder stringBuilder, Contracts.TypeHandle typeHandle, TypeNameFormat format) 196public static void AppendType(Target target, StringBuilder stringBuilder, Contracts.TypeHandle typeHandle, ReadOnlySpan<TypeHandle> typeInstantiation, TypeNameFormat format) 202private static void AppendTypeCore(ref TypeNameBuilder tnb, Contracts.TypeHandle typeHandle, ReadOnlySpan<Contracts.TypeHandle> instantiation, TypeNameFormat format) 219AppendTypeCore(ref tnb, typeSystemContract.GetTypeParam(typeHandle), default(ReadOnlySpan<Contracts.TypeHandle>), (TypeNameFormat)(format & ~TypeNameFormat.FormatAssembly)); 225AppendTypeCore(ref tnb, typeSystemContract.GetTypeParam(typeHandle), Array.Empty<Contracts.TypeHandle>(), format & ~TypeNameFormat.FormatAssembly); 248else if (typeSystemContract.IsFunctionPointer(typeHandle, out ReadOnlySpan<TypeHandle> retAndArgTypes, out SignatureCallingConvention callConv)) 306ReadOnlySpan<TypeHandle> instantiationSpan = typeSystemContract.GetInstantiation(typeHandle); 336private static void AppendInst(Target target, StringBuilder stringBuilder, ReadOnlySpan<TypeHandle> inst, TypeNameFormat format) 342private static void AppendInst(ref TypeNameBuilder tnb, ReadOnlySpan<TypeHandle> inst, TypeNameFormat format) 345foreach (TypeHandle arg in inst) 513private static void AppendContinuationName(ref TypeNameBuilder tnb, IRuntimeTypeSystem typeSystemContract, TypeHandle typeHandle)