8 instantiations of FunctionPointerTypeSymbol
Microsoft.CodeAnalysis.CSharp (8)
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (8)
20=> new FunctionPointerTypeSymbol( 41=> new FunctionPointerTypeSymbol(FunctionPointerMethodSymbol.CreateFromPartsForTest(callingConvention, returnType, refCustomModifiers, returnRefKind, parameterTypes, parameterRefCustomModifiers, parameterRefKinds, compilation)); 54=> new FunctionPointerTypeSymbol(FunctionPointerMethodSymbol.CreateFromParts(callingConvention, callingConventionModifiers, returnType, returnRefKind, parameterTypes, parameterRefKinds, compilation)); 57=> new FunctionPointerTypeSymbol( 65=> new FunctionPointerTypeSymbol(Signature.SubstituteParameterSymbols(substitutedReturnType, substitutedParameterTypes, refCustomModifiers, paramRefCustomModifiers)); 141result = madeChanges ? new FunctionPointerTypeSymbol(newSignature) : this; 168return new FunctionPointerTypeSymbol(mergedSignature); 179return new FunctionPointerTypeSymbol(substitutedSignature);
109 references to FunctionPointerTypeSymbol
Microsoft.CodeAnalysis.CSharp (101)
Binder\Binder_Conversions.cs (2)
2280else if (targetType is FunctionPointerTypeSymbol functionPointerType) 2830FunctionPointerTypeSymbol { Signature: { } signature } => signature,
Binder\Binder_Crefs.cs (1)
580MethodSymbol signature = ((FunctionPointerTypeSymbol)type).Signature;
Binder\Binder_Invocation.cs (3)
2441RoslynDebug.Assert(boundExpression.Type is FunctionPointerTypeSymbol); 2443var funcPtr = (FunctionPointerTypeSymbol)boundExpression.Type;
Binder\Binder_Symbols.cs (1)
468FunctionPointerTypeSymbol.CreateFromSource(
Binder\Semantics\AccessCheck.cs (2)
167var funcPtr = (FunctionPointerTypeSymbol)symbol;
Binder\Semantics\Conversions\Conversions.cs (2)
115public override Conversion GetMethodGroupFunctionPointerConversion(BoundMethodGroup source, FunctionPointerTypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 280if (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: 3376if (!(source is FunctionPointerTypeSymbol { Signature: { } sourceSig }) 3377|| !(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)
561Debug.Assert(delegateOrFunctionPointerType.IsDelegateType() || delegateOrFunctionPointerType is FunctionPointerTypeSymbol); 1086FunctionPointerTypeSymbol f => f.Signature, 1467FunctionPointerTypeSymbol f => (f.Signature, true), 1893else if (source.Type is FunctionPointerTypeSymbol { Signature: { ParameterCount: int sourceParameterCount } sourceSignature } && 1894target.Type is FunctionPointerTypeSymbol { Signature: { ParameterCount: int targetParameterCount } targetSignature } && 2427if (source is not FunctionPointerTypeSymbol { Signature: { } sourceSignature } || target is not FunctionPointerTypeSymbol { Signature: { } targetSignature }) 2777if (source is not FunctionPointerTypeSymbol { Signature: { } sourceSignature } || target is not FunctionPointerTypeSymbol { Signature: { } targetSignature })
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
715Debug.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)
4124return FunctionPointerTypeSymbol.CreateFromParts( 4141if (!FunctionPointerTypeSymbol.IsCallingConventionModifier(internalType) || @this.Assembly.CorLibrary != internalType.ContainingAssembly)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (6)
393public override Symbol? VisitFunctionPointerType(FunctionPointerTypeSymbol symbol) 677private bool AreFunctionPointerTypesEqual(FunctionPointerTypeSymbol type, FunctionPointerTypeSymbol other) 770return AreFunctionPointerTypesEqual((FunctionPointerTypeSymbol)type, (FunctionPointerTypeSymbol)other); 916public override Symbol VisitFunctionPointerType(FunctionPointerTypeSymbol symbol)
Emitter\Model\FunctionPointerTypeSymbolAdapter.cs (2)
125internal FunctionPointerTypeSymbolAdapter(FunctionPointerTypeSymbol underlyingFunctionPointerTypeSymbol) 131internal FunctionPointerTypeSymbol AdaptedFunctionPointerTypeSymbol { get; }
Emitter\Model\PEModuleBuilder.cs (2)
1161return Translate((FunctionPointerTypeSymbol)typeSymbol); 1455internal Cci.IFunctionPointerTypeReference Translate(FunctionPointerTypeSymbol symbol)
FlowAnalysis\NullableWalker.cs (2)
9210FunctionPointerTypeSymbol { Signature: { Parameters: { } parameters } signature } => (signature, parameters), 12540Debug.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)
58=> FunctionPointerTypeSymbol.RefKindEquals(compareKind, RefKind, other.RefKind) 69=> Hash.Combine(TypeWithAnnotations.GetHashCode(), ((int)FunctionPointerTypeSymbol.GetRefKindForHashCode(RefKind)).GetHashCode());
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (7)
19public static FunctionPointerTypeSymbol CreateFromSource(FunctionPointerTypeSyntax syntax, Binder typeBinder, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 32public static FunctionPointerTypeSymbol CreateFromPartsForTests( 46public static FunctionPointerTypeSymbol CreateFromParts( 56public static FunctionPointerTypeSymbol CreateFromMetadata(ModuleSymbol containingModule, Cci.CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes) 60public FunctionPointerTypeSymbol SubstituteTypeSymbol( 108if (!(t2 is FunctionPointerTypeSymbol other)) 165var 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)
664internal static IFunctionPointerTypeSymbol? GetPublicSymbol(this FunctionPointerTypeSymbol? symbol) 807internal static FunctionPointerTypeSymbol? GetSymbol(this IFunctionPointerTypeSymbol? symbol) 809return 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)
451return (TypeSymbol?)GetDelegateType(type) ?? type as FunctionPointerTypeSymbol; 586Debug.Assert(type is FunctionPointerTypeSymbol || type.IsDelegateType()); 587if (type is FunctionPointerTypeSymbol { Signature: { Parameters: var functionPointerParameters } }) 933var result = visitFunctionPointerType((FunctionPointerTypeSymbol)current, typeWithAnnotationsPredicate, typePredicate, arg, useDefaultType, canDigThroughNullable, visitCustomModifiers, out next); 954static 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) 1944var functionPointerType = (FunctionPointerTypeSymbol)type; 2043private 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(