8 instantiations of FunctionPointerTypeSymbol
Microsoft.CodeAnalysis.CSharp (8)
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (8)
19=> new FunctionPointerTypeSymbol( 40=> new FunctionPointerTypeSymbol(FunctionPointerMethodSymbol.CreateFromPartsForTest(callingConvention, returnType, refCustomModifiers, returnRefKind, parameterTypes, parameterRefCustomModifiers, parameterRefKinds, compilation)); 53=> new FunctionPointerTypeSymbol(FunctionPointerMethodSymbol.CreateFromParts(callingConvention, callingConventionModifiers, returnType, returnRefKind, parameterTypes, parameterRefKinds, compilation)); 56=> new FunctionPointerTypeSymbol( 64=> new FunctionPointerTypeSymbol(Signature.SubstituteParameterSymbols(substitutedReturnType, substitutedParameterTypes, refCustomModifiers, paramRefCustomModifiers)); 139result = madeChanges ? new FunctionPointerTypeSymbol(newSignature) : this; 166return new FunctionPointerTypeSymbol(mergedSignature); 177return new FunctionPointerTypeSymbol(substitutedSignature);
109 references to FunctionPointerTypeSymbol
Microsoft.CodeAnalysis.CSharp (101)
Binder\Binder_Conversions.cs (2)
2268else if (targetType is FunctionPointerTypeSymbol functionPointerType) 2818FunctionPointerTypeSymbol { Signature: { } signature } => signature,
Binder\Binder_Crefs.cs (1)
561MethodSymbol signature = ((FunctionPointerTypeSymbol)type).Signature;
Binder\Binder_Invocation.cs (3)
2345RoslynDebug.Assert(boundExpression.Type is FunctionPointerTypeSymbol); 2347var funcPtr = (FunctionPointerTypeSymbol)boundExpression.Type;
Binder\Binder_Symbols.cs (1)
460FunctionPointerTypeSymbol.CreateFromSource(
Binder\Semantics\AccessCheck.cs (2)
167var funcPtr = (FunctionPointerTypeSymbol)symbol;
Binder\Semantics\Conversions\Conversions.cs (2)
113public override Conversion GetMethodGroupFunctionPointerConversion(BoundMethodGroup source, FunctionPointerTypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 275if (type is FunctionPointerTypeSymbol { Signature: { } signature })
Binder\Semantics\Conversions\ConversionsBase.cs (4)
69public abstract Conversion GetMethodGroupFunctionPointerConversion(BoundMethodGroup source, FunctionPointerTypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo); 1121case BoundKind.UnconvertedAddressOfOperator when destination is FunctionPointerTypeSymbol funcPtrType: 3378if (!(source is FunctionPointerTypeSymbol { Signature: { } sourceSig }) 3379|| !(destination is FunctionPointerTypeSymbol { Signature: { } destinationSig }))
Binder\Semantics\Conversions\TypeConversions.cs (1)
42public override Conversion GetMethodGroupFunctionPointerConversion(BoundMethodGroup source, FunctionPointerTypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (2)
699if ((object)leftType != null || (object)rightType != null || left.Type is FunctionPointerTypeSymbol || right.Type is FunctionPointerTypeSymbol)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (9)
535Debug.Assert(delegateOrFunctionPointerType.IsDelegateType() || delegateOrFunctionPointerType is FunctionPointerTypeSymbol); 1060FunctionPointerTypeSymbol f => f.Signature, 1441FunctionPointerTypeSymbol f => (f.Signature, true), 1865else if (source.Type is FunctionPointerTypeSymbol { Signature: { ParameterCount: int sourceParameterCount } sourceSignature } && 1866target.Type is FunctionPointerTypeSymbol { Signature: { ParameterCount: int targetParameterCount } targetSignature } && 2399if (source is not FunctionPointerTypeSymbol { Signature: { } sourceSignature } || target is not FunctionPointerTypeSymbol { Signature: { } targetSignature }) 2749if (source is not FunctionPointerTypeSymbol { Signature: { } sourceSignature } || target is not FunctionPointerTypeSymbol { Signature: { } targetSignature })
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
717Debug.Assert(unmanagedCallingConventionTypes.All(u => FunctionPointerTypeSymbol.IsCallingConventionModifier((NamedTypeSymbol)u)));
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (2)
549ReportWrongCallingConvention(location, diagnostics, symbols, firstSupported, ((FunctionPointerTypeSymbol)delegateOrFunctionPointerType).Signature); 672else if (delegateOrFunctionPointerType is FunctionPointerTypeSymbol)
BoundTree\BoundFunctionPointerInvocation.cs (3)
12public FunctionPointerTypeSymbol FunctionPointer 16Debug.Assert(InvokedExpression.Type is FunctionPointerTypeSymbol); 17return (FunctionPointerTypeSymbol)InvokedExpression.Type;
CodeGen\CodeGenerator.cs (1)
361private void EmitSignatureToken(FunctionPointerTypeSymbol symbol, SyntaxNode syntaxNode)
Compilation\CSharpCompilation.cs (2)
4080return FunctionPointerTypeSymbol.CreateFromParts( 4097if (!FunctionPointerTypeSymbol.IsCallingConventionModifier(internalType) || @this.Assembly.CorLibrary != internalType.ContainingAssembly)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (6)
386public override Symbol? VisitFunctionPointerType(FunctionPointerTypeSymbol symbol) 670private bool AreFunctionPointerTypesEqual(FunctionPointerTypeSymbol type, FunctionPointerTypeSymbol other) 763return AreFunctionPointerTypesEqual((FunctionPointerTypeSymbol)type, (FunctionPointerTypeSymbol)other); 909public override Symbol VisitFunctionPointerType(FunctionPointerTypeSymbol symbol)
Emitter\Model\FunctionPointerTypeSymbolAdapter.cs (2)
124internal FunctionPointerTypeSymbolAdapter(FunctionPointerTypeSymbol underlyingFunctionPointerTypeSymbol) 130internal FunctionPointerTypeSymbol AdaptedFunctionPointerTypeSymbol { get; }
Emitter\Model\PEModuleBuilder.cs (2)
1161return Translate((FunctionPointerTypeSymbol)typeSymbol); 1455internal Cci.IFunctionPointerTypeReference Translate(FunctionPointerTypeSymbol symbol)
FlowAnalysis\NullableWalker.cs (2)
8864FunctionPointerTypeSymbol { Signature: { Parameters: { } parameters } signature } => (signature, parameters), 12102Debug.Assert(ResultType is TypeWithState { Type: FunctionPointerTypeSymbol { }, State: NullableFlowState.NotNull });
Operations\CSharpOperationFactory.cs (1)
1034if (boundConversion.Type is FunctionPointerTypeSymbol)
Symbols\AbstractTypeMap.cs (3)
113result = SubstituteFunctionPointerType((FunctionPointerTypeSymbol)previous); 239private FunctionPointerTypeSymbol SubstituteFunctionPointerType(FunctionPointerTypeSymbol f)
Symbols\Compilation_WellKnownMembers.cs (2)
966handleFunctionPointerType((FunctionPointerTypeSymbol)type, transformFlagsBuilder, addCustomModifierFlags); 994static void handleFunctionPointerType(FunctionPointerTypeSymbol funcPtr, ArrayBuilder<bool> transformFlagsBuilder, bool addCustomModifierFlags)
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (4)
657if (FunctionPointerTypeSymbol.IsCallingConventionModifier(modifier.ModifierSymbol)) 681if (FunctionPointerTypeSymbol.IsCallingConventionModifier(((CSharpCustomModifier)modifier).ModifierSymbol)) 724|| !FunctionPointerTypeSymbol.RefKindEquals(compareKind, RefKind, other.RefKind) 761=> Hash.Combine(ReturnType, Hash.Combine(((int)CallingConvention).GetHashCode(), ((int)FunctionPointerTypeSymbol.GetRefKindForHashCode(RefKind)).GetHashCode()));
Symbols\FunctionPointers\FunctionPointerParameterSymbol.cs (2)
57=> FunctionPointerTypeSymbol.RefKindEquals(compareKind, RefKind, other.RefKind) 68=> Hash.Combine(TypeWithAnnotations.GetHashCode(), ((int)FunctionPointerTypeSymbol.GetRefKindForHashCode(RefKind)).GetHashCode());
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (7)
18public static FunctionPointerTypeSymbol CreateFromSource(FunctionPointerTypeSyntax syntax, Binder typeBinder, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 31public static FunctionPointerTypeSymbol CreateFromPartsForTests( 45public static FunctionPointerTypeSymbol CreateFromParts( 55public static FunctionPointerTypeSymbol CreateFromMetadata(ModuleSymbol containingModule, Cci.CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes) 59public FunctionPointerTypeSymbol SubstituteTypeSymbol( 106if (!(t2 is FunctionPointerTypeSymbol other)) 163var mergedSignature = Signature.MergeEquivalentTypes(((FunctionPointerTypeSymbol)other).Signature, variance);
Symbols\Metadata\PE\DynamicTypeDecoder.cs (3)
170return TransformFunctionPointerType((FunctionPointerTypeSymbol)type); 347private FunctionPointerTypeSymbol? TransformFunctionPointerType(FunctionPointerTypeSymbol type)
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (3)
91return TransformFunctionPointerType((FunctionPointerTypeSymbol)type); 173private FunctionPointerTypeSymbol? TransformFunctionPointerType(FunctionPointerTypeSymbol type)
Symbols\Metadata\PE\SymbolFactory.cs (1)
51return FunctionPointerTypeSymbol.CreateFromMetadata(moduleSymbol, callingConvention, retAndParamTypes);
Symbols\Metadata\PE\TupleTypeDecoder.cs (3)
168return DecodeFunctionPointerType((FunctionPointerTypeSymbol)type); 209private FunctionPointerTypeSymbol DecodeFunctionPointerType(FunctionPointerTypeSymbol type)
Symbols\MethodSymbol.cs (1)
1014|| !FunctionPointerTypeSymbol.IsCallingConventionModifier(callConvType))
Symbols\PublicModel\FunctionPointerTypeSymbol.cs (2)
12private readonly Symbols.FunctionPointerTypeSymbol _underlying; 14public FunctionPointerTypeSymbol(Symbols.FunctionPointerTypeSymbol underlying, CodeAnalysis.NullableAnnotation nullableAnnotation)
Symbols\Retargeting\RetargetingSymbolTranslator.cs (3)
759public FunctionPointerTypeSymbol Retarget(FunctionPointerTypeSymbol type) 1344public override Symbol VisitFunctionPointerType(FunctionPointerTypeSymbol symbol, RetargetOptions argument)
Symbols\SymbolExtensions.cs (3)
677internal static IFunctionPointerTypeSymbol? GetPublicSymbol(this FunctionPointerTypeSymbol? symbol) 820internal static FunctionPointerTypeSymbol? GetSymbol(this IFunctionPointerTypeSymbol? symbol) 822return symbol.GetSymbol<FunctionPointerTypeSymbol>();
Symbols\SymbolVisitor.cs (1)
100public virtual void VisitFunctionPointerType(FunctionPointerTypeSymbol symbol)
Symbols\SymbolVisitor`1.cs (1)
100public virtual TResult VisitFunctionPointerType(FunctionPointerTypeSymbol symbol)
Symbols\SymbolVisitor`2.cs (2)
124/// Called when visiting a <see cref="FunctionPointerTypeSymbol"/>; Override this with specific 130public virtual TResult VisitFunctionPointerType(FunctionPointerTypeSymbol symbol, TArgument argument)
Symbols\TypeSymbolExtensions.cs (8)
450return (TypeSymbol?)GetDelegateType(type) ?? type as FunctionPointerTypeSymbol; 585Debug.Assert(type is FunctionPointerTypeSymbol || type.IsDelegateType()); 586if (type is FunctionPointerTypeSymbol { Signature: { Parameters: var functionPointerParameters } }) 931var result = visitFunctionPointerType((FunctionPointerTypeSymbol)current, typeWithAnnotationsPredicate, typePredicate, arg, useDefaultType, canDigThroughNullable, visitCustomModifiers, out next); 952static TypeSymbol? visitFunctionPointerType(FunctionPointerTypeSymbol type, Func<TypeWithAnnotations, T, bool, bool>? typeWithAnnotationsPredicate, Func<TypeSymbol, T, bool, bool>? typePredicate, T arg, bool useDefaultType, bool canDigThroughNullable, bool visitCustomModifiers, out TypeWithAnnotations next) 1943var functionPointerType = (FunctionPointerTypeSymbol)type; 2042private static bool NormalizeTaskTypesInFunctionPointer(CSharpCompilation compilation, ref FunctionPointerTypeSymbol funcPtrType)
Utilities\TypeSymbolExtensions.cs (3)
43return ((FunctionPointerTypeSymbol)type).Signature.CustomModifierCount(); 112var funcPtr = (FunctionPointerTypeSymbol)type;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (8)
CodeGen\CodeGenFunctionPointersTests.cs (8)
7672var funcPtr = FunctionPointerTypeSymbol.CreateFromPartsForTests( 7676var funcPtrRef = FunctionPointerTypeSymbol.CreateFromPartsForTests( 7681var funcPtrWithTestOnReturn = FunctionPointerTypeSymbol.CreateFromPartsForTests( 7685var funcPtrWithTestOnRef = FunctionPointerTypeSymbol.CreateFromPartsForTests( 7757var funcPtr = FunctionPointerTypeSymbol.CreateFromPartsForTests( 7761var funcPtrRef = FunctionPointerTypeSymbol.CreateFromPartsForTests( 7766var funcPtrWithTestOnReturn = FunctionPointerTypeSymbol.CreateFromPartsForTests( 7770var funcPtrWithTestOnRef = FunctionPointerTypeSymbol.CreateFromPartsForTests(