Versions in this module Expand all Collapse all v1 v1.0.0 Apr 22, 2020 Changes in this version + const DefaultModule + const MAX_CLASS_REGISTRATIONS + const MAX_FUNC_REGISTRATIONS + func CallbackError(vm *VM, errorType ErrorType, module string, line int, message string) + func CallbackWrite(vm *VM, text string) + type Callbacks struct + ErrorFunc func(vm *VM, errorType ErrorType, module string, line int, message string) + LoadModuleFunc func(vm *VM, name string) string + ResolveModuleFunc func(vm *VM, importer, name string) string + WriteFunc func(vm *VM, text string) + type Configuration struct + HeapGrowthPercent int + InitialHeapSize uint + MinHeapSize uint + func NewConfiguration() Configuration + type ErrorType int + const ERROR_COMPILE + const ERROR_RUNTIME + const ERROR_STACK_TRACE + func (i ErrorType) String() string + type Handle struct + func (h *Handle) Call() error + func (h *Handle) Release() + type InterpretResult int + const RESULT_COMPILE_ERROR + const RESULT_RUNTIME_ERROR + const RESULT_SUCCESS + func (i InterpretResult) Error() error + func (i InterpretResult) String() string + type VM struct + func NewVM(cfg Configuration) VM + func (vm *VM) AbortFiber(slot int) + func (vm *VM) BindForeignClass(signature string, f func() interface{}) error + func (vm *VM) BindForeignMethod(class string, isStatic bool, signature string, f func(*VM)) error + func (vm *VM) EnsureSlots(numSlots int) + func (vm *VM) FreeVM() + func (vm *VM) GC() + func (vm *VM) GetListCount(slot int) int + func (vm *VM) GetListElement(listSlot, index, elementSlot int) + func (vm *VM) GetSlotBool(slot int) bool + func (vm *VM) GetSlotBytes(slot, length int) []byte + func (vm *VM) GetSlotCount() int + func (vm *VM) GetSlotDouble(slot int) float64 + func (vm *VM) GetSlotForeign(slot int, i interface{}) interface{} + func (vm *VM) GetSlotHandle(slot int) Handle + func (vm *VM) GetSlotString(slot int) string + func (vm *VM) GetSlotType(slot int) WrenType + func (vm *VM) GetVariable(module, name string, slot int) + func (vm *VM) InsertInList(listSlot, index, elementSlot int) + func (vm *VM) Interpret(module, source string) error + func (vm *VM) NewCallHandle(signature string) Handle + func (vm *VM) SetSlotBool(slot int, value bool) + func (vm *VM) SetSlotBytes(slot int, value []byte) + func (vm *VM) SetSlotDouble(slot int, value float64) + func (vm *VM) SetSlotHandle(slot int, handle Handle) + func (vm *VM) SetSlotNewList(slot int) + func (vm *VM) SetSlotNull(slot int) + func (vm *VM) SetSlotString(slot int, value string) + type WrenType int + const WREN_TYPE_BOOL + const WREN_TYPE_FOREIGN + const WREN_TYPE_LIST + const WREN_TYPE_NULL + const WREN_TYPE_NUM + const WREN_TYPE_STRING + const WREN_TYPE_UNKNOWN + func (i WrenType) String() string v1.0.0-alpha Apr 15, 2020