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 booleanappropriateIntConstant(Expression[] args, int iarg, InlineCalls visitor) static booleanappropriateLongConstant(Expression[] args, int iarg, InlineCalls visitor) static TypecombineType(Type t1, Type t2) voidcompile(ApplyExp exp, Compilation comp, Target target) voidcompileGeneric(ApplyExp exp, Compilation comp, Target target) booleancompileIntNum(Expression arg1, Expression arg2, int kind1, int kind2, Compilation comp) static CompileArithforBitwise(Object proc) static CompileArithstatic CompileArithstatic intgetReturnKind(int kind1, int kind2, int op) intgetReturnKind(Expression[] args) This actually returns the "promoted argument type".getReturnType(Expression[] args) static Expressionpairwise(Procedure proc, Expression rproc, Expression[] args, InlineCalls visitor) Convert (PROC A B C) to (PROC (PROC A B) C) etc.intstatic ExpressionvalidateApplyAdd(AddOp proc, ApplyExp exp, InlineCalls visitor) static ExpressionvalidateApplyArithOp(ApplyExp exp, InlineCalls visitor, Type required, Procedure proc) static ExpressionvalidateApplyDiv(DivideOp proc, ApplyExp exp, InlineCalls visitor) static ExpressionvalidateApplyNot(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:
compilein 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.
-