L1InstructionDecoder

class L1InstructionDecoder

A mechanism for extracting consecutive operations and operands from an A_RawFunction.

Constructors

Link copied to clipboard
fun L1InstructionDecoder()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun atEnd(): Boolean

Answer whether the receiver has reached the end of its instructions.

Link copied to clipboard
fun getNybble(): Int

Get one nybble from the stream of nybblecodes.

Link copied to clipboard
fun getOperand(): Int

Consume the next nybblecode operand.

Link copied to clipboard
fun getOperation(): L1Operation

Consume the next nybblecode operation, but not operands.

Link copied to clipboard
fun getOperationOrdinal(): Int

Consume the next nybblecode operation, but not operands.

Link copied to clipboard
fun pc(): Int

Answer the current one-based program counter.

fun pc(pc: Int)

Set the pc. This can be done independently of the call to AvailObject.setUpInstructionDecoder.

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

Properties

Link copied to clipboard
var encodedInstructionsArray: LongArray

The actual longSlots field from the current A_RawFunction being traced.

Link copied to clipboard
var finalLongIndex: Int

The long index just after consuming the last nybble.

Link copied to clipboard
var finalShift: Int

The shift just after consuming the last nybble.

Link copied to clipboard
var shift: Int

The current shift factor for extracting nybblecodes from the long at the current longIndex.