package
0.0.0-20200201092036-a048d374ae49
Repository: https://github.com/bedreamcoder/uwavm.git
Documentation: pkg.go.dev

# Functions

CaptureTrap 用于捕获潜在的Trap,如果是其他panic则不会捕获.
DefaultContextConfig returns the default configuration of ContextConfig.
GetDebugWriter get debug writer.
NewCodec instances a Codec, if memory of ctx is nil, trapNilMemory will be raised.
NewInterpCode instance a WasmExec based on the wasm code and resolver.
NewMultiResolver instance a MultiResolver from resolves.
NewTrap returns a trap with the given reason.
SetWriter set debug writer to GetContractState.
Throw 用于抛出一个Trap.
Write write debug message if SetWriter is not set, message will be ignored.

# Constants

MaxGasLimit is the maximum gas limit.

# Variables

TrapCallStackExhaustion is raised when call stack exhausted.
TrapDivByZero is raised when divide by zero.
TrapGasExhaustion is raised when runnning out of gas limit.
TrapIntOverflow is raised when math overflow.
TrapInvalidArgument is raised when running function with invalid argument.
TrapInvalidConvert is raised when convert from NaN to integer.
TrapInvalidIndirectCall is raised when run invalid call_indirect instruction.
TrapOOB is raised when memory access out of bound.
TrapUnreachable is raised when unreachable instruction executed.

# Structs

Codec helps encoding and decoding data between wasm code and go code.
ContextConfig configures an execution context.
No description provided by the author
GasMapper map instruction name to gas cost.
InterpCode is the WasmExec interface of interpreter mode.
TrapError 用于包装一个Trap到Error.
TrapFuncSignatureNotMatch is raised when calling function signature is not matched.
TrapSymbolNotFound is raised when resolving symbol failed.

# Interfaces

GetContractState hold the context data when running a wasm instance.
A Resolver resolves global and function symbols imported by wasm code.
Trap 用于表示虚拟机运行过程中的错误,中断虚拟机的运行.
No description provided by the author

# Type aliases

MapResolver is the Resolver which stores symbols in map.
MultiResolver chains multiple Resolvers, symbol looking up is according to the order of resolvers.
TrapInvalidAddress is the trap raised when encounter an invalid address.