resolver

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2019 License: MIT, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FCall

type FCall struct {
	Method string
	CB     int
	Input  json.RawMessage
	Output json.RawMessage
}

function parameters as JSON in method name to avoid unnecessary conversion logic

type Resolver

type Resolver struct {
	Stderr       bytes.Buffer
	BlockedCalls []FCall
	PendingCalls []FCall
	NewCalls     int
	// contains filtered or unexported fields
}

Resolver defines imports for WebAssembly modules ran in Life.

func NewResolver

func NewResolver() *Resolver

func (*Resolver) NanoTime

func (r *Resolver) NanoTime(vm *exec.VirtualMachine) int64

func (*Resolver) RandomData

func (r *Resolver) RandomData(vm *exec.VirtualMachine) int64

func (*Resolver) ResolveFunc

func (r *Resolver) ResolveFunc(module, field string) exec.FunctionImport

ResolveFunc defines a set of import functions that may be called within a WebAssembly module.

func (*Resolver) ResolveGlobal

func (r *Resolver) ResolveGlobal(module, field string) int64

ResolveGlobal defines a set of global variables for use within a WebAssembly module.

func (*Resolver) Stub

func (r *Resolver) Stub(name string) func(vm *exec.VirtualMachine) int64

func (*Resolver) ValueCall

func (r *Resolver) ValueCall(vm *exec.VirtualMachine) int64

func (*Resolver) ValueGet

func (r *Resolver) ValueGet(vm *exec.VirtualMachine) int64

because VM should not have business with host's memory we have a set of hardcoded pointers & values that always have consistent value across all VM hosts. We don't wanna manage garbage collection and other shit the whole point is to make minimal functionality to run GO inside life VM

func (*Resolver) ValueIndex

func (r *Resolver) ValueIndex(vm *exec.VirtualMachine) int64

func (*Resolver) ValueInvoke

func (r *Resolver) ValueInvoke(vm *exec.VirtualMachine) int64

this is invoked only for _makeCallbackHelper, which we don't need so we just ignore the stuff

func (*Resolver) ValueLength

func (r *Resolver) ValueLength(vm *exec.VirtualMachine) int64

func (*Resolver) ValueLoadString

func (r *Resolver) ValueLoadString(vm *exec.VirtualMachine) int64

func (*Resolver) ValueNew

func (r *Resolver) ValueNew(vm *exec.VirtualMachine) int64

func (*Resolver) ValuePrepString

func (r *Resolver) ValuePrepString(vm *exec.VirtualMachine) int64

func (*Resolver) WallTime

func (r *Resolver) WallTime(vm *exec.VirtualMachine) int64

func (*Resolver) WasmExit

func (r *Resolver) WasmExit(vm *exec.VirtualMachine) int64

func (*Resolver) Write

func (r *Resolver) Write(vm *exec.VirtualMachine) int64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL