Package gnu.kawa.functions
Class CompileArith
java.lang.Object
gnu.kawa.functions.CompileArith
- All Implemented Interfaces:
Inlineable
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
appropriateIntConstant
(Expression[] args, int iarg, InlineCalls visitor) static boolean
appropriateLongConstant
(Expression[] args, int iarg, InlineCalls visitor) static Type
combineType
(Type t1, Type t2) void
compile
(ApplyExp exp, Compilation comp, Target target) void
compileGeneric
(ApplyExp exp, Compilation comp, Target target) boolean
compileIntNum
(Expression arg1, Expression arg2, int kind1, int kind2, Compilation comp) static CompileArith
forBitwise
(Object proc) static CompileArith
static CompileArith
static int
getReturnKind
(int kind1, int kind2, int op) int
getReturnKind
(Expression[] args) This actually returns the "promoted argument type".getReturnType
(Expression[] args) static Expression
pairwise
(Procedure proc, Expression rproc, Expression[] args, InlineCalls visitor) Convert (PROC A B C) to (PROC (PROC A B) C) etc.int
static Expression
validateApplyAdd
(AddOp proc, ApplyExp exp, InlineCalls visitor) static Expression
validateApplyArithOp
(ApplyExp exp, InlineCalls visitor, Type required, Procedure proc) static Expression
validateApplyDiv
(DivideOp proc, ApplyExp exp, InlineCalls visitor) static Expression
validateApplyNot
(ApplyExp exp, int kind, InlineCalls visitor)
-
Field Details
-
PLUS
-
MINUS
-
-
Method Details
-
forMul
-
forDiv
-
forBitwise
-
appropriateIntConstant
-
appropriateLongConstant
-
combineType
-
validateApplyArithOp
public static Expression validateApplyArithOp(ApplyExp exp, InlineCalls visitor, Type required, Procedure proc) -
compileGeneric
-
compile
- Specified by:
compile
in interfaceInlineable
-
compileIntNum
public boolean compileIntNum(Expression arg1, Expression arg2, int kind1, int kind2, Compilation comp) -
getReturnKind
public static int getReturnKind(int kind1, int kind2, int op) -
getReturnKind
This actually returns the "promoted argument type". The result kind is different for divide. -
getReturnType
-
validateApplyAdd
-
validateApplyDiv
-
validateApplyNot
-
primitiveOpcode
public int primitiveOpcode() -
pairwise
public static Expression pairwise(Procedure proc, Expression rproc, Expression[] args, InlineCalls visitor) Convert (PROC A B C) to (PROC (PROC A B) C) etc.
-