|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gnu.mapping.Procedure gnu.mapping.Procedure0 gnu.expr.Expression gnu.expr.ApplyExp
public class ApplyExp
This class is used to represent "combination" or "application". A function and arguments are evaluated, and then the function applied.
Field Summary | |
---|---|
static int |
INLINE_IF_CONSTANT
|
ApplyExp |
nextCall
The next ApplyExp in ((ReferenceExp)func).binding.firstCall list. |
static int |
TAILCALL
|
protected Type |
type
Cache for getType(). |
Fields inherited from class gnu.expr.Expression |
---|
flags, NEXT_AVAIL_FLAG, noExpressions |
Constructor Summary | |
---|---|
ApplyExp(Expression f,
Expression[] a)
|
|
ApplyExp(Method m,
Expression[] a)
|
|
ApplyExp(Procedure p,
Expression[] a)
|
Method Summary | |
---|---|
void |
apply(CallContext ctx)
Call this Procedure using the explicit-CallContext-convention. |
static void |
compile(ApplyExp exp,
Compilation comp,
Target target)
|
void |
compile(Compilation comp,
Target target)
|
static void |
compileToArray(Expression[] args,
Compilation comp)
|
java.lang.Object |
eval(Environment env)
|
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. |
Expression |
inlineIfConstant(Procedure proc,
ExpWalker walker)
|
Expression |
inlineIfConstant(Procedure proc,
SourceMessages messages)
Inline this ApplyExp if parameters are constant. |
boolean |
isTailCall()
|
void |
print(OutPort out)
|
void |
setArgs(Expression[] args)
|
void |
setFunction(Expression func)
|
void |
setTailCall(boolean tailCall)
|
protected Expression |
walk(ExpWalker walker)
|
protected void |
walkChildren(ExpWalker walker)
|
Methods inherited from class gnu.expr.Expression |
---|
apply0, compile, compileButFirst, compileNotePosition, compileWithPosition, compileWithPosition, eval, getColumn, getFile, getFlag, getFlags, getLine, makeWhile, match0, print, printLineColumn, setFile, setFlag, setFlag, setLine, setLine, setLine, setLine |
Methods inherited from class gnu.mapping.Procedure0 |
---|
apply1, apply2, apply3, apply4, applyN, numArgs |
Methods inherited from class gnu.mapping.Procedure |
---|
apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getName, getProperty, getSetter, getSymbol, match1, match2, match3, match4, matchN, maxArgs, minArgs, name, removeProperty, set0, set1, setN, setName, setProperty, setProperty, setSetter, setSymbol, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int TAILCALL
public static final int INLINE_IF_CONSTANT
public ApplyExp nextCall
protected Type type
Constructor Detail |
---|
public ApplyExp(Expression f, Expression[] a)
public ApplyExp(Procedure p, Expression[] a)
public ApplyExp(Method m, Expression[] a)
Method Detail |
---|
public final Expression getFunction()
public final Expression[] getArgs()
public final int getArgCount()
public void setFunction(Expression func)
public void setArgs(Expression[] args)
public final boolean isTailCall()
public final void setTailCall(boolean tailCall)
public final java.lang.Object getFunctionValue()
public java.lang.Object eval(Environment env) throws java.lang.Throwable
eval
in class Expression
java.lang.Throwable
public void apply(CallContext ctx) throws java.lang.Throwable
Procedure
apply
in class Expression
java.lang.Throwable
public static void compileToArray(Expression[] args, Compilation comp)
public void compile(Compilation comp, Target target)
compile
in class Expression
public static void compile(ApplyExp exp, Compilation comp, Target target)
protected Expression walk(ExpWalker walker)
walk
in class Expression
protected void walkChildren(ExpWalker walker)
walkChildren
in class Expression
public void print(OutPort out)
print
in class Expression
public final Type getType()
Expression
getType
in class Expression
public final Expression inlineIfConstant(Procedure proc, ExpWalker walker)
public final Expression inlineIfConstant(Procedure proc, SourceMessages messages)
proc
- the procedure bound to this.func.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |