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); 1265return new TypeHandle(TargetPointer.Null); 1302return 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)
469 references to TypeHandle
Microsoft.Diagnostics.DataContractReader.Abstractions (70)
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)
12IEnumerable<TargetPointer> EnumerateAddedFieldDescs(TypeHandle typeHandle, bool staticFields) => throw new NotImplementedException();
Contracts\IRuntimeTypeSystem.cs (65)
118TypeHandle GetTypeHandle(TargetPointer address) => throw new NotImplementedException(); 119TargetPointer GetModule(TypeHandle typeHandle) => throw new NotImplementedException(); 120TargetPointer GetLoaderModule(TypeHandle typeHandle) => throw new NotImplementedException(); 124TargetPointer GetCanonicalMethodTable(TypeHandle typeHandle) => throw new NotImplementedException(); 127TargetPointer GetClassPointer(TypeHandle typeHandle) => throw new NotImplementedException(); 129bool IsCanonicalMethodTable(TypeHandle typeHandle) => throw new NotImplementedException(); 130TargetPointer GetParentMethodTable(TypeHandle typeHandle) => throw new NotImplementedException(); 132TargetPointer GetMethodDescForSlot(TypeHandle methodTable, ushort slot) => throw new NotImplementedException(); 133IEnumerable<TargetPointer> GetIntroducedMethodDescs(TypeHandle methodTable) => throw new NotImplementedException(); 134TargetCodePointer GetSlot(TypeHandle typeHandle, uint slot) => throw new NotImplementedException(); 136uint GetBaseSize(TypeHandle typeHandle) => throw new NotImplementedException(); 137uint GetNumInstanceFieldBytes(TypeHandle typeHandle) => throw new NotImplementedException(); 139uint GetComponentSize(TypeHandle typeHandle) => throw new NotImplementedException(); 142bool IsFreeObjectMethodTable(TypeHandle typeHandle) => throw new NotImplementedException(); 144bool IsObject(TypeHandle typeHandle) => throw new NotImplementedException(); 145bool IsString(TypeHandle typeHandle) => throw new NotImplementedException(); 152bool ContainsGCPointers(TypeHandle typeHandle) => throw new NotImplementedException(); 154bool IsByRefLike(TypeHandle typeHandle) => throw new NotImplementedException(); 159bool TryGetHFAElementSize(TypeHandle typeHandle, out int elementSize) 165bool RequiresAlign8(TypeHandle typeHandle) => throw new NotImplementedException(); 167bool IsContinuationWithoutMetadata(TypeHandle typeHandle) => throw new NotImplementedException(); 173IEnumerable<(uint Offset, uint Size)> GetGCDescSeries(TypeHandle typeHandle, uint numComponents = 0) => throw new NotImplementedException(); 174bool IsDynamicStatics(TypeHandle typeHandle) => throw new NotImplementedException(); 175ushort GetNumInterfaces(TypeHandle typeHandle) => throw new NotImplementedException(); 178uint GetTypeDefToken(TypeHandle typeHandle) => throw new NotImplementedException(); 179ushort GetNumVtableSlots(TypeHandle typeHandle) => throw new NotImplementedException(); 180ushort GetNumMethods(TypeHandle typeHandle) => throw new NotImplementedException(); 183uint GetTypeDefTypeAttributes(TypeHandle typeHandle) => throw new NotImplementedException(); 184ushort GetNumInstanceFields(TypeHandle typeHandle) => throw new NotImplementedException(); 185ushort GetNumStaticFields(TypeHandle typeHandle) => throw new NotImplementedException(); 186ushort GetNumThreadStaticFields(TypeHandle typeHandle) => throw new NotImplementedException(); 187IEnumerable<TargetPointer> GetFieldDescList(TypeHandle typeHandle) => throw new NotImplementedException(); 189bool IsTrackedReferenceWithFinalizer(TypeHandle typeHandle) => throw new NotImplementedException(); 190TargetPointer GetGCStaticsBasePointer(TypeHandle typeHandle) => throw new NotImplementedException(); 191TargetPointer GetNonGCStaticsBasePointer(TypeHandle typeHandle) => throw new NotImplementedException(); 192TargetPointer GetGCThreadStaticsBasePointer(TypeHandle typeHandle, TargetPointer threadPtr) => throw new NotImplementedException(); 193TargetPointer GetNonGCThreadStaticsBasePointer(TypeHandle typeHandle, TargetPointer threadPtr) => throw new NotImplementedException(); 196ReadOnlySpan<TypeHandle> GetInstantiation(TypeHandle typeHandle) => throw new NotImplementedException(); 197public bool IsClassInited(TypeHandle typeHandle) => throw new NotImplementedException(); 198public bool IsInitError(TypeHandle typeHandle) => throw new NotImplementedException(); 199bool IsGenericTypeDefinition(TypeHandle typeHandle) => throw new NotImplementedException(); 200bool ContainsGenericVariables(TypeHandle typeHandle) => throw new NotImplementedException(); 201bool IsCollectible(TypeHandle typeHandle) => throw new NotImplementedException(); 203bool HasTypeParam(TypeHandle typeHandle) => throw new NotImplementedException(); 208CorElementType GetSignatureCorElementType(TypeHandle typeHandle) => throw new NotImplementedException(); 209bool IsValueType(TypeHandle typeHandle) => throw new NotImplementedException(); 214CorElementType GetInternalCorElementType(TypeHandle typeHandle) => throw new NotImplementedException(); 217bool IsEnum(TypeHandle typeHandle) => throw new NotImplementedException(); 220bool IsDelegate(TypeHandle typeHandle) => throw new NotImplementedException(); 223bool IsArray(TypeHandle typeHandle, out uint rank) => throw new NotImplementedException(); 224TypeHandle GetTypeParam(TypeHandle typeHandle) => throw new NotImplementedException(); 225TypeHandle GetConstructedType(TypeHandle typeHandle, CorElementType corElementType, int rank, ImmutableArray<TypeHandle> typeArguments, SignatureCallingConvention callConv = SignatureCallingConvention.Default) => throw new NotImplementedException(); 226TypeHandle GetPrimitiveType(CorElementType typeCode) => throw new NotImplementedException(); 227bool IsGenericVariable(TypeHandle typeHandle, out TargetPointer module, out uint token) => throw new NotImplementedException(); 228bool IsFunctionPointer(TypeHandle typeHandle, out ReadOnlySpan<TypeHandle> retAndArgTypes, out SignatureCallingConvention callConv) => throw new NotImplementedException(); 229bool IsPointer(TypeHandle typeHandle) => throw new NotImplementedException(); 230bool IsTypeDesc(TypeHandle typeHandle) => throw new NotImplementedException(); 241ReadOnlySpan<TypeHandle> GetGenericMethodInstantiation(MethodDescHandle methodDesc) => throw new NotImplementedException(); 310TypeHandle GetFieldDescApproxTypeHandle(TargetPointer fieldDescPointer) => throw new NotImplementedException(); 311TargetPointer 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 (219)
_generated\1\TypeNameResolver.g.cs (2)
11public static TypeHandle GetTypeHandle(Target target, string[] names) 15if (target.Contracts.ManagedTypeSource.TryGetTypeHandle(name, out TypeHandle th))
_generated\129\Microsoft_Diagnostics_DataContractReader_Data.NativeObjectWrapper.g.cs (1)
15public static TypeHandle TypeHandle(Target target)
Contracts\CallingConvention\ArgumentLocation.cs (2)
10public TypeHandle TypeHandle { get; init; } 31public TypeHandle OpenGenericType { get; init; }
Contracts\CallingConvention\CallingConvention_1.cs (22)
79public TypeHandle OpenGenericType { get; init; } 87MethodSignature<TypeHandle> methodSig = DecodeMethodSignature(rts, methodDesc); 151TypeHandle owningType = rts.GetTypeHandle(methodTablePtr); 241TypeHandle probe = methodSig.ParameterTypes[argIndex]; 272private MethodSignature<TypeHandle> DecodeMethodSignature( 276TypeHandle typeHandle = rts.GetTypeHandle(methodTablePtr); 290RuntimeSignatureDecoder<TypeHandle, MethodSigContext> decoder = new( 328TypeHandle typeHandle = rts.GetTypeHandle(methodTablePtr); 427public TypeHandle Underlying { get; init; } 437public TypeHandle OpenGeneric { get; init; } 463private static TrackedType Wrap(TypeHandle th) 487ImmutableArray<TypeHandle>.Builder builder = ImmutableArray.CreateBuilder<TypeHandle>(typeArguments.Length); 490TypeHandle constructed = _inner.GetGenericInstantiation(genericType.Underlying, builder.ToImmutable()); 546internal readonly record struct MethodSigContext(MethodDescHandle Method, TypeHandle OwningType); 570IRuntimeSignatureTypeProvider<TypeHandle, MethodSigContext> 580public new TypeHandle GetGenericMethodParameter(MethodSigContext context, int index) 583public new TypeHandle GetGenericTypeParameter(MethodSigContext context, int index) 681TypeHandle probe = arg.TypeHandle; 831TypeHandle byRefLikeType, 841TypeHandle byRefLikeType, 890TypeHandle nested = rts.GetFieldDescApproxTypeHandle(fdPtr);
Contracts\CallingConvention\CdacTypeHandle.cs (4)
20private readonly TypeHandle _typeHandle; 33public CdacTypeHandle(TypeHandle typeHandle, Target target) 38public CdacTypeHandle(TypeHandle typeHandle, Target target, CdacCorElementType kindOverride) 183TypeHandle nested = Rts.GetFieldDescApproxTypeHandle(singleFieldType.Value);
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 (2)
75TypeHandle typeHandle = typeSystemContract.GetTypeHandle(mt); 208TypeHandle typeHandle = typeSystemContract.GetTypeHandle(mt);
Contracts\RuntimeMutableTypeSystem_1.cs (1)
29IEnumerable<TargetPointer> IRuntimeMutableTypeSystem.EnumerateAddedFieldDescs(TypeHandle typeHandle, bool staticFields)
Contracts\RuntimeTypeSystem_1.cs (118)
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; 615public bool ContainsGCPointers(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[typeHandle.Address].Flags.ContainsGCPointers; 616public bool IsByRefLike(TypeHandle typeHandle) => typeHandle.IsMethodTable() && _methodTables[typeHandle.Address].Flags.IsByRefLike; 624public bool TryGetHFAElementSize(TypeHandle typeHandle, out int elementSize) 643TypeHandle current = typeHandle; 689private int GetVectorHFAElementSize(TypeHandle typeHandle) 743ReadOnlySpan<TypeHandle> instantiation = ((IRuntimeTypeSystem)this).GetInstantiation(typeHandle); 764public bool RequiresAlign8(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[typeHandle.Address].Flags.RequiresAlign8; 765public bool IsContinuationWithoutMetadata(TypeHandle typeHandle) => typeHandle.IsMethodTable() 771IEnumerable<(uint Offset, uint Size)> IRuntimeTypeSystem.GetGCDescSeries(TypeHandle typeHandle, uint numComponents) 845public bool IsDynamicStatics(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[typeHandle.Address].Flags.IsDynamicStatics; 846public ushort GetNumInterfaces(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : _methodTables[typeHandle.Address].NumInterfaces; 848public uint GetTypeDefToken(TypeHandle typeHandle) 855public ushort GetNumVtableSlots(TypeHandle typeHandle) 863public ushort GetNumMethods(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : GetClassData(typeHandle).NumMethods; 864public uint GetTypeDefTypeAttributes(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (uint)0 : GetClassData(typeHandle).CorTypeAttr; 865public ushort GetNumInstanceFields(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : GetClassData(typeHandle).NumInstanceFields; 866public ushort GetNumStaticFields(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : GetClassData(typeHandle).NumStaticFields; 867public ushort GetNumThreadStaticFields(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : GetClassData(typeHandle).NumThreadStaticFields; 868public IEnumerable<TargetPointer> GetFieldDescList(TypeHandle typeHandle) 880TypeHandle parentHandle = GetTypeHandle(parentMT); 889public bool IsTrackedReferenceWithFinalizer(TypeHandle typeHandle) => typeHandle.IsMethodTable() && _methodTables[typeHandle.Address].Flags.IsTrackedReferenceWithFinalizer; 890private TargetPointer GetDynamicStaticsInfo(TypeHandle typeHandle) 903private Data.ThreadStaticsInfo GetThreadStaticsInfo(TypeHandle typeHandle) 912public TargetPointer GetGCThreadStaticsBasePointer(TypeHandle typeHandle, TargetPointer threadPtr) 921public TargetPointer GetNonGCThreadStaticsBasePointer(TypeHandle typeHandle, TargetPointer threadPtr) 930public TargetPointer GetGCStaticsBasePointer(TypeHandle typeHandle) 939public TargetPointer GetNonGCStaticsBasePointer(TypeHandle typeHandle) 948public ReadOnlySpan<TypeHandle> GetInstantiation(TypeHandle typeHandle) 960public bool IsClassInited(TypeHandle typeHandle) 969public bool IsInitError(TypeHandle typeHandle) 982public TypeHandle[] TypeHandles { get; } 998TypeHandles = new TypeHandle[numberOfGenericArgs]; 1006public bool IsGenericTypeDefinition(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[typeHandle.Address].Flags.IsGenericTypeDefinition; 1007public bool ContainsGenericVariables(TypeHandle typeHandle) 1022_ = IsFunctionPointer(typeHandle, out ReadOnlySpan<TypeHandle> signatureTypeArgs, out _); 1023foreach (TypeHandle sigTypeArg in signatureTypeArgs) 1035public bool IsCollectible(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[typeHandle.Address].Flags.IsCollectible; 1036public bool HasTypeParam(TypeHandle typeHandle) 1058public CorElementType GetSignatureCorElementType(TypeHandle typeHandle) 1089public CorElementType GetInternalCorElementType(TypeHandle typeHandle) 1102public bool IsValueType(TypeHandle typeHandle) 1118public bool IsEnum(TypeHandle typeHandle) 1130public bool IsDelegate(TypeHandle typeHandle) 1140public bool IsArray(TypeHandle typeHandle, out uint rank) 1165public TypeHandle GetTypeParam(TypeHandle typeHandle) 1191private TypeHandle GetRootTypeParam(TypeHandle typeHandle) 1193TypeHandle current = typeHandle; 1201private bool GenericInstantiationMatch(TypeHandle genericType, TypeHandle potentialMatch, ImmutableArray<TypeHandle> typeArguments) 1203ReadOnlySpan<TypeHandle> instantiation = GetInstantiation(potentialMatch); 1221private bool ArrayPtrMatch(TypeHandle elementType, CorElementType corElementType, int rank, TypeHandle potentialMatch) 1231private bool FnPtrMatch(TypeHandle candidate, ImmutableArray<TypeHandle> retAndArgTypes, SignatureCallingConvention callConv) 1233if (!IsFunctionPointer(candidate, out ReadOnlySpan<TypeHandle> candidateRetAndArgs, out SignatureCallingConvention candidateCallConv)) 1247private bool IsLoaded(TypeHandle typeHandle) 1262TypeHandle IRuntimeTypeSystem.GetConstructedType(TypeHandle typeHandle, CorElementType corElementType, int rank, ImmutableArray<TypeHandle> typeArguments, SignatureCallingConvention callConv) 1266if (_typeHandles.TryGetValue(new TypeKey(typeHandle, corElementType, rank, typeArguments, callConv), out TypeHandle existing)) 1276TypeHandle potentialMatch; 1309private TargetPointer FindFnPtrLoaderModule(ImmutableArray<TypeHandle> retAndArgTypes) 1317foreach (TypeHandle arg in retAndArgTypes) 1353TypeHandle IRuntimeTypeSystem.GetPrimitiveType(CorElementType typeCode) 1361public bool IsGenericVariable(TypeHandle typeHandle, out TargetPointer module, out uint token) 1383public bool IsFunctionPointer(TypeHandle typeHandle, out ReadOnlySpan<TypeHandle> retAndArgTypes, out SignatureCallingConvention callConv) 1402public bool IsPointer(TypeHandle typeHandle) 1412public bool IsTypeDesc(TypeHandle typeHandle) => typeHandle.IsTypeDesc(); 1420public TargetPointer GetLoaderModule(TypeHandle typeHandle) 1450public TypeHandle[] TypeHandles { get; } 1459TypeHandles = new TypeHandle[numberOfRetAndArgTypes]; 1531public ReadOnlySpan<TypeHandle> GetGenericMethodInstantiation(MethodDescHandle methodDescHandle) 1771private TargetPointer GetAddressOfSlot(TypeHandle typeHandle, uint slotNum) 1832TypeHandle mt = GetTypeHandle(mtAddr); 1891private IEnumerable<MethodDescHandle> GetIntroducedMethods(TypeHandle typeHandle) 1917IEnumerable<TargetPointer> IRuntimeTypeSystem.GetIntroducedMethodDescs(TypeHandle typeHandle) 1922TypeHandle canonMT = GetTypeHandle(GetCanonicalMethodTable(typeHandle)); 1931TargetPointer IRuntimeTypeSystem.GetMethodDescForSlot(TypeHandle typeHandle, ushort slot) 1937TypeHandle canonMT = GetTypeHandle(GetCanonicalMethodTable(typeHandle)); 1956private TargetPointer GetMethodDescForVtableSlot(TypeHandle typeHandle, ushort slot) 1964TypeHandle canonMT = GetTypeHandle(cannonMTPTr); 1977TypeHandle lookupMT = GetTypeHandle(lookupMTPtr); 2013TargetCodePointer IRuntimeTypeSystem.GetSlot(TypeHandle typeHandle, uint slot) 2075TypeHandle typeHandle = GetTypeHandle(methodTablePointer); 2169TypeHandle typeHandle = GetTypeHandle(methodTablePointer); 2177TypeHandle typeHandle = GetTypeHandle(methodTablePointer); 2229TypeHandle IRuntimeTypeSystem.GetFieldDescApproxTypeHandle(TargetPointer fieldDescPointer) 2236TypeHandle enclosingType = GetTypeHandle(enclosingMT); 2258TargetPointer IRuntimeTypeSystem.GetFieldDescByName(TypeHandle typeHandle, string fieldName) 2316TypeHandle 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\GcScanContext.cs (1)
174TypeHandle handle = _rts.GetTypeHandle(mt);
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 (180)
ClrDataFrame.cs (5)
413TypeHandle typeHandle = rts.GetTypeHandle(mtAddr); 748ReadOnlySpan<TypeHandle> methodInst = rts.GetGenericMethodInstantiation(mdh); 760TypeHandle declaringType = rts.GetTypeHandle(mtAddr); 761ReadOnlySpan<TypeHandle> typeInst = rts.GetInstantiation(declaringType); 767private 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 (88)
1825TypeHandle typeHandle = rts.GetTypeHandle(mtPtr); 2063Contracts.TypeHandle th = rts.GetTypeHandle(new TargetPointer(thExact)); 2221Contracts.TypeHandle th = rts.GetTypeHandle(new TargetPointer(vmTypeHandle)); 2248TypeHandle typeHandle = rts.GetTypeHandle(new TargetPointer(vmTypeHandle)); 2286TypeHandle thExactHandle = rts.GetTypeHandle(thExact); 2291TypeHandle thApprox = thExactHandle; 2342TypeHandle thExactHandle = rts.GetTypeHandle(vmThExact); 2343TypeHandle thApproxHandle = rts.GetTypeHandle(vmThApprox); 2377TypeHandle thExact, 2378TypeHandle thApprox, 2450TypeHandle enclosingTh = rts.GetTypeHandle(enclosingMT); 2550TypeHandle th = rts.GetTypeHandle(new TargetPointer(vmTypeHandle)); 2579TypeHandle th = rts.GetTypeHandle(mtAddr); 2703TypeHandle canonTh = rts.GetTypeHandle(canonMtPtr); 2706TypeHandle th = walk.ReadLoadedTypeHandle(); 2738TypeHandle th = default; 2782private TypeHandle BasicTypeInfoToTypeHandle(IRuntimeTypeSystem rts, DebuggerIPCE_BasicTypeData* pData) 2785TypeHandle th; 2811private TypeHandle GetClassOrValueTypeHandle(IRuntimeTypeSystem rts, DebuggerIPCE_BasicTypeData* pData) 2822private TypeHandle GetExactArrayTypeHandle(IRuntimeTypeSystem rts, DebuggerIPCE_ExpandedTypeData* pTopLevel, ArgInfoList* pArgInfo) 2826TypeHandle elementType = BasicTypeInfoToTypeHandle(rts, &pArgInfo->m_pList[0]); 2829return rts.GetConstructedType(elementType, et, rank, ImmutableArray<TypeHandle>.Empty); 2832private TypeHandle GetExactPtrOrByRefTypeHandle(IRuntimeTypeSystem rts, DebuggerIPCE_ExpandedTypeData* pTopLevel, ArgInfoList* pArgInfo) 2836TypeHandle referent = BasicTypeInfoToTypeHandle(rts, &pArgInfo->m_pList[0]); 2838return rts.GetConstructedType(referent, et, 0, ImmutableArray<TypeHandle>.Empty); 2841private TypeHandle GetExactClassTypeHandle(IRuntimeTypeSystem rts, DebuggerIPCE_ExpandedTypeData* pTopLevel, ArgInfoList* pArgInfo) 2845TypeHandle typeConstructor = LookupTypeDefOrRefInAssembly(vmAssembly, metadataToken); 2851ImmutableArray<TypeHandle>.Builder builder = ImmutableArray.CreateBuilder<TypeHandle>(argCount); 2858private TypeHandle GetExactFnPtrTypeHandle(IRuntimeTypeSystem rts, ArgInfoList* pArgInfo) 2861ImmutableArray<TypeHandle>.Builder builder = ImmutableArray.CreateBuilder<TypeHandle>(argCount); 2890TypeHandle thRepMt = rts.GetTypeHandle(rts.GetMethodTable(pRepMethod)); 2896TypeHandle thSpecificClass = thRepMt; 2925TypeHandle thFromThis = rts.GetTypeHandle(new TargetPointer(genericsToken)); 2926TypeHandle thMatch = GetMethodTableMatchingParentClass(rts, thFromThis, thRepMt); 2949TypeHandle thSpecMethodMt = rts.GetTypeHandle(specMethodMtPtr); 2950TypeHandle thMatchingParent = GetMethodTableMatchingParentClass(rts, thSpecificClass, thSpecMethodMt); 2951ReadOnlySpan<TypeHandle> classInst = thMatchingParent.IsNull 2952? ReadOnlySpan<TypeHandle>.Empty 2954ReadOnlySpan<TypeHandle> methodInst = rts.GetGenericMethodInstantiation(pSpecificMethod); 2961TypeHandle thCanon = rts.GetTypeHandle(canonMtPtr); 3177internal TypeHandle LookupTypeDefOrRefInAssembly(ulong vmAssembly, uint metadataToken) 3179TypeHandle th = TryLookupTypeDefOrRefInAssembly(vmAssembly, metadataToken); 3185internal TypeHandle TryLookupTypeDefOrRefInAssembly(ulong vmAssembly, uint metadataToken) 3221TypeHandle typeHandle = rts.GetTypeHandle(new TargetPointer(vmTypeHandle)); 3222ReadOnlySpan<TypeHandle> instantiation = rts.GetInstantiation(typeHandle); 3298Contracts.TypeHandle typeHandle = rts.GetPrimitiveType((CorElementType)simpleType); 3354TypeHandle typeHandle = rts.GetTypeHandle(parentMT); 3540TypeHandle th = rts.GetTypeHandle(info.TypeHandle); 3578TypeHandle th = rts.GetTypeHandle(mtAddr); 3617TypeHandle th = rts.GetTypeHandle(mt); 3680TypeHandle th = default; 4285TypeHandle th = rts.GetTypeHandle(mt); 4295TypeHandle canonTh = rts.GetTypeHandle(canonMT); 4549TypeHandle typeHandle = rts.GetTypeHandle(new TargetPointer(id)); 4561TypeHandle parentHandle = rts.GetTypeHandle(parentMT); 4602TypeHandle enclosingTypeHandle = rts.GetTypeHandle(enclosingMT); 4617TypeHandle fieldTypeHandle = signature.DecodeFieldSignature(fieldDef.Signature, enclosingModuleHandle, enclosingTypeHandle); 4635TypeHandle mtHandle = (signatureType == CorElementType.Ptr || signatureType == CorElementType.FnPtr) 4700TypeHandle typeHandle = rts.GetTypeHandle(new TargetPointer((ulong)id)); 4709TypeHandle parentHandle = rts.GetTypeHandle(parentMT); 4756TypeHandle arrayOrStringTypeHandle = rts.GetTypeHandle(new TargetPointer(id)); 4761TypeHandle charTypeHandle = rts.GetPrimitiveType(CorElementType.Char); 4777TypeHandle componentTypeHandle = rts.GetTypeParam(arrayOrStringTypeHandle); 5238TypeHandle typeHandle = rts.GetTypeHandle(mtPtr); 5303TypeHandle typeHandle = rts.GetTypeHandle(mt); 5588private void FillExpandedTypeDataWithCanonFallback(IRuntimeTypeSystem rts, TypeHandle typeHandle, TypeHandle thCanon, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 5602private static bool HasSameTypeDefAs(IRuntimeTypeSystem rts, TypeHandle a, TypeHandle b) 5616private static TypeHandle GetMethodTableMatchingParentClass(IRuntimeTypeSystem rts, TypeHandle start, TypeHandle parent) 5618TypeHandle current = start; 5634private void TypeHandleToExpandedTypeInfoImpl(IRuntimeTypeSystem rts, AreValueTypesBoxed boxed, TypeHandle typeHandle, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 5681private static CorElementType GetElementType(IRuntimeTypeSystem rts, TypeHandle typeHandle) 5697private static TypeHandle UpCastTypeIfNeeded(IRuntimeTypeSystem rts, TypeHandle typeHandle) 5710private void FillArrayTypeInfo(IRuntimeTypeSystem rts, TypeHandle typeHandle, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 5715TypeHandle elemTypeHandle = rts.GetTypeParam(typeHandle); 5720private void FillPtrTypeInfo(IRuntimeTypeSystem rts, AreValueTypesBoxed boxed, TypeHandle typeHandle, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 5728TypeHandle paramTypeHandle = rts.GetTypeParam(typeHandle); 5734private void FillClassTypeInfo(IRuntimeTypeSystem rts, TypeHandle typeHandle, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 5742ReadOnlySpan<TypeHandle> instantiation = rts.GetInstantiation(typeHandle); 5757private void FillFnPtrTypeInfo(IRuntimeTypeSystem rts, AreValueTypesBoxed boxed, TypeHandle typeHandle, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 5772internal void FillBasicTypeInfo(IRuntimeTypeSystem rts, TypeHandle typeHandle, out DebuggerIPCE_BasicTypeData typeInfo) 5798ReadOnlySpan<TypeHandle> instantiation = rts.GetInstantiation(typeHandle);
Dbi\Helpers\HeapWalk.cs (1)
116TypeHandle handle = _rts.GetTypeHandle(mt);
Dbi\TypeDataWalk.cs (23)
22private readonly TypeHandle _canonTh; 26public TypeDataWalk(Target target, IRuntimeTypeSystem rts, TypeHandle canonTh, DebuggerIPCE_TypeArgData* pData, uint nData) 58public TypeHandle ReadLoadedTypeHandle() 92private TypeHandle ReadLoadedTypeArg() 117private TypeHandle ReadLoadedInstantiation(ulong vmAssembly, uint metadataToken, uint nTypeArgs) 119TypeHandle typeDef = TryLookupTypeDefOrRefInAssembly(vmAssembly, metadataToken); 126ImmutableArray<TypeHandle>.Builder builder = ImmutableArray.CreateBuilder<TypeHandle>((int)nTypeArgs); 130TypeHandle th = ReadLoadedTypeArg(); 140private TypeHandle ArrayTypeArg(DebuggerIPCE_TypeArgData* pInfo) 142TypeHandle elem = ReadLoadedTypeArg(); 147return _rts.GetConstructedType(elem, et, rank, ImmutableArray<TypeHandle>.Empty); 150private TypeHandle PtrOrByRefTypeArg(DebuggerIPCE_TypeArgData* pInfo) 152TypeHandle referent = ReadLoadedTypeArg(); 156return _rts.GetConstructedType(referent, et, 0, ImmutableArray<TypeHandle>.Empty); 162private TypeHandle ClassTypeArg(DebuggerIPCE_TypeArgData* pInfo) 169TypeHandle typeDef = TryLookupTypeDefOrRefInAssembly(vmAssembly, metadataToken); 183private TypeHandle FnPtrTypeArg(DebuggerIPCE_TypeArgData* pInfo) 186ImmutableArray<TypeHandle>.Builder builder = ImmutableArray.CreateBuilder<TypeHandle>((int)numTypeArgs); 190TypeHandle th = ReadLoadedTypeArg(); 201private TypeHandle ObjRefOrPrimitiveTypeArg(DebuggerIPCE_TypeArgData* pInfo, CorElementType elementType) 213private TypeHandle TryLookupTypeDefOrRefInAssembly(ulong vmAssembly, uint metadataToken)
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)
1072TypeHandle ctx = rtsContract.GetTypeHandle(enclosingMT); 1080TypeHandle foundTypeHandle = signatureContract.DecodeFieldSignature(fieldDef.Signature, moduleHandle, ctx); 1097TypeHandle paramTypeHandle = rtsContract.GetTypeParam(foundTypeHandle); 2321TypeHandle typeHandle = rtsContract.GetTypeHandle(methodTableAddr); 2797Contracts.TypeHandle methodTable = contract.GetTypeHandle(mt.ToTargetPointer(_target)); 2870TypeHandle typeHandle = rtsContract.GetTypeHandle(mtAddress); 2910Contracts.TypeHandle methodTableHandle = contract.GetTypeHandle(eeClassReallyCanonMT.ToTargetPointer(_target)); 2940Contracts.TypeHandle methodTableHandle = typeSystemContract.GetTypeHandle(mt.ToTargetPointer(_target, overrideCheck: true)); 3012TypeHandle methodTableHandle = rts.GetTypeHandle(methodTable); // validate MT 3255Contracts.TypeHandle typeHandle = rts.GetTypeHandle(mt); 3327TypeHandle handle = runtimeTypeSystemContract.GetTypeHandle(mt); 3369TypeHandle element = runtimeTypeSystemContract.GetTypeParam(handle); 5423Contracts.TypeHandle typeHandle = rtsContract.GetTypeHandle(mt.ToTargetPointer(_target)); 5577TypeHandle typeHandle = rts.GetTypeHandle(mt); 5638TypeHandle typeHandle = rts.GetTypeHandle(ptr); 5997Contracts.TypeHandle methodTableHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 6283TypeHandle mtHandle = rtsContract.GetTypeHandle(mt); 6725Contracts.TypeHandle typeHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 6766Contracts.TypeHandle typeHandle = rtsContract.GetTypeHandle(methodTablePtr); 6819Contracts.TypeHandle methodTableHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 6853private readonly TypeHandle _methodTable; 6860public SOSMethodEnum(Target target, TypeHandle methodTable, ISOSMethodEnum? legacyMethodEnum) 6896TypeHandle typeHandle = _rts.GetTypeHandle(mtAddr); 6920TypeHandle typeHandle = _rts.GetTypeHandle(mtAddr); 7039TypeHandle methodTableHandle = rts.GetTypeHandle(mt.ToTargetPointer(_target));
SOSDacImpl.IXCLRDataProcess.cs (6)
301private IEnumerable<Contracts.TypeHandle> IterateTypeParams(Contracts.ModuleHandle moduleHandle) 348TypeHandle mainMT = _rts.GetTypeHandle(mtAddr); 362TypeHandle methodTypeHandle = _rts.GetTypeHandle(_rts.GetMethodTable(methodDesc)); 385foreach (Contracts.TypeHandle typeParam in IterateTypeParams(moduleHandle)) 399TypeHandle cmtHandle = _rts.GetTypeHandle(cmt); 428TypeHandle 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)