Versions in this module Expand all Collapse all v0 v0.14.3 May 2, 2026 v0.14.2 Apr 26, 2026 v0.14.1 Apr 21, 2026 Changes in this version + func Disassemble(img *BytecodeImage) string + func DisassembleFunc(p *FuncPrototype, img *BytecodeImage) string + func OpCount() int + type ADTObj struct + Fields []Value + Tag int + type BytecodeImage struct + Constants []Value + EntryPoint int + Globals []Value + Prototypes []*FuncPrototype + func NewImage() *BytecodeImage + func (img *BytecodeImage) AddConstant(v Value) int + func (img *BytecodeImage) AddPrototype(p *FuncPrototype) int + func (img *BytecodeImage) SetEntryPoint(idx int) error + func (img *BytecodeImage) Validate() error + func (img *BytecodeImage) ValidatePrototype(protoIdx int) error + type ClosureObj struct + Captures []Value + Proto FuncPrototypeRef + type FuncPrototype struct + Constants []int + EvalOnly bool + EvalReason string + File string + Instructions []Instruction + IsVariadic bool + LineInfo []int + Name string + NestedProtos []int + NumCaptures uint8 + NumParams uint8 + NumRegs uint8 + func (p *FuncPrototype) LookupConstant(localIdx int, img *BytecodeImage) (Value, bool) + func (p *FuncPrototype) NumParameters() uint8 + func (p *FuncPrototype) NumRegisters() uint8 + func (p *FuncPrototype) ProtoName() string + type FuncPrototypeRef interface + NumParameters func() uint8 + NumRegisters func() uint8 + ProtoName func() string + type Instruction uint32 + func EncodeABC(op OpCode, a, b, c uint8) Instruction + func EncodeABx(op OpCode, a uint8, bx uint16) Instruction + func EncodeASBx(op OpCode, a uint8, sbx int) Instruction + func (i Instruction) A() uint8 + func (i Instruction) B() uint8 + func (i Instruction) Bx() uint16 + func (i Instruction) C() uint8 + func (i Instruction) Op() OpCode + func (i Instruction) SBx() int + func (i Instruction) String() string + type ListObj struct + Elems []Value + type OpCode uint8 + const OpAdd + const OpBuiltinCall + const OpBuiltinCallHOF + const OpBuiltinTrap + const OpCall + const OpClosure + const OpConcat + const OpCons + const OpDiv + const OpEffectTrap + const OpEq + const OpGetField + const OpGetIndex + const OpGetTag + const OpJump + const OpJumpIfFalse + const OpLe + const OpLoadConst + const OpLoadGlobal + const OpLoadNil + const OpLt + const OpMakeADT + const OpMakeList + const OpMakeRecord + const OpMakeTuple + const OpMod + const OpMove + const OpMul + const OpNeg + const OpNot + const OpReturn + const OpSub + const OpTailCall + func (op OpCode) String() string + type RecordField struct + Name string + Value Value + type RecordObj struct + Fields []RecordField + type StringObj struct + S string + type TupleObj struct + Elems []Value + type Value struct + Bool bool + Flt float64 + Int int64 + Obj any + Tag ValueTag + func NewADT(tag int, fields []Value) Value + func NewBool(b bool) Value + func NewClosure(proto FuncPrototypeRef, captures []Value) Value + func NewFloat(f float64) Value + func NewInt(n int64) Value + func NewList(elems []Value) Value + func NewRecord(fields []RecordField) Value + func NewString(s string) Value + func NewTuple(elems []Value) Value + func Unit() Value + func (v Value) AsADT() *ADTObj + func (v Value) AsClosure() *ClosureObj + func (v Value) AsList() []Value + func (v Value) AsRecord() []RecordField + func (v Value) AsString() string + func (v Value) AsTuple() []Value + func (v Value) Equal(other Value) bool + func (v Value) String() string + type ValueTag uint8 + const TagADT + const TagBool + const TagClosure + const TagFloat + const TagInt + const TagList + const TagRecord + const TagString + const TagTuple + const TagUnit + func (t ValueTag) String() string