gnu.kawa.functions

Class AddOp

public class AddOp extends ProcedureN implements CanInline, Inlineable

Implement the Scheme standard functions "+" and "-".
Field Summary
static AddOp$Mn
static AddOp$Pl
Constructor Summary
AddOp(String name, int plusOrMinus)
Method Summary
static Objectapply2(int plusOrMinus, Object arg1, Object arg2)
static ObjectapplyN(int plusOrMinus, Object[] args)
static ObjectapplyN(int plusOrMinus, Object init, Object[] args)
ObjectapplyN(Object[] args)
static intclassify(Type type)
Classify an expression according to its numeric type. kind==0: not a number. kind==1: a non-real number kind==2: real number kind==3: floating-point kind==4: exact integer
voidcompile(ApplyExp exp, Compilation comp, Target target)
TypegetReturnType(Expression[] args)
Expressioninline(ApplyExp exp, ExpWalker walker)
static Expressionpairwise(Procedure proc, Expression rproc, Expression[] args, ExpWalker walker)
Convert (PROC A B C) to (PROC (PROC A B) C) etc.
static ExpressionprimInline(int opcode, ApplyExp exp)
static Object$Mn(Object arg1, Object arg2)
static Object$Mn(Object arg1)
static Object$Mn$V(Object arg1, Object arg2, Object arg3, Object[] rest)
static Object$Pl(Object arg1, Object arg2)
static Object$Pl$V(Object arg1, Object arg2, Object arg3, Object[] rest)

Field Detail

$Mn

public static final AddOp $Mn

$Pl

public static final AddOp $Pl

Constructor Detail

AddOp

public AddOp(String name, int plusOrMinus)

Method Detail

apply2

public static Object apply2(int plusOrMinus, Object arg1, Object arg2)

applyN

public static Object applyN(int plusOrMinus, Object[] args)

applyN

public static Object applyN(int plusOrMinus, Object init, Object[] args)

applyN

public Object applyN(Object[] args)

classify

public static int classify(Type type)
Classify an expression according to its numeric type. kind==0: not a number. kind==1: a non-real number kind==2: real number kind==3: floating-point kind==4: exact integer

compile

public void compile(ApplyExp exp, Compilation comp, Target target)

getReturnType

public Type getReturnType(Expression[] args)

inline

public Expression inline(ApplyExp exp, ExpWalker walker)

pairwise

public static Expression pairwise(Procedure proc, Expression rproc, Expression[] args, ExpWalker walker)
Convert (PROC A B C) to (PROC (PROC A B) C) etc.

primInline

public static Expression primInline(int opcode, ApplyExp exp)

$Mn

public static Object $Mn(Object arg1, Object arg2)

$Mn

public static Object $Mn(Object arg1)

$Mn$V

public static Object $Mn$V(Object arg1, Object arg2, Object arg3, Object[] rest)

$Pl

public static Object $Pl(Object arg1, Object arg2)

$Pl$V

public static Object $Pl$V(Object arg1, Object arg2, Object arg3, Object[] rest)