28 instantiations of BinaryOperatorSignature
Microsoft.CodeAnalysis.CSharp (28)
Binder\Binder_Operators.cs (4)
73new BinaryOperatorSignature( 184bestSignature = new BinaryOperatorSignature( 714resultSignature = new BinaryOperatorSignature(kind, leftType: null, rightType: null, CreateErrorType()); 736resultSignature = new BinaryOperatorSignature(kind | BinaryOperatorKind.NullableNull, leftType: null, rightType: null,
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (20)
318operators.Add(new BinaryOperatorSignature(kind | BinaryOperatorKind.Delegate, delegateType, delegateType, delegateType)); 484operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.EnumAndUnderlyingAddition, enumType, underlying, enumType)); 485operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.UnderlyingAndEnumAddition, underlying, enumType, enumType)); 486operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.LiftedEnumAndUnderlyingAddition, nullableEnum, nullableUnderlying, nullableEnum)); 487operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.LiftedUnderlyingAndEnumAddition, nullableUnderlying, nullableEnum, nullableEnum)); 492operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.EnumSubtraction, enumType, enumType, underlying)); 493operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.EnumAndUnderlyingSubtraction, enumType, underlying, enumType)); 494operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.LiftedEnumSubtraction, nullableEnum, nullableEnum, nullableUnderlying)); 495operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.LiftedEnumAndUnderlyingSubtraction, nullableEnum, nullableUnderlying, nullableEnum)); 505operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.EnumSubtraction, enumType, enumType, underlying) 507operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.EnumAndUnderlyingSubtraction, enumType, underlying, enumType) 509operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.LiftedEnumSubtraction, nullableEnum, nullableEnum, nullableUnderlying) 511operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.LiftedEnumAndUnderlyingSubtraction, nullableEnum, nullableUnderlying, nullableEnum) 515operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.UnderlyingAndEnumSubtraction, underlying, enumType, enumType) 517operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.LiftedUnderlyingAndEnumSubtraction, nullableUnderlying, nullableEnum, nullableEnum) 534operators.Add(new BinaryOperatorSignature(kind | BinaryOperatorKind.Enum, enumType, enumType, enumType)); 535operators.Add(new BinaryOperatorSignature(kind | BinaryOperatorKind.Lifted | BinaryOperatorKind.Enum, nullableEnum, nullableEnum, nullableEnum)); 976operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.UserDefined | kind, leftOperandType, rightOperandType, resultType, op, constrainedToTypeOpt)); 995operators.Add(new BinaryOperatorSignature( 1001operators.Add(new BinaryOperatorSignature(
Compilation\BuiltInOperators.cs (4)
714return new BinaryOperatorSignature(kind, left, left, left); 716return new BinaryOperatorSignature(kind, left, RightType(kind), ReturnType(kind)); 725return new BinaryOperatorSignature(kind, left, rightType, left); 735return new BinaryOperatorSignature(kind, left, RightType(kind), ReturnType(kind));
82 references to BinaryOperatorSignature
Microsoft.CodeAnalysis.CSharp (81)
Binder\Binder_Operators.cs (10)
51return new BoundCompoundAssignmentOperator(node, BinaryOperatorSignature.Error, left, right, 94return new BoundCompoundAssignmentOperator(node, BinaryOperatorSignature.Error, left, right, 108return new BoundCompoundAssignmentOperator(node, BinaryOperatorSignature.Error, left, right, 129return new BoundCompoundAssignmentOperator(node, BinaryOperatorSignature.Error, left, right, 176BinaryOperatorSignature bestSignature = best.Signature; 579BinaryOperatorSignature signature; 700out BinaryOperatorSignature resultSignature, out BinaryOperatorAnalysisResult best) 719var signature = best.Signature; 985BinaryOperatorSignature signature = best.Signature; 1101BinaryOperatorSignature signature,
Binder\Semantics\Operators\BinaryOperatorAnalysisResult.cs (4)
18public readonly BinaryOperatorSignature Signature; 21private BinaryOperatorAnalysisResult(OperatorAnalysisResultKind kind, BinaryOperatorSignature signature, Conversion leftConversion, Conversion rightConversion) 54public static BinaryOperatorAnalysisResult Applicable(BinaryOperatorSignature signature, Conversion leftConversion, Conversion rightConversion) 59public static BinaryOperatorAnalysisResult Inapplicable(BinaryOperatorSignature signature, Conversion leftConversion, Conversion rightConversion)
Binder\Semantics\Operators\BinaryOperatorEasyOut.cs (1)
312BinaryOperatorSignature signature = this.Compilation.BuiltInOperators.GetSignature(easyOut);
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (23)
230var operators = ArrayBuilder<BinaryOperatorSignature>.GetInstance(); 252var operators = ArrayBuilder<BinaryOperatorSignature>.GetInstance(); 306ArrayBuilder<BinaryOperatorSignature> operators) 324ArrayBuilder<BinaryOperatorSignature> operators, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 464private void GetEnumOperation(BinaryOperatorKind kind, TypeSymbol enumType, BoundExpression right, ArrayBuilder<BinaryOperatorSignature> operators) 543ArrayBuilder<BinaryOperatorSignature> operators) 572ArrayBuilder<BinaryOperatorSignature> operators) 588private void GetEnumOperations(BinaryOperatorKind kind, BoundExpression left, BoundExpression right, ArrayBuilder<BinaryOperatorSignature> results) 677ArrayBuilder<BinaryOperatorSignature> results) 711var operators = ArrayBuilder<BinaryOperatorSignature>.GetInstance(); 724BinaryOperatorSignature op = operators[0]; 783private void GetReferenceEquality(BinaryOperatorKind kind, ArrayBuilder<BinaryOperatorSignature> operators) 791ArrayBuilder<BinaryOperatorSignature> operators, 884var operators = ArrayBuilder<BinaryOperatorSignature>.GetInstance(); 921ArrayBuilder<BinaryOperatorSignature> operators) 932var operators2 = ArrayBuilder<BinaryOperatorSignature>.GetInstance(); 942foreach (BinaryOperatorSignature signature1 in operators) 959void getDeclaredOperators(TypeSymbol constrainedToTypeOpt, NamedTypeSymbol type, BinaryOperatorKind kind, string name, ArrayBuilder<BinaryOperatorSignature> operators) 982void addLiftedOperators(TypeSymbol constrainedToTypeOpt, BinaryOperatorKind kind, ArrayBuilder<BinaryOperatorSignature> operators) 1184private BetterResult BetterOperator(BinaryOperatorSignature op1, BinaryOperatorSignature op2, BoundExpression left, BoundExpression right, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1320private BetterResult MoreSpecificOperator(BinaryOperatorSignature op1, BinaryOperatorSignature op2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Operators\BinaryOperatorSignature.cs (10)
14internal struct BinaryOperatorSignature : IEquatable<BinaryOperatorSignature> 16public static BinaryOperatorSignature Error = default(BinaryOperatorSignature); 59public bool Equals(BinaryOperatorSignature other) 69public static bool operator ==(BinaryOperatorSignature x, BinaryOperatorSignature y) 74public static bool operator !=(BinaryOperatorSignature x, BinaryOperatorSignature y) 81return obj is BinaryOperatorSignature && Equals((BinaryOperatorSignature)obj);
BoundTree\Constructors.cs (2)
714BinaryOperatorSignature @operator, 728public BoundCompoundAssignmentOperator Update(BinaryOperatorSignature @operator,
Compilation\BuiltInOperators.cs (27)
29private ImmutableArray<BinaryOperatorSignature>[][] _builtInOperators; 30private SingleInitNullable<BinaryOperatorSignature> _builtInUtf8Concatenation; 292private ImmutableArray<BinaryOperatorSignature> GetSignaturesFromBinaryOperatorKinds(int[] operatorKinds) 294var builder = ArrayBuilder<BinaryOperatorSignature>.GetInstance(); 303internal void GetSimpleBuiltInOperators(BinaryOperatorKind kind, ArrayBuilder<BinaryOperatorSignature> operators, bool skipNativeIntegerOperators) 307var logicalOperators = new ImmutableArray<BinaryOperatorSignature>[] 309ImmutableArray<BinaryOperatorSignature>.Empty, //multiplication 310ImmutableArray<BinaryOperatorSignature>.Empty, //addition 311ImmutableArray<BinaryOperatorSignature>.Empty, //subtraction 312ImmutableArray<BinaryOperatorSignature>.Empty, //division 313ImmutableArray<BinaryOperatorSignature>.Empty, //remainder 314ImmutableArray<BinaryOperatorSignature>.Empty, //left shift 315ImmutableArray<BinaryOperatorSignature>.Empty, //right shift 316ImmutableArray<BinaryOperatorSignature>.Empty, //equal 317ImmutableArray<BinaryOperatorSignature>.Empty, //not equal 318ImmutableArray<BinaryOperatorSignature>.Empty, //greater than 319ImmutableArray<BinaryOperatorSignature>.Empty, //less than 320ImmutableArray<BinaryOperatorSignature>.Empty, //greater than or equal 321ImmutableArray<BinaryOperatorSignature>.Empty, //less than or equal 322ImmutableArray.Create<BinaryOperatorSignature>(GetSignature(BinaryOperatorKind.LogicalBoolAnd)), //and 323ImmutableArray<BinaryOperatorSignature>.Empty, //xor 324ImmutableArray.Create<BinaryOperatorSignature>(GetSignature(BinaryOperatorKind.LogicalBoolOr)), //or 325ImmutableArray<BinaryOperatorSignature>.Empty, //unsigned right shift 328var nonLogicalOperators = new ImmutableArray<BinaryOperatorSignature>[] 675foreach (var op in _builtInOperators[kind.IsLogical() ? 1 : 0][kind.OperatorIndex()]) 690internal void GetUtf8ConcatenationBuiltInOperator(TypeSymbol readonlySpanOfByte, ArrayBuilder<BinaryOperatorSignature> operators) 702internal BinaryOperatorSignature GetSignature(BinaryOperatorKind kind)
Compilation\CSharpCompilation.cs (1)
4273var signature = this.BuiltInOperators.GetSignature(easyOutBinaryKind);
Generated\BoundNodes.xml.Generated.cs (3)
1778public BoundCompoundAssignmentOperator(SyntaxNode syntax, BinaryOperatorSignature @operator, BoundExpression left, BoundExpression right, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundValuePlaceholder? finalPlaceholder, BoundExpression? finalConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type, bool hasErrors = false) 1798public BinaryOperatorSignature Operator { get; } 1811public BoundCompoundAssignmentOperator Update(BinaryOperatorSignature @operator, BoundExpression left, BoundExpression right, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundValuePlaceholder? finalPlaceholder, BoundExpression? finalConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\OperatorTests.cs (1)
8827var op = visitor.FirstNode.Operator;