1 implementation of ITypeHandle
Microsoft.Diagnostics.DataContractReader.Contracts (1)
Contracts\RuntimeTypeSystem\TypeHandleImplementations.cs (1)
10internal sealed class TargetTypeHandle : ITypeHandle
481 references to ITypeHandle
Microsoft.Diagnostics.DataContractReader.Abstractions (70)
Contracts\IManagedTypeSource.cs (2)
20bool TryGetTypeHandle(string fullyQualifiedName, [NotNullWhen(true)] out ITypeHandle? typeHandle) => throw new NotImplementedException(); 21ITypeHandle GetTypeHandle(string fullyQualifiedName) => throw new NotImplementedException();
Contracts\IRuntimeMutableTypeSystem.cs (1)
12IEnumerable<TargetPointer> EnumerateAddedFieldDescs(ITypeHandle typeHandle, bool staticFields) => throw new NotImplementedException();
Contracts\IRuntimeTypeSystem.cs (65)
152ITypeHandle GetTypeHandle(TargetPointer address) => throw new NotImplementedException(); 153TargetPointer GetModule(ITypeHandle typeHandle) => throw new NotImplementedException(); 154TargetPointer GetLoaderModule(ITypeHandle typeHandle) => throw new NotImplementedException(); 158TargetPointer GetCanonicalMethodTable(ITypeHandle typeHandle) => throw new NotImplementedException(); 160bool IsCanonicalMethodTable(ITypeHandle typeHandle) => throw new NotImplementedException(); 161TargetPointer GetParentMethodTable(ITypeHandle typeHandle) => throw new NotImplementedException(); 163TargetPointer GetMethodDescForSlot(ITypeHandle methodTable, ushort slot) => throw new NotImplementedException(); 164IEnumerable<TargetPointer> GetIntroducedMethodDescs(ITypeHandle methodTable) => throw new NotImplementedException(); 165TargetCodePointer GetSlot(ITypeHandle typeHandle, uint slot) => throw new NotImplementedException(); 167uint GetBaseSize(ITypeHandle typeHandle) => throw new NotImplementedException(); 168uint GetNumInstanceFieldBytes(ITypeHandle typeHandle) => throw new NotImplementedException(); 170uint GetComponentSize(ITypeHandle typeHandle) => throw new NotImplementedException(); 173bool IsFreeObjectMethodTable(ITypeHandle typeHandle) => throw new NotImplementedException(); 175bool IsObject(ITypeHandle typeHandle) => throw new NotImplementedException(); 176bool IsString(ITypeHandle typeHandle) => throw new NotImplementedException(); 183bool ContainsGCPointers(ITypeHandle typeHandle) => throw new NotImplementedException(); 185bool IsByRefLike(ITypeHandle typeHandle) => throw new NotImplementedException(); 190bool TryGetHFAElementSize(ITypeHandle typeHandle, out int elementSize) => throw new NotImplementedException(); 192bool RequiresAlign8(ITypeHandle typeHandle) => throw new NotImplementedException(); 197bool TryGetSystemVAmd64EightByteClassification(ITypeHandle typeHandle, out SystemVAmd64EightByteClassification classification) => throw new NotImplementedException(); 199bool IsContinuationWithoutMetadata(ITypeHandle typeHandle) => throw new NotImplementedException(); 205IEnumerable<(uint Offset, uint Size)> GetGCDescSeries(ITypeHandle typeHandle, uint numComponents = 0) => throw new NotImplementedException(); 206bool IsDynamicStatics(ITypeHandle typeHandle) => throw new NotImplementedException(); 207ushort GetNumInterfaces(ITypeHandle typeHandle) => throw new NotImplementedException(); 210uint GetTypeDefToken(ITypeHandle typeHandle) => throw new NotImplementedException(); 211ushort GetNumVtableSlots(ITypeHandle typeHandle) => throw new NotImplementedException(); 212ushort GetNumMethods(ITypeHandle typeHandle) => throw new NotImplementedException(); 215uint GetTypeDefTypeAttributes(ITypeHandle typeHandle) => throw new NotImplementedException(); 216ushort GetNumInstanceFields(ITypeHandle typeHandle) => throw new NotImplementedException(); 217ushort GetNumStaticFields(ITypeHandle typeHandle) => throw new NotImplementedException(); 218ushort GetNumThreadStaticFields(ITypeHandle typeHandle) => throw new NotImplementedException(); 219IEnumerable<TargetPointer> GetFieldDescList(ITypeHandle typeHandle) => throw new NotImplementedException(); 221bool IsTrackedReferenceWithFinalizer(ITypeHandle typeHandle) => throw new NotImplementedException(); 222TargetPointer GetGCStaticsBasePointer(ITypeHandle typeHandle) => throw new NotImplementedException(); 223TargetPointer GetNonGCStaticsBasePointer(ITypeHandle typeHandle) => throw new NotImplementedException(); 224TargetPointer GetGCThreadStaticsBasePointer(ITypeHandle typeHandle, TargetPointer threadPtr) => throw new NotImplementedException(); 225TargetPointer GetNonGCThreadStaticsBasePointer(ITypeHandle typeHandle, TargetPointer threadPtr) => throw new NotImplementedException(); 228ReadOnlySpan<ITypeHandle> GetInstantiation(ITypeHandle typeHandle) => throw new NotImplementedException(); 229public bool IsClassInited(ITypeHandle typeHandle) => throw new NotImplementedException(); 230public bool IsInitError(ITypeHandle typeHandle) => throw new NotImplementedException(); 231bool IsGenericTypeDefinition(ITypeHandle typeHandle) => throw new NotImplementedException(); 232bool ContainsGenericVariables(ITypeHandle typeHandle) => throw new NotImplementedException(); 233bool IsCollectible(ITypeHandle typeHandle) => throw new NotImplementedException(); 235bool HasTypeParam(ITypeHandle typeHandle) => throw new NotImplementedException(); 240CorElementType GetSignatureCorElementType(ITypeHandle typeHandle) => throw new NotImplementedException(); 241bool IsValueType(ITypeHandle typeHandle) => throw new NotImplementedException(); 246CorElementType GetInternalCorElementType(ITypeHandle typeHandle) => throw new NotImplementedException(); 249bool IsEnum(ITypeHandle typeHandle) => throw new NotImplementedException(); 252bool IsDelegate(ITypeHandle typeHandle) => throw new NotImplementedException(); 255bool IsArray(ITypeHandle typeHandle, out uint rank) => throw new NotImplementedException(); 256ITypeHandle GetTypeParam(ITypeHandle typeHandle) => throw new NotImplementedException(); 257ITypeHandle? GetConstructedType(ITypeHandle? typeHandle, CorElementType corElementType, int rank, ImmutableArray<ITypeHandle?> typeArguments, SignatureCallingConvention callConv = SignatureCallingConvention.Default) => throw new NotImplementedException(); 258ITypeHandle GetPrimitiveType(CorElementType typeCode) => throw new NotImplementedException(); 259bool IsGenericVariable(ITypeHandle typeHandle, out TargetPointer module, out uint token, out uint index) => throw new NotImplementedException(); 260bool IsFunctionPointer(ITypeHandle typeHandle, out ReadOnlySpan<ITypeHandle> retAndArgTypes, out SignatureCallingConvention callConv) => throw new NotImplementedException(); 261bool IsPointer(ITypeHandle typeHandle) => throw new NotImplementedException(); 262bool IsTypeDesc(ITypeHandle typeHandle) => throw new NotImplementedException(); 272ReadOnlySpan<ITypeHandle> GetGenericMethodInstantiation(MethodDescHandle methodDesc) => throw new NotImplementedException(); 345ITypeHandle? GetFieldDescApproxTypeHandle(TargetPointer fieldDescPointer) => throw new NotImplementedException(); 347TargetPointer GetFieldDescByName(ITypeHandle typeHandle, string fieldName) => throw new NotImplementedException();
Contracts\ISignature.cs (2)
12ITypeHandle? DecodeFieldSignature(BlobHandle blobHandle, ModuleHandle moduleHandle, ITypeHandle? ctx) => throw new NotImplementedException();
Microsoft.Diagnostics.DataContractReader.Contracts (224)
_generated\1\TypeNameResolver.g.cs (2)
11public static ITypeHandle GetTypeHandle(Target target, string[] names) 15if (target.Contracts.ManagedTypeSource.TryGetTypeHandle(name, out ITypeHandle? th))
_generated\145\Microsoft_Diagnostics_DataContractReader_Data.NativeObjectWrapper.g.cs (1)
15public static ITypeHandle TypeHandle(Target target)
Contracts\CallingConvention\ArgumentLocation.cs (2)
12public ITypeHandle? TypeHandle { get; init; } 33public ITypeHandle? OpenGenericType { get; init; }
Contracts\CallingConvention\CallingConvention_1.cs (24)
79public ITypeHandle? OpenGenericType { get; init; } 87MethodSignature<ITypeHandle?> methodSig = DecodeMethodSignature(rts, methodDesc); 151ITypeHandle owningType = rts.GetTypeHandle(methodTablePtr); 221elemType = methodSig.ParameterTypes[argIndex] is ITypeHandle parameterType 261ITypeHandle? probe = methodSig.ParameterTypes[argIndex]; 291private MethodSignature<ITypeHandle?> DecodeMethodSignature( 295ITypeHandle typeHandle = rts.GetTypeHandle(methodTablePtr); 309RuntimeSignatureDecoder<ITypeHandle?, MethodSigContext> decoder = new( 337ITypeHandle typeHandle = rts.GetTypeHandle(methodTablePtr); 424public ITypeHandle? Underlying { get; init; } 434public ITypeHandle? OpenGeneric { get; init; } 460private static TrackedType Wrap(ITypeHandle? th) 484ImmutableArray<ITypeHandle?>.Builder builder = ImmutableArray.CreateBuilder<ITypeHandle?>(typeArguments.Length); 487ITypeHandle? constructed = _inner.GetGenericInstantiation(genericType.Underlying, builder.ToImmutable()); 543internal readonly record struct MethodSigContext(MethodDescHandle Method, ITypeHandle OwningType); 567IRuntimeSignatureTypeProvider<ITypeHandle?, MethodSigContext> 577public new ITypeHandle? GetGenericMethodParameter(MethodSigContext context, int index) 580public new ITypeHandle? GetGenericTypeParameter(MethodSigContext context, int index) 706ITypeHandle? probe = arg.TypeHandle; 715if (arg.TypeHandle is ITypeHandle typeHandle && rts.ContainsGCPointers(typeHandle)) 854ITypeHandle byRefLikeType, 864ITypeHandle byRefLikeType, 913ITypeHandle? nested = rts.GetFieldDescApproxTypeHandle(fdPtr);
Contracts\CallingConvention\CdacTypeHandle.cs (6)
9using CdacITypeHandle = Microsoft.Diagnostics.DataContractReader.Contracts.ITypeHandle; 16/// Adapts cDAC's IRuntimeTypeSystem + ITypeHandle to the shared <see cref="ITypeHandle"/> 21private readonly CdacITypeHandle? _typeHandle; 34public CdacTypeHandle(CdacITypeHandle? typeHandle, Target target) 39public CdacTypeHandle(CdacITypeHandle? typeHandle, Target target, CdacCorElementType kindOverride) 222CdacITypeHandle? nested = Rts.GetFieldDescApproxTypeHandle(singleFieldType.Value);
Contracts\CodeVersions_1.cs (1)
339ITypeHandle typeHandle = rts.GetTypeHandle(mtAddr);
Contracts\ConditionalWeakTable_1.cs (1)
37ITypeHandle entriesTypeHandle = _target.Contracts.RuntimeTypeSystem.GetTypeHandle(entriesMT);
Contracts\Exception_1.cs (1)
65ITypeHandle stackTraceHandle = rtsContract.GetTypeHandle(mt);
Contracts\ExecutionManager\ExecutionManagerCore.cs (1)
599ITypeHandle th = rts.GetTypeHandle(mtPtr);
Contracts\ManagedTypeSource_1.cs (10)
17private readonly Dictionary<string, ITypeHandle?> _typeHandleCache = new(); 88public ITypeHandle GetTypeHandle(string fullyQualifiedName) 90if (!TryGetTypeHandle(fullyQualifiedName, out ITypeHandle? typeHandle)) 96public bool TryGetTypeHandle(string fullyQualifiedName, [NotNullWhen(true)] out ITypeHandle? typeHandle) 98if (_typeHandleCache.TryGetValue(fullyQualifiedName, out ITypeHandle? cached)) 139ITypeHandle ctx = rts.GetTypeHandle(enclosingMT); 174ITypeHandle ctx = rts.GetTypeHandle(enclosingMT); 193if (!TryResolveType(fullyQualifiedName, out ITypeHandle? th, out _, out _)) 209if (!TryResolveType(managedFqName, out ITypeHandle? th, out MetadataReader? mdReader, out TypeDefinition typeDef)) 254private bool TryResolveType(string managedFqName, [NotNullWhen(true)] out ITypeHandle? th, [NotNullWhen(true)] out MetadataReader? mdReader, out TypeDefinition typeDef)
Contracts\Object_1.cs (2)
77ITypeHandle typeHandle = typeSystemContract.GetTypeHandle(mt); 216ITypeHandle typeHandle = typeSystemContract.GetTypeHandle(mt);
Contracts\RuntimeMutableTypeSystem_1.cs (1)
29IEnumerable<TargetPointer> IRuntimeMutableTypeSystem.EnumerateAddedFieldDescs(ITypeHandle typeHandle, bool staticFields)
Contracts\RuntimeTypeSystem_1.cs (127)
35private readonly Dictionary<TypeKey, ITypeHandle> _typeHandles = new(); 92public TypeKey(ITypeHandle? typeHandle, CorElementType elementType, int rank, ImmutableArray<ITypeHandle?> typeArgs, SignatureCallingConvention callConv = SignatureCallingConvention.Default) 100public ITypeHandle? TypeHandle { get; } 103public ImmutableArray<ITypeHandle?> TypeArgs { get; } 124foreach (ITypeHandle? th in TypeArgs) 374Instantiation = System.Array.Empty<ITypeHandle>(); 378Instantiation = new ITypeHandle[numGenericArgs]; 391public ITypeHandle[] Instantiation { get; } 485public ITypeHandle GetTypeHandle(TargetPointer typeHandlePointer) 538public TargetPointer GetModule(ITypeHandle typeHandle) 565public TargetPointer GetCanonicalMethodTable(ITypeHandle typeHandle) => !typeHandle.IsMethodTable() ? TargetPointer.Null : GetClassData(typeHandle).MethodTable; 566public bool IsCanonicalMethodTable(ITypeHandle typeHandle) => typeHandle.IsMethodTable() && _methodTables[typeHandle.Address].IsCanonMT; 567public TargetPointer GetParentMethodTable(ITypeHandle typeHandle) => !typeHandle.IsMethodTable() ? TargetPointer.Null : _methodTables[typeHandle.Address].ParentMethodTable; 569public uint GetBaseSize(ITypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (uint)0 : _methodTables[typeHandle.Address].Flags.BaseSize; 571public uint GetNumInstanceFieldBytes(ITypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (uint)0 : _methodTables[typeHandle.Address].Flags.BaseSize - GetClassData(typeHandle).BaseSizePadding; 573public uint GetComponentSize(ITypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (uint)0 : _methodTables[typeHandle.Address].Flags.ComponentSize; 575private TargetPointer GetClassPointer(ITypeHandle typeHandle) 586ITypeHandle canonMTHandle = GetTypeHandle(canonMTPtr); 594public bool TryGetSystemVAmd64EightByteClassification(ITypeHandle typeHandle, out SystemVAmd64EightByteClassification classification) 626private Data.EEClass GetClassData(ITypeHandle typeHandle) 633public bool IsFreeObjectMethodTable(ITypeHandle typeHandle) => FreeObjectMethodTablePointer == typeHandle.Address; 635public bool IsObject(ITypeHandle typeHandle) => ObjectMethodTablePointer != TargetPointer.Null && ObjectMethodTablePointer == typeHandle.Address; 637public bool IsString(ITypeHandle typeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[typeHandle.Address].Flags.IsString; 666public bool ContainsGCPointers(ITypeHandle typeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[typeHandle.Address].Flags.ContainsGCPointers; 667public bool IsByRefLike(ITypeHandle typeHandle) => typeHandle.IsMethodTable() && _methodTables[typeHandle.Address].Flags.IsByRefLike; 675public bool TryGetHFAElementSize(ITypeHandle typeHandle, out int elementSize) 694ITypeHandle current = typeHandle; 726ITypeHandle? next = ((IRuntimeTypeSystem)this).GetFieldDescApproxTypeHandle(firstField); 741private int GetVectorHFAElementSize(ITypeHandle typeHandle) 795ReadOnlySpan<ITypeHandle> instantiation = ((IRuntimeTypeSystem)this).GetInstantiation(typeHandle); 816public bool RequiresAlign8(ITypeHandle typeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[typeHandle.Address].Flags.RequiresAlign8; 817public bool IsContinuationWithoutMetadata(ITypeHandle typeHandle) => typeHandle.IsMethodTable() 823IEnumerable<(uint Offset, uint Size)> IRuntimeTypeSystem.GetGCDescSeries(ITypeHandle typeHandle, uint numComponents) 897public bool IsDynamicStatics(ITypeHandle typeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[typeHandle.Address].Flags.IsDynamicStatics; 898public ushort GetNumInterfaces(ITypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : _methodTables[typeHandle.Address].NumInterfaces; 900public uint GetTypeDefToken(ITypeHandle typeHandle) 907public ushort GetNumVtableSlots(ITypeHandle typeHandle) 915public ushort GetNumMethods(ITypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : GetClassData(typeHandle).NumMethods; 916public uint GetTypeDefTypeAttributes(ITypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (uint)0 : GetClassData(typeHandle).CorTypeAttr; 917public ushort GetNumInstanceFields(ITypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : GetClassData(typeHandle).NumInstanceFields; 918public ushort GetNumStaticFields(ITypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : GetClassData(typeHandle).NumStaticFields; 919public ushort GetNumThreadStaticFields(ITypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : GetClassData(typeHandle).NumThreadStaticFields; 920public IEnumerable<TargetPointer> GetFieldDescList(ITypeHandle typeHandle) 934private (TargetPointer ListStart, uint FieldDescSize, int TotalFields) GetFieldDescListLayout(ITypeHandle typeHandle) 943ITypeHandle parentHandle = GetTypeHandle(parentMT); 949public bool IsTrackedReferenceWithFinalizer(ITypeHandle typeHandle) => typeHandle.IsMethodTable() && _methodTables[typeHandle.Address].Flags.IsTrackedReferenceWithFinalizer; 950private TargetPointer GetDynamicStaticsInfo(ITypeHandle typeHandle) 963private Data.ThreadStaticsInfo GetThreadStaticsInfo(ITypeHandle typeHandle) 972public TargetPointer GetGCThreadStaticsBasePointer(ITypeHandle typeHandle, TargetPointer threadPtr) 981public TargetPointer GetNonGCThreadStaticsBasePointer(ITypeHandle typeHandle, TargetPointer threadPtr) 990public TargetPointer GetGCStaticsBasePointer(ITypeHandle typeHandle) 999public TargetPointer GetNonGCStaticsBasePointer(ITypeHandle typeHandle) 1008public ReadOnlySpan<ITypeHandle> GetInstantiation(ITypeHandle typeHandle) 1020public bool IsClassInited(ITypeHandle typeHandle) 1029public bool IsInitError(ITypeHandle typeHandle) 1042public ITypeHandle[] TypeHandles { get; } 1058TypeHandles = new ITypeHandle[numberOfGenericArgs]; 1066public bool IsGenericTypeDefinition(ITypeHandle typeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[typeHandle.Address].Flags.IsGenericTypeDefinition; 1067public bool ContainsGenericVariables(ITypeHandle typeHandle) 1082_ = IsFunctionPointer(typeHandle, out ReadOnlySpan<ITypeHandle> signatureTypeArgs, out _); 1083foreach (ITypeHandle sigTypeArg in signatureTypeArgs) 1095public bool IsCollectible(ITypeHandle typeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[typeHandle.Address].Flags.IsCollectible; 1096public bool HasTypeParam(ITypeHandle typeHandle) 1118public CorElementType GetSignatureCorElementType(ITypeHandle typeHandle) 1149public CorElementType GetInternalCorElementType(ITypeHandle typeHandle) 1162public bool IsValueType(ITypeHandle typeHandle) 1178public bool IsEnum(ITypeHandle typeHandle) 1190public bool IsDelegate(ITypeHandle typeHandle) 1200public bool IsArray(ITypeHandle typeHandle, out uint rank) 1225public ITypeHandle GetTypeParam(ITypeHandle typeHandle) 1251private ITypeHandle GetRootTypeParam(ITypeHandle typeHandle) 1253ITypeHandle current = typeHandle; 1261private bool GenericInstantiationMatch(ITypeHandle genericType, ITypeHandle potentialMatch, ImmutableArray<ITypeHandle?> typeArguments) 1263ReadOnlySpan<ITypeHandle> instantiation = GetInstantiation(potentialMatch); 1275if (typeArguments[i] is not ITypeHandle typeArgument || instantiation[i].Address != typeArgument.Address) 1281private bool ArrayPtrMatch(ITypeHandle elementType, CorElementType corElementType, int rank, ITypeHandle potentialMatch) 1291private bool FnPtrMatch(ITypeHandle candidate, ImmutableArray<ITypeHandle?> retAndArgTypes, SignatureCallingConvention callConv) 1293if (!IsFunctionPointer(candidate, out ReadOnlySpan<ITypeHandle> candidateRetAndArgs, out SignatureCallingConvention candidateCallConv)) 1301if (retAndArgTypes[i] is not ITypeHandle retOrArgType || candidateRetAndArgs[i].Address != retOrArgType.Address) 1307private bool IsLoaded(ITypeHandle typeHandle) 1322ITypeHandle? IRuntimeTypeSystem.GetConstructedType(ITypeHandle? typeHandle, CorElementType corElementType, int rank, ImmutableArray<ITypeHandle?> typeArguments, SignatureCallingConvention callConv) 1326foreach (ITypeHandle? typeArgument in typeArguments) 1331if (_typeHandles.TryGetValue(new TypeKey(typeHandle, corElementType, rank, typeArguments, callConv), out ITypeHandle? existing) && existing is not null) 1343ITypeHandle potentialMatch; 1373private TargetPointer ComputeLoaderModule(TargetPointer definitionModule, ImmutableArray<ITypeHandle?> inst) 1388foreach (ITypeHandle? nullableArg in inst) 1390ITypeHandle arg = nullableArg!; 1444ITypeHandle IRuntimeTypeSystem.GetPrimitiveType(CorElementType typeCode) 1452public bool IsGenericVariable(ITypeHandle typeHandle, out TargetPointer module, out uint token, out uint index) 1476public bool IsFunctionPointer(ITypeHandle typeHandle, out ReadOnlySpan<ITypeHandle> retAndArgTypes, out SignatureCallingConvention callConv) 1495public bool IsPointer(ITypeHandle typeHandle) 1505public bool IsTypeDesc(ITypeHandle typeHandle) => typeHandle.IsTypeDesc(); 1513public TargetPointer GetLoaderModule(ITypeHandle typeHandle) 1543public ITypeHandle[] TypeHandles { get; } 1552TypeHandles = new ITypeHandle[numberOfRetAndArgTypes]; 1624public ReadOnlySpan<ITypeHandle> GetGenericMethodInstantiation(MethodDescHandle methodDescHandle) 1906private TargetPointer GetAddressOfSlot(ITypeHandle typeHandle, uint slotNum) 1967ITypeHandle mt = GetTypeHandle(mtAddr); 2026private IEnumerable<MethodDescHandle> GetIntroducedMethods(ITypeHandle typeHandle) 2055ITypeHandle methodTable = GetTypeHandle(methodDesc.MethodTable); 2056ITypeHandle canonicalMethodTable = GetTypeHandle(GetCanonicalMethodTable(methodTable)); 2072IEnumerable<TargetPointer> IRuntimeTypeSystem.GetIntroducedMethodDescs(ITypeHandle typeHandle) 2077ITypeHandle canonMT = GetTypeHandle(GetCanonicalMethodTable(typeHandle)); 2086TargetPointer IRuntimeTypeSystem.GetMethodDescForSlot(ITypeHandle typeHandle, ushort slot) 2092ITypeHandle canonMT = GetTypeHandle(GetCanonicalMethodTable(typeHandle)); 2111private TargetPointer GetMethodDescForVtableSlot(ITypeHandle typeHandle, ushort slot) 2119ITypeHandle canonMT = GetTypeHandle(cannonMTPTr); 2132ITypeHandle lookupMT = GetTypeHandle(lookupMTPtr); 2168TargetCodePointer IRuntimeTypeSystem.GetSlot(ITypeHandle typeHandle, uint slot) 2230ITypeHandle typeHandle = GetTypeHandle(methodTablePointer); 2340ITypeHandle typeHandle = GetTypeHandle(methodTablePointer); 2348ITypeHandle typeHandle = GetTypeHandle(methodTablePointer); 2404ITypeHandle? IRuntimeTypeSystem.GetFieldDescApproxTypeHandle(TargetPointer fieldDescPointer) 2411ITypeHandle enclosingType = GetTypeHandle(enclosingMT); 2451TargetPointer IRuntimeTypeSystem.GetFieldDescByName(ITypeHandle typeHandle, string fieldName) 2509ITypeHandle ctx = GetTypeHandle(enclosingMT);
Contracts\Signature\Signature_1.cs (9)
21private readonly Dictionary<ModuleHandle, SignatureTypeProvider<ITypeHandle?>> _thProviders = []; 33private SignatureTypeProvider<ITypeHandle?> GetTypeHandleProvider(ModuleHandle moduleHandle) 35if (_thProviders.TryGetValue(moduleHandle, out SignatureTypeProvider<ITypeHandle?>? thProvider)) 40SignatureTypeProvider<ITypeHandle?> newProvider = new(_target, moduleHandle); 45ITypeHandle? ISignature.DecodeFieldSignature(BlobHandle blobHandle, ModuleHandle moduleHandle, ITypeHandle? ctx) 47SignatureTypeProvider<ITypeHandle?> provider = GetTypeHandleProvider(moduleHandle); 51RuntimeSignatureDecoder<ITypeHandle?, ITypeHandle?> decoder = new(provider, _target, mdReader, ctx);
Contracts\Signature\SignatureTypeProvider.cs (31)
13public class SignatureTypeProvider<T> : IRuntimeSignatureTypeProvider<ITypeHandle?, T> 28public ITypeHandle? GetArrayType(ITypeHandle? elementType, ArrayShape shape) 31public ITypeHandle? GetByReferenceType(ITypeHandle? elementType) 34public ITypeHandle? GetFunctionPointerType(MethodSignature<ITypeHandle?> signature) 37public ITypeHandle? GetGenericInstantiation(ITypeHandle? genericType, ImmutableArray<ITypeHandle?> typeArguments) 40public ITypeHandle? GetGenericMethodParameter(T context, int index) 49public ITypeHandle? GetGenericTypeParameter(T context, int index) 51if (typeof(T) == typeof(ITypeHandle)) 53ITypeHandle? typeContext = (ITypeHandle?)(object?)context; 60public ITypeHandle? GetModifiedType(ITypeHandle? modifier, ITypeHandle? unmodifiedType, bool isRequired) 63public ITypeHandle? GetPinnedType(ITypeHandle? elementType) 66public ITypeHandle? GetPointerType(ITypeHandle? elementType) 69public ITypeHandle? GetPrimitiveType(PrimitiveTypeCode typeCode) 72public ITypeHandle? GetSZArrayType(ITypeHandle? elementType) 75public ITypeHandle? GetTypeFromDefinition(MetadataReader reader, TypeDefinitionHandle handle, byte rawTypeKind) 83public ITypeHandle? GetTypeFromReference(MetadataReader reader, TypeReferenceHandle handle, byte rawTypeKind) 91public ITypeHandle? GetTypeFromSpecification(MetadataReader reader, T context, TypeSpecificationHandle handle, byte rawTypeKind) 94public ITypeHandle? GetInternalType(TargetPointer typeHandlePointer) 99public ITypeHandle? GetInternalModifiedType(TargetPointer typeHandlePointer, ITypeHandle? unmodifiedType, bool isRequired)
Contracts\StackWalk\FrameHandling\FrameHelpers.cs (1)
119ITypeHandle mtHandle = rtsContract.GetTypeHandle(stubDispatchFrame.RepresentativeMTPtr);
Contracts\StackWalk\GC\GcScanContext.cs (1)
174ITypeHandle handle = _rts.GetTypeHandle(mt);
RuntimeTypeSystemHelpers\ExtensionMethods.cs (3)
10public static bool IsTypeDesc(this ITypeHandle type) 15public static bool IsMethodTable(this ITypeHandle type) 20public static TargetPointer TypeDescAddress(this ITypeHandle type)
Microsoft.Diagnostics.DataContractReader.Legacy (187)
ClrDataFrame.cs (5)
432ITypeHandle typeHandle = rts.GetTypeHandle(mtAddr); 753ReadOnlySpan<ITypeHandle> methodInst = rts.GetGenericMethodInstantiation(mdh); 765ITypeHandle declaringType = rts.GetTypeHandle(mtAddr); 766ReadOnlySpan<ITypeHandle> typeInst = rts.GetInstantiation(declaringType); 772private static (uint Flags, int Size) ResolveGenericParam(IRuntimeTypeSystem rts, ITypeHandle resolvedType)
ClrDataMethodDefinition.cs (1)
77ITypeHandle mt = rts.GetTypeHandle(mtAddr);
ClrDataMethodInstance.cs (1)
76ITypeHandle mainMT = rts.GetTypeHandle(mtAddr);
ClrDataTypeDefinition.cs (2)
20private readonly ITypeHandle? _typeHandle; 27ITypeHandle? typeHandle,
ClrDataTypeInstance.cs (3)
15private readonly ITypeHandle _typeHandle; 18public ClrDataTypeInstance(Target target, ITypeHandle typeHandle, IXCLRDataTypeInstance? legacyImpl) 135ITypeHandle? definitionType = null;
Dbi\DacDbiImpl.cs (87)
255ITypeHandle typeHandle = rts.GetTypeHandle(methodTable); 2235ITypeHandle mt = rts.GetTypeHandle(mtAddr); 2401ITypeHandle typeHandle = rts.GetTypeHandle(mtPtr); 2633ITypeHandle th = rts.GetTypeHandle(new TargetPointer(thExact)); 2972ITypeHandle th = rts.GetTypeHandle(new TargetPointer(vmTypeHandle)); 2999ITypeHandle typeHandle = rts.GetTypeHandle(new TargetPointer(vmTypeHandle)); 3037ITypeHandle thExactHandle = rts.GetTypeHandle(thExact); 3039ITypeHandle thApprox = thExactHandle; 3090ITypeHandle thExactHandle = rts.GetTypeHandle(vmThExact); 3091ITypeHandle thApproxHandle = rts.GetTypeHandle(vmThApprox); 3122ITypeHandle thExact, 3123ITypeHandle thApprox, 3195ITypeHandle enclosingTh = rts.GetTypeHandle(enclosingMT); 3295ITypeHandle th = rts.GetTypeHandle(new TargetPointer(vmTypeHandle)); 3324ITypeHandle th = rts.GetTypeHandle(mtAddr); 3448ITypeHandle canonTh = rts.GetTypeHandle(canonMtPtr); 3451ITypeHandle? th = walk.ReadLoadedTypeHandle(); 3483ITypeHandle? th = null; 3527private ITypeHandle BasicTypeInfoToTypeHandle(IRuntimeTypeSystem rts, DebuggerIPCE_BasicTypeData* pData) 3530ITypeHandle th; 3556private ITypeHandle GetClassOrValueTypeHandle(IRuntimeTypeSystem rts, DebuggerIPCE_BasicTypeData* pData) 3567private ITypeHandle GetExactArrayTypeHandle(IRuntimeTypeSystem rts, DebuggerIPCE_ExpandedTypeData* pTopLevel, ArgInfoList* pArgInfo) 3571ITypeHandle elementType = BasicTypeInfoToTypeHandle(rts, &pArgInfo->m_pList[0]); 3574return rts.GetConstructedType(elementType, et, rank, ImmutableArray<ITypeHandle?>.Empty) 3578private ITypeHandle GetExactPtrOrByRefTypeHandle(IRuntimeTypeSystem rts, DebuggerIPCE_ExpandedTypeData* pTopLevel, ArgInfoList* pArgInfo) 3582ITypeHandle referent = BasicTypeInfoToTypeHandle(rts, &pArgInfo->m_pList[0]); 3584return rts.GetConstructedType(referent, et, 0, ImmutableArray<ITypeHandle?>.Empty) 3588private ITypeHandle GetExactClassTypeHandle(IRuntimeTypeSystem rts, DebuggerIPCE_ExpandedTypeData* pTopLevel, ArgInfoList* pArgInfo) 3592ITypeHandle typeConstructor = LookupTypeDefOrRefInAssembly(vmAssembly, metadataToken); 3598ImmutableArray<ITypeHandle?>.Builder builder = ImmutableArray.CreateBuilder<ITypeHandle?>(argCount); 3606private ITypeHandle GetExactFnPtrTypeHandle(IRuntimeTypeSystem rts, ArgInfoList* pArgInfo) 3609ImmutableArray<ITypeHandle?>.Builder builder = ImmutableArray.CreateBuilder<ITypeHandle?>(argCount); 3639ITypeHandle thRepMt = rts.GetTypeHandle(rts.GetMethodTable(pRepMethod)); 3645ITypeHandle thSpecificClass = thRepMt; 3674ITypeHandle thFromThis = rts.GetTypeHandle(new TargetPointer(genericsToken)); 3675ITypeHandle? thMatch = GetMethodTableMatchingParentClass(rts, thFromThis, thRepMt); 3698ITypeHandle thSpecMethodMt = rts.GetTypeHandle(specMethodMtPtr); 3699ITypeHandle? thMatchingParent = GetMethodTableMatchingParentClass(rts, thSpecificClass, thSpecMethodMt); 3700ReadOnlySpan<ITypeHandle> classInst = thMatchingParent is null 3703ReadOnlySpan<ITypeHandle> methodInst = rts.GetGenericMethodInstantiation(pSpecificMethod); 3710ITypeHandle thCanon = rts.GetTypeHandle(canonMtPtr); 3926internal ITypeHandle LookupTypeDefOrRefInAssembly(ulong vmAssembly, uint metadataToken) 3928ITypeHandle? th = TryLookupTypeDefOrRefInAssembly(vmAssembly, metadataToken); 3934internal ITypeHandle? TryLookupTypeDefOrRefInAssembly(ulong vmAssembly, uint metadataToken) 3970ITypeHandle typeHandle = rts.GetTypeHandle(new TargetPointer(vmTypeHandle)); 3971ReadOnlySpan<ITypeHandle> instantiation = rts.GetInstantiation(typeHandle); 4047ITypeHandle typeHandle = rts.GetPrimitiveType((CorElementType)simpleType); 4098ITypeHandle typeHandle = rts.GetTypeHandle(parentMT); 4284ITypeHandle th = rts.GetTypeHandle(info.TypeHandle); 4322ITypeHandle th = rts.GetTypeHandle(mtAddr); 4361ITypeHandle th = rts.GetTypeHandle(mt); 4424ITypeHandle? th = null; 5312ITypeHandle typeHandle = rts.GetTypeHandle(new TargetPointer(id)); 5324ITypeHandle parentHandle = rts.GetTypeHandle(parentMT); 5365ITypeHandle enclosingTypeHandle = rts.GetTypeHandle(enclosingMT); 5380ITypeHandle? fieldTypeHandle = signature.DecodeFieldSignature(fieldDef.Signature, enclosingModuleHandle, enclosingTypeHandle); 5398ITypeHandle mtHandle = (signatureType == CorElementType.Ptr || signatureType == CorElementType.FnPtr) 5463ITypeHandle typeHandle = rts.GetTypeHandle(new TargetPointer((ulong)id)); 5472ITypeHandle parentHandle = rts.GetTypeHandle(parentMT); 5519ITypeHandle arrayOrStringTypeHandle = rts.GetTypeHandle(new TargetPointer(id)); 5524ITypeHandle charTypeHandle = rts.GetPrimitiveType(CorElementType.Char); 5540ITypeHandle componentTypeHandle = rts.GetTypeParam(arrayOrStringTypeHandle); 6016ITypeHandle typeHandle = rts.GetTypeHandle(mtPtr); 6081ITypeHandle typeHandle = rts.GetTypeHandle(mt); 6366private void FillExpandedTypeDataWithCanonFallback(IRuntimeTypeSystem rts, ITypeHandle typeHandle, ITypeHandle thCanon, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 6380private static bool HasSameTypeDefAs(IRuntimeTypeSystem rts, ITypeHandle a, ITypeHandle b) 6394private static ITypeHandle? GetMethodTableMatchingParentClass(IRuntimeTypeSystem rts, ITypeHandle start, ITypeHandle parent) 6396ITypeHandle current = start; 6412private void TypeHandleToExpandedTypeInfoImpl(IRuntimeTypeSystem rts, AreValueTypesBoxed boxed, ITypeHandle typeHandle, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 6459private static CorElementType GetElementType(IRuntimeTypeSystem rts, ITypeHandle? typeHandle) 6475private static ITypeHandle UpCastTypeIfNeeded(IRuntimeTypeSystem rts, ITypeHandle typeHandle) 6488private void FillArrayTypeInfo(IRuntimeTypeSystem rts, ITypeHandle typeHandle, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 6493ITypeHandle elemTypeHandle = rts.GetTypeParam(typeHandle); 6498private void FillPtrTypeInfo(IRuntimeTypeSystem rts, AreValueTypesBoxed boxed, ITypeHandle typeHandle, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 6506ITypeHandle paramTypeHandle = rts.GetTypeParam(typeHandle); 6512private void FillClassTypeInfo(IRuntimeTypeSystem rts, ITypeHandle typeHandle, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 6520ReadOnlySpan<ITypeHandle> instantiation = rts.GetInstantiation(typeHandle); 6535private void FillFnPtrTypeInfo(IRuntimeTypeSystem rts, AreValueTypesBoxed boxed, ITypeHandle typeHandle, DebuggerIPCE_ExpandedTypeData* pTypeInfo) 6550internal void FillBasicTypeInfo(IRuntimeTypeSystem rts, ITypeHandle typeHandle, out DebuggerIPCE_BasicTypeData typeInfo) 6576ReadOnlySpan<ITypeHandle> instantiation = rts.GetInstantiation(typeHandle);
Dbi\Helpers\HeapWalk.cs (1)
116ITypeHandle handle = _rts.GetTypeHandle(mt);
Dbi\TypeDataWalk.cs (23)
22private readonly ITypeHandle _canonTh; 26public TypeDataWalk(Target target, IRuntimeTypeSystem rts, ITypeHandle canonTh, DebuggerIPCE_TypeArgData* pData, uint nData) 58public ITypeHandle? ReadLoadedTypeHandle() 92private ITypeHandle? ReadLoadedTypeArg() 117private ITypeHandle? ReadLoadedInstantiation(ulong vmAssembly, uint metadataToken, uint nTypeArgs) 119ITypeHandle? typeDef = TryLookupTypeDefOrRefInAssembly(vmAssembly, metadataToken); 126ImmutableArray<ITypeHandle?>.Builder builder = ImmutableArray.CreateBuilder<ITypeHandle?>((int)nTypeArgs); 129ITypeHandle? th = ReadLoadedTypeArg(); 138private ITypeHandle? ArrayTypeArg(DebuggerIPCE_TypeArgData* pInfo) 140ITypeHandle? elem = ReadLoadedTypeArg(); 145return _rts.GetConstructedType(elem, et, rank, ImmutableArray<ITypeHandle?>.Empty); 148private ITypeHandle? PtrOrByRefTypeArg(DebuggerIPCE_TypeArgData* pInfo) 150ITypeHandle? referent = ReadLoadedTypeArg(); 154return _rts.GetConstructedType(referent, et, 0, ImmutableArray<ITypeHandle?>.Empty); 160private ITypeHandle? ClassTypeArg(DebuggerIPCE_TypeArgData* pInfo) 167ITypeHandle? typeDef = TryLookupTypeDefOrRefInAssembly(vmAssembly, metadataToken); 181private ITypeHandle? FnPtrTypeArg(DebuggerIPCE_TypeArgData* pInfo) 184ImmutableArray<ITypeHandle?>.Builder builder = ImmutableArray.CreateBuilder<ITypeHandle?>((int)numTypeArgs); 187ITypeHandle? th = ReadLoadedTypeArg(); 197private ITypeHandle ObjRefOrPrimitiveTypeArg(DebuggerIPCE_TypeArgData* pInfo, CorElementType elementType) 209private ITypeHandle? TryLookupTypeDefOrRefInAssembly(ulong vmAssembly, uint metadataToken)
SigFormat.cs (10)
21ReadOnlySpan<ITypeHandle> typeInstantiation, 22ReadOnlySpan<ITypeHandle> methodInstantiation, 39ReadOnlySpan<ITypeHandle> typeInstantiation, 40ReadOnlySpan<ITypeHandle> methodInstantiation, 98ReadOnlySpan<ITypeHandle> typeInstantiation, 99ReadOnlySpan<ITypeHandle> methodInstantiation, 160ITypeHandle th = runtimeTypeSystem.GetTypeHandle(typeHandlePointer); 311private static void AddType(Target target, StringBuilder stringBuilder, ITypeHandle? typeHandle) 364ReadOnlySpan<ITypeHandle> instantiation = runtimeTypeSystem.GetInstantiation(typeHandle); 420runtimeTypeSystem.IsFunctionPointer(typeHandle, out ReadOnlySpan<ITypeHandle> retAndArgTypes, out SignatureCallingConvention callConv);
SOSDacImpl.cs (25)
1070ITypeHandle ctx = rtsContract.GetTypeHandle(enclosingMT); 1076ITypeHandle? foundTypeHandle = rtsContract.GetFieldDescApproxTypeHandle(fieldDescTargetPtr); 1095ITypeHandle paramTypeHandle = rtsContract.GetTypeParam(foundTypeHandle); 2320ITypeHandle typeHandle = rtsContract.GetTypeHandle(methodTableAddr); 2803ITypeHandle methodTable = contract.GetTypeHandle(mt.ToTargetPointer(_target)); 2876ITypeHandle typeHandle = rtsContract.GetTypeHandle(mtAddress); 2916ITypeHandle methodTableHandle = contract.GetTypeHandle(eeClassReallyCanonMT.ToTargetPointer(_target)); 2946ITypeHandle methodTableHandle = typeSystemContract.GetTypeHandle(mt.ToTargetPointer(_target, overrideCheck: true)); 3018ITypeHandle methodTableHandle = rts.GetTypeHandle(methodTable); // validate MT 3261ITypeHandle typeHandle = rts.GetTypeHandle(mt); 3333ITypeHandle handle = runtimeTypeSystemContract.GetTypeHandle(mt); 3375ITypeHandle element = runtimeTypeSystemContract.GetTypeParam(handle); 5434ITypeHandle typeHandle = rtsContract.GetTypeHandle(mt.ToTargetPointer(_target)); 5592ITypeHandle typeHandle = rts.GetTypeHandle(mt); 5653ITypeHandle typeHandle = rts.GetTypeHandle(ptr); 6014ITypeHandle methodTableHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 6300ITypeHandle mtHandle = rtsContract.GetTypeHandle(mt); 6742ITypeHandle typeHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 6783ITypeHandle typeHandle = rtsContract.GetTypeHandle(methodTablePtr); 6836ITypeHandle methodTableHandle = rtsContract.GetTypeHandle(methodTable.ToTargetPointer(_target)); 6870private readonly ITypeHandle _methodTable; 6877public SOSMethodEnum(Target target, ITypeHandle methodTable, ISOSMethodEnum? legacyMethodEnum) 6913ITypeHandle typeHandle = _rts.GetTypeHandle(mtAddr); 6937ITypeHandle typeHandle = _rts.GetTypeHandle(mtAddr); 7056ITypeHandle methodTableHandle = rts.GetTypeHandle(mt.ToTargetPointer(_target));
SOSDacImpl.IXCLRDataProcess.cs (6)
767private IEnumerable<ITypeHandle> IterateTypeParams(Contracts.ModuleHandle moduleHandle) 814ITypeHandle mainMT = _rts.GetTypeHandle(mtAddr); 828ITypeHandle methodTypeHandle = _rts.GetTypeHandle(_rts.GetMethodTable(methodDesc)); 851foreach (ITypeHandle typeParam in IterateTypeParams(moduleHandle)) 865ITypeHandle cmtHandle = _rts.GetTypeHandle(cmt); 894ITypeHandle mt = rts.GetTypeHandle(mtAddr);
TypeHandleExtensions.cs (4)
15public static string GetName(this ITypeHandle typeHandle, Target target) 22private static void AppendName(ITypeHandle typeHandle, Target target, StringBuilder result) 55ReadOnlySpan<ITypeHandle> instantiation = runtimeTypeSystem.GetInstantiation(typeHandle); 62private static void AppendTypeDescName(ITypeHandle typeHandle, Target target, StringBuilder result)
TypeNameBuilder.cs (19)
65public static void AppendMethodImpl(Target target, StringBuilder stringBuilder, Contracts.MethodDescHandle method, ReadOnlySpan<ITypeHandle> typeInstantiation, TypeNameFormat format) 70ITypeHandle? th = null; 125ITypeHandle methodType = th ?? throw new InvalidOperationException("Metadata-backed method has no declaring type."); 133ReadOnlySpan<ITypeHandle> genericMethodInstantiation = runtimeTypeSystem.GetGenericMethodInstantiation(method); 146ReadOnlySpan<ITypeHandle> typeInstantiationSigFormat = default; 162public static ITypeHandle GetExactOwningType(IRuntimeTypeSystem runtimeTypeSystem, ITypeHandle possiblyDerivedType, MethodDescHandle method) 164ITypeHandle approxOwner = runtimeTypeSystem.GetTypeHandle(runtimeTypeSystem.GetMethodTable(method)); 188public static void AppendType(Target target, StringBuilder stringBuilder, ITypeHandle? typeHandle, TypeNameFormat format) 193public static void AppendType(Target target, StringBuilder stringBuilder, ITypeHandle? typeHandle, ReadOnlySpan<ITypeHandle> typeInstantiation, TypeNameFormat format) 199private static void AppendTypeCore(ref TypeNameBuilder tnb, ITypeHandle? typeHandle, ReadOnlySpan<ITypeHandle> instantiation, TypeNameFormat format) 245else if (typeSystemContract.IsFunctionPointer(typeHandle, out ReadOnlySpan<ITypeHandle> retAndArgTypes, out SignatureCallingConvention callConv)) 303ReadOnlySpan<ITypeHandle> instantiationSpan = typeSystemContract.GetInstantiation(typeHandle); 333internal static void AppendInst(Target target, StringBuilder stringBuilder, ReadOnlySpan<ITypeHandle> inst, TypeNameFormat format) 339private static void AppendInst(ref TypeNameBuilder tnb, ReadOnlySpan<ITypeHandle> inst, TypeNameFormat format) 342foreach (ITypeHandle arg in inst) 510private static void AppendContinuationName(ref TypeNameBuilder tnb, IRuntimeTypeSystem typeSystemContract, ITypeHandle typeHandle)