5 types derived from TypeDesc
System.Private.TypeLoader (5)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\DefType.cs (1)
16public abstract partial class DefType : TypeDesc
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\FunctionPointerType.cs (1)
9public sealed partial class FunctionPointerType : TypeDesc
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\GenericParameterDesc.cs (1)
67public abstract partial class GenericParameterDesc : TypeDesc
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\ParameterizedType.cs (1)
6public abstract partial class ParameterizedType : TypeDesc
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\SignatureVariable.cs (1)
8public abstract partial class SignatureVariable : TypeDesc
427 references to TypeDesc
System.Private.TypeLoader (427)
Internal\Runtime\TypeLoader\CanonicallyEquivalentEntryLocator.cs (3)
63TypeDesc typeToFindAsCanon = _defType.ConvertToCanonForm(CanonicalFormKind.Specific); 64TypeDesc otherTypeAsTypeDesc = _defType.Context.ResolveRuntimeTypeHandle(other); 65TypeDesc otherTypeAsCanon = otherTypeAsTypeDesc.ConvertToCanonForm(CanonicalFormKind.Specific);
Internal\Runtime\TypeLoader\EETypeCreator.cs (4)
556public static RuntimeTypeHandle CreatePointerEEType(uint hashCodeOfNewType, RuntimeTypeHandle pointeeTypeHandle, TypeDesc pointerType) 570public static RuntimeTypeHandle CreateByRefEEType(uint hashCodeOfNewType, RuntimeTypeHandle pointeeTypeHandle, TypeDesc byRefType) 592public static RuntimeTypeHandle CreateEEType(TypeDesc type, TypeBuilderState state) 657public static int GetDictionarySlotInVTable(TypeDesc type)
Internal\Runtime\TypeLoader\GenericDictionaryCell.cs (24)
34private static RuntimeTypeHandle GetRuntimeTypeHandleWithNullableTransform(TypeBuilder builder, TypeDesc type) 44internal TypeDesc Type; 89internal TypeDesc InterfaceType; 117internal TypeDesc ConstraintType; 118internal TypeDesc ConstrainedMethodType; 154internal TypeDesc ConstraintType; 155internal TypeDesc ConstrainedMethodType; 216internal TypeDesc Type; 252internal TypeDesc Type; 289internal TypeDesc ContainingType; 325foreach (var type in Method.Instantiation) 346internal TypeDesc Type; 372internal TypeDesc Type; 451var type = nativeLayoutInfoLoadContext.GetType(ref parser); 460var interfaceType = nativeLayoutInfoLoadContext.GetType(ref parser); 480var type = nativeLayoutInfoLoadContext.GetType(ref parser); 490var type = nativeLayoutInfoLoadContext.GetType(ref parser); 502var type = nativeLayoutInfoLoadContext.GetType(ref parser); 524var type = nativeLayoutInfoLoadContext.GetType(ref parser); 533var type = nativeLayoutInfoLoadContext.GetType(ref parser); 555var constraintType = nativeLayoutInfoLoadContext.GetType(ref parser); 556var constrainedMethodType = nativeLayoutInfoLoadContext.GetType(ref parser); 586TypeDesc constraintType = nativeLayoutInfoLoadContext.GetType(ref parser); 601var type = nativeLayoutInfoLoadContext.GetType(ref parser);
Internal\Runtime\TypeLoader\NativeLayoutInfoLoadContext.cs (15)
36TypeDesc[] typeArguments = new TypeDesc[arity]; 43private TypeDesc GetModifierType(ref NativeParser parser, TypeModifierKind modifier) 45TypeDesc typeParameter = GetType(ref parser); 79internal TypeDesc GetExternalType(uint index) 97private unsafe TypeDesc GetLookbackType(ref NativeParser parser, uint lookback) 103internal TypeDesc GetType(ref NativeParser parser) 128TypeDesc elementType = GetType(ref parser); 159TypeDesc returnType = GetType(ref parser); 160TypeDesc[] parameters = new TypeDesc[numParams]; 198TypeDesc[] typeArguments = GetTypeSequence(ref parser); 215internal TypeDesc[] GetTypeSequence(ref NativeParser parser) 219TypeDesc[] sequence = new TypeDesc[count];
Internal\Runtime\TypeLoader\NativeLayoutInterfacesAlgorithm.cs (4)
18public override DefType[] ComputeRuntimeInterfaces(TypeDesc type) 44TypeDesc[] implementedInterfaces; 48implementedInterfaces = TypeDesc.EmptyTypes; 53foreach (TypeDesc interfaceType in implementedInterfaces)
Internal\Runtime\TypeLoader\NoMetadataRuntimeInterfacesAlgorithm.cs (2)
16public override DefType[] ComputeRuntimeInterfaces(TypeDesc type) 23TypeDesc itfType = type.Context.ResolveRuntimeTypeHandle(itfHandle);
Internal\Runtime\TypeLoader\TemplateLocator.cs (6)
20public static TypeDesc TryGetTypeTemplate(TypeDesc concreteType, ref NativeLayoutInfo nativeLayoutInfo) 25private static TypeDesc TryGetTypeTemplate_Internal(TypeDesc concreteType, CanonicalFormKind kind, out NativeFormatModuleInfo nativeLayoutInfoModule, out uint nativeLayoutInfoToken) 29var canonForm = concreteType.ConvertToCanonForm(kind); 46TypeDesc candidateTemplate = concreteType.Context.ResolveRuntimeTypeHandle(candidateTemplateTypeHandle);
Internal\Runtime\TypeLoader\TypeBuilder.cs (28)
29private ArrayBuilder<TypeDesc> _typesThatNeedTypeHandles; 33private ArrayBuilder<TypeDesc> _typesThatNeedPreparation; 72public void RegisterForPreparation(TypeDesc type) 123foreach (var type in genericMethod.Instantiation) 129private void InsertIntoNeedsTypeHandleList(TypeDesc type) 141internal void PrepareType(TypeDesc type) 182TypeDesc.ComputeTemplate(state, false); 189foreach (var instArg in typeAsDefType.Instantiation) 207TypeDesc.ComputeTemplate(state); 221foreach (TypeDesc paramType in functionPointerType.Signature) 242private void PrepareRuntimeInterfaces(TypeDesc type) 255private void PrepareBaseTypeAndDictionaries(TypeDesc type) 342internal void ParseNativeLayoutInfo(TypeBuilderState state, TypeDesc type) 508private unsafe void AllocateRuntimeType(TypeDesc type) 537public RuntimeTypeHandle GetRuntimeTypeHandle(TypeDesc type) 564public static DefType GetBaseTypeUsingRuntimeTypeHandle(TypeDesc type) 577public static DefType GetBaseTypeThatIsCorrectForMDArrays(TypeDesc type) 583TypeDesc template = type.ComputeTemplate(false); 602private unsafe void FinishTypeDictionary(TypeDesc type) 635private unsafe void FinishClassConstructor(TypeDesc type, TypeBuilderState state) 678private void FinishBaseTypeAndDictionaries(TypeDesc type, TypeBuilderState state) 694private void FinishRuntimeType(TypeDesc type) 941TypeDesc type = _typesThatNeedTypeHandles[i]; 1030internal void BuildType(TypeDesc type) 1118TypeDesc typeContext = typeSystemContext.ResolveRuntimeTypeHandle(RuntimeAugments.CreateRuntimeTypeHandle(context)); 1126nlilContext._typeArgumentHandles = new Instantiation(new TypeDesc[] { ((ArrayType)typeContext).ElementType }); 1136TypeDesc declaringType = nlilContext.GetType(ref parser); 1219TypeDesc elementType = context.ResolveRuntimeTypeHandle(elementTypeHandle);
Internal\Runtime\TypeLoader\TypeBuilderState.cs (11)
26public TypeBuilderState(TypeDesc typeBeingBuilt) 31public readonly TypeDesc TypeBeingBuilt; 51private TypeDesc _templateType; 53public TypeDesc TemplateType 72if (TypeBeingBuilt.IsSzArray && ((ArrayType)TypeBeingBuilt).ElementType is TypeDesc elementType && 129private static void FinishInitNativeLayoutInfo(TypeDesc type, ref NativeLayoutInfo nativeLayoutInfo) 142nativeLayoutInfoLoadContext._typeArgumentHandles = new Instantiation(new TypeDesc[] { ((ArrayType)type).ElementType }); 261if (TypeBeingBuilt.IsMdArray || (TypeBeingBuilt.IsSzArray && ((ArrayType)TypeBeingBuilt).ElementType is TypeDesc elementType 272TypeDesc templateType = TypeBeingBuilt.ComputeTemplate(false); 425private static unsafe TypeBuilder.GCLayout GetFieldGCLayout(TypeDesc fieldType) 446TypeDesc templateType = fieldType.ComputeTemplate();
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.ConstructedGenericMethodsLookup.cs (6)
158TypeDesc parsedDeclaringType = context.ResolveRuntimeTypeHandle(parsedDeclaringTypeHandle); 182TypeDesc leftType = context.ResolveRuntimeTypeHandle(parsedArgsHandles[i]); 183TypeDesc rightType = _methodToLookup.Instantiation[i]; 195TypeDesc parsedDeclaringType = context.ResolveRuntimeTypeHandle(entry._declaringTypeHandle); 213TypeDesc leftType = context.ResolveRuntimeTypeHandle(entry._genericMethodArgumentHandles[i]); 214TypeDesc rightType = _methodToLookup.Instantiation[i];
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.cs (4)
160private bool EnsureTypeHandleForType(TypeDesc type) 371TypeDesc type = context.ResolveRuntimeTypeHandle(typeHandle); 414TypeDesc genericArg1 = context.ResolveRuntimeTypeHandle(genericArgHandles1[i]); 415TypeDesc genericArg2 = context.ResolveRuntimeTypeHandle(genericArgHandles2[i]);
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.GVMResolution.cs (4)
23private static string GetTypeNameDebug(TypeDesc type) 27TypeDesc typeDefinition = type.GetTypeDefinition(); 173TypeDesc declaringType = slotMethod.OwningType; 228TypeDesc currentIfaceType = nativeLayoutContext.GetType(ref ifaceSigParser);
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.Metadata.cs (1)
413internal static IntPtr TryGetDefaultConstructorForType(TypeDesc type)
Internal\Runtime\TypeLoader\TypeLoaderTypeSystemContext.cs (3)
146protected internal override TypeDesc ConvertToCanon(TypeDesc typeToConvert, CanonicalFormKind kind) 151protected internal override bool ComputeHasStaticConstructor(TypeDesc type)
Internal\Runtime\TypeLoader\TypeSystemExtensions.cs (6)
14public static bool CanShareNormalGenericCode(this TypeDesc type) 19public static bool IsGeneric(this TypeDesc type) 25public static bool IsWellKnownType(this TypeDesc type, WellKnownType wellKnownType) 30public static ByRefType MakeByRefType(this TypeDesc type) 35public static TypeDesc GetParameterType(this TypeDesc type)
Internal\TypeSystem\RuntimeMethodDesc.cs (10)
56TypeDesc[] genericParameters = new TypeDesc[genericArgCount]; 70public override TypeDesc OwningType 132TypeDesc owningTypeDefinition = OwningType.GetTypeDefinition(); 148TypeDesc owningType = method.OwningType; 149TypeDesc instantiatedOwningType = owningType.InstantiateSignature(typeInstantiation, methodInstantiation); 154TypeDesc[] clone = null; 158TypeDesc uninst = instantiation[i]; 159TypeDesc inst = uninst.InstantiateSignature(typeInstantiation, methodInstantiation); 164clone = new TypeDesc[instantiation.Length];
Internal\TypeSystem\RuntimeNoMetadataType.cs (13)
40TypeDesc[] genericParameters; 43genericParameters = Array.Empty<TypeDesc>(); 47genericParameters = new TypeDesc[instantiationLength]; 242foreach (TypeDesc t in Instantiation) 253protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind) 259TypeDesc openType = GetTypeDefinition(); 266public override TypeDesc GetTypeDefinition() 274public override TypeDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) 276TypeDesc[] clone = null; 280TypeDesc uninst = _instantiation[i]; 281TypeDesc inst = uninst.InstantiateSignature(typeInstantiation, methodInstantiation); 286clone = new TypeDesc[_instantiation.Length]; 307public override TypeDesc UnderlyingType
Internal\TypeSystem\ThrowHelper.cs (3)
22public static void ThrowMissingMethodException(TypeDesc owningType, string methodName, MethodSignature signature) 27public static void ThrowMissingFieldException(TypeDesc owningType, string fieldName) 54public static string OwningModule(TypeDesc type)
Internal\TypeSystem\TypeDesc.Runtime.cs (6)
61TypeDesc type = this; 71TypeDesc typeDefinition = typeAsDefType.GetTypeDefinition(); 205internal TypeDesc ComputeTemplate(bool templateRequired = true) 210internal static TypeDesc ComputeTemplate(TypeBuilderState state, bool templateRequired = true) 212TypeDesc templateType = state.TemplateType; 224TypeDesc templateType = ComputeTemplate(false);
Internal\TypeSystem\TypeSystemContext.Runtime.cs (15)
164public TypeDesc[] ResolveRuntimeTypeHandlesInternal(RuntimeTypeHandle[] runtimeTypeHandles) 166TypeDesc[] TypeDescs = new TypeDesc[runtimeTypeHandles.Length]; 178private LowLevelDictionary<RuntimeTypeHandle, TypeDesc> _runtimeTypeHandleResolutionCache = 179new LowLevelDictionary<RuntimeTypeHandle, TypeDesc>(); 181public TypeDesc ResolveRuntimeTypeHandle(RuntimeTypeHandle rtth) 183TypeDesc returnedType; 195TypeDesc[] genericParameters = new TypeDesc[rtth.ToEETypePtr()->GenericParameterCount]; 216TypeDesc elementType = ResolveRuntimeTypeHandle(elementTypeHandle); 228TypeDesc targetType = ResolveRuntimeTypeHandle(targetTypeHandle); 248TypeDesc targetType = ResolveRuntimeTypeHandle(targetTypeHandle); 530private ArrayBuilder<TypeDesc> _typesToFlushTypeSystemStateFrom; 536internal void RegisterTypeForTypeSystemStateFlushing(TypeDesc type) 558public static T WithDebugName<T>(this T type) where T : TypeDesc
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\ArrayType.Canon.cs (3)
9protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind) 11TypeDesc paramTypeConverted = Context.ConvertToCanon(ParameterType, kind); 33TypeDesc canonicalizedTypeOfTargetMethod = _owningType.ConvertToCanonForm(kind);
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\ByRefType.Canon.cs (2)
9protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind) 11TypeDesc paramTypeConverted = Context.ConvertToCanon(ParameterType, kind);
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\CanonTypes.cs (2)
109protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind) 194protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind)
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\CastingHelper.Canon.cs (6)
13public static bool IsCanonicalCastTarget(TypeDesc thisType, TypeDesc otherType) 30public static bool IsCanonicalTypeArgMatch(TypeDesc type, TypeDesc otherType) 70public static bool IsCanonEquivalent(TypeDesc thisType, TypeDesc otherType)
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\DefType.Canon.cs (1)
9protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind)
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\FunctionPointerType.Canon.cs (1)
21protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind)
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\GenericParameterDesc.Canon.cs (1)
17protected sealed override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind)
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\InstantiatedMethod.Canon.cs (1)
102foreach (TypeDesc type in Instantiation)
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\InstantiatedType.Canon.cs (2)
15foreach (TypeDesc t in Instantiation) 26protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind)
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\MethodForInstantiatedType.Canon.cs (1)
16TypeDesc canonicalizedTypeOfTargetMethod = OwningType.ConvertToCanonForm(kind);
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\PointerType.Canon.cs (2)
9protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind) 11TypeDesc paramTypeConverted = Context.ConvertToCanon(ParameterType, kind);
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\SignatureVariable.Canon.cs (2)
17protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind) 33protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind)
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\StandardCanonicalizationAlgorithm.cs (10)
22TypeDesc[] canonInstantiation = null; 35TypeDesc typeToConvert = instantiation[instantiationIndex]; 36TypeDesc canonForm = ConvertToCanon(typeToConvert, ref currentKind); 41canonInstantiation = new TypeDesc[instantiation.Length]; 75public static TypeDesc ConvertToCanon(TypeDesc typeToConvert, CanonicalFormKind kind) 82private static TypeDesc ConvertToCanon(TypeDesc typeToConvert, ref CanonicalFormKind kind) 106TypeDesc convertedType = typeToConvert.ConvertToCanonForm(CanonicalFormKind.Specific); 123TypeDesc convertedType = typeToConvert.ConvertToCanonForm(CanonicalFormKind.Specific);
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\TypeDesc.Canon.cs (7)
15private TypeDesc _specificCanonCache; 16private TypeDesc _universalCanonCache; 18private TypeDesc GetCachedCanonValue(CanonicalFormKind kind) 34private void SetCachedCanonValue(CanonicalFormKind kind, TypeDesc value) 57public TypeDesc ConvertToCanonForm(CanonicalFormKind kind) 59TypeDesc canonForm = GetCachedCanonValue(kind); 72protected abstract TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind);
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\TypeSystemContext.Canon.cs (4)
49public bool IsCanonicalDefinitionType(TypeDesc type, CanonicalFormKind kind) 86/// from <see cref="TypeDesc.ConvertToCanonForm(CanonicalFormKind)"/>. 88protected internal virtual TypeDesc ConvertToCanon(TypeDesc typeToConvert, CanonicalFormKind kind)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\ArrayType.cs (14)
20internal ArrayType(TypeDesc elementType, int rank) 42public TypeDesc ElementType 95var t = this.ElementType; 135public override TypeDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) 137TypeDesc elementType = this.ElementType; 138TypeDesc instantiatedElementType = elementType.InstantiateSignature(typeInstantiation, methodInstantiation); 203public override TypeDesc OwningType 239var parameters = new TypeDesc[_owningType.Rank]; 247var parameters = new TypeDesc[_owningType.Rank + 1]; 256var parameters = new TypeDesc[_owningType.Rank]; 264var parameters = new TypeDesc[_owningType.Rank + 1]; 292var argTypes = new TypeDesc[numArgs]; 330TypeDesc owningType = this.OwningType; 331TypeDesc instantiatedOwningType = owningType.InstantiateSignature(typeInstantiation, methodInstantiation);
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\BaseTypeRuntimeInterfacesAlgorithm.cs (1)
24public override DefType[] ComputeRuntimeInterfaces(TypeDesc _type)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\ByRefType.cs (4)
11internal ByRefType(TypeDesc parameter) 21public override TypeDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) 23TypeDesc parameterType = this.ParameterType; 24TypeDesc instantiatedParameterType = parameterType.InstantiateSignature(typeInstantiation, methodInstantiation);
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\CastingHelper.cs (67)
15public static bool CanCastTo(this TypeDesc thisType, TypeDesc otherType) 26public static bool CanCastToWithCanon(this TypeDesc thisType, TypeDesc otherType) 31public static bool IsArrayElementTypeCastableBySize(TypeDesc elementType) 55private static TypeFlags GetReducedTypeElementType(TypeDesc type) 79private static TypeFlags GetVerificationTypeElementType(TypeDesc type) 97private static bool AreVerificationTypesEqual(TypeDesc type1, TypeDesc type2) 120private static bool IsMethodSignatureCompatibleWith(TypeDesc fn1Ttype, TypeDesc fn2Type) 130public static bool IsCompatibleWith(this TypeDesc thisType, TypeDesc otherType) 135internal static bool IsCompatibleWith(this TypeDesc thisType, TypeDesc otherType, StackOverflowProtect visited) 181public static bool IsEquivalentTo(this TypeDesc thisType, TypeDesc otherType) 190internal static bool IsEquivalentTo(this TypeDesc thisType, TypeDesc otherType, StackOverflowProtect visited) 199static partial void IsEquivalentTo(this TypeDesc thisType, TypeDesc otherType, StackOverflowProtect visited, ref bool isEquivalentTo); 204static abstract bool IsCanonicalCastTarget(TypeDesc thisType, TypeDesc otherType); 205static abstract bool IsCanonicalTypeArgMatch(TypeDesc type, TypeDesc otherType); 206static abstract bool IsCanonEquivalent(TypeDesc thisType, TypeDesc otherType); 212static bool ICanonicalTypeCastingHandler.IsCanonicalCastTarget(TypeDesc thisType, TypeDesc otherType) => false; 213static bool ICanonicalTypeCastingHandler.IsCanonicalTypeArgMatch(TypeDesc type, TypeDesc otherType) => false; 214static bool ICanonicalTypeCastingHandler.IsCanonEquivalent(TypeDesc thisType, TypeDesc otherType) => false; 219internal static bool CanCastToInternal(TypeDesc thisType, TypeDesc otherType, StackOverflowProtect protect) 257private static bool CanCastGenericParameterTo(GenericParameterDesc thisType, TypeDesc otherType, StackOverflowProtect protect) 280typeInstantiation = ((TypeDesc)thisType.AssociatedTypeOrMethod).Instantiation; 282foreach (var typeConstraint in thisType.TypeConstraints) 284TypeDesc instantiatedConstraint = typeConstraint.InstantiateSignature(typeInstantiation, methodInstantiation); 294private static bool CanCastArrayTo(ArrayType thisType, TypeDesc otherType, StackOverflowProtect protect) 327private static bool CanCastParamTo(ParameterizedType thisType, TypeDesc paramType, StackOverflowProtect protect) 338TypeDesc curTypesParm = thisType.ParameterType; 341TypeDesc fromParamUnderlyingType = curTypesParm.UnderlyingType; 356TypeDesc toParamUnderlyingType = paramType.UnderlyingType; 369foreach (var typeConstraint in type.TypeConstraints) 391private static TypeFlags GetNormalizedIntegralArrayElementType(TypeDesc type) 414private static bool CanCastToClassOrInterface(TypeDesc thisType, TypeDesc otherType, StackOverflowProtect protect) 426private static bool CanCastToInterface(TypeDesc thisType, TypeDesc otherType, StackOverflowProtect protect) 453private static bool CanCastToNonVariantInterface(TypeDesc thisType, TypeDesc otherType) 471private static bool CanCastByVarianceToInterfaceOrDelegate(TypeDesc thisType, TypeDesc otherType, StackOverflowProtect protectInput, bool arrayCovariance = false) 501TypeDesc arg = instantiationThis[i]; 502TypeDesc targetArg = instantiationTarget[i]; 535private static bool CanCastToClass(TypeDesc thisType, TypeDesc otherType, StackOverflowProtect protect) 537TypeDesc curType = thisType; 591private static bool IsBoxedAndCanCastTo(TypeDesc thisType, TypeDesc otherType, StackOverflowProtect protect, bool arrayCovariance) 593TypeDesc fromUnderlyingType = thisType.UnderlyingType; 609TypeDesc toUnderlyingType = otherType.UnderlyingType; 650public readonly TypeDesc FromType; 651public readonly TypeDesc ToType; 653public CastingPair(TypeDesc fromType, TypeDesc toType)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\FieldDesc.cs (2)
57public abstract TypeDesc FieldType 112TypeDesc instantiatedOwningType = owningType.InstantiateSignature(typeInstantiation, methodInstantiation);
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\FieldForInstantiatedType.cs (1)
51public override TypeDesc FieldType
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\FunctionPointerType.cs (1)
45public override TypeDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\GenericParameterDesc.cs (1)
120public virtual IEnumerable<TypeDesc> TypeConstraints
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\InstantiatedMethod.cs (3)
50public override TypeDesc OwningType 58private TypeDesc Instantiate(TypeDesc type)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\InstantiatedType.cs (9)
242public override TypeDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) 244TypeDesc[] clone = null; 248TypeDesc uninst = _instantiation[i]; 249TypeDesc inst = uninst.InstantiateSignature(typeInstantiation, methodInstantiation); 254clone = new TypeDesc[_instantiation.Length]; 270public static T[] InstantiateTypeArray<T>(T[] uninstantiatedTypes, Instantiation typeInstantiation, Instantiation methodInstantiation) where T : TypeDesc 277TypeDesc inst = uninst.InstantiateSignature(typeInstantiation, methodInstantiation); 296public override TypeDesc GetTypeDefinition() 310public override TypeDesc UnderlyingType
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\Instantiation.cs (8)
16private TypeDesc[] _genericParameters; 18public Instantiation(params TypeDesc[] genericParameters) 24public TypeDesc this[int index] 32public static implicit operator ReadOnlySpan<TypeDesc>(Instantiation instantiation) 53public static readonly Instantiation Empty = new Instantiation(TypeDesc.EmptyTypes); 80private TypeDesc[] _collection; 83public Enumerator(TypeDesc[] collection) 89public TypeDesc Current
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\LayoutInt.cs (1)
95public static LayoutInt AddThrowing(LayoutInt left, LayoutInt right, TypeDesc loadedType)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\MethodDesc.cs (30)
41public TypeDesc type; 51internal TypeDesc _returnType; 52internal TypeDesc[] _parameters; 69public MethodSignature(MethodSignatureFlags flags, int genericParameterCount, TypeDesc returnType, TypeDesc[] parameters, EmbeddedSignatureData[] embeddedSignatureData = null) 86TypeDesc[] newParameters = _parameters; // Re-use existing array until conflict appears 87TypeDesc returnTypeNew = _returnType.InstantiateSignature(substitution, default(Instantiation)); 91newParameters = (TypeDesc[])_parameters.Clone(); 96TypeDesc newParameter = newParameters[i].InstantiateSignature(substitution, default(Instantiation)); 102newParameters = (TypeDesc[])_parameters.Clone(); 150public TypeDesc ReturnType 162public TypeDesc this[int index] 308static bool IsTypeEqualHelper(TypeDesc type1, TypeDesc type2, bool allowEquivalence, StackOverflowProtect visited) 352public TypeDesc Current => _signature[_index]; 373private TypeDesc _returnType; 374private TypeDesc[] _parameters; 396public TypeDesc ReturnType 405public TypeDesc this[int index] 414TypeDesc[] parameters = new TypeDesc[_parameters.Length]; 427_parameters = new TypeDesc[value]; 514public abstract TypeDesc OwningType 732TypeDesc owningType = OwningType; 740TypeDesc[] clone = null; 744TypeDesc uninst = instantiation[i]; 745TypeDesc inst = uninst.InstantiateSignature(typeInstantiation, methodInstantiation); 750clone = new TypeDesc[instantiation.Length]; 762TypeDesc owningType = method.OwningType; 763TypeDesc instantiatedOwningType = owningType.InstantiateSignature(typeInstantiation, methodInstantiation);
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\MethodForInstantiatedType.cs (3)
43public override TypeDesc OwningType 51private TypeDesc Instantiate(TypeDesc type)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\ParameterizedType.cs (3)
8private TypeDesc _parameterType; 10internal ParameterizedType(TypeDesc parameterType) 15public TypeDesc ParameterType
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\PointerType.cs (4)
11internal PointerType(TypeDesc parameterType) 21public override TypeDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) 23TypeDesc parameterType = this.ParameterType; 24TypeDesc instantiatedParameterType = parameterType.InstantiateSignature(typeInstantiation, methodInstantiation);
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\RuntimeInterfacesAlgorithm.cs (2)
9/// The computed list is exposed as <see cref="TypeDesc.RuntimeInterfaces"/>. 23public abstract DefType[] ComputeRuntimeInterfaces(TypeDesc type);
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\SignatureVariable.cs (2)
83public override TypeDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) 131public override TypeDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\ThrowHelper.Common.cs (6)
30public static void ThrowTypeLoadException(TypeDesc type) 42public static void ThrowTypeLoadException(ExceptionStringID id, TypeDesc type, string messageArg) 48public static void ThrowTypeLoadException(ExceptionStringID id, TypeDesc type) 77public static string Type(TypeDesc type) 87public static string Field(TypeDesc owningType, string fieldName) 97public static string Method(TypeDesc owningType, string methodName, MethodSignature signature)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\TypeDesc.cs (12)
19public static readonly TypeDesc[] EmptyTypes = new TypeDesc[0]; 29Debug.Assert(o is not TypeDesc || ReferenceEquals(((TypeDesc)o).Context, this.Context)); 34public static bool operator ==(TypeDesc left, TypeDesc right) 41public static bool operator !=(TypeDesc left, TypeDesc right) 470public virtual TypeDesc UnderlyingType 604public virtual TypeDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) 613public virtual TypeDesc GetTypeDefinition() 633public bool HasSameTypeDefinition(TypeDesc otherType)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\TypeSystemContext.cs (28)
56public ArrayType GetArrayType(TypeDesc elementType) 67private TypeDesc _elementType; 70public ArrayTypeKey(TypeDesc elementType, int rank) 76public TypeDesc ElementType 129public ArrayType GetArrayType(TypeDesc elementType, int rank) 137public class ByRefHashtable : LockFreeReaderHashtable<TypeDesc, ByRefType> 139protected override int GetKeyHashCode(TypeDesc key) 149protected override bool CompareKeyToValue(TypeDesc key, ByRefType value) 159protected override ByRefType CreateValueFromKey(TypeDesc key) 167public ByRefType GetByRefType(TypeDesc parameterType) 175public class PointerHashtable : LockFreeReaderHashtable<TypeDesc, PointerType> 177protected override int GetKeyHashCode(TypeDesc key) 187protected override bool CompareKeyToValue(TypeDesc key, PointerType value) 197protected override PointerType CreateValueFromKey(TypeDesc key) 205public PointerType GetPointerType(TypeDesc parameterType) 258private TypeDesc _typeDef; 261public InstantiatedTypeKey(TypeDesc typeDef, Instantiation instantiation) 267public TypeDesc TypeDef 642public TypeDesc GetSignatureVariable(int index, bool method) 651protected internal virtual IEnumerable<MethodDesc> GetAllMethods(TypeDesc type) 656protected internal virtual IEnumerable<MethodDesc> GetAllVirtualMethods(TypeDesc type) 665public RuntimeInterfacesAlgorithm GetRuntimeInterfacesAlgorithmForType(TypeDesc type) 674TypeDesc elementType = arrType.ElementType; 708public virtual VirtualMethodAlgorithm GetVirtualMethodAlgorithmForType(TypeDesc type) 726internal TypeFlags ComputeTypeFlags(TypeDesc type, TypeFlags flags, TypeFlags mask) 731TypeDesc typeDefinition = type.GetTypeDefinition(); 754TypeDesc typeDefinition = type.GetTypeDefinition(); 776protected internal abstract bool ComputeHasStaticConstructor(TypeDesc type);
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\Utilities\TypeNameFormatter.cs (4)
15public void AppendName(StringBuilder sb, TypeDesc type) 76public string FormatName(TypeDesc type) 86public TState AppendName(StringBuilder sb, TypeDesc type, TOptions options) 137public string FormatName(TypeDesc type, TOptions options)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\VirtualMethodAlgorithm.cs (8)
23public abstract MethodDesc ResolveInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType); 25public abstract MethodDesc ResolveVariantInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType); 27public abstract MethodDesc ResolveInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType); 29public abstract MethodDesc ResolveVariantInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType); 31public abstract DefaultInterfaceMethodResolution ResolveInterfaceMethodToDefaultImplementationOnType(MethodDesc interfaceMethod, TypeDesc currentType, out MethodDesc impl); 33public abstract DefaultInterfaceMethodResolution ResolveVariantInterfaceMethodToDefaultImplementationOnType(MethodDesc interfaceMethod, TypeDesc currentType, out MethodDesc impl); 38public abstract MethodDesc FindVirtualFunctionTargetMethodOnObjectType(MethodDesc targetMethod, TypeDesc objectType); 43public abstract IEnumerable<MethodDesc> ComputeAllVirtualSlots(TypeDesc type);