public static CodegenExpression CodegenComparable( CodegenExpression lhs, CodegenExpression rhs, CodegenExpressionRelational.CodegenRelational rel) { return(CodegenExpressionBuilder.Relational( CodegenExpressionBuilder.ExprDotMethod(lhs, "CompareTo", rhs), rel, CodegenExpressionBuilder.Constant(0))); }
public static CodegenExpression CodegenStringCompare( CodegenExpression lhs, Type lhsType, CodegenExpression rhs, Type rhsType, CodegenExpressionRelational.CodegenRelational rel) { return(CodegenExpressionBuilder.Relational( CodegenExpressionBuilder.ExprDotMethod(CodegenAsString(lhs, lhsType), "CompareTo", CodegenAsString(rhs, rhsType)), rel, CodegenExpressionBuilder.Constant(0))); }
public static CodegenExpression CodegenBigIntConv( CodegenExpression lhs, Type lhsType, CodegenExpression rhs, Type rhsType, BigIntegerCoercer convLeft, BigIntegerCoercer convRight, CodegenExpressionRelational.CodegenRelational rel) { var leftConv = convLeft.CoerceBoxedBigIntCodegen(lhs, lhsType); var rightConv = convRight.CoerceBoxedBigIntCodegen(rhs, rhsType); return(CodegenExpressionBuilder.Relational( CodegenExpressionBuilder.ExprDotMethod(leftConv, "CompareTo", rightConv), rel, CodegenExpressionBuilder.Constant(0))); }