6 types derived from TypeDesc
ILCompiler.TypeSystem (6)
parent\parent\Common\TypeSystem\Common\DefType.cs (1)
16public abstract partial class DefType : TypeDesc
parent\parent\Common\TypeSystem\Common\DefType.FieldLayout.cs (1)
10public abstract partial class DefType : TypeDesc
parent\parent\Common\TypeSystem\Common\FunctionPointerType.cs (1)
9public sealed partial class FunctionPointerType : TypeDesc
parent\parent\Common\TypeSystem\Common\GenericParameterDesc.cs (1)
67public abstract partial class GenericParameterDesc : TypeDesc
parent\parent\Common\TypeSystem\Common\ParameterizedType.cs (1)
6public abstract partial class ParameterizedType : TypeDesc
parent\parent\Common\TypeSystem\Common\SignatureVariable.cs (1)
8public abstract partial class SignatureVariable : TypeDesc
3513 references to TypeDesc
crossgen2 (5)
Program.cs (5)
757private TypeDesc FindType(CompilerTypeSystemContext context, string typeName) 761TypeDesc foundType = systemModule.GetTypeByCustomAttributeTypeName(typeName, false, 781TypeDesc owningType = FindType(context, singleMethodTypeName); 839List<TypeDesc> genericArguments = new List<TypeDesc>();
ilc (13)
parent\parent\Common\TypeSystem\IL\HelperExtensions.cs (2)
74public static MethodDesc GetKnownMethod(this TypeDesc type, ReadOnlySpan<byte> name, MethodSignature signature) 89public static FieldDesc GetKnownField(this TypeDesc type, ReadOnlySpan<byte> name)
Program.cs (5)
775private static TypeDesc FindType(CompilerTypeSystemContext context, string typeName) 779TypeDesc foundType = systemModule.GetTypeByCustomAttributeTypeName(typeName, false, 800TypeDesc owningType = FindType(context, singleMethodTypeName); 815List<TypeDesc> genericArguments = new List<TypeDesc>();
RdXmlRootProvider.cs (6)
71foreach (TypeDesc type in ((EcmaModule)assembly).GetAllTypes()) 97TypeDesc type = containingModule.GetTypeByCustomAttributeTypeName(typeName); 139private static void ProcessMethodDirective(IRootingServiceProvider rootProvider, ModuleDesc containingModule, TypeDesc containingType, XElement methodElement) 145var parameter = new List<TypeDesc>(); 146var instArgs = new List<TypeDesc>(); 164static bool SignatureMatches(MethodDesc method, List<TypeDesc> parameter)
ILCompiler.Compiler (1777)
Compiler\AnalysisBasedInteropStubManager.cs (1)
47public override void AddInterestingInteropConstructedTypeDependencies(ref DependencyList dependencies, NodeFactory factory, TypeDesc type)
Compiler\AnalysisBasedMetadataManager.cs (10)
27private readonly List<TypeDesc> _forcedTypes; 29private readonly Dictionary<TypeDesc, MetadataCategory> _reflectableTypes = new Dictionary<TypeDesc, MetadataCategory>(); 38new NoDynamicInvokeThunkGenerationPolicy(), null, Array.Empty<ModuleDesc>(), Array.Empty<TypeDesc>(), 39Array.Empty<ReflectableEntity<TypeDesc>>(), Array.Empty<ReflectableEntity<MethodDesc>>(), 55IEnumerable<TypeDesc> forcedTypes, 56IEnumerable<ReflectableEntity<TypeDesc>> reflectableTypes, 65_forcedTypes = new List<TypeDesc>(forcedTypes); 171protected sealed override MetadataCategory GetMetadataCategory(TypeDesc type) 201foreach (var type in _forcedTypes)
Compiler\AssemblyExtensions.cs (1)
25CustomAttributeValue<TypeDesc> decoded = attr.DecodeValue(new CustomAttributeTypeProvider(assembly));
Compiler\BodySubstitutionParser.cs (5)
49protected override void ProcessType(TypeDesc type, XPathNavigator nav) 55protected override void ProcessMethod(TypeDesc type, XPathNavigator methodNav, object customData) 106protected override void ProcessField(TypeDesc type, XPathNavigator fieldNav) 157private static MethodDesc FindMethod(TypeDesc type, string signature) 165private static object TryCreateSubstitution(TypeDesc type, string value)
Compiler\Compilation.cs (30)
97public virtual IEETypeNode NecessaryTypeSymbolIfPossible(TypeDesc type) 107public bool CanReferenceConstructedMethodTable(TypeDesc type) 112public bool CanReferenceConstructedTypeOrCanonicalFormOfType(TypeDesc type) 117public DelegateCreationInfo GetDelegateCtor(TypeDesc delegateType, MethodDesc target, TypeDesc constrainedType, bool followVirtualDispatch) 157public bool HasLazyStaticConstructor(TypeDesc type) 225public bool NeedsSlotUseTracking(TypeDesc type) 230public bool IsEffectivelySealed(TypeDesc type) 235public TypeDesc[] GetImplementingClasses(TypeDesc type) 245public MethodDesc ResolveVirtualMethod(MethodDesc declMethod, TypeDesc implType, out CORINFO_DEVIRTUALIZATION_DETAIL devirtualizationDetail) 260return ((TypeDesc)targetOfLookup).IsRuntimeDeterminedSubtype; 280public ReadyToRunHelperId GetLdTokenHelperForType(TypeDesc type) 302public static MethodDesc GetConstructorForCreateInstanceIntrinsic(TypeDesc type) 326return NodeFactory.ConstructedTypeSymbol((TypeDesc)targetOfLookup); 328return NodeFactory.MetadataTypeSymbol((TypeDesc)targetOfLookup); 330return NecessaryTypeSymbolIfPossible((TypeDesc)targetOfLookup); 333var type = (TypeDesc)targetOfLookup; 364var type = (TypeDesc)targetOfLookup; 370var type = (TypeDesc)targetOfLookup; 409var type = (TypeDesc)targetOfLookup; 522TypeDesc runtimeDeterminedOwningType = calledMethod.OwningType; 670public IEnumerable<TypeDesc> ConstructedEETypes 682public IEnumerable<TypeDesc> AllEETypes 709public readonly TypeDesc ConstrainedType; 711public ConstrainedCallInfo(TypeDesc constrainedType, MethodDesc method)
Compiler\CompilationModuleGroup.Aot.cs (5)
13public abstract bool ContainsTypeDictionary(TypeDesc type); 32public abstract bool ShouldProduceFullVTable(TypeDesc type); 36public abstract bool ShouldPromoteToFullType(TypeDesc type); 41public abstract bool PresenceOfEETypeImpliesAllMethodsOnType(TypeDesc type); 46public abstract bool ShouldReferenceThroughImportTable(TypeDesc type);
Compiler\CompilerTypeSystemContext.Aot.cs (18)
43private TypeDesc[] _arrayOfTInterfaces; 44private TypeDesc[] _arrayEnumeratorOfTInterfaces; 83public bool IsArrayVariantCastable(TypeDesc type) 94TypeDesc elementType = type.IsSzArray ? ((ArrayType)type).ElementType : type.Instantiation[0]; 136TypeDesc fieldType = field.FieldType; 146public bool IsGenericArrayInterfaceType(TypeDesc type) 155TypeDesc[] interfaceDefinitions = new TypeDesc[implementedInterfaces.Length]; 161TypeDesc interfaceDefinition = type.GetTypeDefinition(); 162foreach (var arrayInterfaceDefinition in _arrayOfTInterfaces) 171public bool IsGenericArrayEnumeratorInterfaceType(TypeDesc type) 181ArrayBuilder<TypeDesc> definitions = default; 194TypeDesc interfaceDefinition = type.GetTypeDefinition(); 198protected override IEnumerable<MethodDesc> GetAllMethods(TypeDesc type) 203protected override IEnumerable<MethodDesc> GetAllVirtualMethods(TypeDesc type) 209private IEnumerable<MethodDesc> GetAllMethods(TypeDesc type, bool virtualOnly) 229protected virtual IEnumerable<MethodDesc> GetAllMethodsForDelegate(TypeDesc type, bool virtualOnly) 258internal DefType GetClosestDefType(TypeDesc type)
Compiler\CompilerTypeSystemContext.DelegateInfo.cs (5)
11private sealed class DelegateInfoHashtable : LockFreeReaderHashtable<TypeDesc, DelegateInfo> 18protected override int GetKeyHashCode(TypeDesc key) 26protected override bool CompareKeyToValue(TypeDesc key, DelegateInfo value) 34protected override DelegateInfo CreateValueFromKey(TypeDesc key) 42public DelegateInfo GetDelegateInfo(TypeDesc delegateType)
Compiler\CompilerTypeSystemContext.GeneratedAssembly.Sorting.cs (1)
17protected override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
Compiler\CompilerTypeSystemContext.GetFieldMethodOverrides.cs (11)
34protected virtual IEnumerable<MethodDesc> GetAllMethodsForValueType(TypeDesc valueType, bool virtualOnly) 36TypeDesc valueTypeDefinition = valueType.GetTypeDefinition(); 57protected virtual IEnumerable<MethodDesc> GetAllMethodsForAttribute(TypeDesc attributeType, bool virtualOnly) 59TypeDesc attributeTypeDefinition = attributeType.GetTypeDefinition(); 120private bool RequiresAttributeGetFieldHelperMethod(TypeDesc attributeTypeDef) 150public TypeDesc Type { get; } 171public TypeState(TypeDesc type, TypeStateHashtable hashtable) 178private sealed class TypeStateHashtable : LockFreeReaderHashtable<TypeDesc, TypeState> 180protected override int GetKeyHashCode(TypeDesc key) => key.GetHashCode(); 182protected override bool CompareKeyToValue(TypeDesc key, TypeState value) => key == value.Type; 185protected override TypeState CreateValueFromKey(TypeDesc key)
Compiler\CompilerTypeSystemContext.InterfaceThunks.cs (5)
70public MethodDesc GetDefaultInterfaceMethodImplementationThunk(MethodDesc targetMethod, TypeDesc implementingClass, DefType interfaceOnDefinition, out int interfaceIndex) 141TypeDesc owningTypeOfThunks = ((CompilerTypeSystemContext)key.TargetMethod.Context).GeneratedAssembly.GetGlobalModuleType(); 169private readonly TypeDesc _owningType; 174public DefaultInterfaceMethodImplementationInstantiationThunk(TypeDesc owningType, MethodDesc targetMethod, int interfaceIndex, bool useContextFromRuntime) 190public override TypeDesc OwningType => _owningType;
Compiler\CustomAttributeExtensions.cs (5)
13public static CustomAttributeValue<TypeDesc>? GetDecodedCustomAttribute(this PropertyPseudoDesc prop, string attributeNamespace, string attributeName) 27public static IEnumerable<CustomAttributeValue<TypeDesc>> GetDecodedCustomAttributes(this PropertyPseudoDesc prop, string attributeNamespace, string attributeName) 42public static CustomAttributeValue<TypeDesc>? GetDecodedCustomAttribute(this EventPseudoDesc @event, string attributeNamespace, string attributeName) 56public static IEnumerable<CustomAttributeValue<TypeDesc>> GetDecodedCustomAttributes(this EventPseudoDesc @event, string attributeNamespace, string attributeName) 71public static IEnumerable<CustomAttributeValue<TypeDesc>> GetDecodedCustomAttributesForModule(this EcmaModule module, string attributeNamespace, string attributeName)
Compiler\Dataflow\ArrayValue.cs (4)
20public static MultiValue Create(MultiValue size, TypeDesc elementType) 31public static ArrayValue Create(int size, TypeDesc elementType) 39private ArrayValue(SingleValue size, TypeDesc elementType) 46public TypeDesc ElementType { get; }
Compiler\Dataflow\AttributeDataFlow.cs (3)
17using CustomAttributeValue = System.Reflection.Metadata.CustomAttributeValue<Internal.TypeSystem.TypeDesc>; 67TypeDesc attributeType = method.OwningType; 124TypeDesc td => new SystemTypeValue(td),
Compiler\Dataflow\CompilerGeneratedState.cs (10)
269static bool IsSameOrNestedType(TypeDesc type, TypeDesc potentialOuterType) 415TypeDesc instantiatedType = typeRef.InstantiateSignature(method.OwningType.Instantiation, method.Instantiation); 418var typeArg = instantiatedType.Instantiation[i]; 513foreach (var tr in methodOperand.Instantiation) 619CustomAttributeValue<TypeDesc>? decodedAttribute = ecmaMethod.GetDecodedCustomAttribute("System.Runtime.CompilerServices", "AsyncIteratorStateMachineAttribute"); 652private static TypeDesc? GetFirstConstructorArgumentAsType(CustomAttributeValue<TypeDesc> attribute) 657return attribute.FixedArguments[0].Value as TypeDesc; 713MetadataType? sourceType = ((sourceMember as TypeDesc) ?? sourceMember.GetOwningType())?.GetTypeDefinition() as MetadataType;
Compiler\Dataflow\DiagnosticUtilities.cs (17)
33return ((TypeDesc)parent).GetDisplayName(); 36internal static bool TryGetRequiresAttribute(TypeSystemEntity member, string requiresAttributeName, [NotNullWhen(returnValue: true)] out CustomAttributeValue<TypeDesc>? attribute) 39CustomAttributeValue<TypeDesc>? decoded; 72internal static string GetRequiresAttributeMessage(CustomAttributeValue<TypeDesc> attribute) 80internal static string GetRequiresAttributeUrl(CustomAttributeValue<TypeDesc> attribute) 98internal static bool IsInRequiresScope(this MethodDesc method, string requiresAttribute, [NotNullWhen(returnValue: true)] out CustomAttributeValue<TypeDesc>? attribute) 103if (method.OwningType is TypeDesc type && TryGetRequiresAttribute(type, requiresAttribute, out attribute)) 121internal static bool DoesMethodRequire(this MethodDesc method, string requiresAttribute, [NotNullWhen(returnValue: true)] out CustomAttributeValue<TypeDesc>? attribute) 130if ((method.Signature.IsStatic || method.IsConstructor) && method.OwningType is TypeDesc owningType && 151internal static bool DoesFieldRequire(this FieldDesc field, string requiresAttribute, [NotNullWhen(returnValue: true)] out CustomAttributeValue<TypeDesc>? attribute) 153if (!field.IsStatic || field.OwningType is not TypeDesc owningType || owningType.IsArray) 162internal static bool DoesPropertyRequire(this PropertyPseudoDesc property, string requiresAttribute, [NotNullWhen(returnValue: true)] out CustomAttributeValue<TypeDesc>? attribute) => 165internal static bool DoesEventRequire(this EventPseudoDesc @event, string requiresAttribute, [NotNullWhen(returnValue: true)] out CustomAttributeValue<TypeDesc>? attribute) => 168internal static bool DoesTypeRequire(this TypeDesc type, string requiresAttribute, [NotNullWhen(returnValue: true)] out CustomAttributeValue<TypeDesc>? attribute) => 176internal static bool DoesMemberRequire(this TypeSystemEntity member, string requiresAttribute, [NotNullWhen(returnValue: true)] out CustomAttributeValue<TypeDesc>? attribute) 189private static bool ExcludeStatics(CustomAttributeValue<TypeDesc> attribute)
Compiler\Dataflow\FlowAnnotations.cs (15)
98public bool HasGenericParameterAnnotation(TypeDesc type) 159public DynamicallyAccessedMemberTypes GetTypeAnnotation(TypeDesc type) 181TypeDesc parent = ecmaGenericParameter.Module.GetType(paramDef.Parent); 259public static bool IsTypeInterestingForDataflow(TypeDesc type) 294private TypeAnnotations GetAnnotations(TypeDesc type) 299private sealed class TypeAnnotationsHashtable : LockFreeReaderHashtable<TypeDesc, TypeAnnotations> 328protected override bool CompareKeyToValue(TypeDesc key, TypeAnnotations value) => key == value.Type; 330protected override int GetKeyHashCode(TypeDesc key) => key.GetHashCode(); 333protected override TypeAnnotations CreateValueFromKey(TypeDesc key) 831case (TypeDesc, MethodDesc method): 843public readonly TypeDesc Type; 852TypeDesc type, 1021internal SingleValue GetTypeValueFromGenericArgument(TypeDesc genericArgument) 1031var innerGenericArgument = genericArgumentType.Instantiation.Length == 1 ? genericArgumentType.Instantiation[0] : null; 1038case TypeDesc underlyingType:
Compiler\Dataflow\GenericArgumentDataFlow.cs (11)
27TypeDesc type, 28TypeDesc contextType, 43public static void ProcessGenericArgumentDataFlow(ref DependencyList dependencies, NodeFactory factory, in MessageOrigin origin, TypeDesc type, MethodDesc contextMethod) 52TypeDesc type, 61TypeDesc instantiatedType = type.InstantiateSignature(typeContext, methodContext); 98public static void ProcessGenericArgumentDataFlow(in DiagnosticContext diagnosticContext, ReflectionMarker reflectionMarker, TypeDesc type) 100TypeDesc typeDefinition = type.GetTypeDefinition(); 128var genericArgument = instantiation[i]; 161foreach (TypeDesc typeParameter in method.Instantiation) 181public static bool RequiresGenericArgumentDataFlow(FlowAnnotations flowAnnotations, TypeDesc type) 190foreach (TypeDesc typeParameter in type.Instantiation)
Compiler\Dataflow\HandleCallAction.cs (21)
72TypeDesc typeInstantiated = typeValue.RepresentedType.Type; 247TypeDesc canonArrayType = _reflectionMarker.Factory.TypeSystemContext.CanonType.MakeArrayType(); 376TypeDesc? staticType = (valueNode as IValueWithStaticType)?.StaticType?.Type; 422TypeDesc? staticType = (valueNode as IValueWithStaticType)?.StaticType?.Type; 432foreach (TypeDesc constraint in genericParam.TypeConstraints) 528TypeDesc typeMapGroup = calledMethod.Method.Instantiation[0]; 546TypeDesc typeMapGroup = calledMethod.Method.Instantiation[0]; 573foreach (TypeDesc constraint in p.TypeConstraints) 615TypeDesc[]? sigInst = null; 616TypeDesc[]? defInst = null; 618ArrayBuilder<TypeDesc> result = default; 629TypeDesc? type = singleValue switch 652TypeDesc contextType = contextMethod.OwningType; 653sigInst = new TypeDesc[contextType.Instantiation.Length + contextMethod.Instantiation.Length]; 654defInst = new TypeDesc[contextType.Instantiation.Length + contextMethod.Instantiation.Length]; 685TypeDesc? type = method.Method.OwningType; 731if (!_reflectionMarker.TryResolveTypeNameAndMark(resolvedAssembly, typeName, _diagnosticContext, "Reflection", fallbackToCoreLib: true, out TypeDesc? foundType)) 764if (!_reflectionMarker.TryResolveTypeNameAndMark(resolvedAssembly, typeName, _diagnosticContext, "Reflection", fallbackToCoreLib: false, out TypeDesc? foundType)) 833private readonly TypeDesc _type; 835public MakeGenericTypeSite(TypeDesc type) => _type = type; 840TypeDesc instantiatedType = _type.InstantiateSignature(typeInstantiation, methodInstantiation);
Compiler\Dataflow\LocalVariableReferenceValue.cs (1)
15public LocalVariableReferenceValue(int localIndex, TypeDesc localType)
Compiler\Dataflow\MethodBodyScanner.cs (6)
606HandleTypeTokenAccess(methodIL, offset, (TypeDesc)methodIL.GetObject(reader.ReadILToken())); 629var arrayElementType = (TypeDesc)methodIL.GetObject(reader.ReadILToken()); 888TypeDesc paramType = param.ParameterType; 942if (operand is TypeDesc type) 1260protected abstract void HandleTypeTokenAccess(MethodIL methodIL, int offset, TypeDesc accessedType);
Compiler\Dataflow\ReferenceValue.cs (1)
14public abstract record ReferenceValue(TypeDesc ReferencedType) : SingleValue { }
Compiler\Dataflow\ReflectionMarker.cs (17)
62internal void MarkTypeForDynamicallyAccessedMembers(in MessageOrigin origin, TypeDesc typeDefinition, DynamicallyAccessedMemberTypes requiredMemberTypes, TypeSystemEntity reason, bool declaredOnly = false) 98internal bool TryResolveTypeNameAndMark(string typeName, in DiagnosticContext diagnosticContext, bool needsAssemblyName, TypeSystemEntity reason, [NotNullWhen(true)] out TypeDesc? type) 103TypeDesc foundType = CustomAttributeTypeNameParser.GetTypeByCustomAttributeTypeNameForDataFlow(typeName, callingModule, diagnosticContext.Origin.MemberDefinition!.Context, 135internal bool TryResolveTypeNameAndMark(ModuleDesc assembly, string typeName, in DiagnosticContext diagnosticContext, string reason, bool fallbackToCoreLib, [NotNullWhen(true)] out TypeDesc? type) 138TypeDesc foundType = CustomAttributeTypeNameParser.GetTypeByCustomAttributeTypeNameForDataFlow(typeName, assembly, assembly.Context, 165internal void MarkType(in MessageOrigin origin, TypeDesc type, TypeSystemEntity reason, AccessKind accessKind = AccessKind.Unspecified) 173internal void MarkType(in MessageOrigin origin, TypeDesc type, string reason, AccessKind accessKind = AccessKind.Unspecified) 239internal void MarkConstructorsOnType(in MessageOrigin origin, TypeDesc type, Func<MethodDesc, bool>? filter, TypeSystemEntity reason, BindingFlags? bindingFlags = null) 249internal void MarkFieldsOnTypeHierarchy(in MessageOrigin origin, TypeDesc type, Func<FieldDesc, bool> filter, TypeSystemEntity reason, BindingFlags? bindingFlags = BindingFlags.Default) 259internal void MarkPropertiesOnTypeHierarchy(in MessageOrigin origin, TypeDesc type, Func<PropertyPseudoDesc, bool> filter, TypeSystemEntity reason, BindingFlags? bindingFlags = BindingFlags.Default) 269internal void MarkEventsOnTypeHierarchy(in MessageOrigin origin, TypeDesc type, Func<EventPseudoDesc, bool> filter, TypeSystemEntity reason, BindingFlags? bindingFlags = BindingFlags.Default) 279internal void MarkStaticConstructor(in MessageOrigin origin, TypeDesc type, TypeSystemEntity reason) 313_logger.ShouldSuppressAnalysisWarningsForRequires(entity, DiagnosticUtilities.RequiresUnreferencedCodeAttribute, out CustomAttributeValue<TypeDesc>? requiresAttribute) && 367static bool IsDeclaredWithinType(TypeSystemEntity member, TypeDesc type) 369TypeDesc owningType = member.GetOwningType(); 388bool isReflectionAccessCoveredByRUC = _logger.ShouldSuppressAnalysisWarningsForRequires(entity, DiagnosticUtilities.RequiresUnreferencedCodeAttribute, out CustomAttributeValue<TypeDesc>? requiresUnreferencedCodeAttribute); 407private void ReportRequires(in MessageOrigin origin, TypeSystemEntity entity, string requiresAttributeName, in CustomAttributeValue<TypeDesc> requiresAttribute)
Compiler\Dataflow\ReflectionMethodBodyScanner.cs (6)
63public static bool RequiresReflectionMethodBodyScannerForAccess(FlowAnnotations flowAnnotations, TypeDesc type) 86internal static void ReportRequires(in DiagnosticContext diagnosticContext, TypeSystemEntity calledMember, string requiresAttributeName, in CustomAttributeValue<TypeDesc> requiresAttribute) 260protected override void HandleTypeTokenAccess(MethodIL methodIL, int offset, TypeDesc accessedType) 356private static bool IsAotUnsafeDelegate(TypeDesc parameterType) 363private static bool IsComInterop(MarshalAsDescriptor? marshalInfoProvider, TypeDesc parameterType) 469private void ProcessGenericArgumentDataFlow(TypeDesc type)
Compiler\Dataflow\RequireDynamicallyAccessedMembersAction.cs (1)
30if (_reflectionMarker.TryResolveTypeNameAndMark(typeName, _diagnosticContext, needsAssemblyName, _reason, out TypeDesc? foundType))
Compiler\Dataflow\TrimAnalysisGenericInstantiationAccessPattern.cs (1)
37case TypeDesc type:
Compiler\DelegateCreationInfo.cs (6)
32private TypeDesc _constrainedType; 165public TypeDesc DelegateType 170private DelegateCreationInfo(TypeDesc delegateType, IMethodNode constructor, MethodDesc targetMethod, TypeDesc constrainedType, TargetKind targetKind, IMethodNode thunk = null) 186public static DelegateCreationInfo Create(TypeDesc delegateType, MethodDesc targetMethod, TypeDesc constrainedType, NodeFactory factory, bool followVirtualDispatch)
Compiler\DependencyAnalysis\AnalyzedExternalTypeMapNode.cs (5)
13internal sealed class AnalyzedExternalTypeMapNode(TypeDesc typeMapGroup, IReadOnlyDictionary<string, TypeDesc> entries) : SortableDependencyNode, IExternalTypeMapNode 15public TypeDesc TypeMapGroup => typeMapGroup; 21foreach ((string key, TypeDesc type) in entries) 38foreach (TypeDesc targetType in entries.Values)
Compiler\DependencyAnalysis\AnalyzedProxyTypeMapNode.cs (6)
14internal sealed class AnalyzedProxyTypeMapNode(TypeDesc typeMapGroup, IReadOnlyDictionary<TypeDesc, TypeDesc> entries) : SortableDependencyNode, IProxyTypeMapNode 16public TypeDesc TypeMapGroup => typeMapGroup; 21foreach ((TypeDesc key, TypeDesc type) in entries)
Compiler\DependencyAnalysis\ArrayMapNode.cs (1)
49foreach (var type in factory.MetadataManager.GetTypesWithEETypes())
Compiler\DependencyAnalysis\AsyncContinuationEETypeNode.cs (1)
17public TypeDesc Type { get; }
Compiler\DependencyAnalysis\ByRefTypeMapNode.cs (1)
48foreach (var type in factory.MetadataManager.GetTypesWithEETypes())
Compiler\DependencyAnalysis\CanonicalDefinitionEETypeNode.cs (1)
13public CanonicalDefinitionEETypeNode(NodeFactory factory, TypeDesc type) : base(factory, type)
Compiler\DependencyAnalysis\CodeBasedDependencyAlgorithm.cs (2)
41TypeDesc[] templateDependencies = null; 57foreach (TypeDesc templateType in templateDependencies)
Compiler\DependencyAnalysis\ConstructedEETypeNode.cs (4)
13public ConstructedEETypeNode(NodeFactory factory, TypeDesc type) : base(factory, type) 84protected override IEETypeNode GetInterfaceTypeNode(NodeFactory factory, TypeDesc interfaceType) 97public static bool CreationAllowed(TypeDesc type) 130public static void CheckCanGenerateConstructedEEType(NodeFactory factory, TypeDesc type)
Compiler\DependencyAnalysis\CustomAttributeBasedDependencyAlgorithm.cs (16)
120CustomAttributeValue<TypeDesc> decodedValue = attribute.DecodeValue(attributeTypeProvider); 162private static bool AddDependenciesFromCustomAttributeBlob(DependencyList dependencies, NodeFactory factory, TypeDesc attributeType, CustomAttributeValue<TypeDesc> value) 164foreach (CustomAttributeTypedArgument<TypeDesc> decodedArgument in value.FixedArguments) 170foreach (CustomAttributeNamedArgument<TypeDesc> decodedArgument in value.NamedArguments) 193private static bool AddDependenciesFromField(DependencyList dependencies, NodeFactory factory, TypeDesc attributeType, string fieldName) 207TypeDesc baseType = attributeType.BaseType; 216private static bool AddDependenciesFromPropertySetter(DependencyList dependencies, NodeFactory factory, TypeDesc attributeType, string propertyName) 250TypeDesc baseType = attributeType.BaseType; 259private static bool AddDependenciesFromCustomAttributeArgument(DependencyList dependencies, NodeFactory factory, TypeDesc type, object value) 274TypeDesc elementType = ((ArrayType)type).ElementType; 278foreach (CustomAttributeTypedArgument<TypeDesc> arrayElement in (ImmutableArray<CustomAttributeTypedArgument<TypeDesc>>)value) 289Debug.Assert(value is TypeDesc); 291TypeDesc typeofType = (TypeDesc)value;
Compiler\DependencyAnalysis\DataflowAnalyzedTypeDefinitionNode.cs (3)
20private readonly TypeDesc _typeDefinition; 22public DataflowAnalyzedTypeDefinitionNode(TypeDesc typeDefinition) 28public static void GetDependencies(ref DependencyList dependencies, NodeFactory factory, FlowAnnotations flowAnnotations, TypeDesc type)
Compiler\DependencyAnalysis\DataOnlyEETypeNode.cs (2)
24private readonly TypeDesc _baseType; 27public DataOnlyEETypeNode(string prefix, GCPointerMap gcMap, TypeDesc baseType, bool requiresAlign8)
Compiler\DependencyAnalysis\DictionaryLayoutNode.cs (4)
37TypeDesc type = _owningMethodOrType as TypeDesc; 54if (_owningMethodOrType is TypeDesc) 165templateLayout = factory.NativeLayout.TemplateTypeLayout((TypeDesc)_owningMethodOrType);
Compiler\DependencyAnalysis\DynamicDependencyAttributesOnEntityNode.cs (9)
60(TypeDesc owningType, IEnumerable<CustomAttributeValue<TypeDesc>> attributes) = _entity switch 66foreach (CustomAttributeValue<TypeDesc> attribute in attributes) 83TypeDesc owningType, 84CustomAttributeValue<TypeDesc> attribute) 88static MetadataType Linkerify(TypeDesc type) 104TypeDesc targetType; 118case 2 when fixedArgs[1].Value is TypeDesc typeFromAttribute: 165if (fixedArgs.Length == 2 && fixedArgs[1].Value is TypeDesc typeFromAttribute)
Compiler\DependencyAnalysis\EETypeNode.cs (17)
66protected readonly TypeDesc _type; 85public EETypeNode(NodeFactory factory, TypeDesc type) 101private static VirtualMethodAnalysisFlags AnalyzeVirtualMethods(TypeDesc type) 211public TypeDesc Type => _type; 350TypeDesc canonOwningType = _type.ConvertToCanonForm(CanonicalFormKind.Specific); 469TypeDesc implType = defType; 565public static bool IsTypeNodeShareable(TypeDesc type) 623foreach (TypeDesc intface in _type.RuntimeInterfaces) 629TypeDesc canonicalType = _type.ConvertToCanonForm(CanonicalFormKind.Specific); 795TypeDesc elementType = ((ArrayType)_type).ElementType; 843var parameterType = ((ParameterizedType)_type).ParameterType; 862TypeDesc baseType = _type.BaseType; 886private void OutputVirtualSlots(NodeFactory factory, ref ObjectDataBuilder objData, TypeDesc implType, TypeDesc declType, TypeDesc templateType, bool relocsOnly) 1037protected virtual IEETypeNode GetInterfaceTypeNode(NodeFactory factory, TypeDesc interfaceType) 1204foreach (TypeDesc paramType in sig)
Compiler\DependencyAnalysis\ExactMethodInstantiationsNode.cs (2)
68foreach (var arg in method.Instantiation) 117foreach (var arg in method.Instantiation)
Compiler\DependencyAnalysis\ExternalTypeMapNode.cs (9)
18public ExternalTypeMapNode(TypeDesc typeMapGroup, IEnumerable<KeyValuePair<string, TypeMapMetadata.ExternalTypeMapEntry>> mapEntries) 32public TypeDesc TypeMapGroup { get; } 40TypeDesc targetType = entry.Value.Type; 41TypeDesc trimmingTargetType = entry.Value.TrimmingType; 62TypeDesc targetType = entry.Value.Type; 63TypeDesc trimmingTargetType = entry.Value.TrimmingType; 88TypeDesc targetType = entry.Value.Type; 89TypeDesc trimmingTargetType = entry.Value.TrimmingType; 101private static IEETypeNode GetEffectiveTrimTargetType(NodeFactory factory, TypeDesc trimmingTargetType)
Compiler\DependencyAnalysis\ExternalTypeMapRequestNode.cs (2)
12public sealed class ExternalTypeMapRequestNode(TypeDesc typeMapGroup) : DependencyNodeCore<NodeFactory> 14public TypeDesc TypeMapGroup { get; } = typeMapGroup;
Compiler\DependencyAnalysis\ExternEETypeSymbolNode.cs (3)
15private TypeDesc _type; 17public ExternEETypeSymbolNode(NodeFactory factory, TypeDesc type) 25public TypeDesc Type => _type;
Compiler\DependencyAnalysis\ExternSymbolsImportedNodeProvider.cs (1)
13public override IEETypeNode ImportedEETypeNode(NodeFactory factory, TypeDesc type)
Compiler\DependencyAnalysis\FrozenObjectNode.cs (1)
26public abstract TypeDesc ObjectType { get; }
Compiler\DependencyAnalysis\FrozenRuntimeTypeNode.cs (2)
14private readonly TypeDesc _type; 17public FrozenRuntimeTypeNode(TypeDesc type, bool withMetadata)
Compiler\DependencyAnalysis\FrozenStringNode.cs (1)
57public override TypeDesc ObjectType => _stringType;
Compiler\DependencyAnalysis\FunctionPointerMapNode.cs (2)
41foreach (TypeDesc paramType in type.Signature) 57foreach (var type in factory.MetadataManager.GetTypesWithEETypes())
Compiler\DependencyAnalysis\GCStaticsNode.cs (1)
42public static Utf8String GetMangledName(TypeDesc type, NameMangler nameMangler)
Compiler\DependencyAnalysis\GCStaticsPreInitDataNode.cs (1)
37public static string GetMangledName(TypeDesc type, NameMangler nameMangler)
Compiler\DependencyAnalysis\GenericCompositionNode.cs (2)
29foreach (TypeDesc instArg in _details) 67foreach (var typeArg in _details)
Compiler\DependencyAnalysis\GenericDefinitionEETypeNode.cs (3)
15public GenericDefinitionEETypeNode(NodeFactory factory, TypeDesc type) : base(factory, type) 66public ReflectionInvisibleGenericDefinitionEETypeNode(NodeFactory factory, TypeDesc type) : base(factory, type) 85public ReflectionVisibleGenericDefinitionEETypeNode(NodeFactory factory, TypeDesc type) : base(factory, type)
Compiler\DependencyAnalysis\GenericDictionaryNode.cs (7)
97private TypeDesc _owningType; 109public TypeDesc OwningType => _owningType; 125TypeDesc canonicalOwningType = _owningType.ConvertToCanonForm(CanonicalFormKind.Specific); 132foreach (var arg in _owningType.Instantiation) 166public TypeGenericDictionaryNode(TypeDesc owningType, NodeFactory factory) 221foreach (var arg in _owningMethod.OwningType.Instantiation) 231foreach (var arg in _owningMethod.Instantiation)
Compiler\DependencyAnalysis\GenericLookupResult.cs (34)
27if (_canonicalOwner is TypeDesc) 29var owningTypeDefinition = (MetadataType)((TypeDesc)_canonicalOwner).GetTypeDefinition(); 43TypeDesc owningType = owningMethodDefinition.OwningType; 105TypeDesc argument = instantiation[i]; 190private TypeDesc _type; 194public TypeHandleGenericLookupResult(TypeDesc type) 203TypeDesc instantiatedType = _type.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(dictionary.TypeInstantiation, dictionary.MethodInstantiation); 220public TypeDesc Type => _type; 249private TypeDesc _type; 253public NecessaryTypeHandleGenericLookupResult(TypeDesc type) 261TypeDesc instantiatedType = _type.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(dictionary.TypeInstantiation, dictionary.MethodInstantiation); 278public TypeDesc Type => _type; 307private TypeDesc _type; 311public MetadataTypeHandleGenericLookupResult(TypeDesc type) 319TypeDesc instantiatedType = _type.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(dictionary.TypeInstantiation, dictionary.MethodInstantiation); 336public TypeDesc Type => _type; 365private TypeDesc _type; 369public UnwrapNullableTypeHandleGenericLookupResult(TypeDesc type) 377TypeDesc instantiatedType = _type.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(dictionary.TypeInstantiation, dictionary.MethodInstantiation); 399public TypeDesc Type => _type; 720dictionary = contextOwner is TypeDesc ? 721(GenericDictionaryNode)factory.TypeGenericDictionary((TypeDesc)contextOwner) : 781public TypeNonGCStaticBaseGenericLookupResult(TypeDesc type) 838public TypeThreadStaticBaseIndexGenericLookupResult(TypeDesc type) 894public TypeGCStaticBaseGenericLookupResult(TypeDesc type) 947private TypeDesc _type; 951public ObjectAllocatorGenericLookupResult(TypeDesc type) 959TypeDesc instantiatedType = _type.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(dictionary.TypeInstantiation, dictionary.MethodInstantiation); 999private TypeDesc _type; 1003public DefaultConstructorLookupResult(TypeDesc type) 1011TypeDesc instantiatedType = _type.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(dictionary.TypeInstantiation, dictionary.MethodInstantiation); 1053private TypeDesc _constraintType; 1058public ConstrainedMethodUseLookupResult(MethodDesc constrainedMethod, TypeDesc constraintType, bool directCall) 1087TypeDesc instantiatedConstraintType = _constraintType.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(dictionary.TypeInstantiation, dictionary.MethodInstantiation);
Compiler\DependencyAnalysis\GenericTypesHashtableNode.cs (1)
46foreach (var type in factory.MetadataManager.GetTypesWithEETypes())
Compiler\DependencyAnalysis\GenericTypesTemplateMap.cs (8)
50foreach (TypeDesc type in factory.MetadataManager.GetTypeTemplates()) 71public static void GetTemplateTypeDependencies(ref DependencyList dependencies, NodeFactory factory, TypeDesc type) 73TypeDesc templateType = ConvertArrayOfTToRegularArray(factory, type); 87public static TypeDesc ConvertArrayOfTToRegularArray(NodeFactory factory, TypeDesc type) 98public static bool IsArrayTypeEligibleForTemplate(TypeDesc type) 105TypeDesc elementType = arrayType.ElementType; 110public static bool IsEligibleToHaveATemplate(TypeDesc type)
Compiler\DependencyAnalysis\GenericVarianceNode.cs (1)
77public GenericVarianceDetails(TypeDesc typeDefinition)
Compiler\DependencyAnalysis\GenericVirtualMethodTableNode.cs (4)
20private Dictionary<MethodDesc, Dictionary<TypeDesc, MethodDesc>> _gvmImplementations; 25_gvmImplementations = new Dictionary<MethodDesc, Dictionary<TypeDesc, MethodDesc>>(); 70_gvmImplementations[openCallingMethod] = new Dictionary<TypeDesc, MethodDesc>(); 107TypeDesc implementationType = implementationEntry.Key;
Compiler\DependencyAnalysis\IEETypeNode.cs (1)
13TypeDesc Type { get; }
Compiler\DependencyAnalysis\ImportedNodeProvider.cs (2)
14public abstract IEETypeNode ImportedEETypeNode(NodeFactory factory, TypeDesc type); 23public override IEETypeNode ImportedEETypeNode(NodeFactory factory, TypeDesc type)
Compiler\DependencyAnalysis\INodeWithDebugInfo.cs (2)
39public readonly TypeDesc Type; 43public DebugVarInfoMetadata(string name, TypeDesc type, bool isParameter, DebugVarInfo info)
Compiler\DependencyAnalysis\InterfaceDispatchMapNode.cs (7)
16private readonly TypeDesc _type; 18public InterfaceDispatchMapNode(NodeFactory factory, TypeDesc type) 55foreach (TypeDesc runtimeInterface in _type.RuntimeInterfaces) 68public static bool MightHaveInterfaceDispatchMap(TypeDesc type, NodeFactory factory) 142TypeDesc declTypeDefinition = declType.GetTypeDefinition(); 143TypeDesc declTypeBaseDefinition = declTypeDefinition.BaseType?.GetTypeDefinition(); 194TypeDesc implType = declType;
Compiler\DependencyAnalysis\InterfaceGenericVirtualMethodTableNode.cs (10)
22private Dictionary<object, Dictionary<TypeDesc, HashSet<int>>> _interfaceImpls; 28_interfaceImpls = new Dictionary<object, Dictionary<TypeDesc, HashSet<int>>>(); 48public static void GetGenericVirtualMethodImplementationDependencies(ref DependencyList dependencies, NodeFactory factory, MethodDesc callingMethod, TypeDesc implementationType, MethodDesc implementationMethod) 54TypeDesc openImplementationType = implementationType.GetTypeDefinition(); 73TypeDesc currentInterface = openImplementationType.RuntimeInterfaces[index]; 81private void AddGenericVirtualMethodImplementation(MethodDesc callingMethod, TypeDesc implementationType, MethodDesc implementationMethod, DefaultInterfaceMethodResolution resolution) 88TypeDesc openImplementationType = implementationType.GetTypeDefinition(); 102_interfaceImpls[openImplementationMethod] = new Dictionary<TypeDesc, HashSet<int>>(); 197TypeDesc implementationType = currentImpl.Key; 208TypeDesc currentInterface = implementationType.RuntimeInterfaces[ifaceId];
Compiler\DependencyAnalysis\InterfaceUseNode.cs (2)
21public TypeDesc Type { get; } 23public InterfaceUseNode(TypeDesc type)
Compiler\DependencyAnalysis\InvalidExternalTypeMapNode.cs (2)
13internal sealed class InvalidExternalTypeMapNode(TypeDesc typeMapGroup, MethodDesc throwingMethodStub) : SortableDependencyNode, IExternalTypeMapNode 34public TypeDesc TypeMapGroup { get; } = typeMapGroup;
Compiler\DependencyAnalysis\InvalidProxyTypeMapNode.cs (2)
13internal sealed class InvalidProxyTypeMapNode(TypeDesc typeMapGroup, MethodDesc throwingMethodStub) : SortableDependencyNode, IProxyTypeMapNode 15public TypeDesc TypeMapGroup { get; } = typeMapGroup;
Compiler\DependencyAnalysis\ManagedDataDescriptorNode.cs (1)
105foreach (TypeDesc type in factory.MetadataManager.GetTypesWithEETypes())
Compiler\DependencyAnalysis\MetadataEETypeNode.cs (2)
13public MetadataEETypeNode(NodeFactory factory, TypeDesc type) : base(factory, type) 95protected override IEETypeNode GetInterfaceTypeNode(NodeFactory factory, TypeDesc interfaceType)
Compiler\DependencyAnalysis\MethodMetadataNode.cs (2)
61foreach (TypeDesc paramType in sig) 81foreach (TypeDesc parameterType in _method.Signature)
Compiler\DependencyAnalysis\NativeLayoutVertexNode.cs (45)
137foreach (var arg in _method.Instantiation) 309protected readonly TypeDesc _type; 311protected NativeLayoutTypeSignatureVertexNode(TypeDesc type) 318public static NativeLayoutTypeSignatureVertexNode NewTypeSignatureVertexNode(NodeFactory factory, TypeDesc type) 351public NativeLayoutParameterizedTypeSignatureVertexNode(NodeFactory factory, TypeDesc type) : base(type) 395public NativeLayoutFunctionPointerTypeSignatureVertexNode(NodeFactory factory, TypeDesc type) : base(type) 413public NativeLayoutGenericVarSignatureVertexNode(TypeDesc type) : base(type) 443public NativeLayoutInstantiatedTypeSignatureVertexNode(NodeFactory factory, TypeDesc type) : base(type) 478public NativeLayoutEETypeSignatureVertexNode(TypeDesc type) : base(type) 684foreach (var arg in _method.Instantiation) 715TypeDesc owningType = (TypeDesc)owningMethodOrType; 732TypeDesc owningType = (TypeDesc)_owningMethodOrType; 750new DependencyListEntry(context.NativeLayout.TypeSignatureVertex((TypeDesc)_owningMethodOrType), "DeclaringType signature"), 786signature = nativeWriter.GetTuple(factory.NativeLayout.TypeSignatureVertex((TypeDesc)_owningMethodOrType).WriteVertex(factory), sequence); 822foreach (var type in _method.Instantiation) 832foreach (TypeDesc typeConstraint in genericParam.TypeConstraints) 878private TypeDesc _type; 880public TypeDesc CanonType => _type.ConvertToCanonForm(CanonicalFormKind.Specific); 884public NativeLayoutTemplateTypeLayoutVertexNode(NodeFactory factory, TypeDesc type) 892private static TypeDesc GetActualTemplateTypeForType(NodeFactory factory, TypeDesc type) 941foreach (TypeDesc iface in _type.RuntimeInterfaces) 958foreach (TypeDesc typeConstraint in genericParam.TypeConstraints) 978TypeDesc baseType = _type.BaseType; 1019foreach (TypeDesc iface in _type.RuntimeInterfaces) 1104private TypeDesc _type; 1106public NativeLayoutTypeSignatureBasedGenericDictionarySlotNode(NodeFactory factory, TypeDesc type) 1133public NativeLayoutTypeHandleGenericDictionarySlotNode(NodeFactory factory, TypeDesc type) : base(factory, type) 1144public NativeLayoutUnwrapNullableGenericDictionarySlotNode(NodeFactory factory, TypeDesc type) : base(factory, type) 1155public NativeLayoutAllocateObjectGenericDictionarySlotNode(NodeFactory factory, TypeDesc type) : base(factory, type) 1166public NativeLayoutThreadStaticBaseIndexDictionarySlotNode(NodeFactory factory, TypeDesc type) : base(factory, type) 1177public NativeLayoutDefaultConstructorGenericDictionarySlotNode(NodeFactory factory, TypeDesc type) : base(factory, type) 1189private TypeDesc _type; 1191public NativeLayoutStaticsGenericDictionarySlotNode(NodeFactory factory, TypeDesc type) 1221public NativeLayoutGcStaticsGenericDictionarySlotNode(NodeFactory factory, TypeDesc type) : base(factory, type) 1230public NativeLayoutNonGcStaticsGenericDictionarySlotNode(NodeFactory factory, TypeDesc type) : base(factory, type) 1305foreach (var type in _method.Instantiation) 1346foreach (var type in _method.Instantiation) 1430foreach (var type in _method.Instantiation) 1457private TypeDesc _constraintType; 1460public NativeLayoutConstrainedMethodDictionarySlotNode(MethodDesc constrainedMethod, TypeDesc constraintType, bool directCall) 1510foreach (var type in _constrainedMethod.Instantiation) 1592foreach (var type in _method.Instantiation)
Compiler\DependencyAnalysis\NodeFactory.cs (65)
143private static bool TypeCannotHaveEEType(TypeDesc type) 196_importedTypeSymbols = new NodeCache<TypeDesc, IEETypeNode>((TypeDesc type) => 348_gvmTableEntries = new NodeCache<TypeDesc, TypeGVMEntriesNode>(type => 373_reflectedDelegates = new NodeCache<TypeDesc, ReflectedDelegateNode>(type => 388_reflectedTypes = new NodeCache<TypeDesc, ReflectedTypeNode>(type => 429_interfaceUses = new NodeCache<TypeDesc, InterfaceUseNode>((TypeDesc type) => 449_frozenMetadataRuntimeTypeNodes = new NodeCache<TypeDesc, FrozenRuntimeTypeNode>(key => 454_frozenNecessaryRuntimeTypeNodes = new NodeCache<TypeDesc, FrozenRuntimeTypeNode>(key => 464_interfaceDispatchMaps = new NodeCache<TypeDesc, InterfaceDispatchMapNode>((TypeDesc type) => 469_sealedVtableNodes = new NodeCache<TypeDesc, SealedVTableNode>((TypeDesc type) => 489_dataflowAnalyzedTypeDefinitions = new NodeCache<TypeDesc, DataflowAnalyzedTypeDefinitionNode>((TypeDesc type) => 550_typeGenericDictionaries = new NodeCache<TypeDesc, TypeGenericDictionaryNode>(type => 614_externalTypeMapRequests = new NodeCache<TypeDesc, ExternalTypeMapRequestNode>(type => 619_proxyTypeMapRequests = new NodeCache<TypeDesc, ProxyTypeMapRequestNode>(type => 647private IEETypeNode CreateNecessaryTypeNode(TypeDesc type) 671private IEETypeNode CreateMetadataTypeNode(TypeDesc type) 694private IEETypeNode CreateConstructedTypeNode(TypeDesc type) 722private abstract class TypeSymbolHashtable : LockFreeReaderHashtable<TypeDesc, IEETypeNode> 726protected override bool CompareKeyToValue(TypeDesc key, IEETypeNode value) => key == value.Type; 728protected override int GetKeyHashCode(TypeDesc key) => key.GetHashCode(); 735protected override IEETypeNode CreateValueFromKey(TypeDesc key) => _factory.CreateNecessaryTypeNode(key); 741public IEETypeNode NecessaryTypeSymbol(TypeDesc type) 766protected override IEETypeNode CreateValueFromKey(TypeDesc key) => _factory.CreateMetadataTypeNode(key); 771public IEETypeNode MetadataTypeSymbol(TypeDesc type) 794protected override IEETypeNode CreateValueFromKey(TypeDesc key) => _factory.CreateConstructedTypeNode(key); 799public IEETypeNode ConstructedTypeSymbol(TypeDesc type) 816public IEETypeNode MaximallyConstructableType(TypeDesc type) 826public IEETypeNode MaximallyMetadataEnabledType(TypeDesc type) 834private NodeCache<TypeDesc, IEETypeNode> _importedTypeSymbols; 836private IEETypeNode ImportedEETypeSymbol(TypeDesc type) 919private NodeCache<TypeDesc, DataflowAnalyzedTypeDefinitionNode> _dataflowAnalyzedTypeDefinitions; 921public DataflowAnalyzedTypeDefinitionNode DataflowAnalyzedTypeDefinition(TypeDesc type) 962private NodeCache<TypeDesc, SealedVTableNode> _sealedVtableNodes; 964internal SealedVTableNode SealedVTable(TypeDesc type) 969private NodeCache<TypeDesc, InterfaceDispatchMapNode> _interfaceDispatchMaps; 971internal InterfaceDispatchMapNode InterfaceDispatchMap(TypeDesc type) 1038private sealed class VTableSliceHashtable : LockFreeReaderHashtable<TypeDesc, VTableSliceNode> 1042protected override bool CompareKeyToValue(TypeDesc key, VTableSliceNode value) => key == value.Type; 1044protected override VTableSliceNode CreateValueFromKey(TypeDesc key) 1051protected override int GetKeyHashCode(TypeDesc key) => key.GetHashCode(); 1057public VTableSliceNode VTable(TypeDesc type) 1068private NodeCache<TypeDesc, TypeGenericDictionaryNode> _typeGenericDictionaries; 1069public TypeGenericDictionaryNode TypeGenericDictionary(TypeDesc type) 1217private NodeCache<TypeDesc, TypeGVMEntriesNode> _gvmTableEntries; 1218internal TypeGVMEntriesNode TypeGVMEntries(TypeDesc type) 1251private NodeCache<TypeDesc, ReflectedDelegateNode> _reflectedDelegates; 1252public ReflectedDelegateNode ReflectedDelegate(TypeDesc type) 1272private NodeCache<TypeDesc, ReflectedTypeNode> _reflectedTypes; 1273public ReflectedTypeNode ReflectedType(TypeDesc type) 1420private NodeCache<TypeDesc, InterfaceUseNode> _interfaceUses; 1422public DependencyNodeCore<NodeFactory> InterfaceUse(TypeDesc type) 1558private NodeCache<TypeDesc, FrozenRuntimeTypeNode> _frozenMetadataRuntimeTypeNodes; 1560public FrozenRuntimeTypeNode SerializedMetadataRuntimeTypeObject(TypeDesc type) 1565private NodeCache<TypeDesc, FrozenRuntimeTypeNode> _frozenNecessaryRuntimeTypeNodes; 1567public FrozenRuntimeTypeNode SerializedNecessaryRuntimeTypeObject(TypeDesc type) 1604private NodeCache<TypeDesc, ExternalTypeMapRequestNode> _externalTypeMapRequests; 1606public ExternalTypeMapRequestNode ExternalTypeMapRequest(TypeDesc type) 1611private NodeCache<TypeDesc, ProxyTypeMapRequestNode> _proxyTypeMapRequests; 1613public ProxyTypeMapRequestNode ProxyTypeMapRequest(TypeDesc type) 1718public Vertex EncodeReferenceToType(NativeWriter writer, TypeDesc type, ModuleDesc module)
Compiler\DependencyAnalysis\NodeFactory.GenericLookups.cs (30)
25_typeSymbols = new NodeCache<TypeDesc, GenericLookupResult>(type => 30_necessaryTypeSymbols = new NodeCache<TypeDesc, GenericLookupResult>(type => 35_metadataTypeSymbols = new NodeCache<TypeDesc, GenericLookupResult>(type => 40_unwrapNullableSymbols = new NodeCache<TypeDesc, GenericLookupResult>(type => 70_typeThreadStaticBaseIndexSymbols = new NodeCache<TypeDesc, GenericLookupResult>(type => 75_typeGCStaticBaseSymbols = new NodeCache<TypeDesc, GenericLookupResult>(type => 80_typeNonGCStaticBaseSymbols = new NodeCache<TypeDesc, GenericLookupResult>(type => 85_objectAllocators = new NodeCache<TypeDesc, GenericLookupResult>(type => 90_defaultCtors = new NodeCache<TypeDesc, GenericLookupResult>(type => 101private NodeCache<TypeDesc, GenericLookupResult> _typeSymbols; 103public GenericLookupResult Type(TypeDesc type) 108private NodeCache<TypeDesc, GenericLookupResult> _necessaryTypeSymbols; 110public GenericLookupResult NecessaryType(TypeDesc type) 115private NodeCache<TypeDesc, GenericLookupResult> _metadataTypeSymbols; 117public GenericLookupResult MetadataType(TypeDesc type) 122private NodeCache<TypeDesc, GenericLookupResult> _unwrapNullableSymbols; 124public GenericLookupResult UnwrapNullableType(TypeDesc type) 154private NodeCache<TypeDesc, GenericLookupResult> _typeThreadStaticBaseIndexSymbols; 156public GenericLookupResult TypeThreadStaticBaseIndex(TypeDesc type) 161private NodeCache<TypeDesc, GenericLookupResult> _typeGCStaticBaseSymbols; 163public GenericLookupResult TypeGCStaticBase(TypeDesc type) 168private NodeCache<TypeDesc, GenericLookupResult> _typeNonGCStaticBaseSymbols; 170public GenericLookupResult TypeNonGCStaticBase(TypeDesc type) 196private NodeCache<TypeDesc, GenericLookupResult> _objectAllocators; 198public GenericLookupResult ObjectAllocator(TypeDesc type) 203private NodeCache<TypeDesc, GenericLookupResult> _defaultCtors; 205public GenericLookupResult DefaultCtorLookupResult(TypeDesc type) 211public GenericLookupResult ConstrainedMethodUse(MethodDesc constrainedMethod, TypeDesc constraintType, bool directCall) 221public ConstrainedMethodUseKey(MethodDesc constrainedMethod, TypeDesc constraintType, bool directCall) 229public readonly TypeDesc ConstraintType;
Compiler\DependencyAnalysis\NodeFactory.NativeLayout.cs (33)
30_typeSignatures = new NodeCache<TypeDesc, NativeLayoutTypeSignatureVertexNode>(type => 70_templateTypeLayouts = new NodeCache<TypeDesc, NativeLayoutTemplateTypeLayoutVertexNode>(type => 75_typeHandle_GenericDictionarySlots = new NodeCache<TypeDesc, NativeLayoutTypeHandleGenericDictionarySlotNode>(type => 80_gcStatic_GenericDictionarySlots = new NodeCache<TypeDesc, NativeLayoutGcStaticsGenericDictionarySlotNode>(type => 85_nonGcStatic_GenericDictionarySlots = new NodeCache<TypeDesc, NativeLayoutNonGcStaticsGenericDictionarySlotNode>(type => 90_unwrapNullable_GenericDictionarySlots = new NodeCache<TypeDesc, NativeLayoutUnwrapNullableGenericDictionarySlotNode>(type => 95_allocateObject_GenericDictionarySlots = new NodeCache<TypeDesc, NativeLayoutAllocateObjectGenericDictionarySlotNode>(type => 100_threadStaticIndex_GenericDictionarySlots = new NodeCache<TypeDesc, NativeLayoutThreadStaticBaseIndexDictionarySlotNode>(type => 105_defaultConstructor_GenericDictionarySlots = new NodeCache<TypeDesc, NativeLayoutDefaultConstructorGenericDictionarySlotNode>(type => 156public IEnumerable<IDependencyNode> TemplateConstructableTypes(TypeDesc type) 161TypeDesc arrayCanonicalType = type.ConvertToCanonForm(CanonicalFormKind.Specific); 183foreach (var param in sig) 191TypeDesc canonicalType = type.ConvertToCanonForm(CanonicalFormKind.Specific); 201foreach (TypeDesc instantiationType in type.Instantiation) 208private NodeCache<TypeDesc, NativeLayoutTypeSignatureVertexNode> _typeSignatures; 209internal NativeLayoutTypeSignatureVertexNode TypeSignatureVertex(TypeDesc type) 333private NodeCache<TypeDesc, NativeLayoutTemplateTypeLayoutVertexNode> _templateTypeLayouts; 334public NativeLayoutTemplateTypeLayoutVertexNode TemplateTypeLayout(TypeDesc type) 339private NodeCache<TypeDesc, NativeLayoutTypeHandleGenericDictionarySlotNode> _typeHandle_GenericDictionarySlots; 340public NativeLayoutTypeHandleGenericDictionarySlotNode TypeHandleDictionarySlot(TypeDesc type) 345private NodeCache<TypeDesc, NativeLayoutGcStaticsGenericDictionarySlotNode> _gcStatic_GenericDictionarySlots; 346public NativeLayoutGcStaticsGenericDictionarySlotNode GcStaticDictionarySlot(TypeDesc type) 351private NodeCache<TypeDesc, NativeLayoutNonGcStaticsGenericDictionarySlotNode> _nonGcStatic_GenericDictionarySlots; 352public NativeLayoutNonGcStaticsGenericDictionarySlotNode NonGcStaticDictionarySlot(TypeDesc type) 357private NodeCache<TypeDesc, NativeLayoutUnwrapNullableGenericDictionarySlotNode> _unwrapNullable_GenericDictionarySlots; 358public NativeLayoutUnwrapNullableGenericDictionarySlotNode UnwrapNullableTypeDictionarySlot(TypeDesc type) 363private NodeCache<TypeDesc, NativeLayoutAllocateObjectGenericDictionarySlotNode> _allocateObject_GenericDictionarySlots; 364public NativeLayoutAllocateObjectGenericDictionarySlotNode AllocateObjectDictionarySlot(TypeDesc type) 369private NodeCache<TypeDesc, NativeLayoutThreadStaticBaseIndexDictionarySlotNode> _threadStaticIndex_GenericDictionarySlots; 370public NativeLayoutThreadStaticBaseIndexDictionarySlotNode ThreadStaticBaseIndexDictionarySlotNode(TypeDesc type) 375private NodeCache<TypeDesc, NativeLayoutDefaultConstructorGenericDictionarySlotNode> _defaultConstructor_GenericDictionarySlots; 376public NativeLayoutDefaultConstructorGenericDictionarySlotNode DefaultConstructorDictionarySlot(TypeDesc type) 471public NativeLayoutConstrainedMethodDictionarySlotNode ConstrainedMethodUse(MethodDesc constrainedMethod, TypeDesc constraintType, bool directCall)
Compiler\DependencyAnalysis\NonGCStaticsNode.cs (2)
74public static Utf8String GetMangledName(TypeDesc type, NameMangler nameMangler) 110TypeDesc canonType = type.ConvertToCanonForm(CanonicalFormKind.Specific);
Compiler\DependencyAnalysis\PInvokeMethodFixupNode.cs (2)
133CustomAttributeValue<TypeDesc>? decodedAttr = null; 187foreach (var p in pInvokeLazyFixupField.NativeSignature)
Compiler\DependencyAnalysis\PointerTypeMapNode.cs (1)
48foreach (var type in factory.MetadataManager.GetTypesWithEETypes())
Compiler\DependencyAnalysis\ProxyTypeMapNode.cs (6)
18private readonly IEnumerable<KeyValuePair<TypeDesc, TypeMapMetadata.ProxyTypeMapEntry>> _mapEntries; 20public ProxyTypeMapNode(TypeDesc typeMapGroup, IEnumerable<KeyValuePair<TypeDesc, TypeMapMetadata.ProxyTypeMapEntry>> mapEntries) 26public TypeDesc TypeMapGroup { get; } 28public IEnumerable<KeyValuePair<TypeDesc, TypeMapMetadata.ProxyTypeMapEntry>> MapEntries => _mapEntries; 52TypeDesc canonKey = key.ConvertToCanonForm(CanonicalFormKind.Specific);
Compiler\DependencyAnalysis\ProxyTypeMapRequestNode.cs (2)
12public sealed class ProxyTypeMapRequestNode(TypeDesc typeMapGroup) : DependencyNodeCore<NodeFactory> 14public TypeDesc TypeMapGroup { get; } = typeMapGroup;
Compiler\DependencyAnalysis\ReadyToRunGenericHelperNode.cs (27)
43(dictionaryOwner is TypeDesc type && type.HasInstantiation) 57return factory.GenericLookup.Type((TypeDesc)target); 59return factory.GenericLookup.NecessaryType((TypeDesc)target); 61return factory.GenericLookup.MetadataType((TypeDesc)target); 64Debug.Assert(factory.GenericLookup.Type((TypeDesc)target) != factory.GenericLookup.UnwrapNullableType((TypeDesc)target)); 65return factory.GenericLookup.UnwrapNullableType((TypeDesc)target); 71return factory.GenericLookup.TypeGCStaticBase((TypeDesc)target); 73return factory.GenericLookup.TypeNonGCStaticBase((TypeDesc)target); 75return factory.GenericLookup.TypeThreadStaticBaseIndex((TypeDesc)target); 85return factory.GenericLookup.DefaultCtorLookupResult((TypeDesc)target); 87return factory.GenericLookup.ObjectAllocator((TypeDesc)target); 118layout.EnsureEntry(factory.GenericLookup.TypeNonGCStaticBase((TypeDesc)_target)); 125TypeDesc type = (TypeDesc)_target; 143var lookupTarget = factory.GenericLookup.TypeNonGCStaticBase((TypeDesc)_target).GetTarget(factory, lookupContext, isConcreteInstantiation); 214if (_dictionaryOwner is TypeDesc type) 252templateLayout = factory.NativeLayout.TemplateTypeLayout((TypeDesc)_dictionaryOwner); 262TypeDesc type = (TypeDesc)_target; 291if (((ReadyToRunGenericHelperNode)other)._dictionaryOwner is TypeDesc) 301compare = comparer.Compare((TypeDesc)_dictionaryOwner, (TypeDesc)((ReadyToRunGenericHelperNode)other)._dictionaryOwner); 316return comparer.Compare((TypeDesc)_target, (TypeDesc)((ReadyToRunGenericHelperNode)other)._target); 347mangledContextName = nameMangler.GetMangledTypeName((TypeDesc)_dictionaryOwner); 369mangledContextName = nameMangler.GetMangledTypeName((TypeDesc)_dictionaryOwner);
Compiler\DependencyAnalysis\ReadyToRunHelperNode.cs (5)
98sb.Append("__GetNonGCStaticBase_"u8).Append(nameMangler.GetMangledTypeName((TypeDesc)_target)); 101sb.Append("__GetGCStaticBase_"u8).Append(nameMangler.GetMangledTypeName((TypeDesc)_target)); 104sb.Append("__GetThreadStaticBase_"u8).Append(nameMangler.GetMangledTypeName((TypeDesc)_target)); 195return comparer.Compare((TypeDesc)_target, (TypeDesc)((ReadyToRunHelperNode)other)._target);
Compiler\DependencyAnalysis\ReflectedDelegateNode.cs (2)
19private readonly TypeDesc _delegateType; 21public ReflectedDelegateNode(TypeDesc delegateType)
Compiler\DependencyAnalysis\ReflectedFieldNode.cs (1)
99TypeDesc fieldType = _field.FieldType.NormalizeInstantiation();
Compiler\DependencyAnalysis\ReflectedTypeNode.cs (3)
24private readonly TypeDesc _type; 26public ReflectedTypeNode(TypeDesc type) 33public TypeDesc Type => _type;
Compiler\DependencyAnalysis\ReflectionInvokeMapNode.cs (3)
56foreach (var parameterType in signature) 74foreach (var instArg in method.Instantiation) 83internal static void AddSignatureDependency(ref DependencyList dependencies, NodeFactory factory, TypeSystemEntity referent, TypeDesc type, string reason, bool isOut)
Compiler\DependencyAnalysis\ReflectionVirtualInvokeMapNode.cs (8)
56TypeDesc typeOfDeclaringMethodForSlot = declaringMethodForSlot.OwningType.GetTypeDefinition(); 57TypeDesc currentType = method.OwningType.GetTypeDefinition(); 58TypeDesc containingTypeOfDeclaringMethodForSlot = method.OwningType; 122Dictionary<int, HashSet<TypeDesc>> methodsEmitted = new Dictionary<int, HashSet<TypeDesc>>(); 156TypeDesc containingTypeKey = method.OwningType.ConvertToCanonForm(CanonicalFormKind.Specific); 158HashSet<TypeDesc> cache; 160methodsEmitted[mappingEntry.MetadataHandle] = cache = new HashSet<TypeDesc>();
Compiler\DependencyAnalysis\RuntimeMethodHandleNode.cs (1)
86foreach (TypeDesc instParam in _targetMethod.Instantiation)
Compiler\DependencyAnalysis\ScannedMethodNode.cs (1)
65TypeDesc owningType = _method.OwningType;
Compiler\DependencyAnalysis\SealedVTableNode.cs (5)
16private readonly TypeDesc _type; 20public SealedVTableNode(TypeDesc type) 147TypeDesc declTypeDefinition = declType.GetTypeDefinition(); 187TypeDesc implType = declType; 254TypeDesc declType = _type.GetClosestDefType();
Compiler\DependencyAnalysis\SerializedFrozenObjectNode.cs (1)
41public override TypeDesc ObjectType => _data.Type;
Compiler\DependencyAnalysis\Target_ARM\ARMReadyToRunGenericHelperNode.cs (1)
230vtableSlot = VirtualMethodSlotHelper.GetGenericDictionarySlot(factory, (TypeDesc)_dictionaryOwner);
Compiler\DependencyAnalysis\Target_ARM64\ARM64ReadyToRunGenericHelperNode.cs (1)
229vtableSlot = VirtualMethodSlotHelper.GetGenericDictionarySlot(factory, (TypeDesc)_dictionaryOwner);
Compiler\DependencyAnalysis\Target_LoongArch64\LoongArch64ReadyToRunGenericHelperNode.cs (1)
231vtableSlot = VirtualMethodSlotHelper.GetGenericDictionarySlot(factory, (TypeDesc)_dictionaryOwner);
Compiler\DependencyAnalysis\Target_RiscV64\RiscV64ReadyToRunGenericHelperNode.cs (1)
228vtableSlot = VirtualMethodSlotHelper.GetGenericDictionarySlot(factory, (TypeDesc)_dictionaryOwner);
Compiler\DependencyAnalysis\Target_X64\X64ReadyToRunGenericHelperNode.cs (1)
238vtableSlot = VirtualMethodSlotHelper.GetGenericDictionarySlot(factory, (TypeDesc)_dictionaryOwner);
Compiler\DependencyAnalysis\Target_X86\X86ReadyToRunGenericHelperNode.cs (1)
237vtableSlot = VirtualMethodSlotHelper.GetGenericDictionarySlot(factory, (TypeDesc)_dictionaryOwner);
Compiler\DependencyAnalysis\TentativeInstanceMethodNode.cs (1)
43TypeDesc owningType = Method.OwningType;
Compiler\DependencyAnalysis\ThreadStaticsNode.cs (1)
40public static Utf8String GetMangledName(TypeDesc type, NameMangler nameMangler)
Compiler\DependencyAnalysis\TypeGVMEntriesNode.cs (5)
32TypeDesc implementationType, DefaultInterfaceMethodResolution defaultResolution) 39public TypeDesc ImplementationType { get; } 43private readonly TypeDesc _associatedType; 46public TypeGVMEntriesNode(TypeDesc associatedType) 53public TypeDesc AssociatedType => _associatedType;
Compiler\DependencyAnalysis\TypeMetadataNode.cs (5)
52foreach (TypeDesc typeConstraint in genericParameter.TypeConstraints) 122public static void GetMetadataDependencies(ref DependencyList dependencies, NodeFactory nodeFactory, TypeDesc type, string reason) 137foreach (TypeDesc paramType in pointerType.Signature) 160TypeDesc typeDefinition = type.GetTypeDefinition(); 169foreach (TypeDesc typeArg in type.Instantiation)
Compiler\DependencyAnalysis\VariantInterfaceMethodUseNode.cs (8)
46public static bool IsVariantInterfaceImplementation(NodeFactory factory, TypeDesc providingType, DefType implementedInterface) 57TypeDesc interfaceDefinition = implementedInterface.GetTypeDefinition(); 67TypeDesc variantArgument = implementedInterface.Instantiation[i]; 86TypeDesc elementType = providingType.IsArray ? ((ArrayType)providingType).ElementType : providingType.Instantiation[0]; 99TypeDesc owningType = calledMethod.OwningType; 107TypeDesc owningTypeDefinition = owningType.GetTypeDefinition(); 117TypeDesc variantArgument = owningType.Instantiation[i]; 134TypeDesc elementType = owningType.Instantiation[0];
Compiler\DependencyAnalysis\VTableSliceNode.cs (8)
20protected TypeDesc _type; 22public VTableSliceNode(TypeDesc type) 29protected static MethodDesc[] ComputeSlots(TypeDesc type) 65public TypeDesc Type => _type; 87TypeDesc canonType = _type.ConvertToCanonForm(CanonicalFormKind.Specific); 109public PrecomputedVTableSliceNode(TypeDesc type, MethodDesc[] slots) 144public EagerlyBuiltVTableSliceNode(TypeDesc type) 162public LazilyBuiltVTableSliceNode(TypeDesc type, MethodDesc[] slots = null)
Compiler\DescriptorMarker.cs (8)
106private void MarkAndPreserve(TypeDesc type, XPathNavigator nav, TypePreserve preserve) 176protected override void ProcessType(TypeDesc type, XPathNavigator nav) 236protected override void ProcessField(TypeDesc type, FieldDesc field, XPathNavigator nav) 241protected override void ProcessMethod(TypeDesc type, MethodDesc method, XPathNavigator nav, object? customData) 254private void ProcessMethodIfNotNull(TypeDesc type, MethodDesc method, XPathNavigator nav, object? customData) 262protected override MethodDesc? GetMethod(TypeDesc type, string signature) 272protected override void ProcessEvent(TypeDesc type, EventPseudoDesc @event, XPathNavigator nav, object? customData) 279protected override void ProcessProperty(TypeDesc type, PropertyPseudoDesc property, XPathNavigator nav, object? customData, bool fromSignature)
Compiler\EmptyInteropStubManager.cs (1)
26public override void AddInterestingInteropConstructedTypeDependencies(ref DependencyList dependencies, NodeFactory factory, TypeDesc type)
Compiler\ExternSymbolMappedField.cs (3)
15private readonly TypeDesc _fieldType; 18public ExternSymbolMappedField(TypeDesc fieldType, string symbolName) 30public override TypeDesc FieldType => _fieldType;
Compiler\HardwareIntrinsicILProvider.cs (1)
39TypeDesc owningType = method.OwningType;
Compiler\ILScanner.cs (52)
296private readonly Dictionary<TypeDesc, MethodDesc[]> _vtableSlices = new Dictionary<TypeDesc, MethodDesc[]>(); 319internal override VTableSliceNode GetSlice(TypeDesc type) 370var constructedTypeLookups = new HashSet<TypeDesc>(); 371var metadataTypeLookups = new HashSet<TypeDesc>(); 440if (methodOrType is TypeDesc type) 456private HashSet<TypeDesc> _constructedMethodTables = new HashSet<TypeDesc>(); 457private HashSet<TypeDesc> _metadataMethodTables = new HashSet<TypeDesc>(); 458private HashSet<TypeDesc> _reflectionVisibleGenericDefinitionMethodTables = new HashSet<TypeDesc>(); 459private HashSet<TypeDesc> _canonConstructedMethodTables = new HashSet<TypeDesc>(); 460private HashSet<TypeDesc> _canonConstructedTypes = new HashSet<TypeDesc>(); 461private HashSet<TypeDesc> _unsealedTypes = new HashSet<TypeDesc>(); 462private Dictionary<TypeDesc, HashSet<TypeDesc>> _implementators = new(); 463private HashSet<TypeDesc> _disqualifiedTypes = new(); 480var vtables = new Dictionary<TypeDesc, List<MethodDesc>>(); 481var dynamicInterfaceCastableImplementationTargets = new HashSet<TypeDesc>(); 501TypeDesc type = (node as ConstructedEETypeNode)?.Type; 506TypeDesc canonForm = type.ConvertToCanonForm(CanonicalFormKind.Specific); 576TypeDesc canonType = type.ConvertToCanonForm(CanonicalFormKind.Specific); 577TypeDesc baseType; 601static List<MethodDesc> BuildVTable(NodeFactory factory, TypeDesc currentType, TypeDesc implType, List<MethodDesc> vtable) 645private static bool CanAssumeWholeProgramViewOnTypeUse(NodeFactory factory, TypeDesc implementingType, DefType baseType) 676private void RecordImplementation(TypeDesc type, TypeDesc implType) 680HashSet<TypeDesc> implList; 689public override bool IsEffectivelySealed(TypeDesc type) 692TypeDesc canonType = type.ConvertToCanonForm(CanonicalFormKind.Specific); 751public override bool CanReferenceConstructedMethodTable(TypeDesc type) 758public override bool CanReferenceMetadataMethodTable(TypeDesc type) 765public override bool CanReferenceConstructedTypeOrCanonicalFormOfType(TypeDesc type) 772public override bool IsGenericDefinitionMethodTableReflectionVisible(TypeDesc type) 778public override TypeDesc[] GetImplementingClasses(TypeDesc type) 786if (_implementators.TryGetValue(type, out HashSet<TypeDesc> implementations)) 788TypeDesc[] types; 792types = new TypeDesc[implementations.Count + 1]; 797types = new TypeDesc[implementations.Count]; 800foreach (TypeDesc implementation in implementations) 809public override bool CanHaveDynamicInterfaceImplementations(TypeDesc type) => _canHaveDynamicInterfaceImplementations; 814private readonly HashSet<TypeDesc> _constructedTypes = new HashSet<TypeDesc>(); 825TypeDesc type = eetypeNode.Type; 941private readonly HashSet<TypeDesc> _canonFormsWithCctorChecks = new HashSet<TypeDesc>();
Compiler\InteropStubManager.cs (1)
19public abstract void AddInterestingInteropConstructedTypeDependencies(ref DependencyList dependencies, NodeFactory factory, TypeDesc type);
Compiler\IRootingServiceProvider.cs (5)
16void AddCompilationRoot(TypeDesc type, string reason); 17void AddReflectionRoot(TypeDesc type, string reason); 20void RootThreadStaticBaseForType(TypeDesc type, string reason); 21void RootGCStaticBaseForType(TypeDesc type, string reason); 22void RootNonGCStaticBaseForType(TypeDesc type, string reason);
Compiler\JitHelper.cs (3)
224TypeDesc t = context.GetWellKnownType(WellKnownType.Int64); 231TypeDesc t = context.GetWellKnownType(WellKnownType.UInt64); 350public static string GetNewObjectHelperForType(TypeDesc type)
Compiler\LazyGenericsPolicy.cs (3)
11public abstract bool UsesLazyGenerics(TypeDesc type); 28public sealed override bool UsesLazyGenerics(TypeDesc type) 45public sealed override bool UsesLazyGenerics(TypeDesc type) => false;
Compiler\LibraryInitializers.cs (1)
52TypeDesc containingType = assembly.GetType(LibraryInitializerContainerNamespaceName, LibraryInitializerContainerTypeName, throwIfNotFound: false);
Compiler\LibraryRootProvider.cs (3)
23foreach (TypeDesc type in _module.GetAllTypes()) 50private static void RootMethods(TypeDesc type, string reason, IRootingServiceProvider rootProvider) 100private static void CheckTypeCanBeUsedInSignature(TypeDesc type)
Compiler\Logger.cs (1)
248internal bool ShouldSuppressAnalysisWarningsForRequires(TypeSystemEntity originMember, string requiresAttribute, [NotNullWhen(returnValue: true)] out CustomAttributeValue<TypeDesc>? attribute)
Compiler\Logging\DocumentationSignatureGenerator.PartVisitor.cs (1)
202var typeArgument = type.Instantiation[i];
Compiler\Logging\DocumentationSignatureParser.cs (15)
55public static TypeDesc GetTypeByDocumentationSignature(IAssemblyDesc assembly, string signature) 61return results.Count == 0 ? null : (TypeDesc)results[0]; 75private static string GetSignaturePart(TypeDesc type) 143TypeDesc containingType = null; 173Debug.Assert(result is TypeDesc); 175containingType = result as TypeDesc; 198public static void GetMatchingMembers(string id, ref int index, ModuleDesc module, TypeDesc containingType, string memberName, int arity, MemberType memberTypes, List<TypeSystemEntity> results, bool acceptName = false) 358typeParameterContext is TypeDesc 381var typeContext = typeParameterContext is MethodDesc methodContext 383: typeParameterContext as TypeDesc; 527private static void GetMatchingTypes(ModuleDesc module, TypeDesc declaringType, string name, int arity, List<TypeSystemEntity> results) 576private static void GetMatchingMethods(string id, ref int index, TypeDesc type, string memberName, int arity, List<TypeSystemEntity> results, bool acceptName = false) 633private static void GetMatchingProperties(string id, ref int index, TypeDesc typeDesc, string memberName, List<TypeSystemEntity> results, bool acceptName = false) 679private static void GetMatchingFields(TypeDesc type, string memberName, List<TypeSystemEntity> results) 691private static void GetMatchingEvents(TypeDesc typeDesc, string memberName, List<TypeSystemEntity> results)
Compiler\Logging\MessageContainer.cs (2)
172var declaringType = origin.MemberDefinition switch 174TypeDesc type => type,
Compiler\Logging\UnconditionalSuppressMessageAttributeState.cs (11)
34public CustomAttributeValue<TypeDesc> OriginAttribute { get; } 37public Suppression(SuppressMessageInfo suppressMessageInfo, CustomAttributeValue<TypeDesc> originAttribute, TypeSystemEntity provider) 173private static bool TryDecodeSuppressMessageAttributeData(CustomAttributeValue<TypeDesc> attribute, out SuppressMessageInfo info) 234foreach (CustomAttributeValue<TypeDesc> ca in GetDecodedCustomAttributes(provider, UnconditionalSuppressMessageAttributeNamespace, UnconditionalSuppressMessageAttributeName)) 263IEnumerable<CustomAttributeValue<TypeDesc>> attributes, 267foreach (CustomAttributeValue<TypeDesc> instance in attributes) 306private static IEnumerable<CustomAttributeValue<TypeDesc>> GetDecodedCustomAttributes(TypeSystemEntity entity, string attributeNamespace, string attributeName) 312return Enumerable.Empty<CustomAttributeValue<TypeDesc>>(); 316return Enumerable.Empty<CustomAttributeValue<TypeDesc>>(); 320return Enumerable.Empty<CustomAttributeValue<TypeDesc>>(); 328return Enumerable.Empty<CustomAttributeValue<TypeDesc>>();
Compiler\MainMethodRootProvider.cs (1)
43TypeDesc owningType = _module.GetGlobalModuleType();
Compiler\ManifestResourceBlockingPolicy.cs (1)
207protected override void ProcessType(TypeDesc type, XPathNavigator nav) => throw new System.NotImplementedException();
Compiler\MetadataManager.cs (34)
22using CustomAttributeValue = System.Reflection.Metadata.CustomAttributeValue<Internal.TypeSystem.TypeDesc>; 70private readonly SortedSet<TypeDesc> _typesWithEETypesGenerated = new SortedSet<TypeDesc>(TypeSystemComparer.Instance); 71private readonly SortedSet<TypeDesc> _typesWithConstructedEETypesGenerated = new SortedSet<TypeDesc>(TypeSystemComparer.Instance); 82private readonly SortedSet<TypeDesc> _typeTemplates = new SortedSet<TypeDesc>(TypeSystemComparer.Instance); 86private readonly HashSet<TypeDesc> _usedInterfaces = new HashSet<TypeDesc>(); 376public bool IsTypeInstantiationReflectionVisible(TypeDesc type) 384foreach (TypeDesc instArg in type.Instantiation) 403TypeDesc owningType = method.OwningType; 537TypeDesc owningCanonicalType = field.OwningType.ConvertToCanonForm(CanonicalFormKind.Specific); 571public virtual void GetDependenciesDueToEETypePresence(ref DependencyList dependencies, NodeFactory factory, TypeDesc type) 586protected virtual void GetMetadataDependenciesDueToReflectability(ref DependencyList dependencies, NodeFactory factory, TypeDesc type) 593public virtual void GetConditionalDependenciesDueToEETypePresence(ref CombinedDependencyList dependencies, NodeFactory factory, TypeDesc type, bool allocated) 599public virtual bool HasConditionalDependenciesDueToEETypePresence(TypeDesc type) 622public void GetDependenciesDueToDelegateCreation(ref DependencyList dependencies, NodeFactory factory, TypeDesc delegateType, MethodDesc target) 634public virtual void GetDependenciesDueToDelegateCreation(ref CombinedDependencyList dependencies, NodeFactory factory, TypeDesc delegateType, MethodDesc target) 836foreach (var type in factory.MetadataManager.GetTypesWithEETypes()) 901TypeDesc canonOwningType = field.OwningType.ConvertToCanonForm(CanonicalFormKind.Specific); 949TypeDesc owningTypeToGenerateMetadataFor = methodToGenerateMetadataFor.OwningType; 1081internal bool HasConstructedEEType(TypeDesc type) => _typesWithConstructedEETypesGenerated.Contains(type); 1113public IEnumerable<TypeDesc> GetTypeTemplates() 1138public bool IsInterfaceUsed(TypeDesc type) 1149internal bool TypeGeneratesEEType(TypeDesc type) 1154internal IEnumerable<TypeDesc> GetTypesWithEETypes() 1159internal IEnumerable<TypeDesc> GetTypesWithConstructedEETypes() 1169public bool IsReflectionBlocked(TypeDesc type) 1177TypeDesc parameterType = ((ParameterizedType)type).ParameterType; 1196TypeDesc typeDefinition = type.GetTypeDefinition(); 1214foreach (TypeDesc type in instantiation) 1296protected abstract MetadataCategory GetMetadataCategory(TypeDesc type); 1299public virtual void GetDependenciesDueToAccess(ref DependencyList dependencies, NodeFactory factory, MethodIL methodIL, TypeDesc accessedType)
Compiler\MultiFileCompilationModuleGroup.cs (7)
25public sealed override bool ContainsType(TypeDesc type) 40public sealed override bool ContainsTypeDictionary(TypeDesc type) 77public sealed override bool ShouldReferenceThroughImportTable(TypeDesc type) 93public override bool ShouldProduceFullVTable(TypeDesc type) 98public override bool ShouldPromoteToFullType(TypeDesc type) 103public override bool PresenceOfEETypeImpliesAllMethodsOnType(TypeDesc type) 116TypeDesc owningType = method.OwningType;
Compiler\NativeLibraryInitializerRootProvider.cs (1)
33TypeDesc owningType = _module.GetGlobalModuleType();
Compiler\NodeMangler.cs (7)
21public abstract Utf8String MangledBoxedTypeName(TypeDesc type); 23public abstract Utf8String MethodTable(TypeDesc type); 24public abstract Utf8String GCStatics(TypeDesc type); 25public abstract Utf8String NonGCStatics(TypeDesc type); 26public abstract Utf8String ThreadStatics(TypeDesc type); 27public abstract Utf8String ThreadStaticsIndex(TypeDesc type); 28public abstract Utf8String TypeGenericDictionary(TypeDesc type);
Compiler\ObjectWriter\CodeView\CodeViewTypesBuilder.cs (2)
83public uint GetPrimitiveTypeIndex(TypeDesc type) 386public Utf8String GetMangledName(TypeDesc type)
Compiler\ObjectWriter\Dwarf\DwarfBuilder.cs (2)
265public uint GetPrimitiveTypeIndex(TypeDesc type) 426public Utf8String GetMangledName(TypeDesc type)
Compiler\PreinitializationManager.cs (3)
32public bool HasLazyStaticConstructor(TypeDesc type) 62public bool HasEagerStaticConstructor(TypeDesc type) 79private static bool HasEagerConstructorAttribute(TypeDesc type)
Compiler\ReachabilityInstrumentationProvider.cs (2)
242public override TypeDesc OwningType => _context.GeneratedAssembly.GetGlobalModuleType(); 275System.Array.Empty<TypeDesc>());
Compiler\RootingHelpers.cs (6)
14public static bool TryRootType(IRootingServiceProvider rootProvider, TypeDesc type, bool rootBaseTypes, string reason) 27public static void RootType(IRootingServiceProvider rootProvider, TypeDesc type, bool rootBaseTypes, string reason) 45TypeDesc baseType = type.BaseType; 153TypeDesc owningType = method.OwningType.GetTypeDefinition(); 218TypeDesc owningType = field.OwningType.GetTypeDefinition(); 245public static bool TryGetDependenciesForReflectedType(ref DependencyList dependencies, NodeFactory factory, TypeDesc type, string reason)
Compiler\RootingServiceProvider.cs (6)
43public void AddCompilationRoot(TypeDesc type, string reason) 48public void AddReflectionRoot(TypeDesc type, string reason) 50TypeDesc lookedAtType = type; 86public void RootThreadStaticBaseForType(TypeDesc type, string reason) 101public void RootGCStaticBaseForType(TypeDesc type, string reason) 116public void RootNonGCStaticBaseForType(TypeDesc type, string reason)
Compiler\RuntimeConstructableTypeDependencies.cs (3)
15public static IEETypeNode GetEffectiveTrimTargetType(NodeFactory factory, TypeDesc trimmingTargetType, bool conditionConstructed) 63TypeDesc type = dependencyType.Type; 64TypeDesc canonType = type.ConvertToCanonForm(CanonicalFormKind.Specific);
Compiler\SingleFileCompilationModuleGroup.cs (6)
12public override bool ContainsType(TypeDesc type) 17public override bool ContainsTypeDictionary(TypeDesc type) 46public override bool ShouldProduceFullVTable(TypeDesc type) 51public override bool ShouldPromoteToFullType(TypeDesc type) 56public override bool PresenceOfEETypeImpliesAllMethodsOnType(TypeDesc type) 61public override bool ShouldReferenceThroughImportTable(TypeDesc type)
Compiler\SingleMethodCompilationModuleGroup.cs (6)
42public override bool ContainsType(TypeDesc type) 47public override bool ContainsTypeDictionary(TypeDesc type) 57public override bool ShouldProduceFullVTable(TypeDesc type) 62public override bool ShouldPromoteToFullType(TypeDesc type) 67public override bool PresenceOfEETypeImpliesAllMethodsOnType(TypeDesc type) 72public override bool ShouldReferenceThroughImportTable(TypeDesc type)
Compiler\SubstitutedILProvider.cs (12)
992TypeDesc type = ReadLdToken(ref reader, methodIL, flags); 1023var type1 = (TypeDesc)methodIL.GetObject(analyzer.Token1); 1024var type2 = (TypeDesc)methodIL.GetObject(analyzer.Token2); 1044var knownType = (TypeDesc)methodIL.GetObject(analyzer.Token1); 1087var type = (TypeDesc)methodIL.GetObject(analyzer.Token); 1114private static TypeDesc ReadLdToken(ref ILReader reader, MethodIL methodIL, OpcodeFlags[] flags) 1120TypeDesc t = (TypeDesc)methodIL.GetObject(reader.ReadILToken());
Compiler\SubstitutionProvider.cs (2)
63if (featureSwitchDefinitionAttribute.FixedArguments is not [CustomAttributeTypedArgument<TypeDesc> { Value: string switchName }]) 73if (featureGuardAttribute.FixedArguments is not [CustomAttributeTypedArgument<TypeDesc> { Value: EcmaType featureType }])
Compiler\TypePreinit.cs (60)
44private readonly Dictionary<TypeDesc, RuntimeTypeValue> _internedTypes = new Dictionary<TypeDesc, RuntimeTypeValue>(); 157private ForeignTypeInstance GetOrCreateForeignInstance(TypeDesc type, AllocationSite allocationSite, ReferenceTypeValue data) 231TypeDesc constrainedType = null; 273TypeDesc type = (TypeDesc)methodIL.GetObject(reader.ReadILToken()); 291TypeDesc elementType = (TypeDesc)methodIL.GetObject(reader.ReadILToken()); 497TypeDesc owningType = method.OwningType; 556TypeDesc owningType = ctor.OwningType; 662TypeDesc currentType = owningType; 670TypeDesc fieldType = field.FieldType; 993TypeDesc argType = GetArgType(methodIL.OwningMethod, index); 1013else if (token is TypeDesc type) 1079TypeDesc localType = localTypes[index].Type; 1131TypeDesc token = (TypeDesc)methodIL.GetObject(reader.ReadILToken()); 1585TypeDesc elementType = opcode switch 1594_ => (TypeDesc)methodIL.GetObject(reader.ReadILToken()), 1636TypeDesc elementType = opcode switch 1648_ => (TypeDesc)methodIL.GetObject(reader.ReadILToken()), 1687TypeDesc type = (TypeDesc)methodIL.GetObject(reader.ReadILToken()); 1711TypeDesc type = (TypeDesc)methodIL.GetObject(reader.ReadILToken()); 1734TypeDesc type = opcode switch 1743_ /* ldobj */ => (TypeDesc)methodIL.GetObject(reader.ReadILToken()), 1771TypeDesc type = methodIL.GetObject(reader.ReadILToken()) as TypeDesc; 1806constrainedType = methodIL.GetObject(reader.ReadILToken()) as TypeDesc; 1846private static bool TryGetSpanElementType(TypeDesc type, bool isReadOnlySpan, out MetadataType elementType) 1862private static BaseValueTypeValue NewUninitializedLocationValue(TypeDesc locationType, FieldDesc fieldThatOwnsMemory) 1880else if (ComInterfaceEntryArrayValue.IsCompatible(locationType, out TypeDesc comInterfaceEntryType)) 1971static bool IsSystemType(TypeDesc type) 1979private static TypeDesc GetArgType(MethodDesc method, int index) 2061public void PushFromLocation(TypeDesc locationType, Value value) 2105public Value PopIntoLocation(TypeDesc locationType) 2235TypeDesc Type { get; } 2328public ValueTypeValue(TypeDesc type) 2431public ComInterfaceEntryArrayValue(TypeDesc type, TypeDesc entryType) 2446private static bool IsComInterfaceEntryType(TypeDesc type) 2453public static bool IsCompatible(TypeDesc type, out TypeDesc entryType) 2622public static bool IsCompatible(TypeDesc type) 2739public override bool TryLoad(TypeDesc type, out Value value) 2850public TypeDesc Type { get; } 2852public RuntimeTypeHandleValue(TypeDesc type) 2885public TypeDesc TypeRepresented { get; } 2887public RuntimeTypeValue(TypeDesc type) 3078public virtual bool TryLoad(TypeDesc type, out Value value) 3145public override bool TryLoad(TypeDesc type, out Value value) 3177public TypeDesc Type { get; } 3179protected ReferenceTypeValue(TypeDesc type) { Type = type; } 3217public AllocatedReferenceTypeValue(TypeDesc type, AllocationSite allocationSite) 3254public DelegateInstance(TypeDesc delegateType, MethodDesc methodPointed, ReferenceTypeValue firstParameter, AllocationSite allocationSite) 3438public ForeignTypeInstance(TypeDesc type, AllocationSite allocationSite, ReferenceTypeValue data) 3477public StringInstance(TypeDesc stringType, string value) 3483private static byte[] ConstructStringInstance(TypeDesc stringType, ReadOnlySpan<char> value) 3561public bool TryUnboxAny(TypeDesc type, out Value value)
Compiler\UnixNodeMangler.cs (7)
15public sealed override Utf8String MangledBoxedTypeName(TypeDesc type) 21public sealed override Utf8String MethodTable(TypeDesc type) 33public sealed override Utf8String GCStatics(TypeDesc type) 38public sealed override Utf8String NonGCStatics(TypeDesc type) 43public sealed override Utf8String ThreadStatics(TypeDesc type) 48public sealed override Utf8String ThreadStaticsIndex(TypeDesc type) 53public sealed override Utf8String TypeGenericDictionary(TypeDesc type)
Compiler\UnmanagedEntryPointsRootProvider.cs (3)
122if (!TryGetAssociatedSourceType(method, out TypeDesc associatedSourceType) || associatedSourceType is not null) 136if (!TryGetAssociatedSourceType(method, out TypeDesc associatedSourceType) || associatedSourceType is null) 176private static bool TryGetAssociatedSourceType(EcmaMethod method, out TypeDesc associatedSourceType)
Compiler\UsageBasedInteropStubManager.cs (3)
38public override void AddInterestingInteropConstructedTypeDependencies(ref DependencyList dependencies, NodeFactory factory, TypeDesc type) 59TypeDesc owningType = method.OwningType; 73foreach (TypeDesc type in method.Instantiation)
Compiler\UsageBasedMetadataManager.cs (25)
24using CustomAttributeValue = System.Reflection.Metadata.CustomAttributeValue<Internal.TypeSystem.TypeDesc>; 52private readonly List<TypeDesc> _typesWithForcedEEType = new List<TypeDesc>(); 210protected override MetadataCategory GetMetadataCategory(TypeDesc type) 296protected override void GetMetadataDependenciesDueToReflectability(ref DependencyList dependencies, NodeFactory factory, TypeDesc type) 319TypeDesc elementType = ((ArrayType)type).ElementType; 367foreach (TypeDesc t in mdType.Module.GetAllTypes()) 403public override void GetDependenciesDueToEETypePresence(ref DependencyList dependencies, NodeFactory factory, TypeDesc type) 410public override bool HasConditionalDependenciesDueToEETypePresence(TypeDesc type) 425public override void GetConditionalDependenciesDueToEETypePresence(ref CombinedDependencyList dependencies, NodeFactory factory, TypeDesc type, bool allocated) 562foreach (TypeDesc instArg in method.Instantiation) 570public override void GetDependenciesDueToDelegateCreation(ref CombinedDependencyList dependencies, NodeFactory factory, TypeDesc delegateType, MethodDesc target) 578TypeDesc canonDelegateType = delegateType.ConvertToCanonForm(CanonicalFormKind.Specific); 748TypeDesc fieldOwningTypeNormalized = fieldOwningType.NormalizeInstantiation(); 767public override void GetDependenciesDueToAccess(ref DependencyList dependencies, NodeFactory factory, MethodIL methodIL, TypeDesc accessedType) 796public bool GeneratesAttributeMetadata(TypeDesc attributeType) 852var reflectableTypes = ReflectableEntityBuilder<TypeDesc>.Create(); 860foreach (var constructedType in GetTypesWithEETypes()) 868TypeDesc constructedTypeDefinition = constructedType.GetTypeDefinition(); 1099public HashSet<TypeDesc> RemovedAttributes { get; } 1104RemovedAttributes = new HashSet<TypeDesc>(); 1149private readonly HashSet<TypeDesc> _removedAttributes = new(); 1158private void ProcessAttribute(TypeDesc type, XPathNavigator nav) 1174public static HashSet<TypeDesc> GetRemovedAttributes(Logger logger, TypeSystemContext context, Stream documentStream, ManifestResource resource, ModuleDesc resourceAssembly, string xmlDocumentLocation, IReadOnlyDictionary<string, bool> featureSwitchValues, bool globalAttributeRemoval) 1201protected override void ProcessType(TypeDesc type, XPathNavigator nav)
Compiler\UsageBasedTypeMapManager.cs (13)
32foreach ((TypeDesc typeMapGroup, TypeMapMetadata.Map typeMap) in typeMapState.Maps) 45private static IExternalTypeMapNode GetExternalTypeMapNode(TypeDesc typeMapGroup, IExternalTypeMap map) 52private static IProxyTypeMapNode GetProxyTypeMapNode(TypeDesc typeMapGroup, IProxyTypeMap map) 60private readonly HashSet<TypeDesc> _requestedExternalTypeMaps = []; 61private readonly HashSet<TypeDesc> _requestedProxyTypeMaps = []; 107SortedSet<TypeDesc> generatedMaps = new(TypeSystemComparer.Instance); 113SortedSet<TypeDesc> emptyMapsToGenerate = new SortedSet<TypeDesc>(_requestedExternalTypeMaps, TypeSystemComparer.Instance); 116foreach (var emptyMap in emptyMapsToGenerate) 126SortedSet<TypeDesc> generatedMaps = new(TypeSystemComparer.Instance); 132SortedSet<TypeDesc> emptyMapsToGenerate = new SortedSet<TypeDesc>(_requestedProxyTypeMaps, TypeSystemComparer.Instance); 135foreach (var emptyMap in emptyMapsToGenerate)
Compiler\UserDefinedTypeDescriptor.cs (42)
36public uint GetVariableTypeIndex(TypeDesc type) 44public uint GetStateMachineThisVariableTypeIndex(TypeDesc type) 118TypeDesc fieldType = GetFieldDebugType(fieldDesc); 160public uint GetThisTypeIndex(TypeDesc type) 245private static TypeDesc DebuggerCanonicalize(TypeDesc type) 253private uint GetVariableTypeIndex(TypeDesc type, bool needsCompleteIndex) 313public uint GetTypeIndex(TypeDesc type, bool needsCompleteType) 328private uint GetNewTypeIndex(TypeDesc type, bool needsCompleteType) 355private uint GetPointerTypeIndex(TypeDesc pointeeType) 377private uint GetByRefTypeIndex(TypeDesc pointeeType) 399private uint GetEnumTypeIndex(TypeDesc type) 431private uint GetArrayTypeIndex(TypeDesc type) 506private bool ShouldUseCanonicalTypeRecord(TypeDesc type) 511static int GetGenericDepth(TypeDesc type) 516foreach (TypeDesc instantiationType in type.Instantiation) 531private TypeDesc GetDebugType(TypeDesc type) 547private TypeDesc GetFieldDebugType(FieldDesc field) 552private uint GetClassTypeIndex(TypeDesc type, bool needsCompleteType) 554TypeDesc debugType = GetDebugType(type); 635TypeDesc fieldType = GetFieldDebugType(fieldDesc); 847private uint GetPrimitiveTypeIndex(TypeDesc type) 863private Dictionary<TypeDesc, uint> _knownTypes = new Dictionary<TypeDesc, uint>(); 864private Dictionary<TypeDesc, uint> _completeKnownTypes = new Dictionary<TypeDesc, uint>(); 865private Dictionary<TypeDesc, uint> _knownReferenceWrappedTypes = new Dictionary<TypeDesc, uint>(); 866private Dictionary<TypeDesc, uint> _knownStateMachineThisTypes = new Dictionary<TypeDesc, uint>(); 867private Dictionary<TypeDesc, uint> _pointerTypes = new Dictionary<TypeDesc, uint>(); 868private Dictionary<TypeDesc, uint> _enumTypes = new Dictionary<TypeDesc, uint>(); 869private Dictionary<TypeDesc, uint> _byRefTypes = new Dictionary<TypeDesc, uint>(); 870private Dictionary<TypeDesc, uint> _thisTypes = new Dictionary<TypeDesc, uint>(); 871private Dictionary<TypeDesc, uint> _primitiveTypes = new Dictionary<TypeDesc, uint>(); 875public ICollection<KeyValuePair<TypeDesc, uint>> CompleteKnownTypes => _completeKnownTypes;
Compiler\VirtualMethodCallHelper.cs (9)
13public static int GetDefaultInterfaceMethodSlot(NodeFactory factory, MethodDesc method, TypeDesc implType, DefType interfaceOnDefinition, bool countDictionarySlots = true) 35public static int GetVirtualMethodSlot(NodeFactory factory, MethodDesc method, TypeDesc implType, bool countDictionarySlots = true) 62TypeDesc owningType = method.OwningType; 92private static int GetNumberOfSlotsInCurrentType(NodeFactory factory, TypeDesc implType, bool countDictionarySlots) 121private static int GetNumberOfBaseSlots(NodeFactory factory, TypeDesc owningType, bool countDictionarySlots) 125TypeDesc baseType = owningType.BaseType; 126TypeDesc templateBaseType = owningType.ConvertToCanonForm(CanonicalFormKind.Specific).BaseType; 181public static int GetGenericDictionarySlot(NodeFactory factory, TypeDesc type) 191public static bool HasGenericDictionarySlot(this TypeDesc type)
Compiler\VTableSliceProvider.cs (2)
14internal abstract VTableSliceNode GetSlice(TypeDesc type); 22internal override VTableSliceNode GetSlice(TypeDesc type)
Compiler\WindowsNodeMangler.cs (9)
29public sealed override Utf8String MangledBoxedTypeName(TypeDesc type) 35public sealed override Utf8String MethodTable(TypeDesc type) 47private Utf8String CreateStaticFieldName(TypeDesc type, ReadOnlySpan<byte> fieldName) 52public sealed override Utf8String GCStatics(TypeDesc type) 57public sealed override Utf8String NonGCStatics(TypeDesc type) 62public sealed override Utf8String ThreadStatics(TypeDesc type) 71public sealed override Utf8String ThreadStaticsIndex(TypeDesc type) 76public sealed override Utf8String TypeGenericDictionary(TypeDesc type) 112foreach (var p in method.Signature)
IL\ILImporter.Scanner.cs (50)
67private TypeDesc _constrained; 135TypeDesc owningType = _canonMethod.OwningType; 214private ISymbolNode GetGenericLookupHelper(ReadyToRunHelperId helperId, TypeDesc type) 274TypeDesc catchType = (TypeDesc)_methodIL.GetObject(region.ClassToken); 320TypeDesc type = (TypeDesc)_methodIL.GetObject(token); 613TypeDesc owningType = runtimeDeterminedMethod.OwningType; 667TypeDesc type = method.Instantiation[0]; 724TypeDesc exactType = method.OwningType; 739TypeDesc constrained = _constrained; 834TypeDesc constraintForDelegate = !resolvedConstraint || forceUseRuntimeLookup ? _constrained : null; 1061TypeDesc canonDelegateType = ctorMethod.OwningType.ConvertToCanonForm(CanonicalFormKind.Specific); 1107TypeDesc awaiterType = runtimeDeterminedMethod.Instantiation[0]; 1191TypeDesc typeEqualityCheckType = (TypeDesc)_canonMethodIL.GetObject(_typeEqualityPatternAnalyzer.Token1); 1211TypeDesc isinstCheckType = (TypeDesc)_canonMethodIL.GetObject(_isInstCheckPatternAnalyzer.Token); 1253TypeDesc type = (TypeDesc)_methodIL.GetObject(token); 1299_factory.MetadataManager.GetDependenciesDueToAccess(ref _dependencies, _factory, _methodIL, (TypeDesc)_canonMethodIL.GetObject(token)); 1305var type = (TypeDesc)_methodIL.GetObject(token); 1320if (obj is TypeDesc type) 1339_factory.MetadataManager.GetDependenciesDueToAccess(ref _dependencies, _factory, _methodIL, (TypeDesc)_canonMethodIL.GetObject(token)); 1419_constrained = (TypeDesc)_methodIL.GetObject(token); 1451TypeDesc canonFieldOwningType = fieldOwningType.ConvertToCanonForm(CanonicalFormKind.Specific); 1500TypeDesc owningType = field.OwningType; 1534var type = (TypeDesc)_methodIL.GetObject(token); 1550var type2 = (TypeDesc)_methodIL.GetObject(reader.ReadILToken()); 1566type2 = (TypeDesc)_methodIL.GetObject(reader.ReadILToken()); 1579private void AddBoxingDependencies(TypeDesc type, string reason) 1588TypeDesc typeForAccessCheck = type.IsRuntimeDeterminedSubtype ? type.ConvertToCanonForm(CanonicalFormKind.Specific) : type; 1617var elementType = (TypeDesc)_methodIL.GetObject(token); 1618_factory.MetadataManager.GetDependenciesDueToAccess(ref _dependencies, _factory, _methodIL, (TypeDesc)_canonMethodIL.GetObject(token)); 1637private void ImportLoadElement(TypeDesc elementType) 1644ImportStoreElement((TypeDesc)_methodIL.GetObject(token)); 1647private void ImportStoreElement(TypeDesc elementType) 1659TypeDesc elementType = (TypeDesc)_methodIL.GetObject(token); 2045TypeDesc taskReturnType = taskReturningMethod.Signature.ReturnType; 2053TypeDesc returnType = runtimeDeterminedCaller.Signature.ReturnType; 2057TypeDesc parameterType = isValueTask 2065TypeDesc signatureVariable = context.GetSignatureVariable(0, method: true); 2066TypeDesc parameterType = isValueTask 2109private static void ImportLoadIndirect(TypeDesc type) { } 2111private static void ImportStoreIndirect(TypeDesc type) { }
IL\RvaIntrinsicPatternAnalyzer.cs (5)
149TypeDesc elementType; 156elementType = (TypeDesc)methodIL.GetObject(reader.PeekILToken()); 225|| !IsRuntimeHelpersCreateSpan(method, out TypeDesc elementType)) 279private static bool TryGetInitializeArrayElementSize(TypeDesc elementType, out int elementSize) 335private static bool IsRuntimeHelpersCreateSpan(MethodDesc method, out TypeDesc elementType)
IL\Stubs\StartupCode\NativeLibraryStartupMethod.cs (4)
18private TypeDesc _owningType; 22public NativeLibraryStartupMethod(TypeDesc owningType, IReadOnlyCollection<MethodDesc> libraryInitializers) 36public override TypeDesc OwningType 93System.Array.Empty<TypeDesc>());
IL\Stubs\StartupCode\StartupCodeMainMethod.cs (6)
19private TypeDesc _owningType; 25public StartupCodeMainMethod(TypeDesc owningType, MethodDesc mainMethod, IReadOnlyCollection<MethodDesc> libraryInitializers, bool generateLibraryAndModuleInitializers) 41public override TypeDesc OwningType 181new TypeDesc[2] { 210public MainMethodWrapper(TypeDesc owningType, MethodDesc mainMethod) 229public override TypeDesc OwningType
IL\TypeEqualityPatternAnalyzer.cs (1)
143static bool IsSystemType(TypeDesc t)
parent\parent\Common\Compiler\AsyncContinuationType.cs (1)
57protected override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
parent\parent\Common\Compiler\AsyncMethodVariant.cs (1)
38TypeDesc md = signature.ReturnType;
parent\parent\Common\Compiler\CachingVirtualMethodAlgorithm.cs (7)
15private readonly ConcurrentDictionary<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]> _vtableCache 16= new ConcurrentDictionary<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]>(); 18private readonly Func<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]> _vtableCreator; 23private (MethodDesc Slot, MethodDesc Implementation)[] ComputeVtable(TypeDesc type) 38public override IEnumerable<MethodDesc> ComputeAllVirtualSlots(TypeDesc type) 46static IEnumerable<MethodDesc> GetCachedSlots(CachingVirtualMethodAlgorithm thisObj, TypeDesc type) 55public override MethodDesc FindVirtualFunctionTargetMethodOnObjectType(MethodDesc targetMethod, TypeDesc objectType)
parent\parent\Common\Compiler\CompilationModuleGroup.cs (1)
13public abstract bool ContainsType(TypeDesc type);
parent\parent\Common\Compiler\CompilerTypeSystemContext.Async.cs (16)
16public static IEnumerable<MethodDesc> GetAllMethodsAndAsyncVariants(this TypeDesc type) 55public override MethodDesc FindVirtualFunctionTargetMethodOnObjectType(MethodDesc targetMethod, TypeDesc objectType) 65public override DefaultInterfaceMethodResolution ResolveInterfaceMethodToDefaultImplementationOnType(MethodDesc interfaceMethod, TypeDesc currentType, out MethodDesc impl) 75public override MethodDesc ResolveInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 84public override MethodDesc ResolveInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 93public override DefaultInterfaceMethodResolution ResolveVariantInterfaceMethodToDefaultImplementationOnType(MethodDesc interfaceMethod, TypeDesc currentType, out MethodDesc impl) 102public override MethodDesc ResolveVariantInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 111public override MethodDesc ResolveVariantInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 121public override IEnumerable<MethodDesc> ComputeAllVirtualSlots(TypeDesc type) 180TypeDesc owningType = asyncVariantMethod.OwningType; 199TypeDesc owningType = taskReturningMethod.OwningType; 219TypeDesc owningType = returnDroppingThunk.OwningType; 251TypeDesc owningType = asyncVariantMethod.OwningType; 273public AsyncResumptionStub GetAsyncResumptionStub(MethodDesc targetMethod, TypeDesc owningType) 281public readonly TypeDesc OwningType; 283public AsyncResumptionStubKey(MethodDesc targetMethod, TypeDesc owningType)
parent\parent\Common\Compiler\CompilerTypeSystemContext.BoxedTypes.cs (8)
60TypeDesc owningType = targetMethod.OwningType; 87TypeDesc owningType = targetMethod.OwningType; 253TypeDesc IPrefixMangledType.BaseType => ValueTypeRepresented; 319protected override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer) 391public override TypeDesc OwningType => _owningType; 504public override TypeDesc OwningType => _owningType; 570TypeDesc owner = _targetMethod.OwningType; 581var inst = new TypeDesc[methodToInstantiate.Instantiation.Length];
parent\parent\Common\Compiler\CompilerTypeSystemContext.cs (5)
285public override VirtualMethodAlgorithm GetVirtualMethodAlgorithmForType(TypeDesc type) 302protected override TypeDesc ConvertToCanon(TypeDesc typeToConvert, CanonicalFormKind kind) 311protected override TypeDesc ConvertToCanon(TypeDesc typeToConvert, ref CanonicalFormKind kind)
parent\parent\Common\Compiler\CompilerTypeSystemContext.Validation.cs (28)
19private static List<TypeDesc> EmptyList = new List<TypeDesc>(); 33public void EnsureLoadableType(TypeDesc type) 93public TypeDesc TypeInLoadabilityCheck; 95public List<TypeDesc> OtherTypesToMarkAsSuccessfullyLoaded; 97public void AddToOtherTypesToMarkAsSuccessfullyLoaded(TypeDesc type) 101OtherTypesToMarkAsSuccessfullyLoaded = new List<TypeDesc>(); 110private static bool PushTypeLoadInProgress(TypeDesc type) 170foreach (var typeToMove in t_typeLoadCheckInProgressStack[typeCheckDepth].OtherTypesToMarkAsSuccessfullyLoaded) 198foreach (var type in typeLoadabilityCheck.OtherTypesToMarkAsSuccessfullyLoaded) 208TypeDesc owningType = method.OwningType; 215foreach (var instType in method.Instantiation) 230foreach (TypeDesc p in sig) 235private sealed class ValidTypeHashTable : LockFreeReaderHashtable<TypeDesc, TypeDesc> 237protected override bool CompareKeyToValue(TypeDesc key, TypeDesc value) => key == value; 238protected override bool CompareValueToValue(TypeDesc value1, TypeDesc value2) => value1 == value2; 239protected override TypeDesc CreateValueFromKey(TypeDesc key) => key; 240protected override int GetKeyHashCode(TypeDesc key) => key.GetHashCode(); 241protected override int GetValueHashCode(TypeDesc value) => value.GetHashCode(); 244private static TypeDesc EnsureLoadableTypeUncached(TypeDesc type) 263TypeDesc parameterType = parameterizedType.ParameterType; 314foreach (TypeDesc param in functionPointer) 373foreach (TypeDesc typeArg in defType.Instantiation)
parent\parent\Common\Compiler\CompilerTypeSystemContext.Wasm.cs (26)
16private readonly Dictionary<int, TypeDesc> _structsBySize = new Dictionary<int, TypeDesc>(); 17private readonly Dictionary<int, TypeDesc> _alignedStructsBySize = new Dictionary<int, TypeDesc>(); 18private readonly Dictionary<int, TypeDesc> _returnStructsBySize = new Dictionary<int, TypeDesc>(); 19private volatile TypeDesc _cachedEmptyStruct; 20private volatile TypeDesc _wasmV128Type; 21private volatile TypeDesc _wasmInt128Type; 22private volatile TypeDesc _wasmV256Type; 23private volatile TypeDesc _wasmV512Type; 30public TypeDesc WasmV128Type 34TypeDesc type = _wasmV128Type; 56public TypeDesc GetWasmElevatedType(char slot, int elevation) 58TypeDesc type = (slot, elevation) switch 74TypeDesc InstantiateOverByte(ReadOnlySpan<byte> name) => 83public TypeDesc CachedEmptyStruct => _cachedEmptyStruct; 88public void CacheEmptyStruct(TypeDesc type) 99public void CacheStruct(TypeDesc type, bool requiresAlignedSlot) 124public void CacheReturnStructBySize(TypeDesc type) 140public TypeDesc GetCachedReturnStructOfSize(int size) 144if (_returnStructsBySize.TryGetValue(size, out TypeDesc result)) 153public TypeDesc GetCachedStructOfSize(int size) 157if (_structsBySize.TryGetValue(size, out TypeDesc result)) 164public TypeDesc GetCachedAlignedStructOfSize(int size) 168if (_alignedStructsBySize.TryGetValue(size, out TypeDesc result))
parent\parent\Common\Compiler\Dataflow\DynamicallyAccessedMembersBinder.cs (16)
19public static IEnumerable<TypeSystemEntity> GetDynamicallyAccessedMembers(this TypeDesc typeDefinition, DynamicallyAccessedMemberTypes memberTypes, bool declaredOnly = false) 140public static IEnumerable<MethodDesc> GetConstructorsOnType(this TypeDesc type, Func<MethodDesc, bool> filter, BindingFlags? bindingFlags = null) 172public static IEnumerable<MethodDesc> GetMethodsOnTypeHierarchy(this TypeDesc type, Func<MethodDesc, bool> filter, BindingFlags? bindingFlags = null) 225public static IEnumerable<FieldDesc> GetFieldsOnTypeHierarchy(this TypeDesc type, Func<FieldDesc, bool> filter, BindingFlags? bindingFlags = BindingFlags.Default) 266public static IEnumerable<MetadataType> GetNestedTypesOnType(this TypeDesc type, Func<MetadataType, bool> filter, BindingFlags? bindingFlags = BindingFlags.Default) 292public static IEnumerable<PropertyPseudoDesc> GetPropertiesOnTypeHierarchy(this TypeDesc type, Func<PropertyPseudoDesc, bool> filter, BindingFlags? bindingFlags = BindingFlags.Default) 360public static IEnumerable<EventPseudoDesc> GetEventsOnTypeHierarchy(this TypeDesc type, Func<EventPseudoDesc, bool> filter, BindingFlags? bindingFlags = BindingFlags.Default) 430public static IEnumerable<DefType> GetAllInterfaceImplementations(this TypeDesc type, bool declaredOnly) 452public static void GetAllOnType(this TypeDesc type, bool declaredOnly, List<TypeSystemEntity> members) => GetAllOnType(type, declaredOnly, members, new HashSet<TypeDesc>()); 454private static void GetAllOnType(TypeDesc type, bool declaredOnly, List<TypeSystemEntity> members, HashSet<TypeDesc> types) 503private static DefType TryGetBaseType(this TypeDesc type) 515private static IEnumerable<T> ApplyIncludeInherited<T>(this TypeDesc type, Func<TypeDesc, IEnumerable<T>> selector, bool includeBases) 529private static DefType[] TryGetExplicitlyImplementedInterfaces(this TypeDesc type)
parent\parent\Common\Compiler\Dataflow\EcmaExtensions.cs (2)
102public static bool IsByRefOrPointer(this TypeDesc type) 105public static TypeDesc GetOwningType(this TypeSystemEntity entity)
parent\parent\Common\Compiler\Dataflow\GenericParameterProxy.cs (1)
20foreach (TypeDesc constraint in GenericParameter.TypeConstraints)
parent\parent\Common\Compiler\Dataflow\MethodProxy.cs (1)
61foreach (TypeDesc? genericParameter in methodDef.Instantiation)
parent\parent\Common\Compiler\Dataflow\ParameterProxy.cs (1)
16public TypeDesc ParameterType => IsImplicitThis
parent\parent\Common\Compiler\Dataflow\TypeExtensions.cs (3)
17public static bool IsTypeOf(this TypeDesc type, string ns, string name) 22public static bool IsTypeOf(this TypeDesc type, string fullTypeName) 42public static bool IsTypeOf(this TypeDesc type, ILLinkSharedWellKnownType wellKnownType) =>
parent\parent\Common\Compiler\Dataflow\TypeProxy.cs (5)
15public TypeProxy(TypeDesc type) => Type = type; 17public static implicit operator TypeProxy(TypeDesc type) => new(type); 21var typeDef = Type.GetTypeDefinition(); 27foreach (var genericParameter in typeDef.Instantiation) 35public TypeDesc Type { get; }
parent\parent\Common\Compiler\DependencyAnalysis\GVMDependenciesNode.cs (6)
68TypeDesc methodOwningType = _method.OwningType; 83TypeDesc methodOwningType = _method.OwningType; 105TypeDesc potentialOverrideType = typeNode.Type; 132TypeDesc potentialOverrideDefinition = potentialOverrideType.GetTypeDefinition(); 217TypeDesc overrideTypeCur = potentialOverrideType; 261TypeDesc currentType = potentialOverrideType;
parent\parent\Common\Compiler\DevirtualizationManager.cs (11)
21public virtual bool IsEffectivelySealed(TypeDesc type) 56public MethodDesc ResolveVirtualMethod(MethodDesc declMethod, TypeDesc implType, out CORINFO_DEVIRTUALIZATION_DETAIL devirtualizationDetail) 128foreach (TypeDesc iface in implType.RuntimeInterfaces) 181TypeDesc checkType; 233public virtual bool IsGenericDefinitionMethodTableReflectionVisible(TypeDesc type) => true; 239public virtual bool CanReferenceConstructedMethodTable(TypeDesc type) => true; 245public virtual bool CanReferenceMetadataMethodTable(TypeDesc type) => true; 252public virtual bool CanReferenceConstructedTypeOrCanonicalFormOfType(TypeDesc type) => true; 254public virtual TypeDesc[] GetImplementingClasses(TypeDesc type) => null; 256public virtual bool CanHaveDynamicInterfaceImplementations(TypeDesc type) => true;
parent\parent\Common\Compiler\DisplayNameHelpers.cs (4)
20TypeDesc type => type.GetDisplayName(), 92TypeDesc instantiatedType = method.Signature[i].InstantiateSignature(method.OwningType.Instantiation, method.Instantiation); 141public static string GetDisplayName(this TypeDesc type) 146public static string GetDisplayNameWithoutNamespace(this TypeDesc type)
parent\parent\Common\Compiler\HardwareIntrinsicHelpers.cs (1)
21TypeDesc owningType = method.OwningType;
parent\parent\Common\Compiler\IExternalTypeMapNode.cs (1)
15TypeDesc TypeMapGroup { get; }
parent\parent\Common\Compiler\INativeFormatTypeReferenceProvider.cs (1)
11internal Vertex EncodeReferenceToType(NativeWriter writer, TypeDesc type, ModuleDesc module);
parent\parent\Common\Compiler\InstructionSetSupport.cs (1)
58public static string GetHardwareIntrinsicId(TargetArchitecture architecture, TypeDesc potentialTypeDesc)
parent\parent\Common\Compiler\IProxyTypeMapNode.cs (1)
15TypeDesc TypeMapGroup { get; }
parent\parent\Common\Compiler\MethodExtensions.cs (5)
81public static TypeDesc GetUnmanagedCallersOnlyAssociatedSourceType(this EcmaMethod This) 92return (TypeDesc)argument.Value; 112TypeDesc owningType = method.OwningType; 148TypeDesc owningType = method.OwningType; 159TypeDesc ret = method.ReturnType;
parent\parent\Common\Compiler\NameMangler.cs (1)
30public abstract Utf8String GetMangledTypeName(TypeDesc type);
parent\parent\Common\Compiler\NativeAotNameMangler.cs (5)
131private Dictionary<TypeDesc, Utf8String> _mangledTypeNames = new Dictionary<TypeDesc, Utf8String>(); 179public override Utf8String GetMangledTypeName(TypeDesc type) 285private Utf8String ComputeMangledTypeName(TypeDesc type) 418var typeDefinition = type.GetTypeDefinition();
parent\parent\Common\Compiler\ProcessLinkerXmlBase.cs (21)
240private void MatchType(TypeDesc type, Regex regex, XPathNavigator nav) 252foreach (TypeDesc type in assembly.GetAllTypes()) 258protected abstract void ProcessType(TypeDesc type, XPathNavigator nav); 260protected void ProcessTypeChildren(TypeDesc type, XPathNavigator nav, object? customData = null) 271private void ProcessSelectedFields(XPathNavigator nav, TypeDesc type) 281protected virtual void ProcessField(TypeDesc type, XPathNavigator nav) 321protected static FieldDesc? GetField(TypeDesc type, string signature) 335protected virtual void ProcessField(TypeDesc type, FieldDesc field, XPathNavigator nav) { } 337private void ProcessSelectedMethods(XPathNavigator nav, TypeDesc type, object? customData) 347protected virtual void ProcessMethod(TypeDesc type, XPathNavigator nav, object? customData) 385protected virtual MethodDesc? GetMethod(TypeDesc type, string signature) => null; 387protected virtual void ProcessMethod(TypeDesc type, MethodDesc method, XPathNavigator nav, object? customData) { } 389private void ProcessSelectedEvents(XPathNavigator nav, TypeDesc type, object? customData) 399protected virtual void ProcessEvent(TypeDesc type, XPathNavigator nav, object? customData) 439protected static EventPseudoDesc? GetEvent(TypeDesc type, string signature) 447protected virtual void ProcessEvent(TypeDesc type, EventPseudoDesc @event, XPathNavigator nav, object? customData) { } 449private void ProcessSelectedProperties(XPathNavigator nav, TypeDesc type, object? customData) 459protected virtual void ProcessProperty(TypeDesc type, XPathNavigator nav, object? customData) 495protected static PropertyPseudoDesc? GetProperty(TypeDesc type, string signature) 503protected virtual void ProcessProperty(TypeDesc type, PropertyPseudoDesc property, XPathNavigator nav, object? customData, bool fromSignature) { } 615var parameter = type.Signature[i];
parent\parent\Common\Compiler\ProxyTypeMapObjectNode.cs (1)
41TypeDesc typeMapGroup = proxyTypeMap.TypeMapGroup;
parent\parent\Common\Compiler\TypeExtensions.cs (45)
15public static bool IsSealed(this TypeDesc type) 30public static DefType GetClosestDefType(this TypeDesc type) 106public static bool IsCanonicalDefinitionType(this TypeDesc type, CanonicalFormKind kind) 114public static bool IsGenericDepthGreaterThan(this TypeDesc type, int depth) 119foreach (TypeDesc instantiationType in type.Instantiation) 138foreach (TypeDesc type in method.Instantiation) 151public static bool IsArrayTypeWithoutGenericInterfaces(this TypeDesc type) 157TypeDesc elementType = arrayType.ElementType; 161public static bool? CompareTypesForEquality(TypeDesc type1, TypeDesc type2) 177static bool AreGuaranteedToRepresentDifferentTypes(TypeDesc type1, TypeDesc type2) 227public static TypeDesc MergeTypesToCommonParent(TypeDesc ta, TypeDesc tb) 305for (TypeDesc searchType = ta; searchType != null; searchType = searchType.BaseType) 310for (TypeDesc searchType = tb; searchType != null; searchType = searchType.BaseType) 342private static TypeDesc MergeArrayTypesToCommonParent(ArrayType ta, ArrayType tb) 352TypeDesc taElem = ta.ElementType; 353TypeDesc tbElem = tb.ElementType; 356TypeDesc mergeElem; 394private static bool ImplementsEquivalentInterface(this TypeDesc type, TypeDesc interfaceType) 407public static MethodDesc TryResolveConstraintMethodApprox(this TypeDesc constrainedType, TypeDesc interfaceType, MethodDesc interfaceMethod, out bool forceRuntimeLookup) 419public static MethodDesc TryResolveConstraintMethodApprox(this TypeDesc constrainedType, TypeDesc interfaceType, MethodDesc interfaceMethod, out bool forceRuntimeLookup, ref DefaultInterfaceMethodResolution staticResolution) 438foreach (TypeDesc arg in methodInstantiation) 457TypeDesc interfaceTypeCanonical = interfaceType.ConvertToCanonForm(CanonicalFormKind.Specific); 504TypeDesc canonType = constrainedType.ConvertToCanonForm(CanonicalFormKind.Specific); 650private static TypeDesc MergeClassWithInterface(TypeDesc type, TypeDesc interfaceType) 678public static TypeDesc NormalizeInstantiation(this TypeDesc thisType) 688TypeDesc[] resultArray = new TypeDesc[inst.Length]; 691TypeDesc instArg = GetTypeThatMeetsConstraints((GenericParameterDesc)inst[i], allowCanon); 700private static TypeDesc GetTypeThatMeetsConstraints(GenericParameterDesc genericParam, bool allowCanon) 716foreach (var c in genericParam.TypeConstraints) 732TypeDesc constrainedType = null; 733foreach (var c in genericParam.TypeConstraints) 756static bool HasStaticVirtualMethods(TypeDesc type) 773foreach (var arg in instantiation) 838TypeDesc firstFieldElementType = firstField.FieldType;
parent\parent\Common\Compiler\TypeMapMetadata.cs (41)
29public TypeWithSerializedName(TypeDesc type, string serializedName) 35public TypeDesc Type { get; } 79TypeDesc type, 81TypeDesc trimmingType, 92public TypeDesc Type { get; } 94public TypeDesc TrimmingType { get; } 101public ProxyTypeMapEntry(TypeDesc type, string serializedSourceTypeName, string serializedTypeName, ModuleDesc declaringModule) 109public TypeDesc Type { get; } 115private static TypeMapAttributeKind LookupTypeMapType(TypeDesc attrType) 138IReadOnlyDictionary<TypeDesc, ProxyTypeMapEntry> TypeMap { get; } 146private readonly TypeDesc _typeMapGroup; 149public ThrowingMethodStub(TypeDesc owningType, TypeDesc typeMapGroup, bool externalTypeMap, TypeSystemException ex) 179public override TypeDesc OwningType { get; } 186private readonly Dictionary<TypeDesc, ProxyTypeMapEntry> _associatedTypeMap = []; 192public Map(TypeDesc typeMapGroup) 197public TypeDesc TypeMapGroup { get; } 208TypeDesc type, 210TypeDesc associatedType, 223TypeDesc type, 225TypeDesc trimmingTarget, 271foreach (KeyValuePair<TypeDesc, ProxyTypeMapEntry> kvp in pendingMap._associatedTypeMap) 348IReadOnlyDictionary<TypeDesc, ProxyTypeMapEntry> IProxyTypeMap.TypeMap => _associatedTypeMap; 353public static readonly TypeMapMetadata Empty = new TypeMapMetadata(new Dictionary<TypeDesc, Map>(), "No type maps", null); 355private readonly IReadOnlyDictionary<TypeDesc, Map> _states; 357private TypeMapMetadata(IReadOnlyDictionary<TypeDesc, Map> states, string diagnosticName, ModuleDesc associatedModule) 366internal IEnumerable<KeyValuePair<TypeDesc, Map>> Maps => _states; 374Dictionary<TypeDesc, Map> typeMapStates = []; 378Dictionary<(EcmaAssembly assembly, TypeDesc typeMapGroup), (TypeDesc scannedDuringGroup, Map map)> pendingMaps = []; 379HashSet<(EcmaAssembly assembly, TypeDesc typeMapGroup)> scannedAssemblies = []; 381Queue<(EcmaAssembly assembly, TypeDesc typeMapGroup)> assembliesToScan = []; 386(EcmaAssembly currentAssembly, TypeDesc currentTypeMapGroup) = assembliesToScan.Dequeue(); 430TypeDesc type = (TypeDesc)currentAssembly.GetObject(attributeType, NotFoundBehavior.ReturnNull); 445TypeDesc typeMapGroup = type.Instantiation[0]; 566{ Value: TypeWithSerializedName { Type: TypeDesc targetType, SerializedName: string serializedTargetTypeName } } 582{ Value: TypeWithSerializedName { Type: TypeDesc targetType, SerializedName: string serializedTargetTypeName } }, 583{ Value: TypeWithSerializedName { Type: TypeDesc trimTargetType, SerializedName: string serializedTrimTargetTypeName } } 608{ Value: TypeWithSerializedName { Type: TypeDesc type, SerializedName: string serializedTypeName } }, 609{ Value: TypeWithSerializedName { Type: TypeDesc associatedType, SerializedName: string serializedAssociatedTypeName } }
parent\parent\Common\Compiler\VectorFieldLayoutAlgorithm.cs (1)
178public static bool IsSupportedVectorBaseType(TypeDesc elementType)
parent\parent\Common\Internal\Runtime\EETypeBuilderHelpers.cs (7)
13private static EETypeElementType ComputeEETypeElementType(TypeDesc type) 45public static uint ComputeFlags(TypeDesc type) 90var arrayElementType = ((ArrayType)type).ElementType; 108public static int ComputeBaseSize(TypeDesc type) 184public static ushort ComputeFlagsEx(TypeDesc type) 267private static bool HasCriticalFinalizer(TypeDesc type) 287private static bool IsTrackedReferenceWithFinalizer(TypeDesc type)
parent\parent\Common\Internal\Runtime\GCDescEncoder.cs (4)
19public static int GetGCDescSize(TypeDesc type) 23TypeDesc elementType = ((ArrayType)type).ElementType; 63public static void EncodeGCDesc<T>(ref T builder, TypeDesc type) 70TypeDesc elementType = ((ArrayType)type).ElementType;
parent\parent\Common\JitInterface\CorInfoInstructionSet.cs (1)
1507public static InstructionSet LookupPlatformIntrinsicInstructionSet(TargetArchitecture targetArch, TypeDesc intrinsicType)
parent\parent\Common\JitInterface\WasmLowering.cs (26)
24TypeDesc[] arguments = new TypeDesc[signature.Length]; 40public static TypeDesc LowerToAbiType(TypeDesc type) => LowerToAbiType(type, out _); 42private static TypeDesc LowerToAbiType(TypeDesc type, out TypeDesc multiSegmentType) 94TypeDesc firstFieldElementType = firstField.FieldType; 140public static bool TryGetMultiSegmentLayout(TypeDesc type, out WasmValueType slotType, out int slotCount) 146LowerToAbiType(type, out TypeDesc multiSegmentType); 169private static bool IsMultiSegmentType(TypeDesc type) 220private static WasmValueType? GetSlotType(TypeDesc type) 299private static bool IsWasmV128Type(TypeDesc type) 326public static WasmValueType LowerType(TypeDesc type) 335TypeDesc abiType = LowerToAbiType(type); 388public static bool IsEmptyStruct(TypeDesc type) => false; 405private static TypeDesc RaiseSigChar(char c, TypeSystemContext context) => c switch 450TypeDesc returnType; 468List<TypeDesc> parameters = new List<TypeDesc>(); 508TypeDesc emptyStruct = ((CompilerTypeSystemContext)context).CachedEmptyStruct; 524TypeDesc cachedStruct = isAlignedStruct 661TypeDesc returnType = signature.ReturnType; 669TypeDesc loweredReturnType = LowerToAbiType(returnType); 764TypeDesc paramType = signature[i]; 765TypeDesc loweredParamType = LowerToAbiType(paramType);
parent\parent\Common\TypeSystem\IL\DelegateInfo.cs (6)
20private readonly TypeDesc _delegateType; 98public TypeDesc Type 106public DelegateInfo(TypeDesc delegateType, DelegateFeature features) 161TypeDesc firstParam = signature[0]; 191TypeDesc paramType = signature[i]; 199TypeDesc returnType = signature.ReturnType;
parent\parent\Common\TypeSystem\IL\HelperExtensions.cs (2)
74public static MethodDesc GetKnownMethod(this TypeDesc type, ReadOnlySpan<byte> name, MethodSignature signature) 89public static FieldDesc GetKnownField(this TypeDesc type, ReadOnlySpan<byte> name)
parent\parent\Common\TypeSystem\IL\NativeAotILProvider.cs (10)
31TypeDesc owningType = method.OwningType; 109&& method.Instantiation[0] is TypeDesc activatedType 150TypeDesc elementType = method.Instantiation[0]; 154TypeDesc underlyingType = elementType.UnderlyingType; 155TypeDesc returnType = method.Context.GetWellKnownType(WellKnownType.Int32); 161parameters: new TypeDesc[] {underlyingType})); 189TypeDesc elementType = method.Instantiation[0]; 216TypeDesc elementType = method.Instantiation[0]; 230TypeDesc elementType = method.Instantiation[0]; 250static MethodDesc GetMethodToCall(TypeDesc elementType)
parent\parent\Common\TypeSystem\IL\Stubs\ArrayMethodILEmitter.cs (5)
15private TypeDesc _elementType; 106TypeDesc objectType = context.GetWellKnownType(WellKnownType.Object); 107TypeDesc eetypeType = context.SystemModule.GetKnownType("Internal.Runtime"u8, "MethodTable"u8); 145TypeDesc objectType = context.GetWellKnownType(WellKnownType.Object); 146TypeDesc eetypeType = context.SystemModule.GetKnownType("Internal.Runtime"u8, "MethodTable"u8);
parent\parent\Common\TypeSystem\IL\Stubs\AssemblyGetExecutingAssemblyMethodThunk.cs (5)
18public AssemblyGetExecutingAssemblyMethodThunk(TypeDesc owningType, IAssemblyDesc executingAssembly) 26context.SystemModule.GetKnownType("System.Reflection"u8, "Assembly"u8), TypeDesc.EmptyTypes); 58public override TypeDesc OwningType 89private TypeDesc _owningTypeForThunks; 92public AssemblyGetExecutingAssemblyMethodThunkCache(TypeDesc owningTypeForThunks)
parent\parent\Common\TypeSystem\IL\Stubs\AsyncResumptionStub.cs (7)
19private readonly TypeDesc _owningType; 22public AsyncResumptionStub(MethodDesc targetMethod, TypeDesc owningType) 32public override TypeDesc OwningType => _owningType; 48TypeDesc objectType = Context.GetWellKnownType(WellKnownType.Object); 49TypeDesc byrefByte = Context.GetWellKnownType(WellKnownType.Byte).MakeByRefType(); 82foreach (var param in _targetMethod.Signature) 110TypeDesc continuation = Context.SystemModule.GetKnownType("System.Runtime.CompilerServices"u8, "Continuation"u8);
parent\parent\Common\TypeSystem\IL\Stubs\AsyncThunks.cs (7)
26TypeDesc returnType = sig.ReturnType; 30TypeDesc logicalReturnType = null; 42TypeDesc stackStateType = asyncHelpersType.GetKnownNestedType("RuntimeAsyncStackState"u8); 44TypeDesc awaitStateType = asyncHelpersType.GetKnownNestedType("RuntimeAsyncAwaitState"u8); 85var inst = new TypeDesc[asyncMethod.Instantiation.Length]; 157TypeDesc exceptionType = context.GetWellKnownType(WellKnownType.Exception); 265var inst = new TypeDesc[asyncVariantTarget.Instantiation.Length];
parent\parent\Common\TypeSystem\IL\Stubs\CalliMarshallingMethodThunk.cs (5)
18private readonly TypeDesc _owningType; 22public CalliMarshallingMethodThunk(MethodSignature targetSignature, TypeDesc owningType, 48public override TypeDesc OwningType 63TypeDesc[] parameterTypes = new TypeDesc[_targetSignature.Length + 1];
parent\parent\Common\TypeSystem\IL\Stubs\ComparerIntrinsics.cs (28)
38public static TypeDesc GetComparerForType(TypeDesc comparand) 46public static TypeDesc GetEqualityComparerForType(TypeDesc comparand) 56TypeDesc owningType = methodBeingGenerated.OwningType; 57TypeDesc comparedType = owningType.Instantiation[0]; 64TypeDesc comparerType = GetComparerForType(comparedType, flavor, interfaceName); 80private static TypeDesc GetComparerForType(TypeDesc type, ReadOnlySpan<byte> flavor, ReadOnlySpan<byte> interfaceName) 120public static TypeDesc[] GetPotentialComparersForType(TypeDesc type) 125public static TypeDesc[] GetPotentialEqualityComparersForType(TypeDesc type) 133private static TypeDesc[] GetPotentialComparersForTypeCommon(TypeDesc type, ReadOnlySpan<byte> flavor, ReadOnlySpan<byte> interfaceName) 137TypeDesc exactComparer = GetComparerForType(type, flavor, interfaceName); 143return new TypeDesc[] { exactComparer }; 152ArrayBuilder<TypeDesc> universalComparers = default(ArrayBuilder<TypeDesc>); 175TypeDesc nullableType = type.Instantiation[0]; 181return new TypeDesc[] 190return new TypeDesc[] 199public static bool? ImplementsIEquatable(TypeDesc type) 202private static bool? ImplementsInterfaceOfSelf(TypeDesc type, ReadOnlySpan<byte> interfaceName) 206foreach (TypeDesc implementedInterface in type.RuntimeInterfaces) 224TypeDesc typeDefinition = type.GetTypeDefinition(); 282TypeDesc fieldType = field.FieldType; 333TypeDesc fieldType = field.FieldType;
parent\parent\Common\TypeSystem\IL\Stubs\DelegateMarshallingMethodThunk.cs (11)
27private readonly TypeDesc _owningType; 65public DelegateMarshallingMethodThunk(MetadataType delegateType, TypeDesc owningType, 91public override TypeDesc OwningType 107private static TypeDesc GetNativeMethodParameterType(TypeDesc managedType, MarshalAsDescriptor marshalAs, InteropStateManager interopStateManager, bool isReturn, bool isAnsi) 109TypeDesc nativeType; 166TypeDesc[] nativeParameterTypes = new TypeDesc[delegateSignature.Length]; 176TypeDesc nativeReturnType = GetNativeMethodParameterType(delegateSignature.ReturnType, 198var managedType = isByRefType ? delegateSignature[i].GetParameterType() : delegateSignature[i]; 200var nativeType = GetNativeMethodParameterType(managedType,
parent\parent\Common\TypeSystem\IL\Stubs\DelegateMarshallingMethodThunk.Mangling.cs (1)
11TypeDesc IPrefixMangledType.BaseType
parent\parent\Common\TypeSystem\IL\Stubs\DelegateMethodILEmitter.cs (8)
50TypeDesc delegateType = context.GetWellKnownType(WellKnownType.MulticastDelegate).BaseType; 76TypeDesc[] typesToReplace = new TypeDesc[method.OwningType.Instantiation.Length]; 77TypeDesc[] replacementTypes = new TypeDesc[typesToReplace.Length]; 83TypeDesc[] parameters = new TypeDesc[method.Signature.Length]; 88TypeDesc returnType = method.Signature.ReturnType.ReplaceTypesInConstructionOfType(typesToReplace, replacementTypes);
parent\parent\Common\TypeSystem\IL\Stubs\DelegateThunks.cs (16)
38public sealed override TypeDesc OwningType 62protected TypeDesc SystemDelegateType 178TypeDesc boxThisType = null; 179TypeDesc[] parameters = new TypeDesc[Signature.Length - 1]; 251TypeDesc[] targetMethodParameters = new TypeDesc[Signature.Length + 1]; 313TypeDesc delegateWrapperType = ((MetadataType)SystemDelegateType).GetKnownNestedType("Wrapper"u8); 524TypeDesc objectType = Context.GetWellKnownType(WellKnownType.Object); 525TypeDesc objectArrayType = objectType.MakeArrayType(); 540TypeDesc paramType = Signature[i]; 585TypeDesc instantiatedFunc = funcType.MakeInstantiatedType(objectArrayType, objectType); 615TypeDesc paramType = Signature[i]; 678public override TypeDesc OwningType 693TypeDesc intPtrType = context.GetWellKnownType(WellKnownType.IntPtr); 694TypeDesc int32Type = context.GetWellKnownType(WellKnownType.Int32);
parent\parent\Common\TypeSystem\IL\Stubs\DynamicInvokeMethodThunk.cs (10)
21private TypeDesc _owningType; 25public DynamicInvokeMethodThunk(TypeDesc owningType, MethodSignature targetSignature) 51TypeDesc[] parameters = new TypeDesc[sig.Length]; 56static TypeDesc NormalizeType(TypeDesc type) 84public override TypeDesc OwningType 105new TypeDesc[] 160var parameterType = _targetSignature[i]; 172var returnType = _targetSignature.ReturnType;
parent\parent\Common\TypeSystem\IL\Stubs\ForwardDelegateCreationThunk.cs (5)
17private readonly TypeDesc _owningType; 23public ForwardDelegateCreationThunk(MetadataType delegateType, TypeDesc owningType, InteropStateManager interopStateManager) 38public override TypeDesc OwningType 60new TypeDesc[] { 120parameters: new TypeDesc[] { Context.GetWellKnownType(WellKnownType.Object),
parent\parent\Common\TypeSystem\IL\Stubs\ForwardDelegateCreationThunk.Mangling.cs (1)
14TypeDesc IPrefixMangledType.BaseType
parent\parent\Common\TypeSystem\IL\Stubs\GetCanonTypeIntrinsic.cs (1)
24TypeDesc runtimeTypeHandleType = context.GetWellKnownType(WellKnownType.RuntimeTypeHandle);
parent\parent\Common\TypeSystem\IL\Stubs\GetFieldHelperMethodOverride.cs (6)
39public override TypeDesc OwningType 54TypeDesc int32Type = context.GetWellKnownType(WellKnownType.Int32); 55TypeDesc eeTypePtrType = context.SystemModule.GetKnownType("Internal.Runtime"u8, "MethodTable"u8).MakePointerType(); 97TypeDesc methodTableType = Context.SystemModule.GetKnownType("Internal.Runtime"u8, "MethodTable"u8); 122TypeDesc boxableFieldType = field.FieldType; 128TypeDesc fieldTypeForOptimizationChecks = boxableFieldType.IsSignatureVariable
parent\parent\Common\TypeSystem\IL\Stubs\InterlockedIntrinsics.cs (2)
37TypeDesc ceArgType = null; 39TypeDesc tType = method.Instantiation[0];
parent\parent\Common\TypeSystem\IL\Stubs\MethodBaseGetCurrentMethodThunk.cs (2)
26Context.SystemModule.GetKnownType("System.Reflection"u8, "MethodBase"u8), TypeDesc.EmptyTypes); 58public override TypeDesc OwningType
parent\parent\Common\TypeSystem\IL\Stubs\PInvokeILEmitter.cs (12)
96TypeDesc parameterType; 166TypeDesc[] parameters = new TypeDesc[_marshallers.Length - 1]; 229TypeDesc nativeReturnType = _marshallers[0].NativeParameterType; 230TypeDesc[] nativeParameterTypes = new TypeDesc[_marshallers.Length - 1]; 269TypeDesc nativeReturnType = _flags.PreserveSig ? _marshallers[0].NativeParameterType : context.GetWellKnownType(WellKnownType.Int32); 270TypeDesc[] nativeParameterTypes = new TypeDesc[isHRSwappedRetVal ? _marshallers.Length : _marshallers.Length - 1]; 362TypeDesc nativeReturnType = _marshallers[0].NativeParameterType; 363TypeDesc[] nativeParameterTypes = new TypeDesc[_marshallers.Length - 1];
parent\parent\Common\TypeSystem\IL\Stubs\PInvokeLazyFixupField.cs (1)
64public override TypeDesc FieldType
parent\parent\Common\TypeSystem\IL\Stubs\RuntimeHelpersIntrinsics.cs (1)
26TypeDesc elementType = method.Instantiation[0];
parent\parent\Common\TypeSystem\IL\Stubs\StreamIntrinsics.cs (1)
25TypeDesc streamClass = method.OwningType;
parent\parent\Common\TypeSystem\IL\Stubs\StructMarshallingThunk.cs (9)
43private TypeDesc _owningType; 46public StructMarshallingThunk(TypeDesc owningType, MetadataType managedType, StructMarshallingThunkType thunkType, InteropStateManager interopStateManager) 64public override TypeDesc OwningType 79TypeDesc[] parameters = null; 83parameters = new TypeDesc[] { 84ManagedType.IsValueType ? (TypeDesc)ManagedType.MakeByRefType() : ManagedType, 89parameters = new TypeDesc[] { 91ManagedType.IsValueType ? (TypeDesc)ManagedType.MakeByRefType() : ManagedType 95parameters = new TypeDesc[] {
parent\parent\Common\TypeSystem\IL\Stubs\StructMarshallingThunk.Mangling.cs (1)
11TypeDesc IPrefixMangledType.BaseType
parent\parent\Common\TypeSystem\IL\Stubs\TypeGetTypeMethodThunk.cs (4)
22public TypeGetTypeMethodThunk(TypeDesc owningType, MethodSignature signature, MethodDesc helperMethod, string defaultAssemblyName) 55public override TypeDesc OwningType 112private TypeDesc _owningTypeForThunks; 115public TypeGetTypeMethodThunkCache(TypeDesc owningTypeForThunks)
parent\parent\Common\TypeSystem\Interop\IL\InlineArrayType.cs (4)
313public override TypeDesc OwningType 363parameters: new TypeDesc[] { Context.GetWellKnownType(WellKnownType.Int32) }); 370parameters: new TypeDesc[] { Context.GetWellKnownType(WellKnownType.Int32), _owningType.ElementType }); 435public override TypeDesc FieldType
parent\parent\Common\TypeSystem\Interop\IL\InlineArrayType.Sorting.cs (1)
11protected override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\Interop\IL\MarshalHelpers.Aot.cs (8)
13public static bool IsStructMarshallingRequired(TypeDesc typeDesc) 48internal static TypeDesc GetNativeMethodParameterType(TypeDesc type, MarshalAsDescriptor marshalAs, InteropStateManager interopStateManager, bool isReturn, bool isAnsi) 67internal static TypeDesc GetNativeStructFieldType(TypeDesc type, MarshalAsDescriptor marshalAs, InteropStateManager interopStateManager, bool isAnsi) 86internal static InlineArrayCandidate GetInlineArrayCandidate(TypeDesc managedElementType, MarshallerKind elementMarshallerKind, InteropStateManager interopStateManager, MarshalAsDescriptor marshalAs) 88TypeDesc nativeType = GetNativeTypeFromMarshallerKind( 125new TypeDesc[] { context.GetWellKnownType(WellKnownType.String) });
parent\parent\Common\TypeSystem\Interop\IL\MarshalHelpers.cs (8)
13internal static TypeDesc GetNativeTypeFromMarshallerKind(TypeDesc type, 125TypeDesc elementNativeType = GetNativeTypeFromMarshallerKind( 216TypeDesc type, 691TypeDesc elementType = arrayType.ElementType; 874TypeDesc type, 910TypeDesc type, 914TypeDesc underlyingType = type.UnderlyingType;
parent\parent\Common\TypeSystem\Interop\IL\Marshaller.Aot.cs (7)
409var managedElementType = ((ArrayType)ManagedType).ElementType; 489var managedElementType = ((ArrayType)ManagedType).ElementType; 771TypeDesc nativeStructType = InteropStateManager.GetStructMarshallingNativeType(ManagedType); 957var parameterType = this.ManagedParameterType; 963CustomAttributeValue<TypeDesc>? guidAttributeValue = (parameterType as EcmaType)? 983parameters: new TypeDesc[] { int32Type, int16Type, int16Type, byteType, byteType, byteType, byteType, byteType, byteType, byteType, byteType }); 1220var marshallerType = MarshalAsDescriptor.MarshallerType;
parent\parent\Common\TypeSystem\Interop\IL\Marshaller.cs (35)
35public TypeDesc ManagedType; 36public TypeDesc ManagedParameterType; 39private TypeDesc _nativeType; 40private TypeDesc _nativeParamType; 46public TypeDesc NativeType 71public TypeDesc NativeParameterType 77TypeDesc nativeParamType = NativeType; 127public Home(ILLocalVariable var, TypeDesc type, bool isByRef) 134public Home(int argIndex, TypeDesc type, bool isByRef) 207private TypeDesc _type; 227public static Marshaller CreateMarshaller(TypeDesc parameterType, 338public static Marshaller CreateDisabledMarshaller(TypeDesc parameterType, 411TypeDesc parameterType = (i == 0) ? methodSig.ReturnType : methodSig[i - 1]; //first item is the return type 1098protected TypeDesc ManagedElementType 1108protected TypeDesc NativeElementType 1185var indexType = Marshallers[index].ManagedType; 1243TypeDesc nativeElementType = NativeElementType; 1279var elementType = ManagedElementType; 1298TypeDesc nativeElementType = NativeElementType; 1342var elementType = ManagedElementType; 1343var nativeElementType = NativeElementType; 1420var elementType = ManagedElementType; 1451var nativeElementType = NativeElementType; 1649TypeDesc charRefType = Context.GetWellKnownType(WellKnownType.Char).MakeByRefType(); 1704new TypeDesc[] { 1823TypeDesc marshallerIn = MarshallerIn; 1841new TypeDesc[] { Context.GetWellKnownType(WellKnownType.Byte) }); 1845new TypeDesc[] { Context.GetWellKnownType(WellKnownType.Void).MakePointerType(), Context.GetWellKnownType(WellKnownType.Int32) })))); 1897ManagedType.Context.GetWellKnownType(WellKnownType.Void), TypeDesc.EmptyTypes)); 1953new TypeDesc[] { Context.GetWellKnownType(WellKnownType.Boolean).MakeByRefType() })))); 1958new MethodSignature(0, 0, Context.GetWellKnownType(WellKnownType.IntPtr), TypeDesc.EmptyTypes)))); 1967new MethodSignature(0, 0, Context.GetWellKnownType(WellKnownType.Void), TypeDesc.EmptyTypes)))); 2002new TypeDesc[] { Context.GetWellKnownType(WellKnownType.IntPtr) })))); 2062new TypeDesc[] { Context.GetSignatureVariable(0, method: true) } 2088new TypeDesc[] { Context.GetWellKnownType(WellKnownType.IntPtr) }
parent\parent\Common\TypeSystem\Interop\IL\MarshalUtils.cs (1)
12public static bool IsBlittableType(TypeDesc type)
parent\parent\Common\TypeSystem\Interop\IL\NativeStructType.cs (5)
231var managedType = field.FieldType; 233TypeDesc nativeType; 323private TypeDesc _fieldType; 335public override TypeDesc FieldType 417public NativeStructField(TypeDesc nativeType, MetadataType owningType, FieldDesc managedField)
parent\parent\Common\TypeSystem\Interop\IL\NativeStructType.Mangling.cs (1)
10TypeDesc IPrefixMangledType.BaseType => ManagedStructType;
parent\parent\Common\TypeSystem\Interop\IL\NativeStructType.Sorting.cs (1)
11protected override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\Interop\IL\PInvokeDelegateWrapper.Mangling.cs (1)
10TypeDesc IPrefixMangledType.BaseType
parent\parent\Common\TypeSystem\Interop\IL\PInvokeDelegateWrapper.Sorting.cs (1)
11protected override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\Interop\IL\PInvokeDelegateWrapperConstructor.cs (2)
22public override TypeDesc OwningType 51parameters: new TypeDesc[] {
parent\parent\Common\TypeSystem\Interop\InteropStateManager.cs (17)
44public DelegateMarshallingMethodThunk GetOpenStaticDelegateMarshallingThunk(TypeDesc delegateType) 62public DelegateMarshallingMethodThunk GetClosedDelegateMarshallingThunk(TypeDesc delegateType) 80public ForwardDelegateCreationThunk GetForwardDelegateCreationThunk(TypeDesc delegateType) 93public PInvokeDelegateWrapper GetPInvokeDelegateWrapper(TypeDesc delegateType) 118public NativeStructType GetStructMarshallingNativeType(TypeDesc managedType) 133public MethodDesc GetStructMarshallingManagedToNativeThunk(TypeDesc managedType) 149public MethodDesc GetStructMarshallingNativeToManagedThunk(TypeDesc managedType) 165public MethodDesc GetStructMarshallingCleanupThunk(TypeDesc managedType) 178public TypeDesc GetInlineArrayType(InlineArrayCandidate candidate) 276private readonly TypeDesc _owningType; 278public StructMarshallingThunkHashTable(InteropStateManager interopStateManager, TypeDesc owningType) 365private TypeDesc _owningType; 368public DelegateMarshallingStubHashtable(InteropStateManager interopStateManager, TypeDesc owningType) 402private TypeDesc _owningType; 405public ForwardDelegateCreationStubHashtable(InteropStateManager interopStateManager, TypeDesc owningType) 497private readonly TypeDesc _owningType; 524public PInvokeCalliHashtable(InteropStateManager interopStateManager, TypeDesc owningType)
parent\parent\Common\TypeSystem\Interop\InteropTypes.cs (20)
72public static bool IsSafeHandle(TypeSystemContext context, TypeDesc type) 77public static bool IsCriticalHandle(TypeSystemContext context, TypeDesc type) 82private static bool IsCoreNamedType(TypeSystemContext context, TypeDesc type, ReadOnlySpan<byte> @namespace, ReadOnlySpan<byte> name) 90public static bool IsHandleRef(TypeSystemContext context, TypeDesc type) 95public static bool IsSystemDateTime(TypeSystemContext context, TypeDesc type) 100public static bool IsStringBuilder(TypeSystemContext context, TypeDesc type) 105public static bool IsSystemDecimal(TypeSystemContext context, TypeDesc type) 110public static bool IsSystemDelegate(TypeSystemContext context, TypeDesc type) 115public static bool IsSystemMulticastDelegate(TypeSystemContext context, TypeDesc type) 120public static bool IsSystemGuid(TypeSystemContext context, TypeDesc type) 125public static bool IsSystemArgIterator(TypeSystemContext context, TypeDesc type) 130public static bool IsSystemSpan(TypeSystemContext context, TypeDesc type) 135public static bool IsSystemReadOnlySpan(TypeSystemContext context, TypeDesc type) 140public static bool IsSystemNullable(TypeSystemContext context, TypeDesc type) 145public static bool IsSystemRuntimeIntrinsicsVector64T(TypeSystemContext context, TypeDesc type) 150public static bool IsSystemRuntimeIntrinsicsVector128T(TypeSystemContext context, TypeDesc type) 155public static bool IsSystemRuntimeIntrinsicsVector256T(TypeSystemContext context, TypeDesc type) 160public static bool IsSystemRuntimeIntrinsicsVector512T(TypeSystemContext context, TypeDesc type) 165public static bool IsSystemNumericsVectorT(TypeSystemContext context, TypeDesc type) 170private static bool IsOrDerivesFromType(TypeDesc type, MetadataType targetType)
parent\parent\Common\TypeSystem\Interop\UnmanagedCallingConventions.cs (7)
102CustomAttributeValue<TypeDesc> unmanagedCallersOnlyAttribute = ((EcmaMethod)method).GetDecodedCustomAttribute("System.Runtime.InteropServices", "UnmanagedCallersOnlyAttribute").Value; 125CustomAttributeValue<TypeDesc>? unmanagedCallConvAttribute = ecmaMethod.GetDecodedCustomAttribute("System.Runtime.InteropServices", "UnmanagedCallConvAttribute"); 142public static UnmanagedCallingConventions GetDelegateCallingConventions(this TypeDesc delegateType) 161private static UnmanagedCallingConventions GetUnmanagedCallingConventionFromAttribute(CustomAttributeValue<TypeDesc> attributeWithCallConvsArray, TypeSystemContext context) 163ImmutableArray<CustomAttributeTypedArgument<TypeDesc>> callConvArray = default; 168callConvArray = (ImmutableArray<CustomAttributeTypedArgument<TypeDesc>>)arg.Value; 176foreach (CustomAttributeTypedArgument<TypeDesc> type in callConvArray)
parent\parent\Common\TypeSystem\MetadataEmitter\TypeSystemMetadataEmitter.cs (8)
25private Dictionary<TypeDesc, EntityHandle> _typeRefs = new Dictionary<TypeDesc, EntityHandle>(); 169case TypeDesc type: return GetTypeRef(type); 204public EntityHandle GetTypeRef(TypeDesc type) 310foreach (var type in method.Instantiation) 349private void EncodeType(BlobBuilder blobBuilder, TypeDesc type, EmbeddedSignatureDataEmitter signatureDataEmitter) 469foreach (var instantiationArg in type.Instantiation) 705private void EncodeFieldSignature(BlobBuilder signatureBuilder, TypeDesc fieldType, EmbeddedSignatureDataEmitter signatureDataEmitter)
parent\parent\Common\TypeSystem\TypesDebugInfoWriter\TypesDebugInfoWriter.cs (2)
26uint GetPrimitiveTypeIndex(TypeDesc type); 28Utf8String GetMangledName(TypeDesc type);
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\GraphBuilder.cs (19)
27HashSet<TypeDesc> types = new HashSet<TypeDesc>(); 28List<TypeDesc> typesToProcess = new List<TypeDesc>(); 32var processType = typesToProcess[typesToProcess.Count - 1]; 53void AddSpecializedType(TypeDesc typeToSpecialize) 57var specializedType = typeToSpecialize.InstantiateSignature(processType.Instantiation, default(Instantiation)); 88void AddProcessType(TypeDesc type) 103foreach (var instType in type.Instantiation) 118IEnumerable<GenericParameterDesc> GetGenericParameters(TypeDesc t) 133foreach (var instType in t.Instantiation) 147foreach (var parameterType in fptrType.Signature) 245TypeDesc baseType = declaringType.BaseType; 257private void ProcessAncestorType(TypeDesc ancestorType, Instantiation typeContext) 280TypeDesc methodOwningType = method.OwningType; 327foreach (TypeDesc parameterType in methodSig) 376var t = methodIL.GetObject(MetadataTokens.GetToken(accessedType), NotFoundBehavior.ReturnNull) as TypeDesc; 452private void ProcessTypeReference(TypeDesc typeReference, Instantiation typeContext, Instantiation methodContext)
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\GraphBuilder.ForEach.cs (4)
27private static void ForEachEmbeddedGenericFormal(TypeDesc typeExpression, Instantiation typeContext, Instantiation methodContext, ref EmbeddingStateList collector) 32private static void ForEachEmbeddedGenericFormalWorker(TypeDesc type, Instantiation typeContext, Instantiation methodContext, ref EmbeddingStateList collector, int depth) 59TypeDesc genericTypeDefinition = type.GetTypeDefinition(); 66TypeDesc genericTypeArgument = genericTypeArguments[i];
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\ModuleCycleInfo.cs (17)
38TypeDesc ownerType = (owner as EcmaMethod)?.OwningType; 123if (entity is TypeDesc type) 133private bool IsDeepPossiblyCyclicInstantiation(TypeDesc type) 139private bool IsDeepPossiblyCyclicInstantiation(TypeDesc type, ref int breadthCounter, List<TypeDesc> seenTypes = null) 145TypeDesc parameterType = type; 160TypeDesc typeDef = type.GetTypeDefinition(); 171(seenTypes ??= new List<TypeDesc>()).Add(typeDef); 174TypeDesc typeToFind = seenTypes[i]; 198private bool IsDeepPossiblyCyclicInstantiation(Instantiation instantiation, ref int breadthCounter, List<TypeDesc> seenTypes) 200foreach (TypeDesc arg in instantiation) 254var ownerType = owner as TypeDesc; 257var referentType = referent as TypeDesc; 302TypeSystemEntity referentDefinition = referent is TypeDesc referentType ? referentType.GetTypeDefinition() 304TypeSystemEntity ownerDefinition = owner is TypeDesc ownerType ? ownerType.GetTypeDefinition()
ILCompiler.MetadataTransform (19)
ILCompiler\Metadata\MetadataTransform.cs (1)
57public abstract MetadataRecord HandleType(Cts.TypeDesc type);
ILCompiler\Metadata\Transform.cs (2)
25private bool IsBlocked(Cts.TypeDesc type) 57foreach (var arg in type.Instantiation)
ILCompiler\Metadata\Transform.CustomAttribute.cs (6)
55foreach (Cts.TypeDesc paramType in sig) 68Cts.TypeDesc type = SerializationTypeToType(module, ref valueReader); 85private static Ecma.SerializationTypeCode TypeDescToSerializationTypeCode(Cts.TypeDesc type) 109private static Cts.TypeDesc SerializationTypeToType(Cts.Ecma.EcmaModule module, ref Ecma.BlobReader valueReader) 138Cts.TypeDesc enumType = Cts.CustomAttributeTypeNameParser.GetTypeByCustomAttributeTypeName(module, valueReader.ReadSerializedString()); 181Cts.TypeDesc enumType = Cts.CustomAttributeTypeNameParser.GetTypeByCustomAttributeTypeName(module, valueReader.ReadSerializedString());
ILCompiler\Metadata\Transform.Method.cs (2)
68foreach (var p in entity.Instantiation) 153foreach (Cts.TypeDesc typeArgument in instantiation.Instantiation)
ILCompiler\Metadata\Transform.Parameter.cs (1)
25foreach (Cts.TypeDesc constraint in genParam.TypeConstraints)
ILCompiler\Metadata\Transform.Type.cs (7)
20internal EntityMap<Cts.TypeDesc, MetadataRecord> _types = 21new EntityMap<Cts.TypeDesc, MetadataRecord>(EqualityComparer<Cts.TypeDesc>.Default); 30private Action<Cts.TypeDesc, TypeSpecification> _initTypeInst; 34public override MetadataRecord HandleType(Cts.TypeDesc type) 158private void InitializeTypeInstance(Cts.TypeDesc entity, TypeSpecification record) 312foreach (var p in entity.Instantiation)
ILCompiler.ReadyToRun (924)
Compiler\AssemblyExtensions.cs (1)
29CustomAttributeValue<TypeDesc> decoded = attribute.DecodeValue(new CustomAttributeTypeProvider(assembly));
Compiler\CallChainProfile.cs (1)
230TypeDesc resolvedType = module.GetTypeByCustomAttributeTypeName(namespaceAndTypeName, false,
Compiler\CompilationModuleGroup.ReadyToRun.cs (4)
19public virtual bool ContainsTypeLayout(TypeDesc type) => ContainsType(type); 27public virtual bool VersionsWithType(TypeDesc typeDesc) => ContainsType(typeDesc); 35public virtual bool VersionsWithTypeReference(TypeDesc typeDesc) => VersionsWithType(typeDesc); 83public abstract bool TryGetModuleTokenForExternalType(TypeDesc type, out ModuleToken token);
Compiler\DependencyAnalysis\AllMethodsOnTypeNode.cs (3)
14private readonly TypeDesc _type; 16public AllMethodsOnTypeNode(TypeDesc type) 21public TypeDesc Type => _type;
Compiler\DependencyAnalysis\ArrayInterfaceMethodsNode.cs (1)
51TypeDesc elementType = _arrayType.ElementType;
Compiler\DependencyAnalysis\ImportReferenceProvider.cs (3)
21public Import GetImportToType(TypeDesc type, ModuleDesc moduleRequiringImport = null) 49internal Vertex EncodeReferenceToType(NativeWriter writer, TypeDesc type, ModuleDesc module) 57Vertex INativeFormatTypeReferenceProvider.EncodeReferenceToType(NativeWriter writer, TypeDesc type, ModuleDesc module) => EncodeReferenceToType(writer, type, module);
Compiler\DependencyAnalysis\InheritedVirtualMethodsNode.cs (8)
24private readonly TypeDesc _type; 27public InheritedVirtualMethodsNode(TypeDesc type) 36public TypeDesc Type => _type; 156private static bool TypeHasGVMSlots(TypeDesc type) 158TypeDesc currentType = type; 182private static bool HasNonCanonicalInstantiationArguments(TypeDesc type) 184TypeDesc canonType = type.Context.CanonType; 185foreach (TypeDesc arg in type.Instantiation)
Compiler\DependencyAnalysis\ReadyToRun\DelegateCtorSignature.cs (2)
13private readonly TypeDesc _delegateType; 20TypeDesc delegateType,
Compiler\DependencyAnalysis\ReadyToRun\DevirtualizationManager.cs (8)
18public override bool IsEffectivelySealed(TypeDesc type) 53var firstTypeInImplTypeHierarchyNotInVersionBubble = FindVersionBubbleEdge(_compilationModuleGroup, implType, out TypeDesc lastTypeInHierarchyInVersionBubble); 144TypeDesc typeThatDerivesFromObject = implType; 196for (TypeDesc typeExamine = resolvedVirtualMethod.OwningType; typeExamine != null; typeExamine = typeExamine.BaseType) 211static TypeDesc FindVersionBubbleEdge(CompilationModuleGroup compilationModuleGroup, TypeDesc type, out TypeDesc lastTypeInVersionBubble)
Compiler\DependencyAnalysis\ReadyToRun\FieldFixupSignature.cs (1)
48TypeDesc baseType = _fieldWithToken.Field.OwningType.BaseType;
Compiler\DependencyAnalysis\ReadyToRun\GCRefMapBuilder.cs (2)
233private void GcScanRoots(TypeDesc type, in ArgDestination argDest, int delta, CORCOMPILE_GCREFMAP_TOKENS[] frame, bool topLevel) 282private void GcScanValueType(TypeDesc type, in ArgDestination argDest, int delta, CORCOMPILE_GCREFMAP_TOKENS[] frame, bool topLevel)
Compiler\DependencyAnalysis\ReadyToRun\GenericLookupSignature.cs (3)
21private readonly TypeDesc _typeArgument; 32TypeDesc typeArgument, 75TypeDesc contextTypeToEmit = null;
Compiler\DependencyAnalysis\ReadyToRun\ILBodyFixupSignature.cs (1)
96foreach (var typeRef in metadata.TypeRefs)
Compiler\DependencyAnalysis\ReadyToRun\MethodFixupSignature.cs (3)
50public TypeDesc ConstrainedType => _method.ConstrainedType; 113TypeDesc canonType = canonMethod.Context.CanonType; 114foreach (TypeDesc arg in canonMethod.Instantiation)
Compiler\DependencyAnalysis\ReadyToRun\ModuleTokenResolver.cs (6)
56public ModuleToken GetModuleTokenForType(TypeDesc type, bool allowDynamicallyCreatedReference, bool throwIfNotFound = true) 177TypeDesc owningType = (TypeDesc)token.Module.GetObject(owningTypeHandle, NotFoundBehavior.Throw); 273private void AddModuleTokenForFieldReference(TypeDesc owningType, ModuleToken token) 307public void AddModuleTokenForType(TypeDesc type, ModuleToken token) 467_resolver.AddModuleTokenForType((TypeDesc)_contextModule.GetObject(handle), new ModuleToken(_contextModule, handle));
Compiler\DependencyAnalysis\ReadyToRun\NewObjectFixupSignature.cs (2)
13private readonly TypeDesc _typeDesc; 15public NewObjectFixupSignature(TypeDesc typeDesc)
Compiler\DependencyAnalysis\ReadyToRun\SignatureBuilder.cs (2)
183public void EmitTypeSignature(TypeDesc typeDesc, SignatureContext context) 545TypeDesc ownerType = null;
Compiler\DependencyAnalysis\ReadyToRun\SignatureContext.cs (1)
56public IEcmaModule GetTargetModule(TypeDesc type)
Compiler\DependencyAnalysis\ReadyToRun\TypeFixupSignature.cs (4)
21private readonly TypeDesc _typeDesc; 23public TypeFixupSignature(ReadyToRunFixupKind fixupKind, TypeDesc typeDesc) 73private static void EncodeTypeLayout(ObjectDataSignatureBuilder dataBuilder, TypeDesc type) 225public static void AddDependenciesForAsyncStateMachineBox(ref DependencyList dependencies, NodeFactory factory, TypeDesc type)
Compiler\DependencyAnalysis\ReadyToRun\TypeHandle.cs (4)
20public TypeHandle(TypeDesc type) 30private readonly TypeDesc _type; 149TypeDesc typeOfEmbeddedField = null; 188public TypeDesc GetRuntimeTypeHandle() { return _type; }
Compiler\DependencyAnalysis\ReadyToRun\TypeValidationChecker.cs (25)
20private ConcurrentBag<(TypeDesc type, string reason)> _typeLoadValidationErrors = new ConcurrentBag<(TypeDesc type, string reason)>(); 21private ConcurrentDictionary<TypeDesc, Task<bool>> _firstStageValidationChecks = new ConcurrentDictionary<TypeDesc, Task<bool>>(); 22private ConcurrentDictionary<TypeDesc, (TypeDesc dependendOnType, string reason)[]> _crossTypeValidationDependencies = new ConcurrentDictionary<TypeDesc, (TypeDesc dependendOnType, string reason)[]>(); 30Array.Sort(typeLoadValidationErrors, (ValueTuple<TypeDesc, string> left, ValueTuple<TypeDesc, string> right) => 43private void AddTypeValidationError(TypeDesc type, string error) 105Task<bool> ValidateTypeWorkerHelper(TypeDesc typeToCheckForSkipValidation) 322foreach (var genericParameterType in method.Instantiation) 324foreach (var constraint in ((GenericParameterDesc)genericParameterType).TypeConstraints) 564HashSet<TypeDesc> constraintsOnDecl = new HashSet<TypeDesc>(); 565foreach (var constraint in parameterOfDecl.TypeConstraints) 570foreach (var constraint in parameterOfImpl.TypeConstraints) 599Task<bool> ValidateTypeHelper(TypeDesc typeDesc) 643foreach (var type in functionPointerType.Signature) 653foreach (var type in instantiation) 668foreach (var type in genericParameter.TypeConstraints) 696static bool ValidateVarianceInType(Instantiation associatedTypeInstantiation, TypeDesc type, Internal.TypeSystem.GenericVariance position) 712var typeDef = instantiatedType.GetTypeDefinition(); 716foreach (TypeDesc instType in instantiatedType.Instantiation)
Compiler\DependencyAnalysis\ReadyToRun\VirtualResolutionFixupSignature.cs (2)
22private readonly TypeDesc _implType; 25public VirtualResolutionFixupSignature(ReadyToRunFixupKind fixupKind, MethodWithToken declMethod, TypeDesc implType, MethodWithToken implMethod)
Compiler\DependencyAnalysis\ReadyToRun\WasmImportThunk.cs (2)
237TypeDesc paramType = methodSignature[i]; 381TypeDesc paramType = methodSignature[i];
Compiler\DependencyAnalysis\ReadyToRun\WasmInterpreterToR2RThunkNode.cs (1)
218TypeDesc paramType = methodSignature[i];
Compiler\DependencyAnalysis\ReadyToRun\WasmR2RToInterpreterThunkNode.cs (1)
224TypeDesc paramType = methodSignature[i];
Compiler\DependencyAnalysis\ReadyToRunCodegenNodeFactory.cs (15)
206private NodeCache<TypeDesc, AllMethodsOnTypeNode> _allMethodsOnType; 208public AllMethodsOnTypeNode AllMethodsOnType(TypeDesc type) 213private NodeCache<TypeDesc, InheritedVirtualMethodsNode> _inheritedVirtualMethods; 215private InheritedVirtualMethodsNode InheritedVirtualMethods(TypeDesc type) 227public void AddVirtualMethodDiscoveryDependencies(ref DependencyList dependencies, TypeDesc type) 392_allMethodsOnType = new NodeCache<TypeDesc, AllMethodsOnTypeNode>(type => 397_inheritedVirtualMethods = new NodeCache<TypeDesc, InheritedVirtualMethodsNode>(type => 425(TypeDesc)helperKey.Target)); 436(TypeDesc)helperKey.Target)); 794public readonly TypeDesc TypeDesc; 796public TypeFixupKey(ReadyToRunFixupKind fixupKind, TypeDesc typeDesc) 820public TypeFixupSignature TypeSignature(ReadyToRunFixupKind fixupKind, TypeDesc typeDesc) 830public readonly TypeDesc ImplType; 833public VirtualResolutionFixupSignatureFixupKey(ReadyToRunFixupKind fixupKind, MethodWithToken declMethod, TypeDesc implType, MethodWithToken implMethod) 865public VirtualResolutionFixupSignature VirtualResolutionFixupSignature(ReadyToRunFixupKind fixupKind, MethodWithToken declMethod, TypeDesc implType, MethodWithToken implMethod)
Compiler\DependencyAnalysis\ReadyToRunSymbolNodeFactory.cs (32)
95_fieldBaseOffsetCache = new NodeCache<TypeDesc, Import>(key => 149_checkTypeLayoutCache = new NodeCache<TypeDesc, Import>(key => 253return CreateNewHelper((TypeDesc)key.Target); 259return CreateGCStaticBaseHelper((TypeDesc)key.Target); 262return CreateNonGCStaticBaseHelper((TypeDesc)key.Target); 265return CreateThreadGcStaticBaseHelper((TypeDesc)key.Target); 268return CreateThreadNonGcStaticBaseHelper((TypeDesc)key.Target); 271return CreateIsInstanceOfHelper((TypeDesc)key.Target); 274return CreateCastClassHelper((TypeDesc)key.Target); 277return CreateTypeHandleHelper((TypeDesc)key.Target); 289return CreateCctorTrigger((TypeDesc)key.Target); 292return CreateTypeDictionary((TypeDesc)key.Target); 316private Import CreateNewHelper(TypeDesc type) 334private Import CreateGCStaticBaseHelper(TypeDesc type) 343private Import CreateNonGCStaticBaseHelper(TypeDesc type) 352private Import CreateThreadGcStaticBaseHelper(TypeDesc type) 361private Import CreateThreadNonGcStaticBaseHelper(TypeDesc type) 370private Import CreateIsInstanceOfHelper(TypeDesc type) 379private Import CreateCastClassHelper(TypeDesc type) 388private Import CreateTypeHandleHelper(TypeDesc type) 424private Import CreateCctorTrigger(TypeDesc type) 433private Import CreateTypeDictionary(TypeDesc type) 472private NodeCache<TypeDesc, Import> _fieldBaseOffsetCache; 474public Import FieldBaseOffset(TypeDesc typeDesc) 496public Import DelegateCtor(TypeDesc delegateType, MethodWithToken method) 507private NodeCache<TypeDesc, Import> _checkTypeLayoutCache; 509public Import CheckTypeLayout(TypeDesc type) 516public Import CheckVirtualFunctionOverride(MethodWithToken declMethod, TypeDesc implType, MethodWithToken implMethod, bool checkOnly = false) 571public readonly TypeDesc TypeArgument; 579TypeDesc typeArgument, 681TypeDesc typeArgument; 692typeArgument = (TypeDesc)helperArgument;
Compiler\DependencyAnalysis\TypeAndMethod.cs (2)
15public readonly TypeDesc Type; 21public TypeAndMethod(TypeDesc type, MethodWithToken method, bool isInstantiatingStub, bool isPrecodeImportRequired, bool isJumpableImportRequired)
Compiler\ExternalReferenceTokenManager.cs (5)
80case TypeDesc typeDesc: 98TypeDesc typeDesc => _tokenResolver.GetModuleTokenForType(typeDesc, allowDynamicallyCreatedReference: true, throwIfNotFound: false), 128foreach (TypeDesc instParam in methodDesc.Instantiation) 150private void EnsureTypeDefTokensAreAvailableInVersionBubble(TypeDesc type) 170foreach (TypeDesc instParam in type.Instantiation)
Compiler\ProfileDataManager.cs (18)
269private List<TypeSystemEntityOrUnknown> SampleImplementers(TypeDesc type, Random rand) 272IList<TypeDesc> implementers = _gdvEntityFinder.GetImplementers(type); 284Debug.Assert(value is MethodDesc or TypeDesc); 287if (value is TypeDesc type) 413private readonly Dictionary<TypeDesc, List<TypeDesc>> _implementers; 418Dictionary<TypeDesc, HashSet<TypeDesc>> implementers = new(); 451void AddImplemented(TypeDesc implemented) 453if (!implementers.TryGetValue(implemented, out HashSet<TypeDesc> set)) 454implementers.Add(implemented, set = new HashSet<TypeDesc>()); 459TypeDesc implemented = type; 466foreach (TypeDesc iface in type.RuntimeInterfaces) 487List<TypeDesc> list = new(kvp.Value); 498public IList<TypeDesc> GetImplementers(TypeDesc type) 500return _implementers.TryGetValue(type, out List<TypeDesc> types) ? types : Array.Empty<TypeDesc>();
Compiler\ReadyToRunCodegenCompilation.cs (17)
123public bool IsEffectivelySealed(TypeDesc type) 133public MethodDesc ResolveVirtualMethod(MethodDesc declMethod, TypeDesc implType, out CORINFO_DEVIRTUALIZATION_DETAIL devirtualizationDetail) 328private ConcurrentDictionary<TypeDesc, bool> _computedFixedLayoutTypes = new ConcurrentDictionary<TypeDesc, bool>(); 329private Func<TypeDesc, bool> _computedFixedLayoutTypesUncached; 610private bool IsLayoutFixedInCurrentVersionBubbleInternal(TypeDesc type) 644var fieldType = field.FieldType; 657public bool IsLayoutFixedInCurrentVersionBubble(TypeDesc type) => 660public bool IsInheritanceChainLayoutFixedInCurrentVersionBubble(TypeDesc type) 981foreach (var type in method.Instantiation) 983foreach (var type in method.OwningType.Instantiation) 994TypeDesc asyncHelpers = TypeSystemContext.SystemModule.GetKnownType("System.Runtime.CompilerServices"u8, "AsyncHelpers"u8); 995TypeDesc[] requiredTypes = [asyncHelpers, continuation]; 1006TypeDesc voidType = TypeSystemContext.GetWellKnownType(WellKnownType.Void); 1007TypeDesc taskType = TypeSystemContext.SystemModule.GetKnownType("System.Threading.Tasks"u8, "Task"u8); 1008TypeDesc valueTaskType = TypeSystemContext.SystemModule.GetKnownType("System.Threading.Tasks"u8, "ValueTask"u8); 1011TypeDesc methodVar = TypeSystemContext.GetSignatureVariable(0, method: true);
Compiler\ReadyToRunCompilationModuleGroupBase.cs (38)
42private Dictionary<TypeDesc, ModuleToken> _typeRefsInCompilationModuleSet; 48private readonly ConcurrentDictionary<TypeDesc, CompilationUnitSet> _layoutCompilationUnits = new ConcurrentDictionary<TypeDesc, CompilationUnitSet>(); 49private readonly Func<TypeDesc, CompilationUnitSet> _layoutCompilationUnitsUncached; 50private readonly ConcurrentDictionary<TypeDesc, bool> _versionsWithTypeCache = new ConcurrentDictionary<TypeDesc, bool>(); 51private readonly Func<TypeDesc, bool> _versionsWithTypeUncached; 52private readonly ConcurrentDictionary<TypeDesc, bool> _versionsWithTypeReferenceCache = new ConcurrentDictionary<TypeDesc, bool>(); 53private readonly Func<TypeDesc, bool> _versionsWithTypeReferenceUncached; 58private readonly ConcurrentDictionary<TypeDesc, bool> _crossModuleInlineableTypeCache = new ConcurrentDictionary<TypeDesc, bool>(); 59private readonly Func<TypeDesc, bool> _crossModuleInlineableTypeCacheUncached; 131public sealed override bool ContainsType(TypeDesc type) 155public CompilationUnitSet TypeLayoutCompilationUnits(TypeDesc type) 322private CompilationUnitSet TypeLayoutCompilationUnitsUncached(TypeDesc type) 348TypeDesc fieldType = field.FieldType; 384public sealed override bool VersionsWithType(TypeDesc typeDesc) 394public bool CrossModuleInlineableType(TypeDesc typeDesc) 400public sealed override bool VersionsWithTypeReference(TypeDesc typeDesc) 504foreach (var instArgFixed in inst) 506var instArg = instArgFixed; 565foreach (TypeDesc t in method.Instantiation) 572foreach (TypeDesc t in method.OwningType.Instantiation) 657TypeDesc type = methodIL.GetObject(token) as TypeDesc; 738public sealed override bool TryGetModuleTokenForExternalType(TypeDesc type, out ModuleToken token) 748var typeRefsInCompilationModuleSet = new Dictionary<TypeDesc, ModuleToken>(); 757TypeDesc typeFromTypeRef = ecmaModule.GetType(typeRefHandle); 780private bool ComputeTypeVersionsWithCode(TypeDesc type) 807private bool ComputeCrossModuleInlineableType(TypeDesc type) 824private bool ComputeTypeReferenceVersionsWithCode(TypeDesc type) 879foreach (TypeDesc instParam in type.Instantiation) 892private static bool ComputeInstantiationVersionsWithCode(Instantiation inst, TypeSystemEntity entityWithInstantiation, Func<TypeDesc, bool> versionsWithTypePredicate) 896TypeDesc instType = inst[iInstantiation]; 906if (entityWithInstantiation is TypeDesc type) 944static bool ComputeInstantiationTypeVersionsWithCode(Func<TypeDesc, bool> versionsWithTypePredicate, TypeDesc type)
Compiler\ReadyToRunCompilerContext.cs (5)
22internal DefType GetClosestDefType(TypeDesc type) 160protected override IEnumerable<MethodDesc> GetAllMethods(TypeDesc type) 169TypeDesc fieldType = field.FieldType; 193TypeDesc _asyncStateMachineBox; 194public TypeDesc AsyncStateMachineBoxType
Compiler\ReadyToRunExternalTypeMapNode.cs (2)
15internal class ReadyToRunExternalTypeMapNode(ModuleDesc triggeringModule, TypeDesc group, TypeMapMetadata.IExternalTypeMap map, ImportReferenceProvider importProvider) : SortableDependencyNode, IExternalTypeMapNode 17public TypeDesc TypeMapGroup => group;
Compiler\ReadyToRunLibraryRootProvider.cs (3)
104private static void CheckTypeCanBeUsedInSignature(TypeDesc type) 128TypeDesc[] args = new TypeDesc[definition.Length];
Compiler\ReadyToRunMetadataFieldLayoutAlgorithm.cs (1)
100TypeDesc fieldType = fieldDesc.FieldType;
Compiler\ReadyToRunProfilingRootProvider.cs (1)
49foreach (TypeDesc t in method.Instantiation)
Compiler\ReadyToRunProxyTypeMapNode.cs (3)
13internal class ReadyToRunProxyTypeMapNode(ModuleDesc triggeringModule, TypeDesc group, TypeMapMetadata.IProxyTypeMap map, ImportReferenceProvider importProvider) : SortableDependencyNode, IProxyTypeMapNode 15public TypeDesc TypeMapGroup => group; 61foreach ((TypeDesc type, TypeMapMetadata.ProxyTypeMapEntry mapEntry) in map.TypeMap)
Compiler\ReadyToRunStandaloneMethodMetadata.cs (6)
23public TypeDesc[] TypeRefs; 216public List<TypeDesc> _alternateTypeRefStream = new List<TypeDesc>(); 217Dictionary<TypeDesc, EntityHandle> _alternateTypeRefTokens = new Dictionary<TypeDesc, EntityHandle>(); 218public EntityHandle GetTypeDefOrRefHandleForTypeDesc(TypeDesc type)
Compiler\ReadyToRunTypeMapEncoding.cs (2)
17public static bool IsTypeDescEncodable(NodeFactory factory, ModuleDesc sourceModule, TypeDesc type) 63foreach (TypeDesc instantiationArgument in type.Instantiation)
Compiler\ReadyToRunXmlRootProvider.cs (3)
111private void PreserveMethodsOnType(TypeDesc type) 179protected override void ProcessType(TypeDesc type, XPathNavigator nav) 192protected override void ProcessMethod(TypeDesc type, MethodDesc method, XPathNavigator nav, object customData)
Compiler\RuntimeDeterminedTypeHelper.cs (3)
37public static bool Equals(TypeDesc type1, TypeDesc type2) 171public static int GetHashCode(TypeDesc type)
Compiler\TypeMapAssemblyTargetsNode.cs (2)
50var groupType = map.Key; 81var groupType = map.Key;
IBC\IBCProfileParser.cs (12)
465private TypeDesc GetSigTypeFromIBCZapSig(IBCModule ibcModule, EcmaModule ecmaModule, BlobReader sig) 528TypeDesc[] typeArgs = new TypeDesc[numTypeArgs]; 531TypeDesc nextTypeArg = GetSigTypeFromIBCZapSig(ibcModule, ecmaModule, sig); 545TypeDesc arrayElementType = GetSigTypeFromIBCZapSig(ibcModule, ecmaModule, sig); 553TypeDesc arrayElementType = GetSigTypeFromIBCZapSig(ibcModule, ecmaModule, sig); 566TypeDesc byRefToType = GetSigTypeFromIBCZapSig(ibcModule, ecmaModule, sig); 574TypeDesc pointerToType = GetSigTypeFromIBCZapSig(ibcModule, ecmaModule, sig); 704TypeDesc methodType = GetSigTypeFromIBCZapSig(ibcModule, ibcModule.EcmaModule, sig); 749List<TypeDesc> instantiationArguments = new List<TypeDesc>(); 752TypeDesc instantiationType = GetSigTypeFromIBCZapSig(ibcModule, ibcModule.EcmaModule, sig);
IBC\MIbcProfileParser.cs (3)
39return new TypeSystemEntityOrUnknown((TypeDesc)null); 45TypeDesc foundType = _ilBody.GetObject((int)token, NotFoundBehavior.ReturnNull) as TypeDesc;
IL\ReadyToRunILProvider.cs (1)
57TypeDesc type = method.Instantiation[0];
IL\Stubs\PInvokeILEmitter.cs (3)
43TypeDesc nativeReturnType = _marshallers[0].NativeParameterType; 44TypeDesc[] nativeParameterTypes = new TypeDesc[_marshallers.Length - 1];
JitInterface\CorInfoImpl.ReadyToRun.cs (80)
145public readonly TypeDesc ConstrainedType; 148public readonly TypeDesc OwningType; 150public MethodWithToken(MethodDesc method, ModuleToken token, TypeDesc constrainedType, bool unboxing, TypeSystemEntity genericContextObject, TypeDesc devirtualizedMethodOwner = null, bool forceOwningTypeFromMethodDesc = false) 153Debug.Assert(genericContextObject is null or MethodDesc or TypeDesc); 169private static TypeDesc GetMethodTokenOwningType(MethodWithToken methodToken, TypeDesc constrainedType, TypeSystemEntity genericContextObject, TypeDesc devirtualizedMethodOwner, out bool owningTypeNotDerivedFromToken) 204static TypeDesc HandleContext(IEcmaModule module, EntityHandle handle, TypeDesc methodTargetOwner, TypeDesc constrainedType, TypeSystemEntity genericContextObject, TypeDesc devirtualizedMethodOwner, ref bool owningTypeNotDerivedFromToken) 206var tokenOnlyOwningType = module.GetType(handle); 207TypeDesc actualOwningType; 225TypeDesc typeContext = (TypeDesc)genericContextObject; 229TypeDesc instantiatedOwningType = null; 236TypeDesc currentType = devirtualizedMethodOwner; 259var canonicalizedOwningType = instantiatedOwningType.ConvertToCanonForm(CanonicalFormKind.Specific); 269TypeDesc ComputeActualOwningType(TypeDesc methodTargetOwner, TypeDesc instantiatedOwningType, TypeDesc canonicalizedOwningType) 281var currentType = canonicalizedOwningType; 438public TypeDesc ContextType { get { return (Context is MethodDesc contextAsMethod ? contextAsMethod.OwningType : (TypeDesc)Context); } } 487private Dictionary<TypeDesc, bool> _preInitedTypes = new Dictionary<TypeDesc, bool>(); 600List<TypeDesc> compExactlyDependsOnList = null; 626TypeDesc typeForBypass = fixedArguments[0].Value as TypeDesc; 630compExactlyDependsOnList = new List<TypeDesc>(); 646foreach (var intrinsicType in compExactlyDependsOnList) 906var type = HandleToObject(pResolvedToken.hClass); 916var type = HandleToObject(pResolvedToken.hClass); 926var type = HandleToObject(pResolvedToken.hClass); 939var type = HandleToObject(pResolvedToken.hClass); 955var type = HandleToObject(pResolvedToken.hClass); 977TypeDesc delegateTypeDesc = HandleToObject(delegateType); 984TypeDesc constrainedType = null; 988constrainedType = (TypeDesc)ResolveTokenInScope(methodIL, typeOrMethodContext, targetConstraint); 1368private MethodWithToken ComputeMethodWithToken(MethodDesc method, ref CORINFO_RESOLVED_TOKEN pResolvedToken, TypeDesc constrainedType, bool unboxing) 1372TypeDesc devirtualizedMethodOwner = null; 1383ModuleToken _HandleToModuleToken(ref CORINFO_RESOLVED_TOKEN pResolvedToken, MethodDesc methodDesc, out TypeSystemEntity context, ref TypeDesc constrainedType, out bool strippedInstantiation) 1514case TypeDesc typeDesc: 1569&& ((TypeDesc)ResolveTokenInScope(_compilation.GetMethodIL(MethodBeingCompiled), MethodBeingCompiled, (mdToken)classTokenOrOffset)).IsWellKnownType(WellKnownType.Exception)) 1637TypeDesc type = HandleToObject(classHandle); 1658private bool IsClassPreInited(TypeDesc type) 1665var uninstantiatedType = type.GetTypeDefinition(); 1676static bool ComputeIsClassPreInited(TypeDesc type) 1694static bool IsDynamicStaticsOrHasBoxedRegularStatics(TypeDesc type) 1727foreach (TypeDesc instantiationType in instantiation) 1902private static bool IsTypeSpecForTypicalInstantiation(TypeDesc t) 1922out TypeDesc constrainedType, 1924out TypeDesc exactType, 1937TypeDesc type = HandleToObject(pResolvedToken.hClass); 2410foreach (TypeDesc type in method.Signature) 2421TypeDesc type = HandleToObject(cls); 2425private void classMustBeLoadedBeforeCodeIsRun(TypeDesc type) 2436foreach (TypeDesc t in methodSig) 2477TypeDesc constrainedType; 2479TypeDesc exactType; 2695private bool CanEncodeTypeInSignature(TypeDesc type) 2719foreach (TypeDesc instantiationArgument in type.Instantiation) 2726TypeDesc typeDefinition = type.GetTypeDefinition(); 2785TypeDesc constrainedType = null; 2810constrainedType = (TypeDesc)GetRuntimeDeterminedObjectForToken(ref *pConstrainedResolvedToken); 2856helperArg is TypeDesc typeDesc && 2900TypeDesc td = HandleToObject(pResolvedToken.hClass); 2915TypeDesc td = HandleToObject(pResolvedToken.hClass); 2924TypeDesc td = HandleToObject(pResolvedToken.hClass); 2984TypeDesc type = HandleToObject(handle); 3028TypeDesc typeHandleType = HandleToObject(pResolvedToken.hClass); 3051TypeDesc td = HandleToObject(pResolvedToken.hClass); 3096private bool NeedsTypeLayoutCheck(TypeDesc type) 3123TypeDesc pMT = field.OwningType; 3538TypeDesc clauseType = (TypeDesc)ResolveTokenInScope(methodIL, MethodBeingCompiled, classToken); 3754foreach (var type in signature) 3760void ValidateSafetyOfUsingTypeEquivalenceOfType(TypeDesc type)
JitInterface\WasmLowering.ReadyToRun.cs (1)
24TypeDesc type = typeHandle.GetRuntimeTypeHandle();
parent\parent\Common\Compiler\AsyncContinuationType.cs (1)
57protected override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
parent\parent\Common\Compiler\AsyncMethodVariant.cs (1)
38TypeDesc md = signature.ReturnType;
parent\parent\Common\Compiler\CachingVirtualMethodAlgorithm.cs (7)
15private readonly ConcurrentDictionary<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]> _vtableCache 16= new ConcurrentDictionary<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]>(); 18private readonly Func<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]> _vtableCreator; 23private (MethodDesc Slot, MethodDesc Implementation)[] ComputeVtable(TypeDesc type) 38public override IEnumerable<MethodDesc> ComputeAllVirtualSlots(TypeDesc type) 46static IEnumerable<MethodDesc> GetCachedSlots(CachingVirtualMethodAlgorithm thisObj, TypeDesc type) 55public override MethodDesc FindVirtualFunctionTargetMethodOnObjectType(MethodDesc targetMethod, TypeDesc objectType)
parent\parent\Common\Compiler\CompilationModuleGroup.cs (1)
13public abstract bool ContainsType(TypeDesc type);
parent\parent\Common\Compiler\CompilerTypeSystemContext.Async.cs (16)
16public static IEnumerable<MethodDesc> GetAllMethodsAndAsyncVariants(this TypeDesc type) 55public override MethodDesc FindVirtualFunctionTargetMethodOnObjectType(MethodDesc targetMethod, TypeDesc objectType) 65public override DefaultInterfaceMethodResolution ResolveInterfaceMethodToDefaultImplementationOnType(MethodDesc interfaceMethod, TypeDesc currentType, out MethodDesc impl) 75public override MethodDesc ResolveInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 84public override MethodDesc ResolveInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 93public override DefaultInterfaceMethodResolution ResolveVariantInterfaceMethodToDefaultImplementationOnType(MethodDesc interfaceMethod, TypeDesc currentType, out MethodDesc impl) 102public override MethodDesc ResolveVariantInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 111public override MethodDesc ResolveVariantInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 121public override IEnumerable<MethodDesc> ComputeAllVirtualSlots(TypeDesc type) 180TypeDesc owningType = asyncVariantMethod.OwningType; 199TypeDesc owningType = taskReturningMethod.OwningType; 219TypeDesc owningType = returnDroppingThunk.OwningType; 251TypeDesc owningType = asyncVariantMethod.OwningType; 273public AsyncResumptionStub GetAsyncResumptionStub(MethodDesc targetMethod, TypeDesc owningType) 281public readonly TypeDesc OwningType; 283public AsyncResumptionStubKey(MethodDesc targetMethod, TypeDesc owningType)
parent\parent\Common\Compiler\CompilerTypeSystemContext.BoxedTypes.cs (8)
60TypeDesc owningType = targetMethod.OwningType; 87TypeDesc owningType = targetMethod.OwningType; 253TypeDesc IPrefixMangledType.BaseType => ValueTypeRepresented; 319protected override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer) 391public override TypeDesc OwningType => _owningType; 504public override TypeDesc OwningType => _owningType; 570TypeDesc owner = _targetMethod.OwningType; 581var inst = new TypeDesc[methodToInstantiate.Instantiation.Length];
parent\parent\Common\Compiler\CompilerTypeSystemContext.cs (5)
285public override VirtualMethodAlgorithm GetVirtualMethodAlgorithmForType(TypeDesc type) 302protected override TypeDesc ConvertToCanon(TypeDesc typeToConvert, CanonicalFormKind kind) 311protected override TypeDesc ConvertToCanon(TypeDesc typeToConvert, ref CanonicalFormKind kind)
parent\parent\Common\Compiler\CompilerTypeSystemContext.Validation.cs (28)
19private static List<TypeDesc> EmptyList = new List<TypeDesc>(); 33public void EnsureLoadableType(TypeDesc type) 93public TypeDesc TypeInLoadabilityCheck; 95public List<TypeDesc> OtherTypesToMarkAsSuccessfullyLoaded; 97public void AddToOtherTypesToMarkAsSuccessfullyLoaded(TypeDesc type) 101OtherTypesToMarkAsSuccessfullyLoaded = new List<TypeDesc>(); 110private static bool PushTypeLoadInProgress(TypeDesc type) 170foreach (var typeToMove in t_typeLoadCheckInProgressStack[typeCheckDepth].OtherTypesToMarkAsSuccessfullyLoaded) 198foreach (var type in typeLoadabilityCheck.OtherTypesToMarkAsSuccessfullyLoaded) 208TypeDesc owningType = method.OwningType; 215foreach (var instType in method.Instantiation) 230foreach (TypeDesc p in sig) 235private sealed class ValidTypeHashTable : LockFreeReaderHashtable<TypeDesc, TypeDesc> 237protected override bool CompareKeyToValue(TypeDesc key, TypeDesc value) => key == value; 238protected override bool CompareValueToValue(TypeDesc value1, TypeDesc value2) => value1 == value2; 239protected override TypeDesc CreateValueFromKey(TypeDesc key) => key; 240protected override int GetKeyHashCode(TypeDesc key) => key.GetHashCode(); 241protected override int GetValueHashCode(TypeDesc value) => value.GetHashCode(); 244private static TypeDesc EnsureLoadableTypeUncached(TypeDesc type) 263TypeDesc parameterType = parameterizedType.ParameterType; 314foreach (TypeDesc param in functionPointer) 373foreach (TypeDesc typeArg in defType.Instantiation)
parent\parent\Common\Compiler\CompilerTypeSystemContext.Wasm.cs (26)
16private readonly Dictionary<int, TypeDesc> _structsBySize = new Dictionary<int, TypeDesc>(); 17private readonly Dictionary<int, TypeDesc> _alignedStructsBySize = new Dictionary<int, TypeDesc>(); 18private readonly Dictionary<int, TypeDesc> _returnStructsBySize = new Dictionary<int, TypeDesc>(); 19private volatile TypeDesc _cachedEmptyStruct; 20private volatile TypeDesc _wasmV128Type; 21private volatile TypeDesc _wasmInt128Type; 22private volatile TypeDesc _wasmV256Type; 23private volatile TypeDesc _wasmV512Type; 30public TypeDesc WasmV128Type 34TypeDesc type = _wasmV128Type; 56public TypeDesc GetWasmElevatedType(char slot, int elevation) 58TypeDesc type = (slot, elevation) switch 74TypeDesc InstantiateOverByte(ReadOnlySpan<byte> name) => 83public TypeDesc CachedEmptyStruct => _cachedEmptyStruct; 88public void CacheEmptyStruct(TypeDesc type) 99public void CacheStruct(TypeDesc type, bool requiresAlignedSlot) 124public void CacheReturnStructBySize(TypeDesc type) 140public TypeDesc GetCachedReturnStructOfSize(int size) 144if (_returnStructsBySize.TryGetValue(size, out TypeDesc result)) 153public TypeDesc GetCachedStructOfSize(int size) 157if (_structsBySize.TryGetValue(size, out TypeDesc result)) 164public TypeDesc GetCachedAlignedStructOfSize(int size) 168if (_alignedStructsBySize.TryGetValue(size, out TypeDesc result))
parent\parent\Common\Compiler\Dataflow\DynamicallyAccessedMembersBinder.cs (16)
19public static IEnumerable<TypeSystemEntity> GetDynamicallyAccessedMembers(this TypeDesc typeDefinition, DynamicallyAccessedMemberTypes memberTypes, bool declaredOnly = false) 140public static IEnumerable<MethodDesc> GetConstructorsOnType(this TypeDesc type, Func<MethodDesc, bool> filter, BindingFlags? bindingFlags = null) 172public static IEnumerable<MethodDesc> GetMethodsOnTypeHierarchy(this TypeDesc type, Func<MethodDesc, bool> filter, BindingFlags? bindingFlags = null) 225public static IEnumerable<FieldDesc> GetFieldsOnTypeHierarchy(this TypeDesc type, Func<FieldDesc, bool> filter, BindingFlags? bindingFlags = BindingFlags.Default) 266public static IEnumerable<MetadataType> GetNestedTypesOnType(this TypeDesc type, Func<MetadataType, bool> filter, BindingFlags? bindingFlags = BindingFlags.Default) 292public static IEnumerable<PropertyPseudoDesc> GetPropertiesOnTypeHierarchy(this TypeDesc type, Func<PropertyPseudoDesc, bool> filter, BindingFlags? bindingFlags = BindingFlags.Default) 360public static IEnumerable<EventPseudoDesc> GetEventsOnTypeHierarchy(this TypeDesc type, Func<EventPseudoDesc, bool> filter, BindingFlags? bindingFlags = BindingFlags.Default) 430public static IEnumerable<DefType> GetAllInterfaceImplementations(this TypeDesc type, bool declaredOnly) 452public static void GetAllOnType(this TypeDesc type, bool declaredOnly, List<TypeSystemEntity> members) => GetAllOnType(type, declaredOnly, members, new HashSet<TypeDesc>()); 454private static void GetAllOnType(TypeDesc type, bool declaredOnly, List<TypeSystemEntity> members, HashSet<TypeDesc> types) 503private static DefType TryGetBaseType(this TypeDesc type) 515private static IEnumerable<T> ApplyIncludeInherited<T>(this TypeDesc type, Func<TypeDesc, IEnumerable<T>> selector, bool includeBases) 529private static DefType[] TryGetExplicitlyImplementedInterfaces(this TypeDesc type)
parent\parent\Common\Compiler\Dataflow\EcmaExtensions.cs (2)
102public static bool IsByRefOrPointer(this TypeDesc type) 105public static TypeDesc GetOwningType(this TypeSystemEntity entity)
parent\parent\Common\Compiler\Dataflow\GenericParameterProxy.cs (1)
20foreach (TypeDesc constraint in GenericParameter.TypeConstraints)
parent\parent\Common\Compiler\Dataflow\MethodProxy.cs (1)
61foreach (TypeDesc? genericParameter in methodDef.Instantiation)
parent\parent\Common\Compiler\Dataflow\ParameterProxy.cs (1)
16public TypeDesc ParameterType => IsImplicitThis
parent\parent\Common\Compiler\Dataflow\TypeExtensions.cs (3)
17public static bool IsTypeOf(this TypeDesc type, string ns, string name) 22public static bool IsTypeOf(this TypeDesc type, string fullTypeName) 42public static bool IsTypeOf(this TypeDesc type, ILLinkSharedWellKnownType wellKnownType) =>
parent\parent\Common\Compiler\Dataflow\TypeProxy.cs (5)
15public TypeProxy(TypeDesc type) => Type = type; 17public static implicit operator TypeProxy(TypeDesc type) => new(type); 21var typeDef = Type.GetTypeDefinition(); 27foreach (var genericParameter in typeDef.Instantiation) 35public TypeDesc Type { get; }
parent\parent\Common\Compiler\DependencyAnalysis\GVMDependenciesNode.cs (5)
68TypeDesc methodOwningType = _method.OwningType; 83TypeDesc methodOwningType = _method.OwningType; 105TypeDesc potentialOverrideType = typeNode.Type; 132TypeDesc potentialOverrideDefinition = potentialOverrideType.GetTypeDefinition(); 217TypeDesc overrideTypeCur = potentialOverrideType;
parent\parent\Common\Compiler\DevirtualizationManager.cs (4)
21public virtual bool IsEffectivelySealed(TypeDesc type) 56public MethodDesc ResolveVirtualMethod(MethodDesc declMethod, TypeDesc implType, out CORINFO_DEVIRTUALIZATION_DETAIL devirtualizationDetail) 128foreach (TypeDesc iface in implType.RuntimeInterfaces) 181TypeDesc checkType;
parent\parent\Common\Compiler\DisplayNameHelpers.cs (4)
20TypeDesc type => type.GetDisplayName(), 92TypeDesc instantiatedType = method.Signature[i].InstantiateSignature(method.OwningType.Instantiation, method.Instantiation); 141public static string GetDisplayName(this TypeDesc type) 146public static string GetDisplayNameWithoutNamespace(this TypeDesc type)
parent\parent\Common\Compiler\HardwareIntrinsicHelpers.cs (1)
21TypeDesc owningType = method.OwningType;
parent\parent\Common\Compiler\IExternalTypeMapNode.cs (1)
15TypeDesc TypeMapGroup { get; }
parent\parent\Common\Compiler\INativeFormatTypeReferenceProvider.cs (1)
11internal Vertex EncodeReferenceToType(NativeWriter writer, TypeDesc type, ModuleDesc module);
parent\parent\Common\Compiler\InstructionSetSupport.cs (1)
58public static string GetHardwareIntrinsicId(TargetArchitecture architecture, TypeDesc potentialTypeDesc)
parent\parent\Common\Compiler\IProxyTypeMapNode.cs (1)
15TypeDesc TypeMapGroup { get; }
parent\parent\Common\Compiler\MethodExtensions.cs (4)
81public static TypeDesc GetUnmanagedCallersOnlyAssociatedSourceType(this EcmaMethod This) 92return (TypeDesc)argument.Value; 148TypeDesc owningType = method.OwningType; 159TypeDesc ret = method.ReturnType;
parent\parent\Common\Compiler\NameMangler.cs (1)
30public abstract Utf8String GetMangledTypeName(TypeDesc type);
parent\parent\Common\Compiler\NativeAotNameMangler.cs (5)
131private Dictionary<TypeDesc, Utf8String> _mangledTypeNames = new Dictionary<TypeDesc, Utf8String>(); 179public override Utf8String GetMangledTypeName(TypeDesc type) 285private Utf8String ComputeMangledTypeName(TypeDesc type) 418var typeDefinition = type.GetTypeDefinition();
parent\parent\Common\Compiler\ProcessLinkerXmlBase.cs (21)
240private void MatchType(TypeDesc type, Regex regex, XPathNavigator nav) 252foreach (TypeDesc type in assembly.GetAllTypes()) 258protected abstract void ProcessType(TypeDesc type, XPathNavigator nav); 260protected void ProcessTypeChildren(TypeDesc type, XPathNavigator nav, object? customData = null) 271private void ProcessSelectedFields(XPathNavigator nav, TypeDesc type) 281protected virtual void ProcessField(TypeDesc type, XPathNavigator nav) 321protected static FieldDesc? GetField(TypeDesc type, string signature) 335protected virtual void ProcessField(TypeDesc type, FieldDesc field, XPathNavigator nav) { } 337private void ProcessSelectedMethods(XPathNavigator nav, TypeDesc type, object? customData) 347protected virtual void ProcessMethod(TypeDesc type, XPathNavigator nav, object? customData) 385protected virtual MethodDesc? GetMethod(TypeDesc type, string signature) => null; 387protected virtual void ProcessMethod(TypeDesc type, MethodDesc method, XPathNavigator nav, object? customData) { } 389private void ProcessSelectedEvents(XPathNavigator nav, TypeDesc type, object? customData) 399protected virtual void ProcessEvent(TypeDesc type, XPathNavigator nav, object? customData) 439protected static EventPseudoDesc? GetEvent(TypeDesc type, string signature) 447protected virtual void ProcessEvent(TypeDesc type, EventPseudoDesc @event, XPathNavigator nav, object? customData) { } 449private void ProcessSelectedProperties(XPathNavigator nav, TypeDesc type, object? customData) 459protected virtual void ProcessProperty(TypeDesc type, XPathNavigator nav, object? customData) 495protected static PropertyPseudoDesc? GetProperty(TypeDesc type, string signature) 503protected virtual void ProcessProperty(TypeDesc type, PropertyPseudoDesc property, XPathNavigator nav, object? customData, bool fromSignature) { } 615var parameter = type.Signature[i];
parent\parent\Common\Compiler\ProxyTypeMapObjectNode.cs (1)
41TypeDesc typeMapGroup = proxyTypeMap.TypeMapGroup;
parent\parent\Common\Compiler\TypeExtensions.cs (45)
15public static bool IsSealed(this TypeDesc type) 30public static DefType GetClosestDefType(this TypeDesc type) 106public static bool IsCanonicalDefinitionType(this TypeDesc type, CanonicalFormKind kind) 114public static bool IsGenericDepthGreaterThan(this TypeDesc type, int depth) 119foreach (TypeDesc instantiationType in type.Instantiation) 138foreach (TypeDesc type in method.Instantiation) 151public static bool IsArrayTypeWithoutGenericInterfaces(this TypeDesc type) 157TypeDesc elementType = arrayType.ElementType; 161public static bool? CompareTypesForEquality(TypeDesc type1, TypeDesc type2) 177static bool AreGuaranteedToRepresentDifferentTypes(TypeDesc type1, TypeDesc type2) 227public static TypeDesc MergeTypesToCommonParent(TypeDesc ta, TypeDesc tb) 305for (TypeDesc searchType = ta; searchType != null; searchType = searchType.BaseType) 310for (TypeDesc searchType = tb; searchType != null; searchType = searchType.BaseType) 342private static TypeDesc MergeArrayTypesToCommonParent(ArrayType ta, ArrayType tb) 352TypeDesc taElem = ta.ElementType; 353TypeDesc tbElem = tb.ElementType; 356TypeDesc mergeElem; 394private static bool ImplementsEquivalentInterface(this TypeDesc type, TypeDesc interfaceType) 407public static MethodDesc TryResolveConstraintMethodApprox(this TypeDesc constrainedType, TypeDesc interfaceType, MethodDesc interfaceMethod, out bool forceRuntimeLookup) 419public static MethodDesc TryResolveConstraintMethodApprox(this TypeDesc constrainedType, TypeDesc interfaceType, MethodDesc interfaceMethod, out bool forceRuntimeLookup, ref DefaultInterfaceMethodResolution staticResolution) 438foreach (TypeDesc arg in methodInstantiation) 457TypeDesc interfaceTypeCanonical = interfaceType.ConvertToCanonForm(CanonicalFormKind.Specific); 504TypeDesc canonType = constrainedType.ConvertToCanonForm(CanonicalFormKind.Specific); 650private static TypeDesc MergeClassWithInterface(TypeDesc type, TypeDesc interfaceType) 678public static TypeDesc NormalizeInstantiation(this TypeDesc thisType) 688TypeDesc[] resultArray = new TypeDesc[inst.Length]; 691TypeDesc instArg = GetTypeThatMeetsConstraints((GenericParameterDesc)inst[i], allowCanon); 700private static TypeDesc GetTypeThatMeetsConstraints(GenericParameterDesc genericParam, bool allowCanon) 716foreach (var c in genericParam.TypeConstraints) 732TypeDesc constrainedType = null; 733foreach (var c in genericParam.TypeConstraints) 756static bool HasStaticVirtualMethods(TypeDesc type) 773foreach (var arg in instantiation) 838TypeDesc firstFieldElementType = firstField.FieldType;
parent\parent\Common\Compiler\TypeMapMetadata.cs (41)
29public TypeWithSerializedName(TypeDesc type, string serializedName) 35public TypeDesc Type { get; } 79TypeDesc type, 81TypeDesc trimmingType, 92public TypeDesc Type { get; } 94public TypeDesc TrimmingType { get; } 101public ProxyTypeMapEntry(TypeDesc type, string serializedSourceTypeName, string serializedTypeName, ModuleDesc declaringModule) 109public TypeDesc Type { get; } 115private static TypeMapAttributeKind LookupTypeMapType(TypeDesc attrType) 138IReadOnlyDictionary<TypeDesc, ProxyTypeMapEntry> TypeMap { get; } 146private readonly TypeDesc _typeMapGroup; 149public ThrowingMethodStub(TypeDesc owningType, TypeDesc typeMapGroup, bool externalTypeMap, TypeSystemException ex) 179public override TypeDesc OwningType { get; } 186private readonly Dictionary<TypeDesc, ProxyTypeMapEntry> _associatedTypeMap = []; 192public Map(TypeDesc typeMapGroup) 197public TypeDesc TypeMapGroup { get; } 208TypeDesc type, 210TypeDesc associatedType, 223TypeDesc type, 225TypeDesc trimmingTarget, 271foreach (KeyValuePair<TypeDesc, ProxyTypeMapEntry> kvp in pendingMap._associatedTypeMap) 348IReadOnlyDictionary<TypeDesc, ProxyTypeMapEntry> IProxyTypeMap.TypeMap => _associatedTypeMap; 353public static readonly TypeMapMetadata Empty = new TypeMapMetadata(new Dictionary<TypeDesc, Map>(), "No type maps", null); 355private readonly IReadOnlyDictionary<TypeDesc, Map> _states; 357private TypeMapMetadata(IReadOnlyDictionary<TypeDesc, Map> states, string diagnosticName, ModuleDesc associatedModule) 366internal IEnumerable<KeyValuePair<TypeDesc, Map>> Maps => _states; 374Dictionary<TypeDesc, Map> typeMapStates = []; 378Dictionary<(EcmaAssembly assembly, TypeDesc typeMapGroup), (TypeDesc scannedDuringGroup, Map map)> pendingMaps = []; 379HashSet<(EcmaAssembly assembly, TypeDesc typeMapGroup)> scannedAssemblies = []; 381Queue<(EcmaAssembly assembly, TypeDesc typeMapGroup)> assembliesToScan = []; 386(EcmaAssembly currentAssembly, TypeDesc currentTypeMapGroup) = assembliesToScan.Dequeue(); 430TypeDesc type = (TypeDesc)currentAssembly.GetObject(attributeType, NotFoundBehavior.ReturnNull); 445TypeDesc typeMapGroup = type.Instantiation[0]; 566{ Value: TypeWithSerializedName { Type: TypeDesc targetType, SerializedName: string serializedTargetTypeName } } 582{ Value: TypeWithSerializedName { Type: TypeDesc targetType, SerializedName: string serializedTargetTypeName } }, 583{ Value: TypeWithSerializedName { Type: TypeDesc trimTargetType, SerializedName: string serializedTrimTargetTypeName } } 608{ Value: TypeWithSerializedName { Type: TypeDesc type, SerializedName: string serializedTypeName } }, 609{ Value: TypeWithSerializedName { Type: TypeDesc associatedType, SerializedName: string serializedAssociatedTypeName } }
parent\parent\Common\Compiler\VectorFieldLayoutAlgorithm.cs (1)
178public static bool IsSupportedVectorBaseType(TypeDesc elementType)
parent\parent\Common\Internal\Runtime\RiscVLoongArch64FpStruct.cs (3)
128private static bool FlattenFields(TypeDesc td, uint offset, ref FpStructInRegistersInfo info, ref int typeIndex) 155TypeDesc nested = field.FieldType; 194public static FpStructInRegistersInfo GetFpStructInRegistersInfo(TypeDesc td, TargetArchitecture arch)
parent\parent\Common\JitInterface\CorInfoImpl.cs (92)
306TypeDesc type = (TypeDesc)handleToObject[likelyClassMethods->handle]; 794private TypeDesc HandleToObject(CORINFO_CLASS_STRUCT_* type) => (TypeDesc)HandleToObject((void*)type); 795private CORINFO_CLASS_STRUCT_* ObjectToHandle(TypeDesc type) => (CORINFO_CLASS_STRUCT_*)ObjectToHandle((object)type); 933TypeDesc returnType = signature.ReturnType; 986private CorInfoType asCorInfoType(TypeDesc type) 991private CorInfoType asCorInfoType(TypeDesc type, out TypeDesc typeIfNotPrimitive) 1039private CorInfoType asCorInfoType(TypeDesc type, CORINFO_CLASS_STRUCT_** structType) 1041var corInfoType = asCorInfoType(type, out TypeDesc typeIfNotPrimitive); 1051private CORINFO_CONTEXT_STRUCT* contextFromType(TypeDesc type) 1078private TypeDesc typeFromContext(CORINFO_CONTEXT_STRUCT* contextStruct) 1137CustomAttributeValue<TypeDesc> value = reader.GetCustomAttribute(handle).DecodeValue(new CustomAttributeTypeProvider(module)); 1301TypeDesc type = HandleToObject(memberParent); 1455TypeDesc objType = HandleToObject(info->objClass); 1471TypeDesc ownerTypeDesc = typeFromContext(info->context); 1499TypeDesc owningType = originalImpl.OwningType; 1733TypeDesc comparand = HandleToObject(elemType); 1734TypeDesc comparer = IL.Stubs.ComparerIntrinsics.GetComparerForType(comparand); 1740TypeDesc comparand = HandleToObject(elemType); 1741TypeDesc comparer = IL.Stubs.ComparerIntrinsics.GetEqualityComparerForType(comparand); 1747TypeDesc elementType = HandleToObject(elemType); 1758TypeDesc type = HandleToObject(classHnd); 1880result = ((TypeDesc)result).InstantiateSignature(typeInst, methodInst); 1902if (typeOrMethodContext is TypeDesc typeContext) 1949result = ((TypeDesc)result).MakeArrayType(); 1981TypeDesc type = (TypeDesc)result; 1986Debug.Assert(((TypeDesc)result).IsRuntimeDeterminedSubtype || 1990((TypeDesc)methodIL.GetMethodILScopeDefinition().GetObject((int)token)).IsCanonicalDefinitionType(CanonicalFormKind.Any)); 2011TypeDesc owningType = methodIL.OwningMethod.GetTypicalMethodDefinition().OwningType; 2073TypeDesc owningClass = field.OwningType; 2088TypeDesc type = (TypeDesc)result; 2238var type = HandleToObject(cls); 2244TypeDesc type = HandleToObject(cls); 2266TypeDesc type = HandleToObject(cls); 2281TypeDesc type = HandleToObject(cls); 2293TypeDesc type = HandleToObject(cls); 2297private uint getClassAttribsInternal(TypeDesc type) 2382TypeDesc type = HandleToObject(cls); 2413TypeDesc type = HandleToObject(cls); 2432TypeDesc type = HandleToObject(cls); 2446TypeDesc type = HandleToObject(cls); 2557var fieldType = field.FieldType; 2628private Dictionary<TypeDesc, uint> _classNumInstanceFields = new(); 2632TypeDesc type = HandleToObject(cls); 2634var lookupType = type.GetTypeDefinition(); // The number of fields on an instantiation is the same as on the generic definition 2652TypeDesc classWithFields = HandleToObject(clsHnd); 2781TypeDesc fieldType = fd.FieldType; 2858TypeDesc type = HandleToObject(typeHnd); 2886var type = HandleToObject(cls); 2888var typeForBox = type.IsNullable ? type.Instantiation[0] : type; 2895var type = HandleToObject(cls); 2905var type = HandleToObject(cls); 2916TypeDesc type = fd != null ? fd.OwningType : typeFromContext(context); 3055var type = HandleToObject(cls); 3065var type = HandleToObject(cls); 3078TypeDesc fromType = HandleToObject(fromClass); 3079TypeDesc toType = HandleToObject(toClass); 3160TypeDesc type1 = HandleToObject(cls1); 3161TypeDesc type2 = HandleToObject(cls2); 3173TypeDesc type1 = HandleToObject(cls1); 3174TypeDesc type2 = HandleToObject(cls2); 3184TypeDesc merged = TypeExtensions.MergeTypesToCommonParent(type1, type2); 3192TypeDesc type = HandleToObject(cls); 3246TypeDesc type = HandleToObject(cls); 3258TypeDesc type = HandleToObject(cls); 3273TypeDesc type = HandleToObject(cls); 3297var td = HandleToObject(clsHnd); 3300TypeDesc returnType = ((ParameterizedType)td).ParameterType; 3313var td = HandleToObject(cls); 3397TypeDesc fieldType = fieldDesc.FieldType; 3521TypeDesc type = methodSig[index]; 3545TypeDesc type = locals[index].Type; 3561TypeDesc type = methodSig[index]; 3567TypeDesc type = locals[index].Type; 3704TypeDesc taskReturnType = taskReturningMethod.Signature.ReturnType; 3710TypeDesc returnType = caller.Signature.ReturnType; 3712TypeDesc runtimeDeterminedReturnType = runtimeDeterminedCaller.Signature.ReturnType; 3718TypeDesc parameterType = isValueTask 3727TypeDesc signatureVariable = context.GetSignatureVariable(0, method: true); 3728TypeDesc parameterType = isValueTask 3781TypeDesc awaiterType = awaitAwaiterMethod.Instantiation[0]; 3786TypeDesc runtimeDeterminedAwaiterType = runtimeDeterminedAwaitAwaiterMethod.Instantiation[0]; 3993TypeDesc typeDesc = HandleToObject(structHnd); 4042TypeDesc type = HandleToObject(structHnd); 4068TypeDesc abiType = WasmLowering.LowerToAbiType(type); 4790var queryType = HandleToObject(cls); 4825TypeDesc owningType = MethodBeingCompiled.OwningType; 4943public static void ComputeJitPgoInstrumentationSchema(Func<object, IntPtr> objectToHandle, PgoSchemaElem[] pgoResultsSchemas, out PgoInstrumentationSchema[] nativeSchemas, MemoryStream instrumentationData, Func<TypeDesc, bool> typeFilter = null)
parent\parent\Common\JitInterface\CorInfoInstructionSet.cs (1)
1507public static InstructionSet LookupPlatformIntrinsicInstructionSet(TargetArchitecture targetArch, TypeDesc intrinsicType)
parent\parent\Common\JitInterface\SwiftPhysicalLowering.cs (3)
55protected override LoweredType GetIntervalDataForType(int offset, TypeDesc fieldType) 104protected override bool NeedsRecursiveLayout(TypeDesc fieldType) => fieldType.IsValueType && !fieldType.IsPrimitiveNumeric; 213public static CORINFO_SWIFT_LOWERING LowerTypeForSwiftSignature(TypeDesc type)
parent\parent\Common\JitInterface\SystemVStructClassificator.cs (5)
68public static void GetSystemVAmd64PassStructInRegisterDescriptor(TypeDesc typeDesc, out SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR structPassInRegDescPtr) 100private static SystemVClassificationType TypeDef2SystemVClassification(TypeDesc typeDesc) 194private static bool ClassifyEightBytes(TypeDesc typeDesc, 235TypeDesc firstFieldElementType = firstField.FieldType; 238TypeDesc typeDescForFieldSearch = hasImpliedRepeatedFields ? new TypeWithRepeatedFields(mdType) : typeDesc;
parent\parent\Common\JitInterface\WasmLowering.cs (26)
24TypeDesc[] arguments = new TypeDesc[signature.Length]; 40public static TypeDesc LowerToAbiType(TypeDesc type) => LowerToAbiType(type, out _); 42private static TypeDesc LowerToAbiType(TypeDesc type, out TypeDesc multiSegmentType) 94TypeDesc firstFieldElementType = firstField.FieldType; 140public static bool TryGetMultiSegmentLayout(TypeDesc type, out WasmValueType slotType, out int slotCount) 146LowerToAbiType(type, out TypeDesc multiSegmentType); 169private static bool IsMultiSegmentType(TypeDesc type) 220private static WasmValueType? GetSlotType(TypeDesc type) 299private static bool IsWasmV128Type(TypeDesc type) 326public static WasmValueType LowerType(TypeDesc type) 335TypeDesc abiType = LowerToAbiType(type); 388public static bool IsEmptyStruct(TypeDesc type) => false; 405private static TypeDesc RaiseSigChar(char c, TypeSystemContext context) => c switch 450TypeDesc returnType; 468List<TypeDesc> parameters = new List<TypeDesc>(); 508TypeDesc emptyStruct = ((CompilerTypeSystemContext)context).CachedEmptyStruct; 524TypeDesc cachedStruct = isAlignedStruct 661TypeDesc returnType = signature.ReturnType; 669TypeDesc loweredReturnType = LowerToAbiType(returnType); 764TypeDesc paramType = signature[i]; 765TypeDesc loweredParamType = LowerToAbiType(paramType);
parent\parent\Common\Pgo\TypeSystemEntityOrUnknown.cs (3)
16public TypeSystemEntityOrUnknown(TypeDesc type) 27public TypeDesc AsType => _data as TypeDesc;
parent\parent\Common\TypeSystem\IL\HelperExtensions.cs (2)
74public static MethodDesc GetKnownMethod(this TypeDesc type, ReadOnlySpan<byte> name, MethodSignature signature) 89public static FieldDesc GetKnownField(this TypeDesc type, ReadOnlySpan<byte> name)
parent\parent\Common\TypeSystem\IL\Stubs\AsyncResumptionStub.cs (7)
19private readonly TypeDesc _owningType; 22public AsyncResumptionStub(MethodDesc targetMethod, TypeDesc owningType) 32public override TypeDesc OwningType => _owningType; 48TypeDesc objectType = Context.GetWellKnownType(WellKnownType.Object); 49TypeDesc byrefByte = Context.GetWellKnownType(WellKnownType.Byte).MakeByRefType(); 82foreach (var param in _targetMethod.Signature) 110TypeDesc continuation = Context.SystemModule.GetKnownType("System.Runtime.CompilerServices"u8, "Continuation"u8);
parent\parent\Common\TypeSystem\IL\Stubs\AsyncThunks.cs (7)
26TypeDesc returnType = sig.ReturnType; 30TypeDesc logicalReturnType = null; 42TypeDesc stackStateType = asyncHelpersType.GetKnownNestedType("RuntimeAsyncStackState"u8); 44TypeDesc awaitStateType = asyncHelpersType.GetKnownNestedType("RuntimeAsyncAwaitState"u8); 85var inst = new TypeDesc[asyncMethod.Instantiation.Length]; 157TypeDesc exceptionType = context.GetWellKnownType(WellKnownType.Exception); 265var inst = new TypeDesc[asyncVariantTarget.Instantiation.Length];
parent\parent\Common\TypeSystem\IL\Stubs\ComparerIntrinsics.cs (28)
38public static TypeDesc GetComparerForType(TypeDesc comparand) 46public static TypeDesc GetEqualityComparerForType(TypeDesc comparand) 56TypeDesc owningType = methodBeingGenerated.OwningType; 57TypeDesc comparedType = owningType.Instantiation[0]; 64TypeDesc comparerType = GetComparerForType(comparedType, flavor, interfaceName); 80private static TypeDesc GetComparerForType(TypeDesc type, ReadOnlySpan<byte> flavor, ReadOnlySpan<byte> interfaceName) 120public static TypeDesc[] GetPotentialComparersForType(TypeDesc type) 125public static TypeDesc[] GetPotentialEqualityComparersForType(TypeDesc type) 133private static TypeDesc[] GetPotentialComparersForTypeCommon(TypeDesc type, ReadOnlySpan<byte> flavor, ReadOnlySpan<byte> interfaceName) 137TypeDesc exactComparer = GetComparerForType(type, flavor, interfaceName); 143return new TypeDesc[] { exactComparer }; 152ArrayBuilder<TypeDesc> universalComparers = default(ArrayBuilder<TypeDesc>); 175TypeDesc nullableType = type.Instantiation[0]; 181return new TypeDesc[] 190return new TypeDesc[] 199public static bool? ImplementsIEquatable(TypeDesc type) 202private static bool? ImplementsInterfaceOfSelf(TypeDesc type, ReadOnlySpan<byte> interfaceName) 206foreach (TypeDesc implementedInterface in type.RuntimeInterfaces) 224TypeDesc typeDefinition = type.GetTypeDefinition(); 282TypeDesc fieldType = field.FieldType; 333TypeDesc fieldType = field.FieldType;
parent\parent\Common\TypeSystem\IL\Stubs\InterlockedIntrinsics.cs (2)
37TypeDesc ceArgType = null; 39TypeDesc tType = method.Instantiation[0];
parent\parent\Common\TypeSystem\IL\Stubs\RuntimeHelpersIntrinsics.cs (1)
26TypeDesc elementType = method.Instantiation[0];
parent\parent\Common\TypeSystem\Interop\IL\MarshalHelpers.cs (8)
13internal static TypeDesc GetNativeTypeFromMarshallerKind(TypeDesc type, 125TypeDesc elementNativeType = GetNativeTypeFromMarshallerKind( 216TypeDesc type, 691TypeDesc elementType = arrayType.ElementType; 874TypeDesc type, 910TypeDesc type, 914TypeDesc underlyingType = type.UnderlyingType;
parent\parent\Common\TypeSystem\Interop\IL\Marshaller.cs (35)
35public TypeDesc ManagedType; 36public TypeDesc ManagedParameterType; 39private TypeDesc _nativeType; 40private TypeDesc _nativeParamType; 46public TypeDesc NativeType 71public TypeDesc NativeParameterType 77TypeDesc nativeParamType = NativeType; 127public Home(ILLocalVariable var, TypeDesc type, bool isByRef) 134public Home(int argIndex, TypeDesc type, bool isByRef) 207private TypeDesc _type; 227public static Marshaller CreateMarshaller(TypeDesc parameterType, 338public static Marshaller CreateDisabledMarshaller(TypeDesc parameterType, 411TypeDesc parameterType = (i == 0) ? methodSig.ReturnType : methodSig[i - 1]; //first item is the return type 1098protected TypeDesc ManagedElementType 1108protected TypeDesc NativeElementType 1185var indexType = Marshallers[index].ManagedType; 1243TypeDesc nativeElementType = NativeElementType; 1279var elementType = ManagedElementType; 1298TypeDesc nativeElementType = NativeElementType; 1342var elementType = ManagedElementType; 1343var nativeElementType = NativeElementType; 1420var elementType = ManagedElementType; 1451var nativeElementType = NativeElementType; 1649TypeDesc charRefType = Context.GetWellKnownType(WellKnownType.Char).MakeByRefType(); 1704new TypeDesc[] { 1823TypeDesc marshallerIn = MarshallerIn; 1841new TypeDesc[] { Context.GetWellKnownType(WellKnownType.Byte) }); 1845new TypeDesc[] { Context.GetWellKnownType(WellKnownType.Void).MakePointerType(), Context.GetWellKnownType(WellKnownType.Int32) })))); 1897ManagedType.Context.GetWellKnownType(WellKnownType.Void), TypeDesc.EmptyTypes)); 1953new TypeDesc[] { Context.GetWellKnownType(WellKnownType.Boolean).MakeByRefType() })))); 1958new MethodSignature(0, 0, Context.GetWellKnownType(WellKnownType.IntPtr), TypeDesc.EmptyTypes)))); 1967new MethodSignature(0, 0, Context.GetWellKnownType(WellKnownType.Void), TypeDesc.EmptyTypes)))); 2002new TypeDesc[] { Context.GetWellKnownType(WellKnownType.IntPtr) })))); 2062new TypeDesc[] { Context.GetSignatureVariable(0, method: true) } 2088new TypeDesc[] { Context.GetWellKnownType(WellKnownType.IntPtr) }
parent\parent\Common\TypeSystem\Interop\IL\MarshalUtils.cs (1)
12public static bool IsBlittableType(TypeDesc type)
parent\parent\Common\TypeSystem\Interop\InteropTypes.cs (20)
72public static bool IsSafeHandle(TypeSystemContext context, TypeDesc type) 77public static bool IsCriticalHandle(TypeSystemContext context, TypeDesc type) 82private static bool IsCoreNamedType(TypeSystemContext context, TypeDesc type, ReadOnlySpan<byte> @namespace, ReadOnlySpan<byte> name) 90public static bool IsHandleRef(TypeSystemContext context, TypeDesc type) 95public static bool IsSystemDateTime(TypeSystemContext context, TypeDesc type) 100public static bool IsStringBuilder(TypeSystemContext context, TypeDesc type) 105public static bool IsSystemDecimal(TypeSystemContext context, TypeDesc type) 110public static bool IsSystemDelegate(TypeSystemContext context, TypeDesc type) 115public static bool IsSystemMulticastDelegate(TypeSystemContext context, TypeDesc type) 120public static bool IsSystemGuid(TypeSystemContext context, TypeDesc type) 125public static bool IsSystemArgIterator(TypeSystemContext context, TypeDesc type) 130public static bool IsSystemSpan(TypeSystemContext context, TypeDesc type) 135public static bool IsSystemReadOnlySpan(TypeSystemContext context, TypeDesc type) 140public static bool IsSystemNullable(TypeSystemContext context, TypeDesc type) 145public static bool IsSystemRuntimeIntrinsicsVector64T(TypeSystemContext context, TypeDesc type) 150public static bool IsSystemRuntimeIntrinsicsVector128T(TypeSystemContext context, TypeDesc type) 155public static bool IsSystemRuntimeIntrinsicsVector256T(TypeSystemContext context, TypeDesc type) 160public static bool IsSystemRuntimeIntrinsicsVector512T(TypeSystemContext context, TypeDesc type) 165public static bool IsSystemNumericsVectorT(TypeSystemContext context, TypeDesc type) 170private static bool IsOrDerivesFromType(TypeDesc type, MetadataType targetType)
parent\parent\Common\TypeSystem\Interop\UnmanagedCallingConventions.cs (7)
102CustomAttributeValue<TypeDesc> unmanagedCallersOnlyAttribute = ((EcmaMethod)method).GetDecodedCustomAttribute("System.Runtime.InteropServices", "UnmanagedCallersOnlyAttribute").Value; 125CustomAttributeValue<TypeDesc>? unmanagedCallConvAttribute = ecmaMethod.GetDecodedCustomAttribute("System.Runtime.InteropServices", "UnmanagedCallConvAttribute"); 142public static UnmanagedCallingConventions GetDelegateCallingConventions(this TypeDesc delegateType) 161private static UnmanagedCallingConventions GetUnmanagedCallingConventionFromAttribute(CustomAttributeValue<TypeDesc> attributeWithCallConvsArray, TypeSystemContext context) 163ImmutableArray<CustomAttributeTypedArgument<TypeDesc>> callConvArray = default; 168callConvArray = (ImmutableArray<CustomAttributeTypedArgument<TypeDesc>>)arg.Value; 176foreach (CustomAttributeTypedArgument<TypeDesc> type in callConvArray)
parent\parent\Common\TypeSystem\MetadataEmitter\TypeSystemMetadataEmitter.cs (8)
25private Dictionary<TypeDesc, EntityHandle> _typeRefs = new Dictionary<TypeDesc, EntityHandle>(); 169case TypeDesc type: return GetTypeRef(type); 204public EntityHandle GetTypeRef(TypeDesc type) 310foreach (var type in method.Instantiation) 349private void EncodeType(BlobBuilder blobBuilder, TypeDesc type, EmbeddedSignatureDataEmitter signatureDataEmitter) 469foreach (var instantiationArg in type.Instantiation) 705private void EncodeFieldSignature(BlobBuilder signatureBuilder, TypeDesc fieldType, EmbeddedSignatureDataEmitter signatureDataEmitter)
PortableCallHelpers\InteropSignature.cs (2)
53public static string GetAbiToken(TypeDesc type) 58TypeDesc loweredType = WasmLowering.LowerToAbiType(type);
PortableCallHelpers\PInvokeCollector.cs (6)
77is CustomAttributeValue<TypeDesc> attribute) 106public TypeDesc ReturnType { get; } 128private readonly Dictionary<TypeDesc, bool> _typeUnsupportedOnPlatform = []; 207private bool IsUnsupportedOnPlatform(TypeDesc type) 247Func<string, string, IEnumerable<CustomAttributeValue<TypeDesc>>> getAttributes) 270bool MatchesTargetOS(CustomAttributeValue<TypeDesc> attribute)
PortableCallHelpers\PInvokeTableGenerator.cs (7)
360TypeDesc returnType = signature.ReturnType; 362foreach (TypeDesc parameter in ParameterTypes(signature)) 396private static bool IsPassedByReference(TypeDesc type) 404private static string TypeToNameType(TypeDesc type) 415private static string MapType(TypeDesc type) => type.Category switch 428private static string PickCTypeNameForUnknownType(TypeDesc type) 468private static IEnumerable<TypeDesc> ParameterTypes(MethodSignature signature)
PortableCallHelpers\TypeNames.cs (1)
34public static string GetNamespace(TypeDesc type)
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\GraphBuilder.cs (19)
27HashSet<TypeDesc> types = new HashSet<TypeDesc>(); 28List<TypeDesc> typesToProcess = new List<TypeDesc>(); 32var processType = typesToProcess[typesToProcess.Count - 1]; 53void AddSpecializedType(TypeDesc typeToSpecialize) 57var specializedType = typeToSpecialize.InstantiateSignature(processType.Instantiation, default(Instantiation)); 88void AddProcessType(TypeDesc type) 103foreach (var instType in type.Instantiation) 118IEnumerable<GenericParameterDesc> GetGenericParameters(TypeDesc t) 133foreach (var instType in t.Instantiation) 147foreach (var parameterType in fptrType.Signature) 245TypeDesc baseType = declaringType.BaseType; 257private void ProcessAncestorType(TypeDesc ancestorType, Instantiation typeContext) 280TypeDesc methodOwningType = method.OwningType; 327foreach (TypeDesc parameterType in methodSig) 376var t = methodIL.GetObject(MetadataTokens.GetToken(accessedType), NotFoundBehavior.ReturnNull) as TypeDesc; 452private void ProcessTypeReference(TypeDesc typeReference, Instantiation typeContext, Instantiation methodContext)
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\GraphBuilder.ForEach.cs (4)
27private static void ForEachEmbeddedGenericFormal(TypeDesc typeExpression, Instantiation typeContext, Instantiation methodContext, ref EmbeddingStateList collector) 32private static void ForEachEmbeddedGenericFormalWorker(TypeDesc type, Instantiation typeContext, Instantiation methodContext, ref EmbeddingStateList collector, int depth) 59TypeDesc genericTypeDefinition = type.GetTypeDefinition(); 66TypeDesc genericTypeArgument = genericTypeArguments[i];
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\ModuleCycleInfo.cs (15)
38TypeDesc ownerType = (owner as EcmaMethod)?.OwningType; 123if (entity is TypeDesc type) 133private bool IsDeepPossiblyCyclicInstantiation(TypeDesc type) 139private bool IsDeepPossiblyCyclicInstantiation(TypeDesc type, ref int breadthCounter, List<TypeDesc> seenTypes = null) 145TypeDesc parameterType = type; 160TypeDesc typeDef = type.GetTypeDefinition(); 171(seenTypes ??= new List<TypeDesc>()).Add(typeDef); 174TypeDesc typeToFind = seenTypes[i]; 198private bool IsDeepPossiblyCyclicInstantiation(Instantiation instantiation, ref int breadthCounter, List<TypeDesc> seenTypes) 200foreach (TypeDesc arg in instantiation) 254var ownerType = owner as TypeDesc; 257var referentType = referent as TypeDesc;
TypeSystem\Mutable\MutableModule.cs (3)
468public TypeDesc GetType(EntityHandle handle) 470TypeDesc type = GetObject(handle, NotFoundBehavior.Throw) as TypeDesc;
ILCompiler.RyuJit (155)
Compiler\DependencyAnalysis\MethodCodeNode.cs (4)
30private TypeDesc[] _localTypes; 80TypeDesc owningType = _method.OwningType; 175public void InitializeLocalTypes(TypeDesc[] localTypes) 224TypeDesc varType;
Compiler\RyuJitCompilation.cs (2)
78public override IEETypeNode NecessaryTypeSymbolIfPossible(TypeDesc type) 96public FrozenRuntimeTypeNode NecessaryRuntimeTypeIfPossible(TypeDesc type)
JitInterface\CorInfoImpl.RyuJit.cs (34)
357var type = HandleToObject(pResolvedToken.hClass); 394TypeDesc delegateTypeDesc = HandleToObject(delegateType); 399TypeDesc constrainedType = null; 409var canonConstrainedType = (TypeDesc)ResolveTokenInScope(methodIL, typeOrMethodContext, targetConstraint); 410TypeDesc interfaceType = HandleToObject(pTargetMethod.hClass); 412constrainedType = (TypeDesc)GetRuntimeDeterminedObjectForToken(methodIL, typeOrMethodContext, targetConstraint); 951var type = (TypeDesc)methodIL.GetObject((int)clause.ClassTokenOrOffset); 1075TypeDesc type = HandleToObject(pResolvedToken.hClass); 1133TypeDesc type = HandleToObject(classHandle); 1158TypeDesc type = HandleToObject(arrayCls); 1162TypeDesc elementType = ((ArrayType)type).ElementType; 1190private static bool IsTypeSpecForTypicalInstantiation(TypeDesc t) 1219TypeDesc exactType = HandleToObject(pResolvedToken.hClass); 1221TypeDesc constrainedType = null; 1391TypeDesc runtimeDeterminedConstrainedType = (TypeDesc)GetRuntimeDeterminedObjectForToken(ref *pConstrainedResolvedToken); 1494TypeDesc owningType = targetMethod.OwningType; 1569TypeDesc runtimeDeterminedConstrainedType = (TypeDesc)GetRuntimeDeterminedObjectForToken(ref *pConstrainedResolvedToken); 1724TypeDesc type = HandleToObject(handle); 1754TypeDesc td = HandleToObject(pResolvedToken.hClass); 1775TypeDesc td = HandleToObject(pResolvedToken.hClass); 1786TypeDesc td = HandleToObject(pResolvedToken.hClass); 1792target = obj as TypeDesc; 1822if (((TypeDesc)target).IsRuntimeDeterminedSubtype) 1887TypeDesc owningType = methodDesc.OwningType; 1990TypeDesc owningType = method.OwningType; 2268private bool CanNeverHaveInstanceOfSubclassOf(TypeDesc type) 2282TypeDesc canonType = type.ConvertToCanonForm(CanonicalFormKind.Specific); 2315TypeDesc[] implClasses = _compilation.GetImplementingClasses(type); 2322foreach (TypeDesc implClass in implClasses) 2444TypeDesc type = HandleToObject(cls);
parent\ILCompiler.Compiler\Compiler\JitHelper.cs (3)
224TypeDesc t = context.GetWellKnownType(WellKnownType.Int64); 231TypeDesc t = context.GetWellKnownType(WellKnownType.UInt64); 350public static string GetNewObjectHelperForType(TypeDesc type)
parent\ILCompiler.ReadyToRun\IBC\MIbcProfileParser.cs (3)
39return new TypeSystemEntityOrUnknown((TypeDesc)null); 45TypeDesc foundType = _ilBody.GetObject((int)token, NotFoundBehavior.ReturnNull) as TypeDesc;
parent\parent\Common\Internal\Runtime\RiscVLoongArch64FpStruct.cs (3)
128private static bool FlattenFields(TypeDesc td, uint offset, ref FpStructInRegistersInfo info, ref int typeIndex) 155TypeDesc nested = field.FieldType; 194public static FpStructInRegistersInfo GetFpStructInRegistersInfo(TypeDesc td, TargetArchitecture arch)
parent\parent\Common\JitInterface\CorInfoImpl.cs (93)
306TypeDesc type = (TypeDesc)handleToObject[likelyClassMethods->handle]; 606TypeDesc[] localTypes = new TypeDesc[locals.Length]; 794private TypeDesc HandleToObject(CORINFO_CLASS_STRUCT_* type) => (TypeDesc)HandleToObject((void*)type); 795private CORINFO_CLASS_STRUCT_* ObjectToHandle(TypeDesc type) => (CORINFO_CLASS_STRUCT_*)ObjectToHandle((object)type); 933TypeDesc returnType = signature.ReturnType; 986private CorInfoType asCorInfoType(TypeDesc type) 991private CorInfoType asCorInfoType(TypeDesc type, out TypeDesc typeIfNotPrimitive) 1039private CorInfoType asCorInfoType(TypeDesc type, CORINFO_CLASS_STRUCT_** structType) 1041var corInfoType = asCorInfoType(type, out TypeDesc typeIfNotPrimitive); 1051private CORINFO_CONTEXT_STRUCT* contextFromType(TypeDesc type) 1078private TypeDesc typeFromContext(CORINFO_CONTEXT_STRUCT* contextStruct) 1137CustomAttributeValue<TypeDesc> value = reader.GetCustomAttribute(handle).DecodeValue(new CustomAttributeTypeProvider(module)); 1301TypeDesc type = HandleToObject(memberParent); 1455TypeDesc objType = HandleToObject(info->objClass); 1471TypeDesc ownerTypeDesc = typeFromContext(info->context); 1499TypeDesc owningType = originalImpl.OwningType; 1733TypeDesc comparand = HandleToObject(elemType); 1734TypeDesc comparer = IL.Stubs.ComparerIntrinsics.GetComparerForType(comparand); 1740TypeDesc comparand = HandleToObject(elemType); 1741TypeDesc comparer = IL.Stubs.ComparerIntrinsics.GetEqualityComparerForType(comparand); 1747TypeDesc elementType = HandleToObject(elemType); 1758TypeDesc type = HandleToObject(classHnd); 1880result = ((TypeDesc)result).InstantiateSignature(typeInst, methodInst); 1902if (typeOrMethodContext is TypeDesc typeContext) 1949result = ((TypeDesc)result).MakeArrayType(); 1981TypeDesc type = (TypeDesc)result; 1986Debug.Assert(((TypeDesc)result).IsRuntimeDeterminedSubtype || 1990((TypeDesc)methodIL.GetMethodILScopeDefinition().GetObject((int)token)).IsCanonicalDefinitionType(CanonicalFormKind.Any)); 2073TypeDesc owningClass = field.OwningType; 2088TypeDesc type = (TypeDesc)result; 2238var type = HandleToObject(cls); 2244TypeDesc type = HandleToObject(cls); 2266TypeDesc type = HandleToObject(cls); 2281TypeDesc type = HandleToObject(cls); 2293TypeDesc type = HandleToObject(cls); 2297private uint getClassAttribsInternal(TypeDesc type) 2382TypeDesc type = HandleToObject(cls); 2413TypeDesc type = HandleToObject(cls); 2432TypeDesc type = HandleToObject(cls); 2446TypeDesc type = HandleToObject(cls); 2557var fieldType = field.FieldType; 2628private Dictionary<TypeDesc, uint> _classNumInstanceFields = new(); 2632TypeDesc type = HandleToObject(cls); 2634var lookupType = type.GetTypeDefinition(); // The number of fields on an instantiation is the same as on the generic definition 2652TypeDesc classWithFields = HandleToObject(clsHnd); 2781TypeDesc fieldType = fd.FieldType; 2858TypeDesc type = HandleToObject(typeHnd); 2886var type = HandleToObject(cls); 2888var typeForBox = type.IsNullable ? type.Instantiation[0] : type; 2895var type = HandleToObject(cls); 2905var type = HandleToObject(cls); 2916TypeDesc type = fd != null ? fd.OwningType : typeFromContext(context); 3055var type = HandleToObject(cls); 3065var type = HandleToObject(cls); 3078TypeDesc fromType = HandleToObject(fromClass); 3079TypeDesc toType = HandleToObject(toClass); 3160TypeDesc type1 = HandleToObject(cls1); 3161TypeDesc type2 = HandleToObject(cls2); 3173TypeDesc type1 = HandleToObject(cls1); 3174TypeDesc type2 = HandleToObject(cls2); 3184TypeDesc merged = TypeExtensions.MergeTypesToCommonParent(type1, type2); 3192TypeDesc type = HandleToObject(cls); 3246TypeDesc type = HandleToObject(cls); 3258TypeDesc type = HandleToObject(cls); 3273TypeDesc type = HandleToObject(cls); 3297var td = HandleToObject(clsHnd); 3300TypeDesc returnType = ((ParameterizedType)td).ParameterType; 3313var td = HandleToObject(cls); 3397TypeDesc fieldType = fieldDesc.FieldType; 3521TypeDesc type = methodSig[index]; 3545TypeDesc type = locals[index].Type; 3561TypeDesc type = methodSig[index]; 3567TypeDesc type = locals[index].Type; 3704TypeDesc taskReturnType = taskReturningMethod.Signature.ReturnType; 3710TypeDesc returnType = caller.Signature.ReturnType; 3712TypeDesc runtimeDeterminedReturnType = runtimeDeterminedCaller.Signature.ReturnType; 3718TypeDesc parameterType = isValueTask 3727TypeDesc signatureVariable = context.GetSignatureVariable(0, method: true); 3728TypeDesc parameterType = isValueTask 3781TypeDesc awaiterType = awaitAwaiterMethod.Instantiation[0]; 3786TypeDesc runtimeDeterminedAwaiterType = runtimeDeterminedAwaitAwaiterMethod.Instantiation[0]; 3993TypeDesc typeDesc = HandleToObject(structHnd); 4042TypeDesc type = HandleToObject(structHnd); 4068TypeDesc abiType = WasmLowering.LowerToAbiType(type); 4790var queryType = HandleToObject(cls); 4825TypeDesc owningType = MethodBeingCompiled.OwningType; 4943public static void ComputeJitPgoInstrumentationSchema(Func<object, IntPtr> objectToHandle, PgoSchemaElem[] pgoResultsSchemas, out PgoInstrumentationSchema[] nativeSchemas, MemoryStream instrumentationData, Func<TypeDesc, bool> typeFilter = null)
parent\parent\Common\JitInterface\SwiftPhysicalLowering.cs (3)
55protected override LoweredType GetIntervalDataForType(int offset, TypeDesc fieldType) 104protected override bool NeedsRecursiveLayout(TypeDesc fieldType) => fieldType.IsValueType && !fieldType.IsPrimitiveNumeric; 213public static CORINFO_SWIFT_LOWERING LowerTypeForSwiftSignature(TypeDesc type)
parent\parent\Common\JitInterface\SystemVStructClassificator.cs (5)
68public static void GetSystemVAmd64PassStructInRegisterDescriptor(TypeDesc typeDesc, out SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR structPassInRegDescPtr) 100private static SystemVClassificationType TypeDef2SystemVClassification(TypeDesc typeDesc) 194private static bool ClassifyEightBytes(TypeDesc typeDesc, 235TypeDesc firstFieldElementType = firstField.FieldType; 238TypeDesc typeDescForFieldSearch = hasImpliedRepeatedFields ? new TypeWithRepeatedFields(mdType) : typeDesc;
parent\parent\Common\Pgo\TypeSystemEntityOrUnknown.cs (3)
16public TypeSystemEntityOrUnknown(TypeDesc type) 27public TypeDesc AsType => _data as TypeDesc;
parent\parent\Common\TypeSystem\IL\HelperExtensions.cs (2)
74public static MethodDesc GetKnownMethod(this TypeDesc type, ReadOnlySpan<byte> name, MethodSignature signature) 89public static FieldDesc GetKnownField(this TypeDesc type, ReadOnlySpan<byte> name)
ILCompiler.TypeSystem (620)
parent\parent\Common\TypeSystem\Canon\ArrayType.Canon.cs (3)
9protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind) 11TypeDesc paramTypeConverted = Context.ConvertToCanon(ParameterType, kind); 33TypeDesc canonicalizedTypeOfTargetMethod = _owningType.ConvertToCanonForm(kind);
parent\parent\Common\TypeSystem\Canon\ByRefType.Canon.cs (2)
9protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind) 11TypeDesc paramTypeConverted = Context.ConvertToCanon(ParameterType, kind);
parent\parent\Common\TypeSystem\Canon\CanonTypes.cs (2)
109protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind) 194protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind)
parent\parent\Common\TypeSystem\Canon\CanonTypes.Sorting.cs (1)
11protected internal sealed override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
parent\parent\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)
parent\parent\Common\TypeSystem\Canon\DefType.Canon.cs (1)
9protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind)
parent\parent\Common\TypeSystem\Canon\FunctionPointerType.Canon.cs (1)
21protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind)
parent\parent\Common\TypeSystem\Canon\GenericParameterDesc.Canon.cs (1)
17protected sealed override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind)
parent\parent\Common\TypeSystem\Canon\InstantiatedMethod.Canon.cs (1)
102foreach (TypeDesc type in Instantiation)
parent\parent\Common\TypeSystem\Canon\InstantiatedType.Canon.cs (2)
15foreach (TypeDesc t in Instantiation) 26protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind)
parent\parent\Common\TypeSystem\Canon\MethodForInstantiatedType.Canon.cs (1)
16TypeDesc canonicalizedTypeOfTargetMethod = OwningType.ConvertToCanonForm(kind);
parent\parent\Common\TypeSystem\Canon\PointerType.Canon.cs (2)
9protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind) 11TypeDesc paramTypeConverted = Context.ConvertToCanon(ParameterType, kind);
parent\parent\Common\TypeSystem\Canon\SignatureVariable.Canon.cs (2)
17protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind) 33protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind)
parent\parent\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);
parent\parent\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);
parent\parent\Common\TypeSystem\Canon\TypeSystemConstraintsHelpers.Canon.cs (3)
10private static bool IsSpecialTypeMeetingConstraint(TypeDesc type, GenericConstraints constraint) 29private static bool CanCastToConstraintWithCanon(TypeDesc instantiationParam, TypeDesc instantiatedConstraintType)
parent\parent\Common\TypeSystem\Canon\TypeSystemContext.Canon.cs (3)
49public bool IsCanonicalDefinitionType(TypeDesc type, CanonicalFormKind kind) 88protected internal virtual TypeDesc ConvertToCanon(TypeDesc typeToConvert, CanonicalFormKind kind)
parent\parent\Common\TypeSystem\Common\ArrayOfTRuntimeInterfacesAlgorithm.cs (2)
28public override DefType[] ComputeRuntimeInterfaces(TypeDesc _type) 32TypeDesc arrayOfTInstantiation = _arrayOfTType.MakeInstantiatedType(arrayType.ElementType);
parent\parent\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);
parent\parent\Common\TypeSystem\Common\BaseTypeRuntimeInterfacesAlgorithm.cs (1)
24public override DefType[] ComputeRuntimeInterfaces(TypeDesc _type)
parent\parent\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);
parent\parent\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)
parent\parent\Common\TypeSystem\Common\CastingHelper.TypeEquivalence.cs (4)
15static partial void IsEquivalentTo(this TypeDesc thisType, TypeDesc otherType, StackOverflowProtect visited, ref bool isEquivalentTo) 21private static bool IsEquivalentToHelper(TypeDesc thisType, TypeDesc otherType, StackOverflowProtect visited)
parent\parent\Common\TypeSystem\Common\ConstructedTypeRewritingHelpers.cs (19)
21public static bool IsConstructedOverType(this TypeDesc type, TypeDesc[] typesToFind) 71public static TypeDesc ReplaceTypesInConstructionOfType(this TypeDesc type, TypeDesc[] typesToReplace, TypeDesc[] replacementTypes) 80TypeDesc[] newInstantiation = null; 84TypeDesc oldType = type.Instantiation[instantiationIndex]; 85TypeDesc newType = oldType.ReplaceTypesInConstructionOfType(typesToReplace, replacementTypes); 90newInstantiation = new TypeDesc[type.Instantiation.Length]; 103TypeDesc oldParameter = parameterizedType.ParameterType; 104TypeDesc newParameter = oldParameter.ReplaceTypesInConstructionOfType(typesToReplace, replacementTypes); 153public static MethodDesc ReplaceTypesInConstructionOfMethod(this MethodDesc method, TypeDesc[] typesToReplace, TypeDesc[] replacementTypes) 155TypeDesc newOwningType = method.OwningType.ReplaceTypesInConstructionOfType(typesToReplace, replacementTypes); 177TypeDesc[] newInstantiation = null; 181TypeDesc oldType = method.Instantiation[instantiationIndex]; 182TypeDesc newType = oldType.ReplaceTypesInConstructionOfType(typesToReplace, replacementTypes); 187newInstantiation = new TypeDesc[method.Instantiation.Length];
parent\parent\Common\TypeSystem\Common\ExplicitLayoutValidator.cs (2)
36protected override FieldLayoutTag GetIntervalDataForType(int offset, TypeDesc fieldType) 77protected override bool NeedsRecursiveLayout(TypeDesc fieldType)
parent\parent\Common\TypeSystem\Common\FieldDesc.cs (2)
57public abstract TypeDesc FieldType 112TypeDesc instantiatedOwningType = owningType.InstantiateSignature(typeInstantiation, methodInstantiation);
parent\parent\Common\TypeSystem\Common\FieldForInstantiatedType.cs (1)
51public override TypeDesc FieldType
parent\parent\Common\TypeSystem\Common\FieldLayoutIntervalCalculator.cs (7)
58protected abstract bool NeedsRecursiveLayout(TypeDesc fieldType); 60protected abstract TIntervalTag GetIntervalDataForType(int offset, TypeDesc fieldType); 64private int GetFieldSize(TypeDesc fieldType) 81public void AddFields(TypeDesc type, bool addTrailingEmptyInterval = true) => AddToFieldLayout(0, type, addTrailingEmptyInterval: false); 83public void AddToFieldLayout(int offset, TypeDesc fieldType) => AddToFieldLayout(offset, fieldType, addTrailingEmptyInterval: true); 85public void AddToFieldLayout(int offset, TypeDesc fieldType, bool addTrailingEmptyInterval) 127private void AddToFieldLayout(List<FieldLayoutInterval> fieldLayout, int offset, TypeDesc fieldType)
parent\parent\Common\TypeSystem\Common\FunctionPointerType.cs (1)
45public override TypeDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation)
parent\parent\Common\TypeSystem\Common\GenericParameterDesc.cs (1)
120public virtual IEnumerable<TypeDesc> TypeConstraints
parent\parent\Common\TypeSystem\Common\ImpliedRepeatedFieldDesc.cs (1)
23public override TypeDesc FieldType => _underlyingFieldDesc.FieldType;
parent\parent\Common\TypeSystem\Common\InstantiatedMethod.cs (3)
50public override TypeDesc OwningType 58private TypeDesc Instantiate(TypeDesc type)
parent\parent\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
parent\parent\Common\TypeSystem\Common\InstantiatedType.MethodImpls.cs (1)
29var implTypeInstantiated = uninstMethodImpls[i].Decl.OwningType.InstantiateSignature(this.Instantiation, default(Instantiation));
parent\parent\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
parent\parent\Common\TypeSystem\Common\LayoutInt.cs (1)
95public static LayoutInt AddThrowing(LayoutInt left, LayoutInt right, TypeDesc loadedType)
parent\parent\Common\TypeSystem\Common\LocalVariableDefinition.cs (2)
17public readonly TypeDesc Type; 19public LocalVariableDefinition(TypeDesc type, bool isPinned)
parent\parent\Common\TypeSystem\Common\MetadataFieldLayoutAlgorithm.cs (10)
37TypeDesc fieldType = field.FieldType; 208TypeDesc fieldType = field.FieldType; 255TypeDesc fieldType = field.FieldType; 287TypeDesc fieldType = field.FieldType; 343TypeDesc fieldType = field.FieldType; 765TypeDesc fieldType = field.FieldType; 821TypeDesc fieldType = field.FieldType; 1100private static bool IsByValueClass(TypeDesc type) 1134private static SizeAndAlignment ComputeFieldSizeAndAlignment(TypeDesc fieldType, bool hasLayout, int packingSize, out ComputedFieldData fieldData) 1396TypeDesc fieldType = field.FieldType;
parent\parent\Common\TypeSystem\Common\MetadataRuntimeInterfacesAlgorithm.cs (1)
16public override DefType[] ComputeRuntimeInterfaces(TypeDesc _type)
parent\parent\Common\TypeSystem\Common\MetadataTypeSystemContext.cs (1)
96protected internal sealed override bool ComputeHasStaticConstructor(TypeDesc type)
parent\parent\Common\TypeSystem\Common\MetadataVirtualMethodAlgorithm.cs (14)
218public override MethodDesc FindVirtualFunctionTargetMethodOnObjectType(MethodDesc targetMethod, TypeDesc objectType) 273foreach (TypeDesc iface in type.RuntimeInterfaces) 361foreach (TypeDesc iface in type.ExplicitlyImplementedInterfaces) 653public override MethodDesc ResolveInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 658public override MethodDesc ResolveVariantInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 663public override MethodDesc ResolveInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 668public override MethodDesc ResolveVariantInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 786foreach (TypeDesc iface in currentType.RuntimeInterfaces) 846public override DefaultInterfaceMethodResolution ResolveInterfaceMethodToDefaultImplementationOnType(MethodDesc interfaceMethod, TypeDesc currentType, out MethodDesc impl) 851public override DefaultInterfaceMethodResolution ResolveVariantInterfaceMethodToDefaultImplementationOnType(MethodDesc interfaceMethod, TypeDesc currentType, out MethodDesc impl) 868TypeDesc interfaceMT, 934TypeDesc interfaceMT = interfaceMethod.OwningType; 1083public override IEnumerable<MethodDesc> ComputeAllVirtualSlots(TypeDesc type) 1145TypeDesc interfaceType = interfaceMethod.OwningType;
parent\parent\Common\TypeSystem\Common\MethodDelegator.cs (1)
24public override TypeDesc OwningType => _wrappedMethod.OwningType;
parent\parent\Common\TypeSystem\Common\MethodDesc.cs (31)
41public TypeDesc type; 51internal TypeDesc _returnType; 52internal TypeDesc[] _parameters; 75public MethodSignature(MethodSignatureFlags flags, int genericParameterCount, TypeDesc returnType, TypeDesc[] parameters, EmbeddedSignatureData[] embeddedSignatureData = null) 92TypeDesc[] newParameters = _parameters; // Re-use existing array until conflict appears 93TypeDesc returnTypeNew = _returnType.InstantiateSignature(substitution, default(Instantiation)); 97newParameters = (TypeDesc[])_parameters.Clone(); 102TypeDesc newParameter = newParameters[i].InstantiateSignature(substitution, default(Instantiation)); 108newParameters = (TypeDesc[])_parameters.Clone(); 156public TypeDesc ReturnType 168public TypeDesc this[int index] 198TypeDesc modifierType) 338static bool IsTypeEqualHelper(TypeDesc type1, TypeDesc type2, bool allowEquivalence, StackOverflowProtect visited) 382public TypeDesc Current => _signature[_index]; 403private TypeDesc _returnType; 404private TypeDesc[] _parameters; 426public TypeDesc ReturnType 435public TypeDesc this[int index] 444TypeDesc[] parameters = new TypeDesc[_parameters.Length]; 457_parameters = new TypeDesc[value]; 544public abstract TypeDesc OwningType 762TypeDesc owningType = OwningType; 770TypeDesc[] clone = null; 774TypeDesc uninst = instantiation[i]; 775TypeDesc inst = uninst.InstantiateSignature(typeInstantiation, methodInstantiation); 780clone = new TypeDesc[instantiation.Length]; 792TypeDesc owningType = method.OwningType; 793TypeDesc instantiatedOwningType = owningType.InstantiateSignature(typeInstantiation, methodInstantiation);
parent\parent\Common\TypeSystem\Common\MethodDesc.ToString.cs (1)
26foreach (TypeDesc param in _parameters)
parent\parent\Common\TypeSystem\Common\MethodForInstantiatedType.cs (3)
43public override TypeDesc OwningType 51private TypeDesc Instantiate(TypeDesc type)
parent\parent\Common\TypeSystem\Common\ParameterizedType.cs (3)
8private TypeDesc _parameterType; 10internal ParameterizedType(TypeDesc parameterType) 15public TypeDesc ParameterType
parent\parent\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);
parent\parent\Common\TypeSystem\Common\PropertySignature.cs (5)
8private TypeDesc[] _parameters; 12public readonly TypeDesc ReturnType; 17public TypeDesc this[int index] 41public PropertySignature(bool isStatic, TypeDesc[] parameters, TypeDesc returnType, EmbeddedSignatureData[] embeddedSignatureData)
parent\parent\Common\TypeSystem\Common\ResolutionFailure.cs (3)
25private TypeDesc _owningType; 58public static ResolutionFailure GetMissingMethodFailure(TypeDesc owningType, string methodName, MethodSignature signature) 68public static ResolutionFailure GetMissingFieldFailure(TypeDesc owningType, string fieldName)
parent\parent\Common\TypeSystem\Common\RuntimeInterfacesAlgorithm.cs (1)
23public abstract DefType[] ComputeRuntimeInterfaces(TypeDesc type);
parent\parent\Common\TypeSystem\Common\SignatureVariable.cs (2)
83public override TypeDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) 131public override TypeDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation)
parent\parent\Common\TypeSystem\Common\SimpleArrayOfTRuntimeInterfacesAlgorithm.cs (2)
43public override DefType[] ComputeRuntimeInterfaces(TypeDesc type) 46TypeDesc elementType = arrayType.ElementType;
parent\parent\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)
parent\parent\Common\TypeSystem\Common\ThrowHelper.cs (3)
21public static void ThrowMissingMethodException(TypeDesc owningType, string methodName, MethodSignature signature) 33public static void ThrowMissingFieldException(TypeDesc owningType, string fieldName) 76public static string OwningModule(TypeDesc type)
parent\parent\Common\TypeSystem\Common\TypeDesc.cs (8)
19public static readonly TypeDesc[] EmptyTypes = new TypeDesc[0]; 29Debug.Assert(o is not TypeDesc || ReferenceEquals(((TypeDesc)o).Context, this.Context)); 470public virtual TypeDesc UnderlyingType 604public virtual TypeDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) 613public virtual TypeDesc GetTypeDefinition() 633public bool HasSameTypeDefinition(TypeDesc otherType)
parent\parent\Common\TypeSystem\Common\TypeDesc.TypeEquivalence.cs (2)
60foreach (var type in Instantiation) 95if (!((TypeDesc)defType).GetEffectiveVisibility().IsExposedOutsideOfThisAssembly(false))
parent\parent\Common\TypeSystem\Common\TypeSystemConstraintsHelpers.cs (15)
24InstantiationContext instantiationParamContext, TypeDesc instantiationParam) 59var instantiatedConstraints = default(ArrayBuilder<TypeDesc>); 62foreach (var constraintType in genericParam.TypeConstraints) 64var instantiatedType = constraintType.InstantiateSignature(genericParamContext.TypeInstantiation, genericParamContext.MethodInstantiation); 85private static bool CheckGenericSpecialConstraint(TypeDesc type, GenericConstraints specialConstraint) 104foreach (var constraint in genericType.TypeConstraints) 134private static void GetInstantiatedConstraintsRecursive(InstantiationContext typeContext, TypeDesc type, ref ArrayBuilder<TypeDesc> instantiatedConstraints) 141foreach (var constraint in genericParam.TypeConstraints) 143var instantiatedType = constraint.InstantiateSignature(typeContext.TypeInstantiation, typeContext.MethodInstantiation); 163private static bool CanCastConstraint(ref ArrayBuilder<TypeDesc> instantiatedConstraints, TypeDesc instantiatedType) 176foreach (var arg in instantiation) 190public static bool CheckConstraints(this TypeDesc type, InstantiationContext context = null) 192TypeDesc uninstantiatedType = type.GetTypeDefinition();
parent\parent\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);
parent\parent\Common\TypeSystem\Common\TypeSystemHelpers.cs (41)
14public static bool IsWellKnownType(this TypeDesc type, WellKnownType wellKnownType) 24public static InstantiatedType MakeInstantiatedType(this MetadataType typeDef, params TypeDesc[] genericParameters) 35public static InstantiatedMethod MakeInstantiatedMethod(this MethodDesc methodDef, params TypeDesc[] genericParameters) 40public static ArrayType MakeArrayType(this TypeDesc type) 49public static ArrayType MakeArrayType(this TypeDesc type, int rank) 54public static ByRefType MakeByRefType(this TypeDesc type) 59public static PointerType MakePointerType(this TypeDesc type) 64public static TypeDesc GetParameterType(this TypeDesc type) 71public static LayoutInt GetElementSize(this TypeDesc type) 86public static MethodDesc GetParameterlessConstructor(this TypeDesc type) 89var sig = new MethodSignature(0, 0, type.Context.GetWellKnownType(WellKnownType.Void), TypeDesc.EmptyTypes); 93public static bool HasExplicitOrImplicitDefaultConstructor(this TypeDesc type) 98internal static MethodDesc FindMethodOnExactTypeWithMatchingTypicalMethod(this TypeDesc type, MethodDesc method) 129public static MethodDesc FindMethodOnTypeWithMatchingTypicalMethod(this TypeDesc targetType, MethodDesc method) 140TypeDesc typicalTypeOfTargetMethod = method.GetTypicalMethodDefinition().OwningType; 141TypeDesc targetOrBase = targetType; 144TypeDesc openTargetOrBase = targetOrBase; 165public static IEnumerable<MethodDesc> GetAllMethods(this TypeDesc type) 173public static IEnumerable<MethodDesc> GetAllVirtualMethods(this TypeDesc type) 178public static IEnumerable<MethodDesc> EnumAllVirtualSlots(this TypeDesc type) 187public static MethodDesc ResolveInterfaceMethodToVirtualMethodOnType(this TypeDesc type, MethodDesc interfaceMethod) 192public static MethodDesc ResolveVariantInterfaceMethodToVirtualMethodOnType(this TypeDesc type, MethodDesc interfaceMethod) 197public static MethodDesc ResolveInterfaceMethodToStaticVirtualMethodOnType(this TypeDesc type, MethodDesc interfaceMethod) 202public static MethodDesc ResolveVariantInterfaceMethodToStaticVirtualMethodOnType(this TypeDesc type, MethodDesc interfaceMethod) 207public static DefaultInterfaceMethodResolution ResolveInterfaceMethodToDefaultImplementationOnType(this TypeDesc type, MethodDesc interfaceMethod, out MethodDesc implMethod) 212public static DefaultInterfaceMethodResolution ResolveVariantInterfaceMethodToDefaultImplementationOnType(this TypeDesc type, MethodDesc interfaceMethod, out MethodDesc implMethod) 220public static MethodDesc FindVirtualFunctionTargetMethodOnObjectType(this TypeDesc type, MethodDesc targetMethod) 229public static TypeDesc InstantiateAsOpen(this TypeDesc type) 239var inst = new TypeDesc[type.Instantiation.Length]; 256TypeDesc owner = field.OwningType; 275TypeDesc owner = method.OwningType; 290public static MethodDesc ResolveInterfaceMethodTarget(this TypeDesc thisType, MethodDesc interfaceMethodToResolve) 295TypeDesc currentType = thisType; 310public static MethodDesc ResolveInterfaceMethodTargetWithVariance(this TypeDesc thisType, MethodDesc interfaceMethodToResolve) 315TypeDesc currentType = thisType; 326public static bool ContainsSignatureVariables(this TypeDesc thisType, bool treatGenericParameterLikeSignatureVariable = false) 359foreach (TypeDesc arg in thisType.Instantiation) 405public static bool RequiresAlign8(this TypeDesc type) 414var elementType = ((ArrayType)type).ElementType;
parent\parent\Common\TypeSystem\Common\TypeWithRepeatedFields.Sorting.cs (1)
17protected internal override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer) => comparer.Compare(MetadataType, ((TypeWithRepeatedFields)other).MetadataType);
parent\parent\Common\TypeSystem\Common\Utilities\CustomAttributeTypeNameParser.cs (18)
23public static TypeDesc GetTypeByCustomAttributeTypeName(this ModuleDesc module, string name, bool throwIfNotFound = true, 24Func<ModuleDesc, string, TypeDesc> canonGenericResolver = null) 39public static TypeDesc GetTypeByCustomAttributeTypeNameForDataFlow(string name, ModuleDesc callingModule, 65TypeDesc type = resolver.Resolve(parsed); 102internal Func<ModuleDesc, string, TypeDesc> _canonGenericResolver; 106internal TypeDesc Resolve(TypeName typeName) 120TypeDesc type = Resolve(typeName.GetElementType()); 138private TypeDesc GetSimpleType(TypeName typeName) 156TypeDesc type = GetSimpleTypeFromModule(typeName, module); 169TypeDesc type = GetSimpleTypeFromModule(typeName, _context.SystemModule); 183private TypeDesc GetSimpleTypeFromModule(TypeName typeName, ModuleDesc module) 187TypeDesc type = GetSimpleTypeFromModule(typeName.DeclaringType, module); 196TypeDesc canonType = _canonGenericResolver(module, fullName); 206private TypeDesc GetGenericType(TypeName typeName) 208TypeDesc typeDefinition = Resolve(typeName.GetGenericTypeDefinition()); 213TypeDesc[] instantiation = new TypeDesc[typeArguments.Length]; 216TypeDesc type = Resolve(typeArguments[i]);
parent\parent\Common\TypeSystem\Common\Utilities\GCPointerMap.Algorithm.cs (3)
44TypeDesc fieldType = field.FieldType; 82TypeDesc fieldType = field.FieldType; 111TypeDesc fieldType = field.FieldType;
parent\parent\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)
parent\parent\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);
parent\parent\Common\TypeSystem\Ecma\CustomAttributeTypeProvider.cs (11)
11public struct CustomAttributeTypeProvider : ICustomAttributeTypeProvider<TypeDesc> 20public TypeDesc GetPrimitiveType(PrimitiveTypeCode typeCode) 25public TypeDesc GetSystemType() 31public TypeDesc GetSZArrayType(TypeDesc elementType) 36public TypeDesc GetTypeFromDefinition(MetadataReader reader, TypeDefinitionHandle handle, byte rawTypeKind) 42public TypeDesc GetTypeFromReference(MetadataReader reader, TypeReferenceHandle handle, byte rawTypeKind) 48public TypeDesc GetTypeFromSpecification(MetadataReader reader, TypeSpecificationHandle handle, byte rawTypeKind) 54public TypeDesc GetTypeFromSerializedName(string name) 62public PrimitiveTypeCode GetUnderlyingEnumType(TypeDesc type) 87public bool IsSystemType(TypeDesc type)
parent\parent\Common\TypeSystem\Ecma\EcmaField.cs (5)
41private TypeDesc _fieldType; 98private TypeDesc InitializeFieldType() 104var fieldType = parser.ParseFieldSignature(out EmbeddedSignatureData[] data); 112public override TypeDesc FieldType 140var fieldType = parser.ParseFieldSignature(out var embeddedSig);
parent\parent\Common\TypeSystem\Ecma\EcmaGenericParameter.cs (3)
122public override IEnumerable<TypeDesc> TypeConstraints 134TypeDesc[] constraintTypes = new TypeDesc[constraintHandles.Count];
parent\parent\Common\TypeSystem\Ecma\EcmaGenericParameter.Sorting.cs (1)
13protected internal override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\Ecma\EcmaMethod.cs (6)
50private TypeDesc[] _genericParameters; // TODO: Optional field? 429TypeDesc[] genericParameters = new TypeDesc[count]; 439_genericParameters = TypeDesc.EmptyTypes; 535CustomAttributeValue<TypeDesc> decoded = attribute.DecodeValue( 545foreach (CustomAttributeNamedArgument<TypeDesc> namedArg in decoded.NamedArguments)
parent\parent\Common\TypeSystem\Ecma\EcmaModule.cs (10)
455public TypeDesc GetType(EntityHandle handle) 457TypeDesc type = GetObject(handle, NotFoundBehavior.Throw) as TypeDesc; 550TypeDesc[] instantiation = parser.ParseMethodSpecSignature(); 578TypeDesc parsedType = parser.ParseTypeSpec(handle); 594TypeDesc parentTypeDesc = parent as TypeDesc; 616TypeDesc typeDescToInspect = parentTypeDesc; 648TypeDesc[] newSubstitutionTypes = new TypeDesc[newSubstitution.Length];
parent\parent\Common\TypeSystem\Ecma\EcmaSignatureEncoder.cs (2)
15EntityHandle GetTypeDefOrRefHandleForTypeDesc(TypeDesc type); 46public void EncodeTypeSignature(SignatureTypeEncoder encoder, TypeDesc type)
parent\parent\Common\TypeSystem\Ecma\EcmaSignatureParser.cs (33)
15private Func<EntityHandle, NotFoundBehavior, TypeDesc> _typeResolver; 25public EcmaSignatureParser(TypeSystemContext tsc, Func<EntityHandle, NotFoundBehavior, TypeDesc> typeResolver, BlobReader reader, NotFoundBehavior notFoundBehavior) 60private TypeDesc ResolveHandle(EntityHandle handle) 79if (resolvedValue is TypeDesc type) 94private TypeDesc ParseType(SignatureTypeCode typeCode) 102TypeDesc result = ParseTypeImpl(typeCode); 107private TypeDesc ParseTypeImpl(SignatureTypeCode typeCode) 150var elementType = ParseType(); 157var elementType = ParseType(); 204TypeDesc byRefedType = ParseType(); 212TypeDesc pointedAtType = ParseType(); 224TypeDesc typeDef = ParseType(); 234TypeDesc[] instance = new TypeDesc[_reader.ReadCompressedInteger()]; 322public TypeDesc ParseType() 330TypeDesc result = ParseTypeImpl(); 335private TypeDesc ParseTypeImpl() 340public TypeDesc ParseTypeSpec(TypeSpecificationHandle typeSpecHandle) 429TypeDesc returnType = ParseType(); 430TypeDesc[] parameters; 435parameters = new TypeDesc[count]; 443parameters = TypeDesc.EmptyTypes; 477TypeDesc returnType = ParseType(); 478TypeDesc[] parameters; 483parameters = new TypeDesc[count]; 491parameters = TypeDesc.EmptyTypes; 499public TypeDesc ParseFieldSignature() 507public TypeDesc ParseFieldSignature(out EmbeddedSignatureData[] embeddedSigData) 513TypeDesc parsedType = ParseFieldSignature(); 554public TypeDesc[] ParseMethodSpecSignature() 564TypeDesc[] arguments = new TypeDesc[count]; 583TypeDesc marshallerType = null;
parent\parent\Common\TypeSystem\Ecma\EcmaType.cs (6)
33private TypeDesc[] _genericParameters; 89TypeDesc[] genericParameters = new TypeDesc[count]; 172TypeDesc baseType = this.BaseType; 414TypeDesc objectType = Context.GetWellKnownType(WellKnownType.Object); 447public override TypeDesc UnderlyingType
parent\parent\Common\TypeSystem\Ecma\EcmaType.Sorting.cs (1)
13protected internal override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\Ecma\EcmaType.TypeEquivalence.cs (1)
16CustomAttributeValue<TypeDesc>? guidAttribute;
parent\parent\Common\TypeSystem\Ecma\EffectiveVisibility.cs (2)
140public static EffectiveVisibility GetEffectiveVisibility(this TypeDesc type) 142var definitionType = type.GetTypeDefinition();
parent\parent\Common\TypeSystem\Ecma\IEcmaModule.cs (1)
45TypeDesc GetType(EntityHandle handle);
parent\parent\Common\TypeSystem\Ecma\MetadataExtensions.cs (7)
16public static CustomAttributeValue<TypeDesc>? GetDecodedCustomAttribute(this EcmaType This, 30public static IEnumerable<CustomAttributeValue<TypeDesc>> GetDecodedCustomAttributes(this EcmaType This, 44public static CustomAttributeValue<TypeDesc>? GetDecodedCustomAttribute(this EcmaMethod This, 58public static IEnumerable<CustomAttributeValue<TypeDesc>> GetDecodedCustomAttributes(this EcmaMethod This, 72public static CustomAttributeValue<TypeDesc>? GetDecodedCustomAttribute(this EcmaField This, 86public static IEnumerable<CustomAttributeValue<TypeDesc>> GetDecodedCustomAttributes(this EcmaField This, 100public static IEnumerable<CustomAttributeValue<TypeDesc>> GetDecodedCustomAttributes(this EcmaAssembly This,
parent\parent\Common\TypeSystem\Ecma\PrimitiveTypeProvider.cs (1)
11public static TypeDesc GetPrimitiveType(TypeSystemContext context, PrimitiveTypeCode typeCode)
parent\parent\Common\TypeSystem\IL\HelperExtensions.cs (2)
74public static MethodDesc GetKnownMethod(this TypeDesc type, ReadOnlySpan<byte> name, MethodSignature signature) 89public static FieldDesc GetKnownField(this TypeDesc type, ReadOnlySpan<byte> name)
parent\parent\Common\TypeSystem\IL\ILDisassembler.cs (7)
49TypeDesc owningTypeDefinition = _methodIL.OwningMethod.OwningType; 59public void AppendType(StringBuilder sb, TypeDesc type, bool forceValueClassPrefix = true) 63TypeDesc typeInContext = type.InstantiateSignature( 71private void AppendOwningType(StringBuilder sb, TypeDesc type) 177else if (obj is TypeDesc) 178AppendType(sb, (TypeDesc)obj, false); 445public void AppendNameWithValueClassPrefix(StringBuilder sb, TypeDesc type)
parent\parent\Common\TypeSystem\IL\InstantiatedMethodIL.cs (4)
70TypeDesc uninst = locals[i].Type; 71TypeDesc inst = uninst.InstantiateSignature(_typeInstantiation, _methodInstantiation); 97else if (o is TypeDesc) 99o = ((TypeDesc)o).InstantiateSignature(_typeInstantiation, _methodInstantiation);
parent\parent\Common\TypeSystem\IL\MethodILDebugView.cs (1)
109disasm.AppendType(sb, (TypeDesc)_methodIL.GetObject(region.ClassToken));
parent\parent\Common\TypeSystem\IL\Stubs\ILEmitter.cs (9)
233public void EmitLdInd(TypeDesc type) 290public void EmitStInd(TypeDesc type) 340public void EmitStElem(TypeDesc type) 390public void EmitLdElem(TypeDesc type) 521internal TypeDesc _catchExceptionType; 523internal ILExceptionRegionBuilder(ILExceptionRegionKind exceptionRegionKind, TypeDesc catchExceptionType = null) 710public ILToken NewToken(TypeDesc value) 735public ILLocalVariable NewLocal(TypeDesc localType, bool isPinned = false) 748public ILExceptionRegionBuilder NewCatchRegion(TypeDesc exceptionType)
parent\parent\Common\TypeSystem\IL\Stubs\PInvokeTargetNativeMethod.cs (1)
43public override TypeDesc OwningType
parent\parent\Common\TypeSystem\IL\UnsafeAccessors.cs (23)
23CustomAttributeValue<TypeDesc>? decodedAttribute = method.GetDecodedCustomAttribute("System.Runtime.CompilerServices", "UnsafeAccessorAttribute"); 54TypeDesc retType = context.DeclarationSignature.ReturnType; 56TypeDesc firstArgType = null; 169private static bool TryParseUnsafeAccessorAttribute(MethodDesc method, CustomAttributeValue<TypeDesc> decodedValue, out UnsafeAccessorKind kind, out string name) 223public TypeDesc TargetType; 229private static bool ValidateTargetType(TypeDesc targetTypeMaybe, out TypeDesc validated) 231TypeDesc targetType = targetTypeMaybe.IsByRef 376TypeDesc declType = context.Kind == UnsafeAccessorKind.Constructor ? declSig[i] : declSig[i + 1]; 377TypeDesc maybeType = maybeSig[i]; 389private static bool VerifyDeclarationSatisfiesTargetConstraints(MethodDesc declaration, TypeDesc targetType, MethodDesc targetMethod) 431TypeDesc targetType = context.TargetType; 480TypeDesc[] methodInstantiation = new TypeDesc[targetMaybe.Instantiation.Length]; 494private static SetTargetResult TrySetTargetField(ref GenerationContext context, string name, TypeDesc fieldType) 496TypeDesc targetType = context.TargetType; 516private static bool IsValidInitialTypeForReplacementType(TypeDesc initialType, TypeDesc replacementType) 574TypeDesc initialType = isReturnValue ? originalSignature.ReturnType : originalSignature[parameter.SequenceNumber - 1]; 583SetTargetResult decodeResult = DecodeUnsafeAccessorType(method, reader.GetCustomAttribute(unsafeAccessorTypeAttributeHandle), out TypeDesc replacementType); 618private static SetTargetResult DecodeUnsafeAccessorType(EcmaMethod method, CustomAttribute unsafeAccessorTypeAttribute, out TypeDesc replacementType) 621CustomAttributeValue<TypeDesc> decoded = unsafeAccessorTypeAttribute.DecodeValue( 742TypeDesc targetType = byrefType.ParameterType;
parent\parent\Common\TypeSystem\Interop\MarshalAsDescriptor.cs (3)
51private TypeDesc _marshallerType; 58public TypeDesc MarshallerType 76public MarshalAsDescriptor(NativeTypeKind type, NativeTypeKind arraySubType, uint? sizeParamIndex, uint? sizeConst, TypeDesc customMarshallerType, string cookie)
parent\parent\Common\TypeSystem\Mangling\IPrefixMangledType.cs (1)
17TypeDesc BaseType { get; }
parent\parent\Common\TypeSystem\RuntimeDetermined\ArrayType.RuntimeDetermined.cs (4)
8public override TypeDesc GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(Instantiation typeInstantiation, Instantiation methodInstantiation) 10TypeDesc parameterTypeConverted = ParameterType.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(typeInstantiation, methodInstantiation); 24TypeDesc owningType = this.OwningType; 25TypeDesc instantiatedOwningType = owningType.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(typeInstantiation, methodInstantiation);
parent\parent\Common\TypeSystem\RuntimeDetermined\ByRefType.RuntimeDetermined.cs (2)
8public override TypeDesc GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(Instantiation typeInstantiation, Instantiation methodInstantiation) 10TypeDesc parameterTypeConverted = ParameterType.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(typeInstantiation, methodInstantiation);
parent\parent\Common\TypeSystem\RuntimeDetermined\DefType.RuntimeDetermined.cs (7)
19foreach (TypeDesc type in Instantiation) 51public override TypeDesc GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(Instantiation typeInstantiation, Instantiation methodInstantiation) 53TypeDesc typeDefinition = GetTypeDefinition(); 58TypeDesc[] clone = null; 62TypeDesc uninst = instantiation[i]; 63TypeDesc inst = uninst.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(typeInstantiation, methodInstantiation); 68clone = new TypeDesc[instantiation.Length];
parent\parent\Common\TypeSystem\RuntimeDetermined\FieldDesc.RuntimeDetermined.cs (1)
11TypeDesc owningTypeInstantiated = owningType.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(typeInstantiation, methodInstantiation);
parent\parent\Common\TypeSystem\RuntimeDetermined\FunctionPointerType.RuntimeDetermined.cs (1)
25public override TypeDesc GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(Instantiation typeInstantiation, Instantiation methodInstantiation)
parent\parent\Common\TypeSystem\RuntimeDetermined\GenericParameterDesc.RuntimeDetermined.cs (1)
19public override TypeDesc GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(Instantiation typeInstantiation, Instantiation methodInstantiation)
parent\parent\Common\TypeSystem\RuntimeDetermined\MethodDesc.RuntimeDetermined.cs (9)
52public TypeDesc ImplementationType 80TypeDesc containingType = ImplementationType; 91foreach (TypeDesc typeArg in Instantiation) 104TypeDesc[] clone = null; 108TypeDesc uninst = instantiation[i]; 109TypeDesc inst = uninst.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(typeInstantiation, methodInstantiation); 114clone = new TypeDesc[instantiation.Length]; 126TypeDesc owningType = method.OwningType; 127TypeDesc instantiatedOwningType = owningType.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(typeInstantiation, methodInstantiation);
parent\parent\Common\TypeSystem\RuntimeDetermined\MethodForRuntimeDeterminedType.cs (2)
34public override TypeDesc OwningType => _rdType; 60TypeDesc canonicalizedTypeOfTargetMethod = _rdType.CanonicalType.ConvertToCanonForm(kind);
parent\parent\Common\TypeSystem\RuntimeDetermined\PointerType.RuntimeDetermined.cs (2)
8public override TypeDesc GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(Instantiation typeInstantiation, Instantiation methodInstantiation) 10TypeDesc parameterTypeConverted = ParameterType.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(typeInstantiation, methodInstantiation);
parent\parent\Common\TypeSystem\RuntimeDetermined\RuntimeDeterminedCanonicalizationAlgorithm.cs (9)
18TypeDesc[] canonInstantiation = null; 31TypeDesc typeToConvert = instantiation[instantiationIndex]; 32TypeDesc canonForm = ConvertToCanon(typeToConvert, ref currentKind); 37canonInstantiation = new TypeDesc[instantiation.Length]; 65public static TypeDesc ConvertToCanon(TypeDesc typeToConvert, CanonicalFormKind kind) 72public static TypeDesc ConvertToCanon(TypeDesc typeToConvert, ref CanonicalFormKind kind) 98TypeDesc canonicalType = typeToConvert.ConvertToCanonForm(CanonicalFormKind.Specific);
parent\parent\Common\TypeSystem\RuntimeDetermined\RuntimeDeterminedType.cs (3)
168public override TypeDesc GetTypeDefinition() 184protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind) 194public override TypeDesc GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(Instantiation typeInstantiation, Instantiation methodInstantiation)
parent\parent\Common\TypeSystem\RuntimeDetermined\RuntimeDeterminedType.Sorting.cs (1)
11protected internal sealed override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\RuntimeDetermined\RuntimeDeterminedTypeUtilities.cs (5)
14TypeDesc[] sharedInstantiation = null; 25TypeDesc typeToConvert = instantiation[instantiationIndex]; 27TypeDesc canonForm = context.ConvertToCanon(typeToConvert, ref currentPolicy); 28TypeDesc runtimeDeterminedForm = typeToConvert; 37sharedInstantiation = new TypeDesc[instantiation.Length];
parent\parent\Common\TypeSystem\RuntimeDetermined\SignatureVariable.RuntimeDetermined.cs (1)
19public override TypeDesc GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(Instantiation typeInstantiation, Instantiation methodInstantiation)
parent\parent\Common\TypeSystem\RuntimeDetermined\TypeDesc.RuntimeDetermined.cs (1)
32public abstract TypeDesc GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(Instantiation typeInstantiation, Instantiation methodInstantiation);
parent\parent\Common\TypeSystem\RuntimeDetermined\TypeSystemContext.RuntimeDetermined.cs (2)
61protected internal virtual TypeDesc ConvertToCanon(TypeDesc typeToConvert, ref CanonicalFormKind kind)
parent\parent\Common\TypeSystem\Sorting\ArrayType.Sorting.cs (1)
11protected internal override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\Sorting\ByRefType.Sorting.cs (1)
11protected internal override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\Sorting\FunctionPointerType.Sorting.cs (1)
11protected internal sealed override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\Sorting\InstantiatedType.Sorting.cs (1)
11protected internal override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\Sorting\PointerType.Sorting.cs (1)
11protected internal override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\Sorting\SignatureVariable.Sorting.cs (1)
9protected internal sealed override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\Sorting\TypeDesc.Sorting.cs (1)
20protected internal abstract int CompareToImpl(TypeDesc other, TypeSystemComparer comparer);
parent\parent\Common\TypeSystem\Sorting\TypeSystemComparer.cs (4)
28public class TypeSystemComparer : IComparer<TypeDesc>, IComparer<MethodDesc>, IComparer<FieldDesc>, IComparer<MethodSignature>, IComparer<ModuleDesc> 32public int Compare(TypeDesc x, TypeDesc y) 58internal int CompareWithinClass<T>(T x, T y) where T : TypeDesc