Companion

object Companion

Functions

Link copied to clipboard
fun createContinuationExceptFrame(function: A_Function, caller: A_Continuation, registerDump: AvailObject, pc: Int, stackp: Int, levelTwoChunk: L2Chunk, levelTwoOffset: Int): AvailObject

Create a mutable continuation with the specified fields. Fill the stack frame slots with nil.

Link copied to clipboard
fun createContinuationWithFrame(function: A_Function, caller: A_Continuation, registerDump: AvailObject, pc: Int, stackp: Int, levelTwoChunk: L2Chunk, levelTwoOffset: Int, frameValues: List<A_BasicObject>, zeroBasedStartIndex: Int): AvailObject

Create a mutable continuation with the specified fields. Initialize the stack slot from the list of fields.

Link copied to clipboard
fun createDummyContinuation(function: A_Function, boxedRegisters: Array<AvailObject>, unboxedRegisters: LongArray, levelTwoChunk: L2Chunk, levelTwoOffset: Int): AvailObject

Create a private continuation with the specified fields. The continuation will never be visible to level one code, but is used to carry register state (and L2Chunk& offset) during stack unwinding for a reification. It will be executed (in the reverse of stack order) to run L2 code that reconstitutes a real continuation, which is pushed on the Interpreter.getReifiedContinuation stack.

Link copied to clipboard
fun createLabelContinuation(function: A_Function, caller: A_Continuation, startingChunk: L2Chunk, startingOffset: Int, args: List<AvailObject>): A_Continuation

Create a new continuation with the given data. The continuation should represent the state upon entering the new context - i.e., set the pc to the first instruction, clear the stack, and set up new local variables.

Link copied to clipboard
fun dumpStackThen(runtime: AvailRuntime, textInterface: TextInterface, availContinuation: A_Continuation, action: (List<String>) -> Unit)

Create a list of descriptions of the stack frames (A_Continuations) of the specified continuation. Invoke the specified Kotlin function with the resultant list. This list begins with the newest frame and ends with the base frame.

Link copied to clipboard
Link copied to clipboard

Answer a substitute for nil for a non-existent caller. This is primarily for use by P_ContinuationStackData.