1 write to Signature
Microsoft.CodeAnalysis.CSharp (1)
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
68Signature = signature;
99 references to Signature
Microsoft.CodeAnalysis.CSharp (99)
Binder\Binder.ValueChecks.cs (5)
878return CheckMethodReturnValueKind(((BoundFunctionPointerInvocation)expr).FunctionPointer.Signature, 3467var methodSymbol = ptrInvocation.FunctionPointer.Signature; 3906FunctionPointerMethodSymbol signature = functionPointerInvocation.FunctionPointer.Signature; 4174var ptrSymbol = ptrInvocation.FunctionPointer.Signature; 4889var ptrSymbol = ptrInvocation.FunctionPointer.Signature;
Binder\Binder_Conversions.cs (2)
2270delegateMethod = functionPointerType.Signature; 2818FunctionPointerTypeSymbol { Signature: { } signature } => signature,
Binder\Binder_Crefs.cs (1)
561MethodSymbol signature = ((FunctionPointerTypeSymbol)type).Signature;
Binder\Binder_Invocation.cs (4)
2352methodsBuilder.Add(funcPtr.Signature); 2376returnRefKind: funcPtr.Signature.RefKind); 2384funcPtr.Signature.ReturnType, 2403funcPtr.Signature.ReturnType,
Binder\RefSafetyAnalysis.cs (1)
864var method = node.FunctionPointer.Signature;
Binder\Semantics\AccessCheck.cs (2)
168if (!IsSymbolAccessibleCore(funcPtr.Signature.ReturnType, within, throughTypeOpt: null, out failedThroughTypeCheck, compilation, ref useSiteInfo, basesBeingResolved)) 173foreach (var param in funcPtr.Signature.Parameters)
Binder\Semantics\Conversions\Conversions.cs (5)
118destination.Signature, 120new CallingConventionInfo(destination.Signature.CallingConvention, destination.Signature.GetCallingConventionModifiers()), 124ToConversion(resolution.OverloadResolutionResult, resolution.MethodGroup, destination.Signature.ParameterCount); 275if (type is FunctionPointerTypeSymbol { Signature: { } signature })
Binder\Semantics\Conversions\ConversionsBase.cs (2)
3378if (!(source is FunctionPointerTypeSymbol { Signature: { } sourceSig }) 3379|| !(destination is FunctionPointerTypeSymbol { Signature: { } destinationSig }))
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (8)
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\OverloadResolutionResult.cs (1)
549ReportWrongCallingConvention(location, diagnostics, symbols, firstSupported, ((FunctionPointerTypeSymbol)delegateOrFunctionPointerType).Signature);
CodeGen\EmitAddress.cs (1)
125var funcPtrRefKind = funcPtrInvocation.FunctionPointer.Signature.RefKind;
CodeGen\EmitExpression.cs (5)
2223return ((BoundFunctionPointerInvocation)receiver).FunctionPointer.Signature.RefKind != RefKind.None; 2942Debug.Assert(left.FunctionPointer.Signature.RefKind != RefKind.None); 3138Debug.Assert(((BoundFunctionPointerInvocation)expression).FunctionPointer.Signature.RefKind != RefKind.None); 4029FunctionPointerMethodSymbol method = ptrInvocation.FunctionPointer.Signature; 4031var stackBehavior = GetCallStackBehavior(ptrInvocation.FunctionPointer.Signature, ptrInvocation.Arguments);
CodeGen\Optimizer.cs (1)
1061Debug.Assert(((BoundFunctionPointerInvocation)lhs).FunctionPointer.Signature.RefKind == RefKind.Ref, "only ref returning function pointers are assignable");
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (4)
388var sig = symbol.Signature; 672var sig = type.Signature; 673var otherSig = other.Signature; 911var sig = symbol.Signature;
Emitter\Model\FunctionPointerTypeSymbolAdapter.cs (1)
31Interlocked.CompareExchange(ref _lazySignature, new FunctionPointerMethodSignature(AdaptedFunctionPointerTypeSymbol.Signature), null);
FlowAnalysis\AbstractFlowPass.cs (1)
3745VisitArguments(node.Arguments, node.ArgumentRefKindsOpt, node.FunctionPointer.Signature);
FlowAnalysis\NullableWalker.cs (3)
8867FunctionPointerTypeSymbol { Signature: { Parameters: { } parameters } signature } => (signature, parameters), 12110node.FunctionPointer.Signature, 12116var returnTypeWithAnnotations = node.FunctionPointer.Signature.ReturnTypeWithAnnotations;
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
703Debug.Assert(((BoundFunctionPointerInvocation)originalLHS).FunctionPointer.Signature.RefKind != RefKind.None);
Lowering\LocalRewriter\LocalRewriter_FunctionPointerInvocation.cs (1)
22MethodSymbol functionPointer = node.FunctionPointer.Signature;
Operations\CSharpOperationFactory_Methods.cs (1)
253return DeriveArguments(boundFunctionPointerInvocation.FunctionPointer.Signature,
Symbols\AbstractTypeMap.cs (6)
241var substitutedReturnType = f.Signature.ReturnTypeWithAnnotations.SubstituteType(this); 242var refCustomModifiers = f.Signature.RefCustomModifiers; 245var parameterTypesWithAnnotations = f.Signature.ParameterTypesWithAnnotations; 250var paramCount = f.Signature.Parameters.Length; 255foreach (var param in f.Signature.Parameters) 277|| !f.Signature.ReturnTypeWithAnnotations.IsSameAs(substitutedReturnType)
Symbols\Compilation_WellKnownMembers.cs (1)
1002var sig = funcPtr.Signature;
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (15)
64=> new FunctionPointerTypeSymbol(Signature.SubstituteParameterSymbols(substitutedReturnType, substitutedParameterTypes, refCustomModifiers, paramRefCustomModifiers)); 111return Signature.Equals(other.Signature, compareKind); 116return Hash.Combine(1, Signature.GetHashCode()); 132Signature.AddNullableTransforms(transforms); 137var newSignature = Signature.ApplyNullableTransforms(defaultTransformFlag, transforms, ref position); 138bool madeChanges = (object)Signature != newSignature; 145UseSiteInfo<AssemblySymbol> fromSignature = Signature.GetUseSiteInfo(); 147if (fromSignature.DiagnosticInfo?.Code == (int)ErrorCode.ERR_BindToBogus && fromSignature.DiagnosticInfo.Arguments.AsSingleton() == (object)Signature) 157return Signature.GetUnificationUseSiteDiagnosticRecursive(ref result, owner, ref checkedTypes); 163var mergedSignature = Signature.MergeEquivalentTypes(((FunctionPointerTypeSymbol)other).Signature, variance); 164if ((object)mergedSignature != Signature) 174var substitutedSignature = Signature.SetNullabilityForReferenceTypes(transform); 175if ((object)Signature != substitutedSignature)
Symbols\Metadata\PE\DynamicTypeDecoder.cs (1)
352var sig = type.Signature;
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (6)
175if (TransformTypeWithAnnotations(type.Signature.ReturnTypeWithAnnotations) is not { } transformedReturnType) 183if (type.Signature.ParameterCount > 0) 185var builder = ArrayBuilder<TypeWithAnnotations>.GetInstance(type.Signature.ParameterCount); 186foreach (var param in type.Signature.Parameters) 203transformedParameterTypes = type.Signature.ParameterTypesWithAnnotations; 208if (paramsModified || !transformedReturnType.IsSameAs(type.Signature.ReturnTypeWithAnnotations))
Symbols\Metadata\PE\TupleTypeDecoder.cs (7)
214if (type.Signature.ParameterCount > 0) 216var paramsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(type.Signature.ParameterCount); 218for (int i = type.Signature.ParameterCount - 1; i >= 0; i--) 220var param = type.Signature.Parameters[i]; 233parameterTypes = type.Signature.ParameterTypesWithAnnotations; 238var decodedReturnType = DecodeTypeInternal(type.Signature.ReturnTypeWithAnnotations); 240if (paramsModified || !decodedReturnType.IsSameAs(type.Signature.ReturnTypeWithAnnotations))
Symbols\PublicModel\FunctionPointerTypeSymbol.cs (1)
21public IMethodSymbol Signature => _underlying.Signature.GetPublicSymbol();
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
761var signature = type.Signature;
Symbols\TypeSymbolExtensions.cs (7)
586if (type is FunctionPointerTypeSymbol { Signature: { Parameters: var functionPointerParameters } }) 954MethodSymbol currentPointer = type.Signature; 2044var returnType = funcPtrType.Signature.ReturnTypeWithAnnotations; 2049if (funcPtrType.Signature.ParameterCount > 0) 2051var paramsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(funcPtrType.Signature.ParameterCount); 2053foreach (var param in funcPtrType.Signature.Parameters) 2067paramTypes = funcPtrType.Signature.ParameterTypesWithAnnotations;
Utilities\TypeSymbolExtensions.cs (4)
43return ((FunctionPointerTypeSymbol)type).Signature.CustomModifierCount(); 113if (!funcPtr.Signature.RefCustomModifiers.IsEmpty || checkTypeWithAnnotations(funcPtr.Signature.ReturnTypeWithAnnotations, flagNonDefaultArraySizesOrLowerBounds)) 118foreach (var param in funcPtr.Signature.Parameters)