Versions in this module Expand all Collapse all v0 v0.2.0 Oct 9, 2026 v0.1.2 Oct 9, 2026 v0.1.1 Oct 6, 2026 Changes in this version + var ErrProgramTooLarge = errors.New("program too large") + var ErrRegisterBankOverflow = errors.New("register bank overflow") + func Assemble(instrs []Instr) (vm.Program, error) + func Dump(code []Instr) string + func Parse(src string) ([]Instr, []Error) + func Typecheck(instrs []Instr) error + type AssertLeftover struct + Exact bool + Portion Reg + func (i AssertLeftover) String() string + type AssertNonNegativeAmount struct + Amount Reg + func (i AssertNonNegativeAmount) String() string + type AssertNonNegativeBalance struct + Account Reg + Balance Reg + func (i AssertNonNegativeBalance) String() string + type AssertNonNegativePortion struct + Portion Reg + func (i AssertNonNegativePortion) String() string + type AssertSameAsset struct + Left Reg + Right Reg + func (i AssertSameAsset) String() string + type AssertUnscoped struct + Account Reg + Scope Reg + func (i AssertUnscoped) String() string + type AssertValidAccount struct + Account Reg + func (i AssertValidAccount) String() string + type AssertValidColor struct + Color Reg + func (i AssertValidColor) String() string + type AssertValidScope struct + Scope Reg + func (i AssertValidScope) String() string + type BinKind interface + type BinaryOp struct + Dest Reg + Left Reg + Op BinKind + Right Reg + func (i BinaryOp) String() string + type Builder struct + func (b *Builder) FreshLabel(prefix string) Label + func (b *Builder) FreshReg() Reg + func (b *Builder) Instrs() []Instr + func (b *Builder) Push(instr Instr) + func (b *Builder) PushWithDest(getInstr func(dest Reg) Instr) Reg + type CheckEnoughFunds struct + Got Reg + Needed Reg + func (i CheckEnoughFunds) String() string + type ConstBool struct + Dest Reg + Value bool + func (i ConstBool) String() string + type Error struct + Msg string + Range parser.Range + func (e Error) Error() string + type FetchBalance struct + Account Reg + Asset Reg + Dest Reg + Scope *Reg + func (i FetchBalance) String() string + type Instr interface + type Jmp struct + Target Label + func (i Jmp) String() string + type JmpIfFalse struct + Cond Reg + Target Label + func (i JmpIfFalse) String() string + type JmpIfTrue struct + Cond Reg + Target Label + func (i JmpIfTrue) String() string + type Label string + func (l Label) String() string + type LabelMarker struct + Label Label + func (i LabelMarker) String() string + type LoadInt struct + Dest Reg + Value big.Int + func (i LoadInt) String() string + type LoadStr struct + Dest Reg + Value string + func (i LoadStr) String() string + type LoadVar struct + Dest Reg + Index uint16 + Typ VarType + func (i LoadVar) String() string + type MarkEnd struct + Rewind bool + func (i MarkEnd) String() string + type MarkPush struct + func (i MarkPush) String() string + type MetaInt struct + func (MetaInt) String() string + type MetaMonetary struct + Account Reg + DestAmount Reg + DestAsset Reg + Key Reg + Scope *Reg + func (i MetaMonetary) String() string + type MetaPortion struct + func (MetaPortion) String() string + type MetaStr struct + func (MetaStr) String() string + type MetaType interface + type MetaVar struct + Account Reg + Dest Reg + Key Reg + Scope *Reg + Typ MetaType + func (i MetaVar) String() string + type OpAddInt struct + func (OpAddInt) String() string + type OpAddPortion struct + func (OpAddPortion) String() string + type OpAddString struct + func (OpAddString) String() string + type OpBoolCopy struct + func (OpBoolCopy) String() string + type OpEqInt struct + func (OpEqInt) String() string + type OpEqPortion struct + func (OpEqPortion) String() string + type OpIntCopy struct + func (OpIntCopy) String() string + type OpIntToPortion struct + func (OpIntToPortion) String() string + type OpIntToString struct + func (OpIntToString) String() string + type OpIsZero struct + func (OpIsZero) String() string + type OpLtInt struct + func (OpLtInt) String() string + type OpLtPortion struct + func (OpLtPortion) String() string + type OpMakePortion struct + func (OpMakePortion) String() string + type OpMonetaryToString struct + func (OpMonetaryToString) String() string + type OpMulPortion struct + func (OpMulPortion) String() string + type OpNegInt struct + func (OpNegInt) String() string + type OpNot struct + func (OpNot) String() string + type OpPortionCopy struct + func (OpPortionCopy) String() string + type OpPortionToInt struct + func (OpPortionToInt) String() string + type OpPortionToString struct + func (OpPortionToString) String() string + type OpStrCopy struct + func (OpStrCopy) String() string + type OpStrEq struct + func (OpStrEq) String() string + type OpSubInt struct + func (OpSubInt) String() string + type OpSubPortion struct + func (OpSubPortion) String() string + type PullAccount struct + Account Reg + Cap *Reg + Color *Reg + Dest Reg + Overdraft *Reg + Scope *Reg + func (i PullAccount) String() string + type Reg uint + func (r Reg) String() string + type Save struct + Account Reg + Amount *Reg + Asset Reg + Scope *Reg + func (i Save) String() string + type SendToAccount struct + Account *Reg + Cap *Reg + Scope *Reg + func (i SendToAccount) String() string + type SetAccountMeta struct + Account Reg + Key Reg + Scope *Reg + Value Reg + func (i SetAccountMeta) String() string + type SetCurrentAsset struct + Asset Reg + func (i SetCurrentAsset) String() string + type SetTxMeta struct + Key Reg + Value Reg + func (i SetTxMeta) String() string + type UnKind interface + type UnaryOp struct + Arg Reg + Dest Reg + Op UnKind + func (i UnaryOp) String() string + type VarInt struct + func (VarInt) String() string + type VarStr struct + func (VarStr) String() string + type VarType interface