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