public class CompileArith extends java.lang.Object implements Inlineable
Modifier and Type | Field and Description |
---|---|
static CompileArith |
MINUS |
static CompileArith |
PLUS |
Modifier and Type | Method and Description |
---|---|
static 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(java.lang.Object proc) |
static CompileArith |
forDiv(java.lang.Object proc) |
static CompileArith |
forMul(java.lang.Object proc) |
int |
getReturnKind(Expression[] args)
This actually returns the "promoted argument type".
|
static int |
getReturnKind(int kind1,
int kind2,
int op) |
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 |
primitiveOpcode() |
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) |
public static CompileArith PLUS
public static CompileArith MINUS
public static CompileArith forMul(java.lang.Object proc)
public static CompileArith forDiv(java.lang.Object proc)
public static CompileArith forBitwise(java.lang.Object proc)
public static boolean appropriateIntConstant(Expression[] args, int iarg, InlineCalls visitor)
public static boolean appropriateLongConstant(Expression[] args, int iarg, InlineCalls visitor)
public static Expression validateApplyArithOp(ApplyExp exp, InlineCalls visitor, Type required, Procedure proc)
public void compileGeneric(ApplyExp exp, Compilation comp, Target target)
public void compile(ApplyExp exp, Compilation comp, Target target)
compile
in interface Inlineable
public boolean compileIntNum(Expression arg1, Expression arg2, int kind1, int kind2, Compilation comp)
public static int getReturnKind(int kind1, int kind2, int op)
public int getReturnKind(Expression[] args)
public Type getReturnType(Expression[] args)
public static Expression validateApplyAdd(AddOp proc, ApplyExp exp, InlineCalls visitor)
public static Expression validateApplyDiv(DivideOp proc, ApplyExp exp, InlineCalls visitor)
public static Expression validateApplyNot(ApplyExp exp, int kind, InlineCalls visitor)
public int primitiveOpcode()
public static Expression pairwise(Procedure proc, Expression rproc, Expression[] args, InlineCalls visitor)