Documentation ¶
Index ¶
Constants ¶
View Source
const ( // StackSize is the maximum stack size. StackSize = 2048 // GlobalsSize is the maximum number of global variables. GlobalsSize = 1024 // MaxFrames is the maximum number of function frames. MaxFrames = 1024 )
Variables ¶
View Source
var ErrStackOverflow = errors.New("stack overflow")
ErrStackOverflow is a stack overflow error.
Functions ¶
This section is empty.
Types ¶
type Frame ¶
type Frame struct {
// contains filtered or unexported fields
}
Frame represents a function call frame.
type VM ¶
type VM struct {
// contains filtered or unexported fields
}
VM is a virtual machine that executes the bytecode compiled by Compiler.
func NewVM ¶
func NewVM(bytecode *compiler.Bytecode, globals []*objects.Object, builtinModules map[string]*objects.Object) *VM
NewVM creates a VM.
Click to show internal directories.
Click to hide internal directories.