compile

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2018 License: BSD-3-Clause Imports: 15 Imported by: 8

Documentation

Index

Constants

View Source
const (
	DefaultMemoryAlignment = 16 // see Module.MemoryAlignment
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DataBuffer

type DataBuffer = module.DataBuffer

type Env

type Env interface {
	ImportFunc(module, field string, sig abi.Sig) (variadic bool, absAddr uint64, err error)
	ImportGlobal(module, field string, t abi.Type) (valueBits uint64, err error)
}

type Mapper

type Mapper = module.Mapper

type Module

type Module struct {
	EntrySymbol          string
	EntryArgs            []uint64
	MemoryAlignment      int // see Data()
	UnknownSectionLoader func(r Reader, payloadLen uint32) error

	module.M
}

func (*Module) Data

func (m *Module) Data() (data []byte, memoryOffset int)

Data is available after data section has been loaded. memoryOffset is an offset into data. It will be a multiple of MemoryAlignment.

func (*Module) FuncSigs

func (m *Module) FuncSigs() (funcSigs []abi.Sig)

FuncSigs are available after preliminary sections have been loaded.

func (*Module) GlobalsSize

func (m *Module) GlobalsSize() int

GlobalsSize is available after preliminary sections have been loaded.

func (*Module) Load

func (m *Module) Load(r Reader, env Env, text TextBuffer, roData DataBuffer, roDataAddr int32, data DataBuffer, mapper Mapper) (err error)

Load all (remaining) sections.

func (*Module) LoadCodeSection

func (m *Module) LoadCodeSection(r Reader, text TextBuffer, roData DataBuffer, roDataAddr int32, mapper Mapper, startTrigger chan<- struct{}) (err error)

LoadCodeSection, after loading the preliminary sections.

func (*Module) LoadDataSection

func (m *Module) LoadDataSection(r Reader, data DataBuffer) (err error)

LoadDataSection, after loading the preliminary sections.

func (*Module) LoadPreliminarySections

func (m *Module) LoadPreliminarySections(r Reader, env Env) (err error)

LoadPreliminarySections, excluding the code and data sections.

func (*Module) MemoryLimits

func (m *Module) MemoryLimits() (initial, maximum wasm.MemorySize)

MemoryLimits are available after preliminary sections have been loaded.

func (*Module) ROData

func (m *Module) ROData() (b []byte)

ROData is available after code section has been loaded.

func (*Module) Sigs

func (m *Module) Sigs() []abi.Sig

Sigs are available after preliminary sections have been loaded.

func (*Module) Text

func (m *Module) Text() (b []byte)

Text is available after code section has been loaded.

type Reader

type Reader = module.Reader

Reader is a subset of bufio.Reader, bytes.Buffer and bytes.Reader.

type TextBuffer

type TextBuffer = module.TextBuffer

Jump to

Keyboard shortcuts

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