createContinuationWithFrame

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.

Return

A new mutable continuation.

Parameters

function

The function being invoked/resumed.

caller

The calling continuation of this continuation.

registerDump

Either nil or a ContinuationRegisterDumpDescriptor instance that an L2Chunk will use upon resumption.

pc

The level one program counter.

stackp

The level one operand stack depth.

levelTwoChunk

The level two chunk to execute.

levelTwoOffset

The level two chunk offset at which to resume.

frameValues

The list of values that populate the frame slots.

zeroBasedStartIndex

The zero-based slot number at which to start writing frame values.