gnu.expr
public class ApplyExp extends Expression
| Field Summary | |
|---|---|
| static int | INLINE_IF_CONSTANT |
| ApplyExp | nextCall The next ApplyExp in ((ReferenceExp)func).binding.firstCall list. |
| protected Type | type Cache for getType(). |
| static int | TAILCALL |
| Constructor Summary | |
|---|---|
| ApplyExp(Expression f, Expression[] a) | |
| ApplyExp(Procedure p, Expression[] a) | |
| ApplyExp(Method m, Expression[] a) | |
| Method Summary | |
|---|---|
| void | apply(CallContext ctx) |
| void | compile(Compilation comp, Target target) |
| static void | compile(ApplyExp exp, Compilation comp, Target target) |
| static void | compileToArray(Expression[] args, Compilation comp) |
| Expression | getArg(int i) |
| int | getArgCount() |
| Expression[] | getArgs() |
| Expression | getFunction() |
| Object | getFunctionValue() If getFunction() is constant, return its value; otherwise null. |
| Type | getType() |
| Type | getTypeRaw() |
| Expression | inlineIfConstant(Procedure proc, ExpWalker walker) |
| 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) |
| String | toString() |
| protected Expression | walk(ExpWalker walker) |
| protected void | walkChildren(ExpWalker walker) |
Parameters: proc the procedure bound to this.func.
Returns: the constant result (as a QuoteExp) if inlining was possible; otherwise this ApplyExp. If applying proc throws an exception, print a warning on walker.messages.