L1InstructionStepper

class L1InstructionStepper(val interpreter: Interpreter)

This class is used to simulate the effect of level one nybblecodes during execution of the L2_INTERPRET_LEVEL_ONE instruction, on behalf of an Interpreter.

Author

Mark van Gulik

Parameters

interpreter

The Interpreter on whose behalf to step through level one nybblecode instructions.

Constructors

Link copied to clipboard
constructor(interpreter: Interpreter)

Construct a new L1InstructionStepper.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The current position in the nybblecodes.

Link copied to clipboard

The Interpreter on whose behalf to step level one nybblecodes.

Link copied to clipboard

The registers that hold Avail objects.

Link copied to clipboard
var stackp: Int

The current stack position as would be seen in a continuation.

Functions

Link copied to clipboard
fun pc(): Int

Get the current program counter.

Link copied to clipboard

Read from the specified object register.

Link copied to clipboard
fun pointerAtPut(index: Int, value: A_BasicObject)

Write to the specified object register.

Link copied to clipboard

Run the current code until it reaches the end. Individual instructions, such as calls, may be subject to reification, which should cause a suitable A_Continuation to be reified. In addition, inter-nybblecode interrupts may also trigger reification, but they'll handle their own reification prior to returning here with a suitable StackReifier (to update and return again from here).

Link copied to clipboard

Wipe out the existing register set for safety.