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 |
protected Type |
type
Cache for getType().
|
flags, NEXT_AVAIL_FLAG, noExpressions, VALIDATEDcompilerKey, validateApplyKeynameKey| 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) |
static void |
compile(ApplyExp exp,
Compilation comp,
Target target) |
void |
compile(Compilation comp,
Target target) |
static void |
compileToArray(Expression[] args,
Compilation comp) |
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 |
getType()
Return the Type used to represent the values of this Expression.
|
Type |
getTypeRaw() |
Expression |
inlineIfConstant(Procedure proc,
InlineCalls visitor) |
Expression |
inlineIfConstant(Procedure proc,
SourceMessages messages)
Inline this ApplyExp if parameters are constant.
|
boolean |
isTailCall() |
protected boolean |
mustCompile() |
void |
print(OutPort out) |
void |
setArg(int i,
Expression arg) |
void |
setArgs(Expression[] args) |
void |
setFunction(Expression func) |
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, isSingleValue, isStableSourceLocation, makeWhile, match0, print, printLineColumn, setFile, setFlag, setFlag, setLine, setLine, setLine, setLine, setLocation, validateApply, valueIfConstantapply, check0, check1, check2, check3, check4, checkArgCount, checkN, getReturnType, getSetter, getSourceLocation, isSideEffectFree, match1, match2, match3, match4, matchN, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setN, setSetter, setSourceLocationgetName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbolpublic static final int TAILCALL
public static final int INLINE_IF_CONSTANT
public static final int MAY_CONTAIN_BACK_JUMP
public ApplyExp nextCall
protected Type type
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 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 final java.lang.Object getFunctionValue()
protected boolean mustCompile()
mustCompile in class Expressionpublic void apply(CallContext ctx) throws java.lang.Throwable
Expressionapply in class Expressionjava.lang.Throwablepublic static void compileToArray(Expression[] args, Compilation comp)
public void compile(Compilation comp, Target target)
compile in class Expressionpublic static void compile(ApplyExp exp, Compilation comp, Target target)
public Expression deepCopy(IdentityHashTable mapper)
deepCopy in class Expressionprotected <R,D> R visit(ExpVisitor<R,D> visitor, D d)
visit in class Expressionpublic void visitArgs(InlineCalls visitor)
protected <R,D> void visitChildren(ExpVisitor<R,D> visitor, D d)
visitChildren in class Expressionpublic void print(OutPort out)
print in class Expressionpublic final Type getTypeRaw()
public final void setType(Type type)
public boolean side_effects()
Expressionside_effects in class Expressionpublic final Type getType()
ExpressiongetType in class Expressionpublic 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