createLabelContinuation

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.

Return

The new continuation.

Parameters

function

The function being invoked.

caller

The calling continuation, or nil.

startingChunk

The level two chunk to invoke.

startingOffset

The offset into the chunk at which to resume.

args

The List of arguments.