clojure.lang.CljCompiler.Ast.CaseExpr.GenTestForInts C# (CSharp) Метод

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

private GenTestForInts ( ObjExpr objx, GenContext context, Type primExprType, clojure.lang.CljCompiler.Ast.Expr test, bool genUnboxed ) : Expression
objx ObjExpr
context GenContext
primExprType System.Type
test clojure.lang.CljCompiler.Ast.Expr
genUnboxed bool
Результат Expression
        private Expression GenTestForInts(ObjExpr objx, GenContext context, Type primExprType, Expr test, bool genUnboxed)
        {
            Expression condCode;

            if (primExprType == null)
            {
                Expression exprCode = _expr.GenCode(RHC.Expression, objx, context);
                Expression testCode = test.GenCode(RHC.Expression, objx, context);
                condCode = Expression.Call(null, Compiler.Method_Util_equiv, Compiler.MaybeBox(exprCode), Compiler.MaybeBox(testCode));

            }
            else if (primExprType == typeof(long) || primExprType == typeof(ulong))
            {
                Expression exprCode = _expr.GenCodeUnboxed(RHC.Expression, objx, context);
                Expression testCode = ((NumberExpr)test).GenCodeUnboxed(RHC.Expression, objx, context);
                condCode = Expression.Equal(exprCode, testCode);
            }
            else if (primExprType == typeof(int) || primExprType == typeof(short) || primExprType == typeof(byte)
                  || primExprType == typeof(uint) || primExprType == typeof(ushort) || primExprType == typeof(sbyte))
            {
                if (IsShiftMasked)
                {
                    Expression exprCode = Expression.Convert(_expr.GenCodeUnboxed(RHC.Expression, objx, context),typeof(long));
                    Expression testCode = ((NumberExpr)test).GenCodeUnboxed(RHC.Expression, objx, context);
                    condCode = Expression.Equal(exprCode, testCode);
                }
                else
                    condCode = Expression.Constant(true);
            }
            else
            {
                condCode = Expression.Constant(false);
            }
            return condCode;
        }