28 instantiations of BinaryOperatorSignature
Microsoft.CodeAnalysis.CSharp (28)
Binder\Binder_Operators.cs (4)
73
new
BinaryOperatorSignature
(
184
bestSignature = new
BinaryOperatorSignature
(
714
resultSignature = new
BinaryOperatorSignature
(kind, leftType: null, rightType: null, CreateErrorType());
736
resultSignature = new
BinaryOperatorSignature
(kind | BinaryOperatorKind.NullableNull, leftType: null, rightType: null,
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (20)
318
operators.Add(new
BinaryOperatorSignature
(kind | BinaryOperatorKind.Delegate, delegateType, delegateType, delegateType));
484
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.EnumAndUnderlyingAddition, enumType, underlying, enumType));
485
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.UnderlyingAndEnumAddition, underlying, enumType, enumType));
486
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedEnumAndUnderlyingAddition, nullableEnum, nullableUnderlying, nullableEnum));
487
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedUnderlyingAndEnumAddition, nullableUnderlying, nullableEnum, nullableEnum));
492
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.EnumSubtraction, enumType, enumType, underlying));
493
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.EnumAndUnderlyingSubtraction, enumType, underlying, enumType));
494
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedEnumSubtraction, nullableEnum, nullableEnum, nullableUnderlying));
495
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedEnumAndUnderlyingSubtraction, nullableEnum, nullableUnderlying, nullableEnum));
505
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.EnumSubtraction, enumType, enumType, underlying)
507
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.EnumAndUnderlyingSubtraction, enumType, underlying, enumType)
509
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedEnumSubtraction, nullableEnum, nullableEnum, nullableUnderlying)
511
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedEnumAndUnderlyingSubtraction, nullableEnum, nullableUnderlying, nullableEnum)
515
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.UnderlyingAndEnumSubtraction, underlying, enumType, enumType)
517
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.LiftedUnderlyingAndEnumSubtraction, nullableUnderlying, nullableEnum, nullableEnum)
534
operators.Add(new
BinaryOperatorSignature
(kind | BinaryOperatorKind.Enum, enumType, enumType, enumType));
535
operators.Add(new
BinaryOperatorSignature
(kind | BinaryOperatorKind.Lifted | BinaryOperatorKind.Enum, nullableEnum, nullableEnum, nullableEnum));
973
operators.Add(new
BinaryOperatorSignature
(BinaryOperatorKind.UserDefined | kind, leftOperandType, rightOperandType, resultType, op, constrainedToTypeOpt));
990
operators.Add(new
BinaryOperatorSignature
(
996
operators.Add(new
BinaryOperatorSignature
(
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));
82 references to BinaryOperatorSignature
Microsoft.CodeAnalysis.CSharp (81)
Binder\Binder_Operators.cs (10)
51
return new BoundCompoundAssignmentOperator(node,
BinaryOperatorSignature
.Error, left, right,
94
return new BoundCompoundAssignmentOperator(node,
BinaryOperatorSignature
.Error, left, right,
108
return new BoundCompoundAssignmentOperator(node,
BinaryOperatorSignature
.Error, left, right,
129
return new BoundCompoundAssignmentOperator(node,
BinaryOperatorSignature
.Error, left, right,
176
BinaryOperatorSignature
bestSignature = best.Signature;
579
BinaryOperatorSignature
signature;
700
out
BinaryOperatorSignature
resultSignature, out BinaryOperatorAnalysisResult best)
719
var
signature = best.Signature;
985
BinaryOperatorSignature
signature = best.Signature;
1101
BinaryOperatorSignature
signature,
Binder\Semantics\Operators\BinaryOperatorAnalysisResult.cs (4)
18
public readonly
BinaryOperatorSignature
Signature;
21
private BinaryOperatorAnalysisResult(OperatorAnalysisResultKind kind,
BinaryOperatorSignature
signature, Conversion leftConversion, Conversion rightConversion)
53
public static BinaryOperatorAnalysisResult Applicable(
BinaryOperatorSignature
signature, Conversion leftConversion, Conversion rightConversion)
58
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 (23)
230
var operators = ArrayBuilder<
BinaryOperatorSignature
>.GetInstance();
252
var operators = ArrayBuilder<
BinaryOperatorSignature
>.GetInstance();
306
ArrayBuilder<
BinaryOperatorSignature
> operators)
324
ArrayBuilder<
BinaryOperatorSignature
> operators, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
464
private void GetEnumOperation(BinaryOperatorKind kind, TypeSymbol enumType, BoundExpression right, ArrayBuilder<
BinaryOperatorSignature
> operators)
543
ArrayBuilder<
BinaryOperatorSignature
> operators)
572
ArrayBuilder<
BinaryOperatorSignature
> operators)
588
private void GetEnumOperations(BinaryOperatorKind kind, BoundExpression left, BoundExpression right, ArrayBuilder<
BinaryOperatorSignature
> results)
677
ArrayBuilder<
BinaryOperatorSignature
> results)
711
var operators = ArrayBuilder<
BinaryOperatorSignature
>.GetInstance();
724
BinaryOperatorSignature
op = operators[0];
783
private void GetReferenceEquality(BinaryOperatorKind kind, ArrayBuilder<
BinaryOperatorSignature
> operators)
791
ArrayBuilder<
BinaryOperatorSignature
> operators,
884
var operators = ArrayBuilder<
BinaryOperatorSignature
>.GetInstance();
921
ArrayBuilder<
BinaryOperatorSignature
> operators)
932
var operators2 = ArrayBuilder<
BinaryOperatorSignature
>.GetInstance();
942
foreach (
BinaryOperatorSignature
signature1 in operators)
959
void getDeclaredOperators(TypeSymbol constrainedToTypeOpt, NamedTypeSymbol type, BinaryOperatorKind kind, string name, ArrayBuilder<
BinaryOperatorSignature
> operators)
977
void addLiftedOperators(TypeSymbol constrainedToTypeOpt, BinaryOperatorKind kind, ArrayBuilder<
BinaryOperatorSignature
> operators)
1179
private BetterResult BetterOperator(
BinaryOperatorSignature
op1,
BinaryOperatorSignature
op2, BoundExpression left, BoundExpression right, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1315
private BetterResult MoreSpecificOperator(
BinaryOperatorSignature
op1,
BinaryOperatorSignature
op2, 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)
714
BinaryOperatorSignature
@operator,
728
public BoundCompoundAssignmentOperator Update(
BinaryOperatorSignature
@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)
4248
var
signature = this.BuiltInOperators.GetSignature(easyOutBinaryKind);
Generated\BoundNodes.xml.Generated.cs (3)
1777
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)
1797
public
BinaryOperatorSignature
Operator { get; }
1810
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)
8827
var
op = visitor.FirstNode.Operator;