public static UnaryOperatorKind OpKind(UnaryOperatorKind kind, TypeSymbol operand) { int?index = TypeToIndex(operand); if (index == null) { return(UnaryOperatorKind.Error); } int kindIndex = kind.OperatorIndex(); var result = (kindIndex >= s_opkind.Length) ? UnaryOperatorKind.Error : s_opkind[kindIndex][index.Value]; return(result == UnaryOperatorKind.Error ? result : result | kind); }
internal void GetSimpleBuiltInOperators(UnaryOperatorKind kind, ArrayBuilder <UnaryOperatorSignature> operators) { if (builtInUnaryOperators == null) { var allOperators = new ImmutableArray <UnaryOperatorSignature>[] { GetSignaturesFromUnaryOperatorKinds(new [] { (int)UnaryOperatorKind.SBytePostfixIncrement, (int)UnaryOperatorKind.BytePostfixIncrement, (int)UnaryOperatorKind.ShortPostfixIncrement, (int)UnaryOperatorKind.UShortPostfixIncrement, (int)UnaryOperatorKind.IntPostfixIncrement, (int)UnaryOperatorKind.UIntPostfixIncrement, (int)UnaryOperatorKind.LongPostfixIncrement, (int)UnaryOperatorKind.ULongPostfixIncrement, (int)UnaryOperatorKind.CharPostfixIncrement, (int)UnaryOperatorKind.FloatPostfixIncrement, (int)UnaryOperatorKind.DoublePostfixIncrement, (int)UnaryOperatorKind.DecimalPostfixIncrement, (int)UnaryOperatorKind.LiftedSBytePostfixIncrement, (int)UnaryOperatorKind.LiftedBytePostfixIncrement, (int)UnaryOperatorKind.LiftedShortPostfixIncrement, (int)UnaryOperatorKind.LiftedUShortPostfixIncrement, (int)UnaryOperatorKind.LiftedIntPostfixIncrement, (int)UnaryOperatorKind.LiftedUIntPostfixIncrement, (int)UnaryOperatorKind.LiftedLongPostfixIncrement, (int)UnaryOperatorKind.LiftedULongPostfixIncrement, (int)UnaryOperatorKind.LiftedCharPostfixIncrement, (int)UnaryOperatorKind.LiftedFloatPostfixIncrement, (int)UnaryOperatorKind.LiftedDoublePostfixIncrement, (int)UnaryOperatorKind.LiftedDecimalPostfixIncrement, }), GetSignaturesFromUnaryOperatorKinds(new [] { (int)UnaryOperatorKind.SBytePostfixDecrement, (int)UnaryOperatorKind.BytePostfixDecrement, (int)UnaryOperatorKind.ShortPostfixDecrement, (int)UnaryOperatorKind.UShortPostfixDecrement, (int)UnaryOperatorKind.IntPostfixDecrement, (int)UnaryOperatorKind.UIntPostfixDecrement, (int)UnaryOperatorKind.LongPostfixDecrement, (int)UnaryOperatorKind.ULongPostfixDecrement, (int)UnaryOperatorKind.CharPostfixDecrement, (int)UnaryOperatorKind.FloatPostfixDecrement, (int)UnaryOperatorKind.DoublePostfixDecrement, (int)UnaryOperatorKind.DecimalPostfixDecrement, (int)UnaryOperatorKind.LiftedSBytePostfixDecrement, (int)UnaryOperatorKind.LiftedBytePostfixDecrement, (int)UnaryOperatorKind.LiftedShortPostfixDecrement, (int)UnaryOperatorKind.LiftedUShortPostfixDecrement, (int)UnaryOperatorKind.LiftedIntPostfixDecrement, (int)UnaryOperatorKind.LiftedUIntPostfixDecrement, (int)UnaryOperatorKind.LiftedLongPostfixDecrement, (int)UnaryOperatorKind.LiftedULongPostfixDecrement, (int)UnaryOperatorKind.LiftedCharPostfixDecrement, (int)UnaryOperatorKind.LiftedFloatPostfixDecrement, (int)UnaryOperatorKind.LiftedDoublePostfixDecrement, (int)UnaryOperatorKind.LiftedDecimalPostfixDecrement, }), GetSignaturesFromUnaryOperatorKinds(new [] { (int)UnaryOperatorKind.SBytePrefixIncrement, (int)UnaryOperatorKind.BytePrefixIncrement, (int)UnaryOperatorKind.ShortPrefixIncrement, (int)UnaryOperatorKind.UShortPrefixIncrement, (int)UnaryOperatorKind.IntPrefixIncrement, (int)UnaryOperatorKind.UIntPrefixIncrement, (int)UnaryOperatorKind.LongPrefixIncrement, (int)UnaryOperatorKind.ULongPrefixIncrement, (int)UnaryOperatorKind.CharPrefixIncrement, (int)UnaryOperatorKind.FloatPrefixIncrement, (int)UnaryOperatorKind.DoublePrefixIncrement, (int)UnaryOperatorKind.DecimalPrefixIncrement, (int)UnaryOperatorKind.LiftedSBytePrefixIncrement, (int)UnaryOperatorKind.LiftedBytePrefixIncrement, (int)UnaryOperatorKind.LiftedShortPrefixIncrement, (int)UnaryOperatorKind.LiftedUShortPrefixIncrement, (int)UnaryOperatorKind.LiftedIntPrefixIncrement, (int)UnaryOperatorKind.LiftedUIntPrefixIncrement, (int)UnaryOperatorKind.LiftedLongPrefixIncrement, (int)UnaryOperatorKind.LiftedULongPrefixIncrement, (int)UnaryOperatorKind.LiftedCharPrefixIncrement, (int)UnaryOperatorKind.LiftedFloatPrefixIncrement, (int)UnaryOperatorKind.LiftedDoublePrefixIncrement, (int)UnaryOperatorKind.LiftedDecimalPrefixIncrement, }), GetSignaturesFromUnaryOperatorKinds(new [] { (int)UnaryOperatorKind.SBytePrefixDecrement, (int)UnaryOperatorKind.BytePrefixDecrement, (int)UnaryOperatorKind.ShortPrefixDecrement, (int)UnaryOperatorKind.UShortPrefixDecrement, (int)UnaryOperatorKind.IntPrefixDecrement, (int)UnaryOperatorKind.UIntPrefixDecrement, (int)UnaryOperatorKind.LongPrefixDecrement, (int)UnaryOperatorKind.ULongPrefixDecrement, (int)UnaryOperatorKind.CharPrefixDecrement, (int)UnaryOperatorKind.FloatPrefixDecrement, (int)UnaryOperatorKind.DoublePrefixDecrement, (int)UnaryOperatorKind.DecimalPrefixDecrement, (int)UnaryOperatorKind.LiftedSBytePrefixDecrement, (int)UnaryOperatorKind.LiftedBytePrefixDecrement, (int)UnaryOperatorKind.LiftedShortPrefixDecrement, (int)UnaryOperatorKind.LiftedUShortPrefixDecrement, (int)UnaryOperatorKind.LiftedIntPrefixDecrement, (int)UnaryOperatorKind.LiftedUIntPrefixDecrement, (int)UnaryOperatorKind.LiftedLongPrefixDecrement, (int)UnaryOperatorKind.LiftedULongPrefixDecrement, (int)UnaryOperatorKind.LiftedCharPrefixDecrement, (int)UnaryOperatorKind.LiftedFloatPrefixDecrement, (int)UnaryOperatorKind.LiftedDoublePrefixDecrement, (int)UnaryOperatorKind.LiftedDecimalPrefixDecrement, }), GetSignaturesFromUnaryOperatorKinds(new [] { (int)UnaryOperatorKind.IntUnaryPlus, (int)UnaryOperatorKind.UIntUnaryPlus, (int)UnaryOperatorKind.LongUnaryPlus, (int)UnaryOperatorKind.ULongUnaryPlus, (int)UnaryOperatorKind.FloatUnaryPlus, (int)UnaryOperatorKind.DoubleUnaryPlus, (int)UnaryOperatorKind.DecimalUnaryPlus, (int)UnaryOperatorKind.LiftedIntUnaryPlus, (int)UnaryOperatorKind.LiftedUIntUnaryPlus, (int)UnaryOperatorKind.LiftedLongUnaryPlus, (int)UnaryOperatorKind.LiftedULongUnaryPlus, (int)UnaryOperatorKind.LiftedFloatUnaryPlus, (int)UnaryOperatorKind.LiftedDoubleUnaryPlus, (int)UnaryOperatorKind.LiftedDecimalUnaryPlus, }), GetSignaturesFromUnaryOperatorKinds(new [] { (int)UnaryOperatorKind.IntUnaryMinus, (int)UnaryOperatorKind.LongUnaryMinus, (int)UnaryOperatorKind.FloatUnaryMinus, (int)UnaryOperatorKind.DoubleUnaryMinus, (int)UnaryOperatorKind.DecimalUnaryMinus, (int)UnaryOperatorKind.LiftedIntUnaryMinus, (int)UnaryOperatorKind.LiftedLongUnaryMinus, (int)UnaryOperatorKind.LiftedFloatUnaryMinus, (int)UnaryOperatorKind.LiftedDoubleUnaryMinus, (int)UnaryOperatorKind.LiftedDecimalUnaryMinus, }), GetSignaturesFromUnaryOperatorKinds(new [] { (int)UnaryOperatorKind.BoolLogicalNegation, (int)UnaryOperatorKind.LiftedBoolLogicalNegation, }), GetSignaturesFromUnaryOperatorKinds(new [] { (int)UnaryOperatorKind.IntBitwiseComplement, (int)UnaryOperatorKind.UIntBitwiseComplement, (int)UnaryOperatorKind.LongBitwiseComplement, (int)UnaryOperatorKind.ULongBitwiseComplement, (int)UnaryOperatorKind.LiftedIntBitwiseComplement, (int)UnaryOperatorKind.LiftedUIntBitwiseComplement, (int)UnaryOperatorKind.LiftedLongBitwiseComplement, (int)UnaryOperatorKind.LiftedULongBitwiseComplement, }), // No built-in operator true or operator false ImmutableArray <UnaryOperatorSignature> .Empty, ImmutableArray <UnaryOperatorSignature> .Empty, }; Interlocked.CompareExchange(ref builtInUnaryOperators, allOperators, null); } operators.AddRange(builtInUnaryOperators[kind.OperatorIndex()]); }
internal void GetSimpleBuiltInOperators(UnaryOperatorKind kind, ArrayBuilder<UnaryOperatorSignature> operators) { if (builtInUnaryOperators == null) { var allOperators = new ImmutableArray<UnaryOperatorSignature>[] { (new [] { GetSignature(UnaryOperatorKind.SBytePostfixIncrement), GetSignature(UnaryOperatorKind.BytePostfixIncrement), GetSignature(UnaryOperatorKind.ShortPostfixIncrement), GetSignature(UnaryOperatorKind.UShortPostfixIncrement), GetSignature(UnaryOperatorKind.IntPostfixIncrement), GetSignature(UnaryOperatorKind.UIntPostfixIncrement), GetSignature(UnaryOperatorKind.LongPostfixIncrement), GetSignature(UnaryOperatorKind.ULongPostfixIncrement), GetSignature(UnaryOperatorKind.CharPostfixIncrement), GetSignature(UnaryOperatorKind.FloatPostfixIncrement), GetSignature(UnaryOperatorKind.DoublePostfixIncrement), GetSignature(UnaryOperatorKind.DecimalPostfixIncrement), GetSignature(UnaryOperatorKind.LiftedSBytePostfixIncrement), GetSignature(UnaryOperatorKind.LiftedBytePostfixIncrement), GetSignature(UnaryOperatorKind.LiftedShortPostfixIncrement), GetSignature(UnaryOperatorKind.LiftedUShortPostfixIncrement), GetSignature(UnaryOperatorKind.LiftedIntPostfixIncrement), GetSignature(UnaryOperatorKind.LiftedUIntPostfixIncrement), GetSignature(UnaryOperatorKind.LiftedLongPostfixIncrement), GetSignature(UnaryOperatorKind.LiftedULongPostfixIncrement), GetSignature(UnaryOperatorKind.LiftedCharPostfixIncrement), GetSignature(UnaryOperatorKind.LiftedFloatPostfixIncrement), GetSignature(UnaryOperatorKind.LiftedDoublePostfixIncrement), GetSignature(UnaryOperatorKind.LiftedDecimalPostfixIncrement), }).AsImmutableOrNull(), (new [] { GetSignature(UnaryOperatorKind.SBytePostfixDecrement), GetSignature(UnaryOperatorKind.BytePostfixDecrement), GetSignature(UnaryOperatorKind.ShortPostfixDecrement), GetSignature(UnaryOperatorKind.UShortPostfixDecrement), GetSignature(UnaryOperatorKind.IntPostfixDecrement), GetSignature(UnaryOperatorKind.UIntPostfixDecrement), GetSignature(UnaryOperatorKind.LongPostfixDecrement), GetSignature(UnaryOperatorKind.ULongPostfixDecrement), GetSignature(UnaryOperatorKind.CharPostfixDecrement), GetSignature(UnaryOperatorKind.FloatPostfixDecrement), GetSignature(UnaryOperatorKind.DoublePostfixDecrement), GetSignature(UnaryOperatorKind.DecimalPostfixDecrement), GetSignature(UnaryOperatorKind.LiftedSBytePostfixDecrement), GetSignature(UnaryOperatorKind.LiftedBytePostfixDecrement), GetSignature(UnaryOperatorKind.LiftedShortPostfixDecrement), GetSignature(UnaryOperatorKind.LiftedUShortPostfixDecrement), GetSignature(UnaryOperatorKind.LiftedIntPostfixDecrement), GetSignature(UnaryOperatorKind.LiftedUIntPostfixDecrement), GetSignature(UnaryOperatorKind.LiftedLongPostfixDecrement), GetSignature(UnaryOperatorKind.LiftedULongPostfixDecrement), GetSignature(UnaryOperatorKind.LiftedCharPostfixDecrement), GetSignature(UnaryOperatorKind.LiftedFloatPostfixDecrement), GetSignature(UnaryOperatorKind.LiftedDoublePostfixDecrement), GetSignature(UnaryOperatorKind.LiftedDecimalPostfixDecrement), }).AsImmutableOrNull(), (new [] { GetSignature(UnaryOperatorKind.SBytePrefixIncrement), GetSignature(UnaryOperatorKind.BytePrefixIncrement), GetSignature(UnaryOperatorKind.ShortPrefixIncrement), GetSignature(UnaryOperatorKind.UShortPrefixIncrement), GetSignature(UnaryOperatorKind.IntPrefixIncrement), GetSignature(UnaryOperatorKind.UIntPrefixIncrement), GetSignature(UnaryOperatorKind.LongPrefixIncrement), GetSignature(UnaryOperatorKind.ULongPrefixIncrement), GetSignature(UnaryOperatorKind.CharPrefixIncrement), GetSignature(UnaryOperatorKind.FloatPrefixIncrement), GetSignature(UnaryOperatorKind.DoublePrefixIncrement), GetSignature(UnaryOperatorKind.DecimalPrefixIncrement), GetSignature(UnaryOperatorKind.LiftedSBytePrefixIncrement), GetSignature(UnaryOperatorKind.LiftedBytePrefixIncrement), GetSignature(UnaryOperatorKind.LiftedShortPrefixIncrement), GetSignature(UnaryOperatorKind.LiftedUShortPrefixIncrement), GetSignature(UnaryOperatorKind.LiftedIntPrefixIncrement), GetSignature(UnaryOperatorKind.LiftedUIntPrefixIncrement), GetSignature(UnaryOperatorKind.LiftedLongPrefixIncrement), GetSignature(UnaryOperatorKind.LiftedULongPrefixIncrement), GetSignature(UnaryOperatorKind.LiftedCharPrefixIncrement), GetSignature(UnaryOperatorKind.LiftedFloatPrefixIncrement), GetSignature(UnaryOperatorKind.LiftedDoublePrefixIncrement), GetSignature(UnaryOperatorKind.LiftedDecimalPrefixIncrement), }).AsImmutableOrNull(), (new [] { GetSignature(UnaryOperatorKind.SBytePrefixDecrement), GetSignature(UnaryOperatorKind.BytePrefixDecrement), GetSignature(UnaryOperatorKind.ShortPrefixDecrement), GetSignature(UnaryOperatorKind.UShortPrefixDecrement), GetSignature(UnaryOperatorKind.IntPrefixDecrement), GetSignature(UnaryOperatorKind.UIntPrefixDecrement), GetSignature(UnaryOperatorKind.LongPrefixDecrement), GetSignature(UnaryOperatorKind.ULongPrefixDecrement), GetSignature(UnaryOperatorKind.CharPrefixDecrement), GetSignature(UnaryOperatorKind.FloatPrefixDecrement), GetSignature(UnaryOperatorKind.DoublePrefixDecrement), GetSignature(UnaryOperatorKind.DecimalPrefixDecrement), GetSignature(UnaryOperatorKind.LiftedSBytePrefixDecrement), GetSignature(UnaryOperatorKind.LiftedBytePrefixDecrement), GetSignature(UnaryOperatorKind.LiftedShortPrefixDecrement), GetSignature(UnaryOperatorKind.LiftedUShortPrefixDecrement), GetSignature(UnaryOperatorKind.LiftedIntPrefixDecrement), GetSignature(UnaryOperatorKind.LiftedUIntPrefixDecrement), GetSignature(UnaryOperatorKind.LiftedLongPrefixDecrement), GetSignature(UnaryOperatorKind.LiftedULongPrefixDecrement), GetSignature(UnaryOperatorKind.LiftedCharPrefixDecrement), GetSignature(UnaryOperatorKind.LiftedFloatPrefixDecrement), GetSignature(UnaryOperatorKind.LiftedDoublePrefixDecrement), GetSignature(UnaryOperatorKind.LiftedDecimalPrefixDecrement), }).AsImmutableOrNull(), (new [] { GetSignature(UnaryOperatorKind.IntUnaryPlus), GetSignature(UnaryOperatorKind.UIntUnaryPlus), GetSignature(UnaryOperatorKind.LongUnaryPlus), GetSignature(UnaryOperatorKind.ULongUnaryPlus), GetSignature(UnaryOperatorKind.FloatUnaryPlus), GetSignature(UnaryOperatorKind.DoubleUnaryPlus), GetSignature(UnaryOperatorKind.DecimalUnaryPlus), GetSignature(UnaryOperatorKind.LiftedIntUnaryPlus), GetSignature(UnaryOperatorKind.LiftedUIntUnaryPlus), GetSignature(UnaryOperatorKind.LiftedLongUnaryPlus), GetSignature(UnaryOperatorKind.LiftedULongUnaryPlus), GetSignature(UnaryOperatorKind.LiftedFloatUnaryPlus), GetSignature(UnaryOperatorKind.LiftedDoubleUnaryPlus), GetSignature(UnaryOperatorKind.LiftedDecimalUnaryPlus), }).AsImmutableOrNull(), (new [] { GetSignature(UnaryOperatorKind.IntUnaryMinus), GetSignature(UnaryOperatorKind.LongUnaryMinus), GetSignature(UnaryOperatorKind.FloatUnaryMinus), GetSignature(UnaryOperatorKind.DoubleUnaryMinus), GetSignature(UnaryOperatorKind.DecimalUnaryMinus), GetSignature(UnaryOperatorKind.LiftedIntUnaryMinus), GetSignature(UnaryOperatorKind.LiftedLongUnaryMinus), GetSignature(UnaryOperatorKind.LiftedFloatUnaryMinus), GetSignature(UnaryOperatorKind.LiftedDoubleUnaryMinus), GetSignature(UnaryOperatorKind.LiftedDecimalUnaryMinus), }).AsImmutableOrNull(), (new [] { GetSignature(UnaryOperatorKind.BoolLogicalNegation), GetSignature(UnaryOperatorKind.LiftedBoolLogicalNegation), }).AsImmutableOrNull(), (new [] { GetSignature(UnaryOperatorKind.IntBitwiseComplement), GetSignature(UnaryOperatorKind.UIntBitwiseComplement), GetSignature(UnaryOperatorKind.LongBitwiseComplement), GetSignature(UnaryOperatorKind.ULongBitwiseComplement), GetSignature(UnaryOperatorKind.LiftedIntBitwiseComplement), GetSignature(UnaryOperatorKind.LiftedUIntBitwiseComplement), GetSignature(UnaryOperatorKind.LiftedLongBitwiseComplement), GetSignature(UnaryOperatorKind.LiftedULongBitwiseComplement), }).AsImmutableOrNull(), // No built-in operator true or operator false (new UnaryOperatorSignature [0]).AsImmutableOrNull(), (new UnaryOperatorSignature [0]).AsImmutableOrNull(), }; Interlocked.CompareExchange(ref builtInUnaryOperators, allOperators, null); } operators.AddRange(builtInUnaryOperators[kind.OperatorIndex()]); }
public static UnaryOperatorKind OpKind(UnaryOperatorKind kind, TypeSymbol operand) { int? index = TypeToIndex(operand); if (index == null) { return UnaryOperatorKind.Error; } var result = opkind[kind.OperatorIndex()][index.Value]; return result == UnaryOperatorKind.Error ? result : result | kind; }
public static UnaryOperatorKind OpKind(UnaryOperatorKind kind, TypeSymbol operand) { int? index = TypeToIndex(operand); if (index == null) { return UnaryOperatorKind.Error; } int kindIndex = kind.OperatorIndex(); var result = (kindIndex >= s_opkind.Length) ? UnaryOperatorKind.Error : s_opkind[kindIndex][index.Value]; return result == UnaryOperatorKind.Error ? result : result | kind; }
internal void GetSimpleBuiltInOperators(UnaryOperatorKind kind, ArrayBuilder <UnaryOperatorSignature> operators) { if (_builtInUnaryOperators == null) { var allOperators = new ImmutableArray <UnaryOperatorSignature>[] { GetSignaturesFromUnaryOperatorKinds(new [] { (int)UnaryOperatorKind.Int8PostfixIncrement, (int)UnaryOperatorKind.UInt8PostfixIncrement, (int)UnaryOperatorKind.Int16PostfixIncrement, (int)UnaryOperatorKind.UInt16PostfixIncrement, (int)UnaryOperatorKind.Int32PostfixIncrement, (int)UnaryOperatorKind.UInt32PostfixIncrement, (int)UnaryOperatorKind.Int64PostfixIncrement, (int)UnaryOperatorKind.UInt64PostfixIncrement, (int)UnaryOperatorKind.CharPostfixIncrement, (int)UnaryOperatorKind.Float32PostfixIncrement, (int)UnaryOperatorKind.Float64PostfixIncrement, (int)UnaryOperatorKind.IntPostfixIncrement, (int)UnaryOperatorKind.UIntPostfixIncrement, (int)UnaryOperatorKind.LiftedInt8PostfixIncrement, (int)UnaryOperatorKind.LiftedUInt8PostfixIncrement, (int)UnaryOperatorKind.LiftedInt16PostfixIncrement, (int)UnaryOperatorKind.LiftedUInt16PostfixIncrement, (int)UnaryOperatorKind.LiftedInt32PostfixIncrement, (int)UnaryOperatorKind.LiftedUInt32PostfixIncrement, (int)UnaryOperatorKind.LiftedInt64PostfixIncrement, (int)UnaryOperatorKind.LiftedUInt64PostfixIncrement, (int)UnaryOperatorKind.LiftedCharPostfixIncrement, (int)UnaryOperatorKind.LiftedFloat32PostfixIncrement, (int)UnaryOperatorKind.LiftedFloat64PostfixIncrement, (int)UnaryOperatorKind.LiftedIntPostfixIncrement, (int)UnaryOperatorKind.LiftedUIntPostfixIncrement, }), GetSignaturesFromUnaryOperatorKinds(new [] { (int)UnaryOperatorKind.Int8PostfixDecrement, (int)UnaryOperatorKind.UInt8PostfixDecrement, (int)UnaryOperatorKind.Int16PostfixDecrement, (int)UnaryOperatorKind.UInt16PostfixDecrement, (int)UnaryOperatorKind.Int32PostfixDecrement, (int)UnaryOperatorKind.UInt32PostfixDecrement, (int)UnaryOperatorKind.Int64PostfixDecrement, (int)UnaryOperatorKind.UInt64PostfixDecrement, (int)UnaryOperatorKind.CharPostfixDecrement, (int)UnaryOperatorKind.Float32PostfixDecrement, (int)UnaryOperatorKind.Float64PostfixDecrement, (int)UnaryOperatorKind.IntPostfixDecrement, (int)UnaryOperatorKind.UIntPostfixDecrement, (int)UnaryOperatorKind.LiftedInt8PostfixDecrement, (int)UnaryOperatorKind.LiftedUInt8PostfixDecrement, (int)UnaryOperatorKind.LiftedInt16PostfixDecrement, (int)UnaryOperatorKind.LiftedUInt16PostfixDecrement, (int)UnaryOperatorKind.LiftedInt32PostfixDecrement, (int)UnaryOperatorKind.LiftedUInt32PostfixDecrement, (int)UnaryOperatorKind.LiftedInt64PostfixDecrement, (int)UnaryOperatorKind.LiftedUInt64PostfixDecrement, (int)UnaryOperatorKind.LiftedCharPostfixDecrement, (int)UnaryOperatorKind.LiftedFloat32PostfixDecrement, (int)UnaryOperatorKind.LiftedFloat64PostfixDecrement, (int)UnaryOperatorKind.LiftedIntPostfixDecrement, (int)UnaryOperatorKind.LiftedUIntPostfixDecrement, }), GetSignaturesFromUnaryOperatorKinds(new [] { (int)UnaryOperatorKind.Int8PrefixIncrement, (int)UnaryOperatorKind.UInt8PrefixIncrement, (int)UnaryOperatorKind.Int16PrefixIncrement, (int)UnaryOperatorKind.UInt16PrefixIncrement, (int)UnaryOperatorKind.Int32PrefixIncrement, (int)UnaryOperatorKind.UInt32PrefixIncrement, (int)UnaryOperatorKind.Int64PrefixIncrement, (int)UnaryOperatorKind.UInt64PrefixIncrement, (int)UnaryOperatorKind.CharPrefixIncrement, (int)UnaryOperatorKind.Float32PrefixIncrement, (int)UnaryOperatorKind.Float64PrefixIncrement, (int)UnaryOperatorKind.IntPrefixIncrement, (int)UnaryOperatorKind.UIntPrefixIncrement, (int)UnaryOperatorKind.LiftedInt8PrefixIncrement, (int)UnaryOperatorKind.LiftedUInt8PrefixIncrement, (int)UnaryOperatorKind.LiftedInt16PrefixIncrement, (int)UnaryOperatorKind.LiftedUInt16PrefixIncrement, (int)UnaryOperatorKind.LiftedInt32PrefixIncrement, (int)UnaryOperatorKind.LiftedUInt32PrefixIncrement, (int)UnaryOperatorKind.LiftedInt64PrefixIncrement, (int)UnaryOperatorKind.LiftedUInt64PrefixIncrement, (int)UnaryOperatorKind.LiftedCharPrefixIncrement, (int)UnaryOperatorKind.LiftedFloat32PrefixIncrement, (int)UnaryOperatorKind.LiftedFloat64PrefixIncrement, (int)UnaryOperatorKind.LiftedIntPrefixIncrement, (int)UnaryOperatorKind.LiftedUIntPrefixIncrement, }), GetSignaturesFromUnaryOperatorKinds(new [] { (int)UnaryOperatorKind.Int8PrefixDecrement, (int)UnaryOperatorKind.UInt8PrefixDecrement, (int)UnaryOperatorKind.Int16PrefixDecrement, (int)UnaryOperatorKind.UInt16PrefixDecrement, (int)UnaryOperatorKind.Int32PrefixDecrement, (int)UnaryOperatorKind.UInt32PrefixDecrement, (int)UnaryOperatorKind.Int64PrefixDecrement, (int)UnaryOperatorKind.UInt64PrefixDecrement, (int)UnaryOperatorKind.CharPrefixDecrement, (int)UnaryOperatorKind.Float32PrefixDecrement, (int)UnaryOperatorKind.Float64PrefixDecrement, (int)UnaryOperatorKind.IntPrefixDecrement, (int)UnaryOperatorKind.UIntPrefixDecrement, (int)UnaryOperatorKind.LiftedInt8PrefixDecrement, (int)UnaryOperatorKind.LiftedUInt8PrefixDecrement, (int)UnaryOperatorKind.LiftedInt16PrefixDecrement, (int)UnaryOperatorKind.LiftedUInt16PrefixDecrement, (int)UnaryOperatorKind.LiftedInt32PrefixDecrement, (int)UnaryOperatorKind.LiftedUInt32PrefixDecrement, (int)UnaryOperatorKind.LiftedInt64PrefixDecrement, (int)UnaryOperatorKind.LiftedUInt64PrefixDecrement, (int)UnaryOperatorKind.LiftedCharPrefixDecrement, (int)UnaryOperatorKind.LiftedFloat32PrefixDecrement, (int)UnaryOperatorKind.LiftedFloat64PrefixDecrement, (int)UnaryOperatorKind.LiftedIntPrefixDecrement, (int)UnaryOperatorKind.LiftedUIntPrefixDecrement, }), GetSignaturesFromUnaryOperatorKinds(new [] { (int)UnaryOperatorKind.Int32UnaryPlus, (int)UnaryOperatorKind.UInt32UnaryPlus, (int)UnaryOperatorKind.Int64UnaryPlus, (int)UnaryOperatorKind.UInt64UnaryPlus, (int)UnaryOperatorKind.Float32UnaryPlus, (int)UnaryOperatorKind.Float64UnaryPlus, (int)UnaryOperatorKind.IntUnaryPlus, (int)UnaryOperatorKind.UIntUnaryPlus, (int)UnaryOperatorKind.LiftedInt32UnaryPlus, (int)UnaryOperatorKind.LiftedUInt32UnaryPlus, (int)UnaryOperatorKind.LiftedInt64UnaryPlus, (int)UnaryOperatorKind.LiftedUInt64UnaryPlus, (int)UnaryOperatorKind.LiftedFloat32UnaryPlus, (int)UnaryOperatorKind.LiftedFloat64UnaryPlus, (int)UnaryOperatorKind.LiftedIntUnaryPlus, (int)UnaryOperatorKind.LiftedUIntUnaryPlus, }), GetSignaturesFromUnaryOperatorKinds(new [] { (int)UnaryOperatorKind.Int32UnaryMinus, (int)UnaryOperatorKind.Int64UnaryMinus, (int)UnaryOperatorKind.Float32UnaryMinus, (int)UnaryOperatorKind.Float64UnaryMinus, (int)UnaryOperatorKind.IntUnaryMinus, (int)UnaryOperatorKind.LiftedInt32UnaryMinus, (int)UnaryOperatorKind.LiftedInt64UnaryMinus, (int)UnaryOperatorKind.LiftedFloat32UnaryMinus, (int)UnaryOperatorKind.LiftedFloat64UnaryMinus, (int)UnaryOperatorKind.LiftedIntUnaryMinus, }), GetSignaturesFromUnaryOperatorKinds(new [] { (int)UnaryOperatorKind.BoolLogicalNegation, (int)UnaryOperatorKind.LiftedBoolLogicalNegation, }), GetSignaturesFromUnaryOperatorKinds(new [] { (int)UnaryOperatorKind.Int32BitwiseComplement, (int)UnaryOperatorKind.UInt32BitwiseComplement, (int)UnaryOperatorKind.Int64BitwiseComplement, (int)UnaryOperatorKind.UInt64BitwiseComplement, (int)UnaryOperatorKind.IntBitwiseComplement, (int)UnaryOperatorKind.LiftedInt32BitwiseComplement, (int)UnaryOperatorKind.LiftedUInt32BitwiseComplement, (int)UnaryOperatorKind.LiftedInt64BitwiseComplement, (int)UnaryOperatorKind.LiftedUInt64BitwiseComplement, (int)UnaryOperatorKind.LiftedIntBitwiseComplement, }), // No built-in operator true or operator false ImmutableArray <UnaryOperatorSignature> .Empty, ImmutableArray <UnaryOperatorSignature> .Empty, }; Interlocked.CompareExchange(ref _builtInUnaryOperators, allOperators, null); } operators.AddRange(_builtInUnaryOperators[kind.OperatorIndex()]); }