L2Simple_PushLabel

class L2Simple_PushLabel(val stackp: Int, val pc: Int, val nextOffset: Int, val liveIndices: IntArray) : L2Simple_AbstractReifiableInstruction

Construct a label for restarting or exiting the current continuation. The current pc isn't strictly needed here, since invalidation can't happen during the reification and label creation, but it's provided to conform to the parent class's protocol.

Write the label (an A_Continuation) to registers[stackp], and continue execution where it left off. If the label is later restarted, its caller will be the same as the current virtual continuation, and its arguments will be the same if using P_RestartContinuation, or the ones provided explicitly if using P_RestartContinuationWithArguments.

Constructors

Link copied to clipboard
constructor(stackp: Int, pc: Int, nextOffset: Int, liveIndices: IntArray)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val pc: Int
Link copied to clipboard
val stackp: Int

Functions

Link copied to clipboard

Generate a suitable print representation of the value.

Link copied to clipboard

A VariableGetException has occurred. Invoke the READ_UNASSIGNED_VARIABLE hook function, which, because it is ⊥-valued, can only reify. Eventually answer that StackReifier.

Link copied to clipboard

A VariableSetException has occurred. Run the implicit-observe handler, and answer null if it completes, or a suitable StackReifier if it eventually reifies.

Link copied to clipboard
open override fun reenter(registers: Array<AvailObject>, interpreter: Interpreter): StackReifier?

The original continuation has resumed after a pushLabel. The label has already been pushed by the reifier's StackReifier.postReificationAction (inside step, above) at this point.

Link copied to clipboard
open override fun step(registers: Array<AvailObject>, interpreter: Interpreter): StackReifier?

Perform this instruction, a single step of an L2SimpleChunk. The mutable Array of AvailObjects acts as a simple set of registers. Element 0 is the current function, and the remaining elements correspond with the continuation slots, should one need to be constructed.

Link copied to clipboard
open override fun toString(): String