Documentation ¶
Index ¶
Constants ¶
View Source
const OptionalParameterInstructions = 3
Variables ¶
This section is empty.
Functions ¶
func ReadOperands ¶
func ReadOperands(def *Definition, ins Instructions) ([]int, int)
func ReadUint16 ¶
func ReadUint16(ins Instructions) uint16
func ReadUint8 ¶
func ReadUint8(ins Instructions) uint8
Types ¶
type Definition ¶
func Lookup ¶
func Lookup(op byte) (*Definition, error)
type Instructions ¶
type Instructions []byte
func (Instructions) String ¶
func (ins Instructions) String() string
type Opcode ¶
type Opcode byte
const ( OpConstant Opcode = iota OpAdd OpSub OpMul OpDiv OpMinus OpPop OpTrue OpFalse OpBang OpCastToBool OpEqual OpNotEqual OpGreaterThan OpGreaterOrEqual OpJumpNotTruthy OpJump OpNull OpGetGlobal OpSetGlobal OpAssignGlobal OpGetLocal OpSetLocal OpAssignLocal OpArray OpHash OpIndex OpCall OpReturn OpGetBuiltin OpClosure OpGetFree OpCurrentClosure )
const OpNop Opcode = 255
The NOP opcode will consume 1 cpu cycle, but do nothing
Click to show internal directories.
Click to hide internal directories.