Documentation
¶
Index ¶
Constants ¶
View Source
const ( OBJ_INT = iota OBJ_PAIR )
View Source
const ( // INITIAL_GC_THRESHOLD determines the number of objects required // initially to trigger the GC (it is currently chosen arbitrarily). // This threshold is modified at the end of each GC cycle to be twice // the number of live objects. This ensures that the GC is not triggered // frequently or infrequently. INITIAL_GC_THRESHOLD = 36 // STACK_MAX determines the maximum number of live objects at any given // instant, preventing stack overflow. // TODO: adjust this to a nice value. STACK_MAX = 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectType ¶
type ObjectType uint8
type VM ¶
type VM struct {
// contains filtered or unexported fields
}
VM represents a minimal stack-based virtual machine structure. It's sole purpose at the moment is to keep track of all the live objects.
func (*VM) NewObject ¶
func (vm *VM) NewObject(typ ObjectType) *Object
NewObject creates a new Object.
Click to show internal directories.
Click to hide internal directories.