Companion

object Companion

Functions

Link copied to clipboard
fun A_Continuation.adjustPcAndStackp(pc: Int, stackp: Int)

Set both the pc and the stack pointer of this continuation, which must be mutable.

Link copied to clipboard
fun A_Continuation.caller(): A_Continuation

The continuation to which control will pass when this continuation returns. May be nil, indicating this is the outermost stack frame of its fiber and will produce a value from the fiber itself.

Link copied to clipboard
fun A_Continuation.currentLineNumber(topFrame: Boolean): Int

Answer the line number associated with this continuation's current pc.

Link copied to clipboard
fun A_Continuation.deoptimizeForDebugger()

Alter this continuation to be suitable for use by a debugger. This must be performed inside a safe point.

Link copied to clipboard
fun A_Continuation.ensureMutable(): A_Continuation

If this continuation is already mutable just answer it; otherwise answer a mutable copy of it.

Link copied to clipboard
fun A_Continuation.frameAt(index: Int): AvailObject

Answer the continuation frame slot at the given index. The frame slots are numbered starting at 1, and consist of the arguments, primitive failure variable (if defined), locals, and then an operand stack that grows from the top down.

Link copied to clipboard
fun A_Continuation.frameAtPut(index: Int, value: AvailObject): AvailObject

Update the continuation frame slot at the given index. The continuation must be mutable. Frame slots are numbered starting at 1, and consist of the arguments, primitive failure variable (if defined), locals, and then an operand stack that grows from the top down.

Link copied to clipboard
fun A_Continuation.function(): A_Function

Answer the function for which this continuation represents an evaluation.

Link copied to clipboard
fun A_Continuation.highlightPc(isTopFrame: Boolean): Int

Determine which nybblecode index is "current" for this continuation. If this is not the top frame, use the instruction previous to the current pc.

Link copied to clipboard
fun A_Continuation.levelTwoChunk(): L2Chunk

Answer the current L2Chunk to run when resuming this continuation. Always check that the chunk is still valid, otherwise the unoptimizedChunk should be resumed instead.

Link copied to clipboard
fun A_Continuation.levelTwoOffset(): Int

The offset within the L2Chunk at which to resume level two execution when this continuation is to be resumed. Note that the chunk might have become invalidated, so check L2Chunk.isValid) before attempting to resume it.

Link copied to clipboard
fun A_Continuation.numSlots(): Int

Also defined in A_RawFunction. The total number of "frame" slots in the receiver. These slots are used to hold the arguments, local variables and constants, and the local operand stack on which the level one instruction set depends.

Link copied to clipboard
fun A_Continuation.pc(): Int

Answer the level one program counter. This is a one-based subscript that indicates the next instruction that will execute in this continuation's function's level one code.

Link copied to clipboard
fun A_Continuation.registerDump(): AvailObject

Answer the ContinuationRegisterDumpDescriptor object that was secretly stashed inside this continuation for an L2Chunk's use.

Link copied to clipboard
fun A_Continuation.replacingCaller(newCaller: A_Continuation): A_Continuation

Create a copy of the receiver if it's not already mutable, then clobber the caller slot with the passed value.

Link copied to clipboard
fun A_Continuation.stackAt(slotIndex: Int): AvailObject

Retrieve the stack element with the given offset. Do not adjust the mutability of the returned value.

Link copied to clipboard
fun A_Continuation.stackp(): Int

Answer the current depth of the argument stack within this continuation. This is a one-based index into the continuation's frame. The stack pointer indexes the most recently pushed value. The stack grows downwards, and the empty stack is indicated by a pointer just beyond the frame data.