225 references to CallingConvention
Microsoft.CodeAnalysis (27)
CodeGen\ArrayMembers.cs (2)
335public Cci.CallingConvention CallingConvention => Cci.CallingConvention.HasThis;
Emit\EditAndContinue\DeletedPEMethodDefinition.cs (1)
146public Cci.CallingConvention CallingConvention
Emit\EditAndContinue\DeletedSourceMethodDefinition.cs (1)
91public CallingConvention CallingConvention => OldDefinition.CallingConvention;
Emit\NoPia\CommonEmbeddedMethod.cs (1)
284Cci.CallingConvention Cci.ISignature.CallingConvention => UnderlyingMethodSignature.CallingConvention;
Emit\NoPia\CommonEmbeddedProperty.cs (1)
129Cci.CallingConvention Cci.ISignature.CallingConvention
Emit\NoPia\VtblGap.cs (3)
225Cci.CallingConvention Cci.ISignature.CallingConvention 227get { return Cci.CallingConvention.Default | Cci.CallingConvention.HasThis; }
MetadataReader\SymbolFactory.cs (1)
43internal abstract TypeSymbol MakeFunctionPointerTypeSymbol(ModuleSymbol moduleSymbol, Cci.CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> returnAndParamTypes);
MetadataReader\TypeNameDecoder.cs (1)
80protected TypeSymbol MakeFunctionPointerTypeSymbol(Cci.CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamInfos)
PEWriter\Members.cs (11)
95internal static CallingConvention FromSignatureConvention(this SignatureCallingConvention convention) 102return (CallingConvention)(convention & SignatureCallingConventionMask); 108internal static SignatureCallingConvention ToSignatureConvention(this CallingConvention convention) 114internal static bool IsCallingConvention(this CallingConvention original, CallingConvention compare) 116Debug.Assert((compare & ~(CallingConvention)SignatureCallingConventionMask) == 0); 117return ((original & (CallingConvention)SignatureCallingConventionMask)) == compare; 120internal static bool HasUnknownCallingConventionAttributeBits(this CallingConvention convention) 121=> (convention & ~((CallingConvention)SignatureCallingConventionMask 122| (CallingConvention)SignatureAttributesMask)) 793CallingConvention CallingConvention { get; }
PEWriter\MetadataWriter.cs (3)
1130Debug.Assert((methodReference.CallingConvention & CallingConvention.Generic) != 0 == (methodReference.GenericParameterCount > 0)); 1137isInstanceMethod: (methodReference.CallingConvention & CallingConvention.HasThis) != 0); 1282isInstanceProperty: (propertyDef.CallingConvention & CallingConvention.HasThis) != 0);
PEWriter\MethodDefinitionBase.cs (2)
95public CallingConvention CallingConvention => CallingConvention.Default;
Microsoft.CodeAnalysis.CSharp (127)
Binder\Binder.ValueChecks.cs (2)
5669Cci.CallingConvention.Default, 5709Cci.CallingConvention.Default,
Binder\Binder_Crefs.cs (4)
283callingConvention: Cci.CallingConvention.Default, 311callingConvention: Cci.CallingConvention.Default, 973callingConvention: candidateMethodIsVararg ? Microsoft.Cci.CallingConvention.ExtraArguments : Microsoft.Cci.CallingConvention.HasThis,
Binder\Semantics\Conversions\ConversionsBase.cs (1)
3388if (sourceSig.CallingConvention == Cci.CallingConvention.Unmanaged &&
Binder\Semantics\OverloadResolution\CallingConventionInfo.cs (3)
12internal readonly Cci.CallingConvention CallKind; 15public CallingConventionInfo(Cci.CallingConvention callKind, ImmutableHashSet<CustomModifier> unmanagedCallingConventionTypes) 17Debug.Assert(unmanagedCallingConventionTypes.IsEmpty || callKind == Cci.CallingConvention.Unmanaged);
Binder\Semantics\OverloadResolution\OverloadResolution.cs (9)
672Debug.Assert(expectedConvention.UnmanagedCallingConventionTypes.IsEmpty || expectedConvention.CallKind == Cci.CallingConvention.Unmanaged); 695Cci.CallingConvention actualCallKind; 720actualCallKind = Cci.CallingConvention.Unmanaged; 727actualCallKind = Cci.CallingConvention.CDecl; 731actualCallKind = Cci.CallingConvention.Standard; 735actualCallKind = Cci.CallingConvention.ThisCall; 739actualCallKind = Cci.CallingConvention.FastCall; 749actualCallKind = Cci.CallingConvention.Unmanaged; 767if (expectedConvention.CallKind.IsCallingConvention(Cci.CallingConvention.Unmanaged))
Compilation\CSharpCompilation.cs (2)
4143var internalCallingConvention = callingConvention.FromSignatureConvention(); 4144var conventionModifiers = internalCallingConvention == CallingConvention.Unmanaged && !callingConventionTypes.IsDefaultOrEmpty
Emitter\Model\ExpandedVarargsMethodReference.cs (1)
85Cci.CallingConvention Cci.ISignature.CallingConvention
Emitter\Model\FunctionPointerTypeSymbolAdapter.cs (1)
73public CallingConvention CallingConvention => Underlying.CallingConvention;
Emitter\Model\MethodReference.cs (1)
71Cci.CallingConvention Cci.ISignature.CallingConvention
Emitter\Model\MethodSymbolAdapter.cs (1)
182Cci.CallingConvention Cci.ISignature.CallingConvention
Emitter\Model\PropertySymbolAdapter.cs (1)
151CallingConvention ISignature.CallingConvention
Lowering\IteratorRewriter\IteratorFinallyMethodSymbol.cs (2)
189internal override Cci.CallingConvention CallingConvention 191get { return Cci.CallingConvention.HasThis; }
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (1)
81internal override Cci.CallingConvention CallingConvention
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (2)
156internal override Microsoft.Cci.CallingConvention CallingConvention 158get { return Microsoft.Cci.CallingConvention.HasThis; }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.SynthesizedMethodBase.cs (2)
84internal sealed override Cci.CallingConvention CallingConvention 86get { return Cci.CallingConvention.HasThis; }
Symbols\ErrorMethodSymbol.cs (2)
111internal override Microsoft.Cci.CallingConvention CallingConvention 113get { return Microsoft.Cci.CallingConvention.Default; }
Symbols\ErrorPropertySymbol.cs (2)
88internal override Cci.CallingConvention CallingConvention { get { return Cci.CallingConvention.Default; } }
Symbols\Extensions\SourceExtensionImplementationMethodSymbol.cs (3)
110internal override Microsoft.Cci.CallingConvention CallingConvention 114return (_originalMethod.CallingConvention & (~Cci.CallingConvention.HasThis)) | 115(Arity != 0 ? Cci.CallingConvention.Generic : 0);
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (27)
26CallingConvention callingConvention = getCallingConvention(typeBinder.Compilation, syntax.CallingConvention, customModifiers, diagnostics); 108static CallingConvention getCallingConvention(CSharpCompilation compilation, FunctionPointerCallingConventionSyntax? callingConventionSyntax, ArrayBuilder<CustomModifier> customModifiers, BindingDiagnosticBag diagnostics) 113return CallingConvention.Default; 121return CallingConvention.Default; 146return CallingConvention.Unmanaged; 152{ ValueText: "Cdecl" } => CallingConvention.CDecl, 153{ ValueText: "Stdcall" } => CallingConvention.Standard, 154{ ValueText: "Thiscall" } => CallingConvention.ThisCall, 155{ ValueText: "Fastcall" } => CallingConvention.FastCall, 168return CallingConvention.Default; 182return CallingConvention.Unmanaged; 189static CallingConvention handleSingleConvention(FunctionPointerUnmanagedCallingConventionSyntax specifier, CSharpCompilation compilation, ArrayBuilder<CustomModifier> customModifiers, BindingDiagnosticBag diagnostics) 197return CallingConvention.Unmanaged; 244CallingConvention callingConvention, 268CallingConvention callingConvention, 280Debug.Assert(callingConvention == CallingConvention.Unmanaged); 330public static FunctionPointerMethodSymbol CreateFromMetadata(ModuleSymbol containingModule, CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes) 442CallingConvention callingConvention, 487CallingConvention callingConvention, 518CallingConvention callingConvention, 543private FunctionPointerMethodSymbol(CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes, bool useUpdatedEscapeRules) 643if (!CallingConvention.IsCallingConvention(CallingConvention.Unmanaged)) 672if (modifiersToSearch.IsEmpty || CallingConvention != CallingConvention.Unmanaged) 736if (CallingConvention.IsCallingConvention(CallingConvention.Unmanaged) 763internal override CallingConvention CallingConvention { get; } 779if (CallingConvention.IsCallingConvention(CallingConvention.ExtraArguments)) 811var isVararg = CallingConvention.IsCallingConvention(CallingConvention.ExtraArguments);
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (3)
33CallingConvention callingConvention, 47CallingConvention callingConvention, 56public static FunctionPointerTypeSymbol CreateFromMetadata(ModuleSymbol containingModule, Cci.CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes)
Symbols\MemberSignatureComparer.cs (2)
864private static Cci.CallingConvention GetCallingConvention(Symbol member) 872return member.IsStatic ? 0 : Cci.CallingConvention.HasThis;
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
1337internal override Cci.CallingConvention CallingConvention => (Cci.CallingConvention)Signature.Header.RawValue;
Symbols\Metadata\PE\PEPropertySymbol.cs (2)
705internal override Microsoft.Cci.CallingConvention CallingConvention 710return (Microsoft.Cci.CallingConvention)(metadataDecoder.GetSignatureHeaderForProperty(_handle).RawValue);
Symbols\Metadata\PE\SymbolFactory.cs (1)
49internal override TypeSymbol MakeFunctionPointerTypeSymbol(PEModuleSymbol moduleSymbol, Cci.CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes)
Symbols\MethodSymbol.cs (1)
924internal abstract Microsoft.Cci.CallingConvention CallingConvention
Symbols\PropertySymbol.cs (1)
218internal abstract Cci.CallingConvention CallingConvention { get; }
Symbols\ReducedExtensionMethodSymbol.cs (1)
296internal override Microsoft.Cci.CallingConvention CallingConvention
Symbols\SignatureOnlyMethodSymbol.cs (3)
24private readonly Cci.CallingConvention _callingConvention; 38Cci.CallingConvention callingConvention, 63internal override Cci.CallingConvention CallingConvention { get { return _callingConvention; } }
Symbols\SignatureOnlyPropertySymbol.cs (1)
72internal override Cci.CallingConvention CallingConvention { get { throw ExceptionUtilities.Unreachable(); } }
Symbols\Source\LambdaSymbol.cs (2)
260internal override Microsoft.Cci.CallingConvention CallingConvention 262get { return Microsoft.Cci.CallingConvention.Default; }
Symbols\Source\LocalFunctionSymbol.cs (2)
350internal override CallingConvention CallingConvention => CallingConvention.Default;
Symbols\Source\SourceMemberContainerSymbol.cs (6)
4904Cci.CallingConvention.HasThis, 4951Cci.CallingConvention.HasThis, 5004Cci.CallingConvention.HasThis, 5064Cci.CallingConvention.HasThis, 5238Cci.CallingConvention.HasThis, 5331Cci.CallingConvention.HasThis,
Symbols\Source\SourceMemberMethodSymbol.cs (6)
713internal sealed override Cci.CallingConvention CallingConvention 717var cc = IsVararg ? Cci.CallingConvention.ExtraArguments : Cci.CallingConvention.Default; 721cc |= Cci.CallingConvention.Generic; 726cc |= Cci.CallingConvention.HasThis;
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (6)
316Cci.CallingConvention.Default => null, // managed is the default 317Cci.CallingConvention.Unmanaged => "unmanaged ", 318Cci.CallingConvention.CDecl => "unmanaged cdecl ", 319Cci.CallingConvention.Standard => "unmanaged stdcall ", 320Cci.CallingConvention.ThisCall => "unmanaged thiscall ", 321Cci.CallingConvention.FastCall => "unmanaged fastcall ",
Symbols\Source\SourcePropertySymbolBase.cs (2)
663internal override Microsoft.Cci.CallingConvention CallingConvention 665get { return (IsStatic ? 0 : Microsoft.Cci.CallingConvention.HasThis); }
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
73internal override Cci.CallingConvention CallingConvention => _interfaceProperty.CallingConvention;
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (2)
203internal override Microsoft.Cci.CallingConvention CallingConvention 205get { return Microsoft.Cci.CallingConvention.HasThis; }
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (1)
210internal override Cci.CallingConvention CallingConvention
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (3)
314internal override Cci.CallingConvention CallingConvention 320return Cci.CallingConvention.Generic; 323return Cci.CallingConvention.Default;
Symbols\Synthesized\SynthesizedImplementationMethod.cs (1)
69internal sealed override Cci.CallingConvention CallingConvention
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (2)
253internal sealed override Cci.CallingConvention CallingConvention 255get { return Cci.CallingConvention.HasThis; }
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (2)
168internal override Cci.CallingConvention CallingConvention 174return Cci.CallingConvention.HasThis;
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (2)
297internal override Cci.CallingConvention CallingConvention 301return Cci.CallingConvention.Default;
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (1)
125internal override Cci.CallingConvention CallingConvention
Symbols\Synthesized\SynthesizedStaticConstructor.cs (2)
269internal override Microsoft.Cci.CallingConvention CallingConvention 274return Microsoft.Cci.CallingConvention.Default;
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
288internal override Microsoft.Cci.CallingConvention CallingConvention
Symbols\Wrapped\WrappedPropertySymbol.cs (1)
63internal override Microsoft.Cci.CallingConvention CallingConvention
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (47)
CodeGen\CodeGenFunctionPointersTests.cs (47)
74[InlineData("", CallingConvention.Default)] 75[InlineData("managed", CallingConvention.Default)] 76[InlineData("unmanaged[Cdecl]", CallingConvention.CDecl)] 77[InlineData("unmanaged[Thiscall]", CallingConvention.ThisCall)] 78[InlineData("unmanaged[Stdcall]", CallingConvention.Standard)] 79[InlineData("unmanaged[Fastcall]", CallingConvention.FastCall)] 80[InlineData("unmanaged[@Cdecl]", CallingConvention.CDecl)] 81[InlineData("unmanaged[@Thiscall]", CallingConvention.ThisCall)] 82[InlineData("unmanaged[@Stdcall]", CallingConvention.Standard)] 83[InlineData("unmanaged[@Fastcall]", CallingConvention.FastCall)] 84[InlineData("unmanaged", CallingConvention.Unmanaged)] 85internal void CallingConventions(string conventionString, CallingConvention expectedConvention) 124Assert.Equal(CallingConvention.Unmanaged, ((FunctionPointerTypeSymbol)funcPtr).Signature.CallingConvention); 145VerifyFunctionPointerSymbol(funcPtr, CallingConvention.Default, 169VerifyFunctionPointerSymbol(funcPtr, CallingConvention.Default, 196VerifyFunctionPointerSymbol(returnType, CallingConvention.CDecl, 198(RefKind.None, IsFunctionPointerTypeSymbol(CallingConvention.Standard, 204VerifyFunctionPointerSymbol(paramType, CallingConvention.Default, 205(RefKind.None, IsFunctionPointerTypeSymbol(CallingConvention.Default, 228VerifyFunctionPointerSymbol(paramType, CallingConvention.Default, 564VerifyFunctionPointerSymbol(field.Type, CallingConvention.Default, 568VerifyFunctionPointerSymbol(field.Type, CallingConvention.Default, 572VerifyFunctionPointerSymbol(field.Type, CallingConvention.Default, 577VerifyFunctionPointerSymbol(field.Type, CallingConvention.Default, 582VerifyFunctionPointerSymbol(field.Type, CallingConvention.Default, 587VerifyFunctionPointerSymbol(field.Type, CallingConvention.Default, 648VerifyFunctionPointerSymbol(returnType, CallingConvention.CDecl, 651IsFunctionPointerTypeSymbol(CallingConvention.Default, 654VerifyFunctionPointerSymbol(paramType, CallingConvention.Default, 656IsFunctionPointerTypeSymbol(CallingConvention.Default, 659IsFunctionPointerTypeSymbol(CallingConvention.Standard, 661IsFunctionPointerTypeSymbol(CallingConvention.Default, 689VerifyFunctionPointerSymbol(param, CallingConvention.Default, 745VerifyFunctionPointerSymbol(param.Type, CallingConvention.Default, 789validateProperty((PropertySymbol)c.GetProperty((string)"Prop1"), IsFunctionPointerTypeSymbol(CallingConvention.Default, 793validateProperty(c.GetProperty("Prop2"), IsFunctionPointerTypeSymbol(CallingConvention.Standard, 819VerifyFunctionPointerSymbol(c.GetField("_field").Type, CallingConvention.Default, 987VerifyFunctionPointerSymbol(prop.Type, CallingConvention.ExtraArguments, 995VerifyFunctionPointerSymbol(type, CallingConvention.ExtraArguments, 7673CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: default, 7677CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: default, 7682CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string, customModifiers: ImmutableArray.Create(testMod)), refCustomModifiers: default, 7686CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: ImmutableArray.Create(testMod), 7758CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: default, 7762CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: default, 7767CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string, customModifiers: ImmutableArray.Create(testMod)), refCustomModifiers: default, 7771CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: ImmutableArray.Create(testMod),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\FunctionPointerTests.cs (1)
3941VerifyFunctionPointerSymbol(type, CallingConvention.Default,
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (20)
Symbols\FunctionPointerTypeSymbolTests.cs (20)
223[InlineData("", CallingConvention.Default)] 224[InlineData("managed", CallingConvention.Default)] 225[InlineData("unmanaged[Cdecl]", CallingConvention.CDecl)] 226[InlineData("unmanaged[Stdcall]", CallingConvention.Standard)] 227[InlineData("unmanaged[Thiscall]", CallingConvention.ThisCall)] 228[InlineData("unmanaged[Fastcall]", CallingConvention.FastCall)] 229[InlineData("unmanaged", CallingConvention.Unmanaged)] 231internal void ValidCallingConventions(string convention, CallingConvention expectedConvention) 250if (expectedConvention == CallingConvention.Unmanaged) 327Assert.Equal(CallingConvention.Unmanaged, m1PointerType.Signature.CallingConvention); 331Assert.Equal(CallingConvention.Unmanaged, m2PointerType.Signature.CallingConvention); 335Assert.Equal(CallingConvention.Unmanaged, m3PointerType.Signature.CallingConvention); 1988var funcPtrConventionThisCall = createTypeSymbol(customModifiers: default, CallingConvention.ThisCall); 1989var funcPtrConventionThisCallWithThiscallMod = createTypeSymbol(customModifiers: ImmutableArray.Create(thiscallMod), CallingConvention.ThisCall); 2044(FunctionPointerTypeSymbol NoRef, FunctionPointerTypeSymbol ByRef) createTypeSymbol(ImmutableArray<CustomModifier> customModifiers, CallingConvention callingConvention = CallingConvention.Unmanaged) 2111(FunctionPointerTypeSymbol NoRef, FunctionPointerTypeSymbol ByRef) createTypeSymbol(ImmutableArray<CustomModifier> customModifiers, CallingConvention callingConvention = CallingConvention.Unmanaged) 2170(FunctionPointerTypeSymbol NoRef, FunctionPointerTypeSymbol ByRef) createTypeSymbol(ImmutableArray<CustomModifier> typeCustomModifiers, ImmutableArray<CustomModifier> refCustomModifiers, CallingConvention callingConvention = CallingConvention.Unmanaged)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
FunctionPointerUtilities.cs (3)
86Assert.Equal(symbol.IsVararg, symbol.CallingConvention.IsCallingConvention(CallingConvention.ExtraArguments)); 271public static void VerifyFunctionPointerSymbol(TypeSymbol type, CallingConvention expectedConvention, (RefKind RefKind, Action<TypeSymbol> TypeVerifier) returnVerifier, params (RefKind RefKind, Action<TypeSymbol> TypeVerifier)[] argumentVerifiers) 350public static Action<TypeSymbol> IsFunctionPointerTypeSymbol(CallingConvention callingConvention, (RefKind, Action<TypeSymbol>) returnVerifier, params (RefKind, Action<TypeSymbol>)[] argumentVerifiers)