Versions in this module Expand all Collapse all v1 v1.0.1 Nov 8, 2023 Changes in this version + var FuncTypes = []any + var MemoryBudget uint = 1e6 + func Run(program *Program, env any) (any, error) + type Function = func(params ...any) (any, error) + type Opcode byte + const OpAdd + const OpArray + const OpBegin + const OpCall + const OpCall0 + const OpCall1 + const OpCall2 + const OpCall3 + const OpCallBuiltin1 + const OpCallFast + const OpCallN + const OpCallTyped + const OpCast + const OpContains + const OpDecrementIndex + const OpDeref + const OpDivide + const OpEnd + const OpEndsWith + const OpEqual + const OpEqualInt + const OpEqualString + const OpExponent + const OpFalse + const OpFetch + const OpFetchField + const OpGetAcc + const OpGetCount + const OpGetGroupBy + const OpGetIndex + const OpGetLen + const OpGroupBy + const OpIn + const OpIncrementCount + const OpIncrementIndex + const OpInt + const OpInvalid + const OpJump + const OpJumpBackward + const OpJumpIfEnd + const OpJumpIfFalse + const OpJumpIfNil + const OpJumpIfNotNil + const OpJumpIfTrue + const OpLen + const OpLess + const OpLessOrEqual + const OpLoadConst + const OpLoadEnv + const OpLoadFast + const OpLoadField + const OpLoadFunc + const OpLoadMethod + const OpLoadVar + const OpMap + const OpMatches + const OpMatchesConst + const OpMethod + const OpModulo + const OpMore + const OpMoreOrEqual + const OpMultiply + const OpNegate + const OpNil + const OpNot + const OpPointer + const OpPop + const OpPush + const OpRange + const OpSetAcc + const OpSetIndex + const OpSlice + const OpStartsWith + const OpStore + const OpSubtract + const OpThrow + const OpTrue + type Program struct + Arguments []int + Bytecode []Opcode + Constants []any + DebugInfo map[string]string + Functions []Function + Locations []file.Location + Node ast.Node + Source *file.Source + Variables []any + func (program *Program) Disassemble() string + func (program *Program) Opcodes(w io.Writer) + type Scope struct + Acc any + Array reflect.Value + Count int + GroupBy map[any][]any + Index int + Len int + type VM struct + func Debug() *VM + func (vm *VM) Position() chan int + func (vm *VM) Run(program *Program, env any) (_ any, err error) + func (vm *VM) Scope() *Scope + func (vm *VM) Stack() []any + func (vm *VM) Step()