Documentation ¶
Index ¶
- func Make(op Opcode, operands ...int) []byte
- func ReadOperands(def *Definition, ins Instructions) ([]int, int)
- func ReadUint16(ins Instructions) uint16
- func ReadUint32(ins Instructions) uint32
- func ReadUint64(ins Instructions) uint64
- func ReadUint8(ins Instructions) uint8
- type Definition
- type Instructions
- type Opcode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadOperands ¶
func ReadOperands(def *Definition, ins Instructions) ([]int, int)
Decodes the operands of a bytecode instruction.
func ReadUint16 ¶
func ReadUint16(ins Instructions) uint16
func ReadUint32 ¶
func ReadUint32(ins Instructions) uint32
func ReadUint64 ¶
func ReadUint64(ins Instructions) uint64
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 ( OpHalt Opcode = iota OpPop OpConstant OpTrue OpFalse OpNull OpList OpMap OpClosure OpCurrentClosure OpAdd OpSub OpMul OpDiv OpMod OpBwAnd OpBwOr OpBwXor OpBwNot OpBwLShift OpBwRShift OpAnd OpOr OpEqual OpNotEqual OpGreaterThan OpGreaterThanEqual OpMinus OpBang OpIndex OpCall OpConcurrentCall OpReturn OpReturnValue OpJump OpJumpNotTruthy OpDot OpDefine OpGetGlobal OpSetGlobal OpGetLocal OpSetLocal OpGetBuiltin OpGetFree OpLoadModule OpInterpolate )
Click to show internal directories.
Click to hide internal directories.