getInstance

getArgCount

public int getArgCount()

getNextArg

public java.lang.Object getNextArg()

Get the next incoming argument.
Throw WrongArguments if there are no more arguments.
FIXME: This and following methods don't really fit until the
current match/apply-based API, at least as currently implemented.
We probably need to pass in (or make this a method of) the Procedure.

getNextIntArg

public int getNextIntArg()

getNextArg

public java.lang.Object getNextArg(java.lang.Object defaultValue)

Get the next incoming argument.
Return defaultValue if there are no more arguments.

getRestArgsArray

getRestArgsList

Get remaining arguments as a list.
Used for Scheme and Lisp rest args.

lastArg

public void lastArg()

Note that we are done with the input arguments.
Throw WrongArguments if there are unprocessed arguments.

getArgs

public java.lang.Object[] getArgs()

runUntilDone

public void runUntilDone()
throws java.lang.Throwable

Throws:

java.lang.Throwable

startFromContext

public final int startFromContext()

Setup routine before calling a method that takes a CallContext.
The compiler emits a call to this before a call to a method that takes
a CallContext, when it wants the function result as an Object.
It pushes the CallContest state so it can uses the vstack for a
temporary, After the method, getFromContext extract the method's result
from the vstack and restores the state.

getFromContext

cleanupFromContext

public final void cleanupFromContext(int oldIndex)

Cleanup-only part of getFromContext.
This can be in an exception handler as an alternative
to getFromContext, which is called in the non-exception case.
(Alternatively, the compiler could call cleanupFromContext
from a finally clause but that is less efficient, partly
because the JVM stack must be empty before a finally subroutine.)

runUntilValue

public final java.lang.Object runUntilValue()
throws java.lang.Throwable