Module tvix_eval::opcode

source ·
Expand description

This module implements the instruction set running on the abstract machine implemented by tvix.

Structs

  • Index of an instruction in the current code chunk.
  • Index of a constant in the current code chunk.
  • Provided count for an instruction (could represent e.g. a number of elements).
  • Offset by which an instruction pointer should change in a jump.
  • Index of a value in the runtime stack. This is an offset relative to the VM value stack_base of the CallFrame containing the opcode which contains this StackIdx.
  • Index of an upvalue within a closure’s bound-variable upvalue list. This is an absolute index into the Upvalues of the CallFrame containing the opcode which contains this UpvalueIdx.

Enums

  • All variants of this enum carry a bounded amount of data to ensure that no heap allocations are needed for an Opcode.