Versions in this module Expand all Collapse all v3 v3.0.1 Dec 27, 2023 v3.0.0 Dec 23, 2022 Changes in this version + var TrapCallStackExhaustion = NewTrap("call stack exhausted") + var TrapDivByZero = NewTrap("integer divide by zero") + var TrapGasExhaustion = NewTrap("run out of gas limit") + var TrapIntOverflow = NewTrap("integer overflow on divide or truncation") + var TrapInvalidArgument = NewTrap("invalid function argument") + var TrapInvalidConvert = NewTrap("conversion from NaN to integer") + var TrapInvalidIndirectCall = NewTrap("invalid call_indirect") + var TrapOOB = NewTrap("memory access out of bound") + var TrapUnreachable = NewTrap("unreachable instruction executed") + func CaptureTrap(err *error) + func PointerDelete(token uintptr) + func PointerRestore(token uintptr) interface + func PointerSave(p interface{}) uintptr + func Throw(trap Trap) + func ThrowError(err error) + func ThrowMessage(msg string) + type Code interface + NewContext func(cfg *ContextConfig) (ictx Context, err error) + Release func() + func NewAOTCode(module string, resolver Resolver) (icode Code, err error) + type Codec struct + func NewCodec(ctx Context) Codec + func (c Codec) Bytes(addr, length uint32) []byte + func (c Codec) CString(addr uint32) string + func (c Codec) GoBytes(sp uint32) []byte + func (c Codec) GoString(sp uint32) string + func (c Codec) SetUint32(addr uint32, val uint32) + func (c Codec) String(addr, length uint32) string + func (c Codec) Uint32(addr uint32) uint32 + func (c Codec) Uint64(addr uint32) uint64 + type Context interface + Exec func(name string, param []int64) (ret int64, err error) + GasUsed func() uint64 + GetUserData func(key string) interface{} + Memory func() []byte + Release func() + ResetGasUsed func() + SetGasUsed func(uint64) + SetUserData func(key string, value interface{}) + StaticTop func() uint32 + type ContextConfig struct + GasLimit int64 + type ErrFuncNotFound struct + Name string + func (e *ErrFuncNotFound) Error() string + type MapResolver map[string]interface + func (m MapResolver) ResolveFunc(module, name string) (interface{}, bool) + func (m MapResolver) ResolveGlobal(module, name string) (int64, bool) + type MultiResolver []Resolver + func NewMultiResolver(resolvers ...Resolver) MultiResolver + func (m MultiResolver) ResolveFunc(module, name string) (interface{}, bool) + func (m MultiResolver) ResolveGlobal(module, name string) (int64, bool) + type Resolver interface + ResolveFunc func(module, name string) (interface{}, bool) + ResolveGlobal func(module, name string) (int64, bool) + type Trap interface + Reason func() string + func NewTrap(reason string) Trap + type TrapError struct + Trap Trap + func (t *TrapError) Error() string + type TrapFuncSignatureNotMatch struct + Module string + Name string + func (s *TrapFuncSignatureNotMatch) Reason() string + type TrapInvalidAddress uint32 + func (t TrapInvalidAddress) Reason() string + type TrapSymbolNotFound struct + Module string + Name string + func (s *TrapSymbolNotFound) Reason() string Other modules containing this package chainmaker.org/chainmaker/vm-wxvm/v2