32 instantiations of BinaryOperatorSignature
Microsoft.CodeAnalysis.CSharp (32)
Binder\Binder_Operators.cs (5)
78
new
BinaryOperatorSignature
(
243
bestSignature = new
BinaryOperatorSignature
(
496
new
BinaryOperatorSignature
(
1117
resultSignature = new
BinaryOperatorSignature
(kind, leftType: null, rightType: null, CreateErrorType());
1145
resultSignature = new
BinaryOperatorSignature
(kind | BinaryOperatorKind.NullableNull, leftType: null, rightType: null,
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (22)
331
operators.Add(new
BinaryOperatorSignature
(kind | BinaryOperatorKind.Delegate, delegateType, delegateType, delegateType));
497
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.EnumAndUnderlyingAddition, enumType, underlying, enumType));
498
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.UnderlyingAndEnumAddition, underlying, enumType, enumType));
499
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedEnumAndUnderlyingAddition, nullableEnum, nullableUnderlying, nullableEnum));
500
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedUnderlyingAndEnumAddition, nullableUnderlying, nullableEnum, nullableEnum));
505
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.EnumSubtraction, enumType, enumType, underlying));
506
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.EnumAndUnderlyingSubtraction, enumType, underlying, enumType));
507
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedEnumSubtraction, nullableEnum, nullableEnum, nullableUnderlying));
508
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedEnumAndUnderlyingSubtraction, nullableEnum, nullableUnderlying, nullableEnum));
518
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.EnumSubtraction, enumType, enumType, underlying)
520
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.EnumAndUnderlyingSubtraction, enumType, underlying, enumType)
522
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedEnumSubtraction, nullableEnum, nullableEnum, nullableUnderlying)
524
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedEnumAndUnderlyingSubtraction, nullableEnum, nullableUnderlying, nullableEnum)
528
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.UnderlyingAndEnumSubtraction, underlying, enumType, enumType)
530
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedUnderlyingAndEnumSubtraction, nullableUnderlying, nullableEnum, nullableEnum)
547
operators.Add(new
BinaryOperatorSignature
(kind | BinaryOperatorKind.Enum, enumType, enumType, enumType));
548
operators.Add(new
BinaryOperatorSignature
(kind | BinaryOperatorKind.Lifted | BinaryOperatorKind.Enum, nullableEnum, nullableEnum, nullableEnum));
1006
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.UserDefined | kind, leftOperandType, rightOperandType, resultType, op, constrainedToTypeOpt));
1025
operators.Add(new
BinaryOperatorSignature
(
1031
operators.Add(new
BinaryOperatorSignature
(
1557
inferredCandidate = new
BinaryOperatorSignature
(
1566
inferredCandidate = new
BinaryOperatorSignature
(BinaryOperatorKind.UserDefined | kind, leftOperandType, rightOperandType, resultType, method, constrainedToTypeOpt: null);
BoundTree\NullabilityRewriter.cs (1)
152
op = new
BinaryOperatorSignature
(op.Kind, op.LeftType, op.RightType, op.ReturnType, GetUpdatedSymbol(node, op.Method), op.ConstrainedToTypeOpt);
Compilation\BuiltInOperators.cs (4)
714
return new
BinaryOperatorSignature
(kind, left, left, left);
716
return new
BinaryOperatorSignature
(kind, left, RightType(kind), ReturnType(kind));
725
return new
BinaryOperatorSignature
(kind, left, rightType, left);
735
return new
BinaryOperatorSignature
(kind, left, RightType(kind), ReturnType(kind));
95 references to BinaryOperatorSignature
Microsoft.CodeAnalysis.CSharp (94)
Binder\Binder_Operators.cs (13)
54
return new BoundCompoundAssignmentOperator(node,
BinaryOperatorSignature
.Error, left, right,
99
return new BoundCompoundAssignmentOperator(node,
BinaryOperatorSignature
.Error, left, right,
113
return new BoundCompoundAssignmentOperator(node,
BinaryOperatorSignature
.Error, left, right,
235
BinaryOperatorSignature
bestSignature = best.Signature;
321
return new BoundCompoundAssignmentOperator(node,
BinaryOperatorSignature
.Error, left, right,
523
BinaryOperatorSignature
.Error,
972
BinaryOperatorSignature
signature;
1093
out
BinaryOperatorSignature
resultSignature, out BinaryOperatorAnalysisResult best)
1122
var
signature = best.Signature;
1408
BinaryOperatorSignature
signature = best.Signature;
1576
BinaryOperatorSignature
signature,
1595
BinaryOperatorSignature
signature,
1762
BinaryOperatorSignature
signature,
Binder\Semantics\Operators\BinaryOperatorAnalysisResult.cs (4)
18
public readonly
BinaryOperatorSignature
Signature;
21
private BinaryOperatorAnalysisResult(OperatorAnalysisResultKind kind,
BinaryOperatorSignature
signature, Conversion leftConversion, Conversion rightConversion)
54
public static BinaryOperatorAnalysisResult Applicable(
BinaryOperatorSignature
signature, Conversion leftConversion, Conversion rightConversion)
59
public static BinaryOperatorAnalysisResult Inapplicable(
BinaryOperatorSignature
signature, Conversion leftConversion, Conversion rightConversion)
Binder\Semantics\Operators\BinaryOperatorEasyOut.cs (1)
312
BinaryOperatorSignature
signature = this.Compilation.BuiltInOperators.GetSignature(easyOut);
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (32)
243
var operators = ArrayBuilder<
BinaryOperatorSignature
>.GetInstance();
265
var operators = ArrayBuilder<
BinaryOperatorSignature
>.GetInstance();
319
ArrayBuilder<
BinaryOperatorSignature
> operators)
337
ArrayBuilder<
BinaryOperatorSignature
> operators, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
477
private void GetEnumOperation(BinaryOperatorKind kind, TypeSymbol enumType, BoundExpression right, ArrayBuilder<
BinaryOperatorSignature
> operators)
556
ArrayBuilder<
BinaryOperatorSignature
> operators)
585
ArrayBuilder<
BinaryOperatorSignature
> operators)
601
private void GetEnumOperations(BinaryOperatorKind kind, BoundExpression left, BoundExpression right, ArrayBuilder<
BinaryOperatorSignature
> results)
690
ArrayBuilder<
BinaryOperatorSignature
> results)
724
var operators = ArrayBuilder<
BinaryOperatorSignature
>.GetInstance();
737
BinaryOperatorSignature
op = operators[0];
796
private void GetReferenceEquality(BinaryOperatorKind kind, ArrayBuilder<
BinaryOperatorSignature
> operators)
804
ArrayBuilder<
BinaryOperatorSignature
> operators,
899
var operators = ArrayBuilder<
BinaryOperatorSignature
>.GetInstance();
953
ArrayBuilder<
BinaryOperatorSignature
> operators)
961
var operators2 = ArrayBuilder<
BinaryOperatorSignature
>.GetInstance();
971
foreach (
BinaryOperatorSignature
signature1 in operators)
989
private static void GetDeclaredUserDefinedBinaryOperators(TypeSymbol? constrainedToTypeOpt, NamedTypeSymbol type, BinaryOperatorKind kind, string name, ArrayBuilder<
BinaryOperatorSignature
> operators)
1012
void AddLiftedUserDefinedBinaryOperators(TypeSymbol? constrainedToTypeOpt, BinaryOperatorKind kind, ArrayBuilder<
BinaryOperatorSignature
> operators)
1215
private BetterResult BetterOperator(
BinaryOperatorSignature
op1,
BinaryOperatorSignature
op2, BoundExpression left, BoundExpression right, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1364
private BetterResult MoreSpecificOperator(
BinaryOperatorSignature
op1,
BinaryOperatorSignature
op2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1436
var operators = ArrayBuilder<
BinaryOperatorSignature
>.GetInstance();
1464
static void getDeclaredUserDefinedBinaryOperatorsInScope(ArrayBuilder<NamedTypeSymbol> extensionDeclarationsInSingleScope, BinaryOperatorKind kind, string name1, string? name2Opt, ArrayBuilder<
BinaryOperatorSignature
> operators)
1475
var operators2 = ArrayBuilder<
BinaryOperatorSignature
>.GetInstance();
1495
static void getDeclaredUserDefinedBinaryOperators(ArrayBuilder<NamedTypeSymbol> extensionDeclarationsInSingleScope, BinaryOperatorKind kind, string name, ArrayBuilder<
BinaryOperatorSignature
> operators)
1510
void inferTypeArgumentsAndRemoveInapplicableToReceiverType(BinaryOperatorKind kind, BoundExpression left, BoundExpression right, ArrayBuilder<
BinaryOperatorSignature
> operators, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1550
BinaryOperatorSignature
inferredCandidate;
1584
bool isApplicableToReceiver(in
BinaryOperatorSignature
candidate, BoundExpression left, BoundExpression right, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1601
static bool parameterMatchesReceiver(in
BinaryOperatorSignature
candidate, int paramIndex)
1610
bool isOperandApplicableToReceiver(in
BinaryOperatorSignature
candidate, BoundExpression operand, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Operators\BinaryOperatorSignature.cs (10)
14
internal struct BinaryOperatorSignature : IEquatable<
BinaryOperatorSignature
>
16
public static
BinaryOperatorSignature
Error = default(
BinaryOperatorSignature
);
59
public bool Equals(
BinaryOperatorSignature
other)
69
public static bool operator ==(
BinaryOperatorSignature
x,
BinaryOperatorSignature
y)
74
public static bool operator !=(
BinaryOperatorSignature
x,
BinaryOperatorSignature
y)
81
return obj is
BinaryOperatorSignature
&& Equals((
BinaryOperatorSignature
)obj);
BoundTree\Constructors.cs (2)
643
BinaryOperatorSignature
@operator,
657
public BoundCompoundAssignmentOperator Update(
BinaryOperatorSignature
@operator,
BoundTree\NullabilityRewriter.cs (1)
148
var
op = node.Operator;
Compilation\BuiltInOperators.cs (27)
29
private ImmutableArray<
BinaryOperatorSignature
>[][] _builtInOperators;
30
private SingleInitNullable<
BinaryOperatorSignature
> _builtInUtf8Concatenation;
292
private ImmutableArray<
BinaryOperatorSignature
> GetSignaturesFromBinaryOperatorKinds(int[] operatorKinds)
294
var builder = ArrayBuilder<
BinaryOperatorSignature
>.GetInstance();
303
internal void GetSimpleBuiltInOperators(BinaryOperatorKind kind, ArrayBuilder<
BinaryOperatorSignature
> operators, bool skipNativeIntegerOperators)
307
var logicalOperators = new ImmutableArray<
BinaryOperatorSignature
>[]
309
ImmutableArray<
BinaryOperatorSignature
>.Empty, //multiplication
310
ImmutableArray<
BinaryOperatorSignature
>.Empty, //addition
311
ImmutableArray<
BinaryOperatorSignature
>.Empty, //subtraction
312
ImmutableArray<
BinaryOperatorSignature
>.Empty, //division
313
ImmutableArray<
BinaryOperatorSignature
>.Empty, //remainder
314
ImmutableArray<
BinaryOperatorSignature
>.Empty, //left shift
315
ImmutableArray<
BinaryOperatorSignature
>.Empty, //right shift
316
ImmutableArray<
BinaryOperatorSignature
>.Empty, //equal
317
ImmutableArray<
BinaryOperatorSignature
>.Empty, //not equal
318
ImmutableArray<
BinaryOperatorSignature
>.Empty, //greater than
319
ImmutableArray<
BinaryOperatorSignature
>.Empty, //less than
320
ImmutableArray<
BinaryOperatorSignature
>.Empty, //greater than or equal
321
ImmutableArray<
BinaryOperatorSignature
>.Empty, //less than or equal
322
ImmutableArray.Create<
BinaryOperatorSignature
>(GetSignature(BinaryOperatorKind.LogicalBoolAnd)), //and
323
ImmutableArray<
BinaryOperatorSignature
>.Empty, //xor
324
ImmutableArray.Create<
BinaryOperatorSignature
>(GetSignature(BinaryOperatorKind.LogicalBoolOr)), //or
325
ImmutableArray<
BinaryOperatorSignature
>.Empty, //unsigned right shift
328
var nonLogicalOperators = new ImmutableArray<
BinaryOperatorSignature
>[]
675
foreach (
var
op in _builtInOperators[kind.IsLogical() ? 1 : 0][kind.OperatorIndex()])
690
internal void GetUtf8ConcatenationBuiltInOperator(TypeSymbol readonlySpanOfByte, ArrayBuilder<
BinaryOperatorSignature
> operators)
702
internal
BinaryOperatorSignature
GetSignature(BinaryOperatorKind kind)
Compilation\CSharpCompilation.cs (1)
4321
var
signature = this.BuiltInOperators.GetSignature(easyOutBinaryKind);
Generated\BoundNodes.xml.Generated.cs (3)
1767
public 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)
1787
public
BinaryOperatorSignature
Operator { get; }
1800
public 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)
8828
var
op = visitor.FirstNode.Operator;