Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (33)
21private ImmutableHashSet<CustomModifier>? _lazyCallingConventionModifiers;
25ArrayBuilder<CustomModifier> customModifiers = ArrayBuilder<CustomModifier>.GetInstance();
87var refCustomModifiers = ImmutableArray<CustomModifier>.Empty;
108static CallingConvention getCallingConvention(CSharpCompilation compilation, FunctionPointerCallingConventionSyntax? callingConventionSyntax, ArrayBuilder<CustomModifier> customModifiers, BindingDiagnosticBag diagnostics)
175CustomModifier? modifier = handleIndividualUnrecognizedSpecifier(specifier, compilation, diagnostics);
189static CallingConvention handleSingleConvention(FunctionPointerUnmanagedCallingConventionSyntax specifier, CSharpCompilation compilation, ArrayBuilder<CustomModifier> customModifiers, BindingDiagnosticBag diagnostics)
192CustomModifier? modifier = handleIndividualUnrecognizedSpecifier(specifier, compilation, diagnostics);
200static CustomModifier? handleIndividualUnrecognizedSpecifier(FunctionPointerUnmanagedCallingConventionSyntax specifier, CSharpCompilation compilation, BindingDiagnosticBag diagnostics)
246ImmutableArray<CustomModifier> refCustomModifiers,
249ImmutableArray<ImmutableArray<CustomModifier>> parameterRefCustomModifiers,
269ImmutableArray<CustomModifier> callingConventionModifiers,
276var modifiersBuilder = ArrayBuilder<CustomModifier>.GetInstance();
284ImmutableArray<CustomModifier> refCustomModifiers;
287refCustomModifiers = ImmutableArray<CustomModifier>.Empty;
292if (GetCustomModifierForRefKind(returnRefKind, compilation) is CustomModifier modifier)
310private static CustomModifier? GetCustomModifierForRefKind(RefKind refKind, CSharpCompilation compilation)
336ImmutableArray<CustomModifier> refCustomModifiers = default,
337ImmutableArray<ImmutableArray<CustomModifier>> paramRefCustomModifiers = default)
445ImmutableArray<CustomModifier> refCustomModifiers,
448ImmutableArray<ImmutableArray<CustomModifier>> substitutedRefCustomModifiers,
490ImmutableArray<CustomModifier> refCustomModifiers,
492ImmutableArray<ImmutableArray<CustomModifier>> parameterRefCustomModifiers,
513static ImmutableArray<CustomModifier> getCustomModifierArrayForRefKind(RefKind refKind, CSharpCompilation compilation)
514=> GetCustomModifierForRefKind(refKind, compilation) is { } modifier ? ImmutableArray.Create(modifier) : ImmutableArray<CustomModifier>.Empty;
521ImmutableArray<CustomModifier> refCustomModifiers,
581static RefKind getRefKind(ParamInfo<TypeSymbol> param, ImmutableArray<CustomModifier> paramRefCustomMods, RefKind hasInRefKind, RefKind hasOutRefKind, bool requiresLocationAllowed)
667public ImmutableHashSet<CustomModifier> GetCallingConventionModifiers()
674_lazyCallingConventionModifiers = ImmutableHashSet<CustomModifier>.Empty;
678var builder = PooledHashSet<CustomModifier>.GetInstance();
679foreach (var modifier in modifiersToSearch)
689_lazyCallingConventionModifiers = ImmutableHashSet<CustomModifier>.Empty;
771public override ImmutableArray<CustomModifier> RefCustomModifiers { get; }
Symbols\Source\ParameterHelpers.cs (8)
90ImmutableArray<CustomModifier> customModifiers = refKind switch
95_ => ImmutableArray<CustomModifier>.Empty
986internal static ImmutableArray<CustomModifier> ConditionallyCreateInModifiers(RefKind refKind, bool addRefReadOnlyModifier, Binder binder, BindingDiagnosticBag diagnostics, SyntaxNode syntax)
994return ImmutableArray<CustomModifier>.Empty;
998internal static ImmutableArray<CustomModifier> CreateInModifiers(Binder binder, BindingDiagnosticBag diagnostics, SyntaxNode syntax)
1004private static ImmutableArray<CustomModifier> CreateRefReadonlyParameterModifiers(Binder binder, BindingDiagnosticBag diagnostics, SyntaxNode syntax)
1010internal static ImmutableArray<CustomModifier> CreateOutModifiers(Binder binder, BindingDiagnosticBag diagnostics, SyntaxNode syntax)
1015private static ImmutableArray<CustomModifier> CreateModifiers(WellKnownType modifier, Binder binder, BindingDiagnosticBag diagnostics, SyntaxNode syntax)
Symbols\Source\SourceMemberContainerSymbol.cs (12)
4305ImmutableArray<CustomModifier>.Empty,
4314ImmutableArray<CustomModifier>.Empty,
4353ImmutableArray<CustomModifier>.Empty,
4362ImmutableArray<CustomModifier>.Empty,
4402ImmutableArray<CustomModifier>.Empty,
4410refCustomModifiers: ImmutableArray<CustomModifier>.Empty,
4465refCustomModifiers: ImmutableArray<CustomModifier>.Empty,
4542ImmutableArray<CustomModifier>.Empty,
4639ImmutableArray<CustomModifier>.Empty,
4668ImmutableArray<CustomModifier>.Empty,
4729ImmutableArray<CustomModifier>.Empty,
4738ImmutableArray<CustomModifier>.Empty,
Symbols\Source\SourceParameterSymbol.cs (5)
58ImmutableArray<CustomModifier> inModifiers = ParameterHelpers.ConditionallyCreateInModifiers(refKind, addRefReadOnlyModifier, context, declarationDiagnostics, syntax);
118internal override ParameterSymbol WithCustomModifiersAndParams(TypeSymbol newType, ImmutableArray<CustomModifier> newCustomModifiers, ImmutableArray<CustomModifier> newRefCustomModifiers, bool newIsParams)
123internal SourceParameterSymbol WithCustomModifiersAndParamsCore(TypeSymbol newType, ImmutableArray<CustomModifier> newCustomModifiers, ImmutableArray<CustomModifier> newRefCustomModifiers, bool newIsParams)
Symbols\TypeWithAnnotations.cs (25)
85internal static TypeWithAnnotations Create(TypeSymbol typeSymbol, NullableAnnotation nullableAnnotation = NullableAnnotation.Oblivious, ImmutableArray<CustomModifier> customModifiers = default)
168private static TypeWithAnnotations CreateNonLazyType(TypeSymbol typeSymbol, NullableAnnotation nullableAnnotation, ImmutableArray<CustomModifier> customModifiers)
178private static TypeWithAnnotations CreateLazySubstitutedType(TypeSymbol substitutedTypeSymbol, ImmutableArray<CustomModifier> customModifiers, TypeParameterSymbol typeParameter)
250public TypeWithAnnotations WithModifiers(ImmutableArray<CustomModifier> customModifiers) =>
269public ImmutableArray<CustomModifier> CustomModifiers => _extensions.CustomModifiers;
567public TypeWithAnnotations WithTypeAndModifiers(TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers) =>
840internal static readonly Extensions Default = new NonLazyType(customModifiers: ImmutableArray<CustomModifier>.Empty);
842internal static Extensions Create(ImmutableArray<CustomModifier> customModifiers)
854internal abstract ImmutableArray<CustomModifier> CustomModifiers { get; }
859internal abstract TypeWithAnnotations WithModifiers(TypeWithAnnotations type, ImmutableArray<CustomModifier> customModifiers);
873internal abstract TypeWithAnnotations WithTypeAndModifiers(TypeWithAnnotations type, TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers);
884private readonly ImmutableArray<CustomModifier> _customModifiers;
886public NonLazyType(ImmutableArray<CustomModifier> customModifiers)
895internal override ImmutableArray<CustomModifier> CustomModifiers => _customModifiers;
907internal override TypeWithAnnotations WithModifiers(TypeWithAnnotations type, ImmutableArray<CustomModifier> customModifiers)
914internal override TypeWithAnnotations WithTypeAndModifiers(TypeWithAnnotations type, TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers)
956private readonly ImmutableArray<CustomModifier> _customModifiers;
962public LazySubstitutedType(ImmutableArray<CustomModifier> customModifiers, TypeParameterSymbol typeParameter)
1010internal override ImmutableArray<CustomModifier> CustomModifiers => _customModifiers;
1012internal override TypeWithAnnotations WithModifiers(TypeWithAnnotations type, ImmutableArray<CustomModifier> customModifiers)
1017internal override TypeWithAnnotations WithTypeAndModifiers(TypeWithAnnotations type, TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers)
1110internal override ImmutableArray<CustomModifier> CustomModifiers => ImmutableArray<CustomModifier>.Empty;
1112internal override TypeWithAnnotations WithModifiers(TypeWithAnnotations type, ImmutableArray<CustomModifier> customModifiers)
1128internal override TypeWithAnnotations WithTypeAndModifiers(TypeWithAnnotations type, TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers)
Symbols\ArrayTypeSymbol.vb (16)
26Friend Shared Function CreateVBArray(elementType As TypeSymbol, customModifiers As ImmutableArray(Of CustomModifier), rank As Integer, compilation As VisualBasicCompilation) As ArrayTypeSymbol
33Friend Shared Function CreateVBArray(elementType As TypeSymbol, customModifiers As ImmutableArray(Of CustomModifier), rank As Integer, declaringAssembly As AssemblySymbol) As ArrayTypeSymbol
43customModifiers As ImmutableArray(Of CustomModifier),
67Friend Shared Function CreateSZArray(elementType As TypeSymbol, customModifiers As ImmutableArray(Of CustomModifier), compilation As VisualBasicCompilation) As ArrayTypeSymbol
71Friend Shared Function CreateSZArray(elementType As TypeSymbol, customModifiers As ImmutableArray(Of CustomModifier), declaringAssembly As AssemblySymbol) As ArrayTypeSymbol
100Public MustOverride ReadOnly Property CustomModifiers As ImmutableArray(Of CustomModifier)
334Dim [mod] As ImmutableArray(Of CustomModifier) = CustomModifiers
335Dim otherMod As ImmutableArray(Of CustomModifier) = other.CustomModifiers
442Private ReadOnly Property IArrayTypeSymbol_CustomModifiers As ImmutableArray(Of CustomModifier) Implements IArrayTypeSymbol.CustomModifiers
478Private ReadOnly _customModifiers As ImmutableArray(Of CustomModifier)
481Public Sub New(elementType As TypeSymbol, customModifiers As ImmutableArray(Of CustomModifier), systemArray As NamedTypeSymbol)
490Public NotOverridable Overrides ReadOnly Property CustomModifiers As ImmutableArray(Of CustomModifier)
551Public Sub New(elementType As TypeSymbol, customModifiers As ImmutableArray(Of CustomModifier), systemArray As NamedTypeSymbol, interfaces As ImmutableArray(Of NamedTypeSymbol))
600Public Sub New(elementType As TypeSymbol, customModifiers As ImmutableArray(Of CustomModifier), rank As Integer, systemArray As NamedTypeSymbol)
630Public Sub New(elementType As TypeSymbol, customModifiers As ImmutableArray(Of CustomModifier), rank As Integer, systemArray As NamedTypeSymbol)
654customModifiers As ImmutableArray(Of CustomModifier),