Versions in this module Expand all Collapse all v0 v0.2.1 Jul 23, 2021 v0.2.0 Jul 23, 2021 Changes in this version + const DefaultCallStackSize + const DefaultPageSize + const JITCodeSizeThreshold + var LE = binary.LittleEndian + type AOTService interface + Initialize func(vm *VirtualMachine) + UnsafeInvokeFunction_0 func(vm *VirtualMachine, name string) uint64 + UnsafeInvokeFunction_1 func(vm *VirtualMachine, name string, p0 uint64) uint64 + UnsafeInvokeFunction_2 func(vm *VirtualMachine, name string, p0, p1 uint64) uint64 + type Frame struct + Code []byte + Continuation int32 + FunctionID int + IP int + Locals []int64 + Regs []int64 + ReturnReg int + func (f *Frame) Destroy(vm *VirtualMachine) + func (f *Frame) Init(vm *VirtualMachine, functionID int, code compiler.InterpreterCode) + type FunctionImport func(vm *VirtualMachine) int64 + type FunctionImportInfo struct + F FunctionImport + FieldName string + ModuleName string + type ImportResolver interface + ResolveFunc func(module, field string) FunctionImport + ResolveGlobal func(module, field string) int64 + type Module struct + Config VMConfig + FunctionCode []compiler.InterpreterCode + FunctionImports []FunctionImportInfo + GasPolicy compiler.GasPolicy + Globals []int64 + ImportResolver ImportResolver + Module *compiler.Module + Table []uint32 + func NewModule(code []byte, config VMConfig, impResolver ImportResolver, ...) (_retVM *Module, retErr error) + func (m *Module) GenerateNEnv(config NCompileConfig) string + func (m *Module) GetFunctionExport(key string) (int, bool) + func (m *Module) GetGlobalExport(key string) (int, bool) + func (m *Module) NBuildAliasDef() string + func (m *Module) NCompile(config NCompileConfig) string + func (m *Module) NewVirtualMachine() *VirtualMachine + type NCompileConfig struct + AliasDef bool + DisableMemBoundCheck bool + type NopResolver struct + func (r *NopResolver) ResolveFunc(module, field string) FunctionImport + func (r *NopResolver) ResolveGlobal(module, field string) int64 + type Snapshot struct + Memory []byte + State []byte + type VMConfig struct + DefaultMemoryPages int + DefaultTableSize int + DisableFloatingPoint bool + EnableJIT bool + GasLimit uint64 + MaxCallStackDepth int + MaxMemoryPages int + MaxTableSize int + MaxValueSlots int + ReturnOnGasLimitExceeded bool + type VirtualMachine struct + AOTService AOTService + CallStack []Frame + Config VMConfig + CurrentFrame int + Delegate func() + ExitError interface{} + Exited bool + FunctionCode []compiler.InterpreterCode + FunctionImports []FunctionImportInfo + Gas uint64 + GasLimitExceeded bool + GasPolicy compiler.GasPolicy + Globals []int64 + ImportResolver ImportResolver + InsideExecute bool + Memory []byte + Module *compiler.Module + NumValueSlots int + ReturnValue int64 + StackTrace string + Table []uint32 + Yielded int64 + func NewVirtualMachine(code []byte, config VMConfig, impResolver ImportResolver, ...) (_retVM *VirtualMachine, retErr error) + func (vm *VirtualMachine) AddAndCheckGas(delta uint64) bool + func (vm *VirtualMachine) Execute() + func (vm *VirtualMachine) GenerateNEnv(config NCompileConfig) string + func (vm *VirtualMachine) GetCurrentFrame() *Frame + func (vm *VirtualMachine) GetFunctionExport(key string) (int, bool) + func (vm *VirtualMachine) GetGlobalExport(key string) (int, bool) + func (vm *VirtualMachine) Ignite(functionID int, params ...int64) + func (vm *VirtualMachine) NBuildAliasDef() string + func (vm *VirtualMachine) NCompile(config NCompileConfig) string + func (vm *VirtualMachine) PrintStackTrace() + func (vm *VirtualMachine) ReadSnapshot() *Snapshot + func (vm *VirtualMachine) Run(entryID int, params ...int64) (retVal int64, retErr error) + func (vm *VirtualMachine) RunWithGasLimit(entryID, limit int, params ...int64) (int64, error) + func (vm *VirtualMachine) SetAOTService(s AOTService) + func (vm *VirtualMachine) WriteSnapshot(ss *Snapshot) error