Boo.Lang.Compiler.Steps.EmitAssembly.GetArithmeticOpCode C# (CSharp) Метод

GetArithmeticOpCode() приватный Метод

private GetArithmeticOpCode ( IType type, BinaryOperatorType op ) : OpCode
type IType
op BinaryOperatorType
Результат OpCode
        OpCode GetArithmeticOpCode(IType type, BinaryOperatorType op)
        {
            if (IsCheckedIntegerOperand(type))
            {
                switch (op)
                {
                    case BinaryOperatorType.Addition: return OpCodes.Add_Ovf;
                    case BinaryOperatorType.Subtraction: return OpCodes.Sub_Ovf;
                    case BinaryOperatorType.Multiply: return OpCodes.Mul_Ovf;
                    case BinaryOperatorType.Division: return OpCodes.Div;
                    case BinaryOperatorType.Modulus: return OpCodes.Rem;
                }
            }
            else
            {
                switch (op)
                {
                    case BinaryOperatorType.Addition: return OpCodes.Add;
                    case BinaryOperatorType.Subtraction: return OpCodes.Sub;
                    case BinaryOperatorType.Multiply: return OpCodes.Mul;
                    case BinaryOperatorType.Division: return OpCodes.Div;
                    case BinaryOperatorType.Modulus: return OpCodes.Rem;
                }
            }
            throw new ArgumentException("op");
        }
EmitAssembly