public class ApplyExp extends Expression
Modifier and Type | Field and Description |
---|---|
static int |
INLINE_IF_CONSTANT |
static int |
MAY_CONTAIN_BACK_JUMP |
ApplyExp |
nextCall
The next ApplyExp in ((ReferenceExp)func).binding.firstCall list.
|
static int |
TAILCALL |
flags, NEXT_AVAIL_FLAG, noExpressions, type, VALIDATED
compilerKey, validateApplyKey
nameKey
Constructor and Description |
---|
ApplyExp(Expression f,
Expression... a) |
ApplyExp(Method m,
Expression... a) |
ApplyExp(Procedure p,
Expression... a) |
Modifier and Type | Method and Description |
---|---|
void |
apply(CallContext ctx)
Evaluate the expression.
|
static Inlineable |
asInlineable(Procedure proc) |
protected Type |
calculateType() |
static void |
compile(ApplyExp exp,
Compilation comp,
Target target) |
void |
compile(Compilation comp,
Target target) |
Expression |
deepCopy(IdentityHashTable mapper) |
Expression |
getArg(int i) |
int |
getArgCount() |
Expression[] |
getArgs() |
Expression |
getFunction() |
java.lang.Object |
getFunctionValue()
If getFunction() is constant, return its value; otherwise null.
|
Type |
getTypeRaw() |
Expression |
inlineIfConstant(Procedure proc,
InlineCalls visitor) |
Expression |
inlineIfConstant(Procedure proc,
SourceMessages messages)
Inline this ApplyExp if parameters are constant.
|
boolean |
isAppendValues() |
boolean |
isTailCall() |
protected boolean |
mustCompile() |
void |
print(OutPort out) |
void |
setArg(int i,
Expression arg) |
void |
setArgs(Expression[] args) |
ApplyExp |
setFuncArgs(Expression func,
Expression[] args) |
ApplyExp |
setFuncArgs(Procedure proc,
Expression[] args) |
void |
setFunction(Expression func) |
void |
setFunction(Procedure proc) |
void |
setTailCall(boolean tailCall) |
void |
setType(Type type) |
boolean |
side_effects()
True if evaluating may have side-effects.
|
java.lang.String |
toString() |
protected <R,D> R |
visit(ExpVisitor<R,D> visitor,
D d) |
void |
visitArgs(InlineCalls visitor) |
protected <R,D> void |
visitChildren(ExpVisitor<R,D> visitor,
D d) |
apply0, compile, compile, compileButFirst, compileNotePosition, compileWithPosition, compileWithPosition, deepCopy, deepCopy, deepCopy, eval, eval, getColumnNumber, getFileName, getFlag, getFlags, getLineNumber, getPublicId, getSystemId, getType, isSingleValue, isStableSourceLocation, makeWhile, match0, neverReturns, print, printLineColumn, setFile, setFlag, setFlag, setLine, setLine, setLine, setLine, setLocation, validateApply, valueIfConstant
apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getReturnType, getSetter, getSourceLocation, isSideEffectFree, match1, match2, match3, match4, matchN, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
public static final int TAILCALL
public static final int INLINE_IF_CONSTANT
public static final int MAY_CONTAIN_BACK_JUMP
public ApplyExp nextCall
public ApplyExp(Expression f, Expression... a)
public ApplyExp(Procedure p, Expression... a)
public ApplyExp(Method m, Expression... a)
public final Expression getFunction()
public final Expression[] getArgs()
public final int getArgCount()
public void setFunction(Expression func)
public void setFunction(Procedure proc)
public void setArgs(Expression[] args)
public Expression getArg(int i)
public void setArg(int i, Expression arg)
public final boolean isTailCall()
public final void setTailCall(boolean tailCall)
public ApplyExp setFuncArgs(Expression func, Expression[] args)
public ApplyExp setFuncArgs(Procedure proc, Expression[] args)
public final java.lang.Object getFunctionValue()
public boolean isAppendValues()
protected boolean mustCompile()
mustCompile
in class Expression
public void apply(CallContext ctx) throws java.lang.Throwable
Expression
apply
in class Expression
java.lang.Throwable
public void compile(Compilation comp, Target target)
compile
in class Expression
public static void compile(ApplyExp exp, Compilation comp, Target target)
public Expression deepCopy(IdentityHashTable mapper)
deepCopy
in class Expression
protected <R,D> R visit(ExpVisitor<R,D> visitor, D d)
visit
in class Expression
public void visitArgs(InlineCalls visitor)
protected <R,D> void visitChildren(ExpVisitor<R,D> visitor, D d)
visitChildren
in class Expression
public void print(OutPort out)
print
in class Expression
public final Type getTypeRaw()
public final void setType(Type type)
public boolean side_effects()
Expression
side_effects
in class Expression
protected Type calculateType()
calculateType
in class Expression
public static Inlineable asInlineable(Procedure proc)
public final Expression inlineIfConstant(Procedure proc, InlineCalls visitor)
public final Expression inlineIfConstant(Procedure proc, SourceMessages messages)
proc
- the procedure bound to this.func.public java.lang.String toString()
toString
in class Expression