module

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	MagicNumber = uint32(0x6d736100)
	Version     = uint32(1)
)
View Source
const (
	SectionUnknown = iota
	SectionType
	SectionImport
	SectionFunction
	SectionTable
	SectionMemory
	SectionGlobal
	SectionExport
	SectionStart
	SectionElement
	SectionCode
	SectionData

	NumSections
)
View Source
const (
	ExternalKindFunction = ExternalKind(iota)
	ExternalKindTable
	ExternalKindMemory
	ExternalKindGlobal
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CallSite added in v0.3.0

type CallSite struct {
	ReturnAddr  int32
	StackOffset int32
}

type DataBuffer added in v0.3.0

type DataBuffer interface {
	Bytes() []byte
	ResizeBytes(n int) []byte
}

type ExternalKind

type ExternalKind byte

func (ExternalKind) String

func (kind ExternalKind) String() (s string)

type Global

type Global struct {
	Type    wasm.Type
	Mutable bool
	Init    uint64
}
type Header struct {
	MagicNumber uint32
	Version     uint32
}

type ImportFunction

type ImportFunction struct {
	FuncIndex int
	Variadic  bool
	AbsAddr   uint64
}

type Module added in v0.3.0

type Module struct {
	Sigs              []function.Type
	FuncSigs          []uint32
	ImportFuncs       []ImportFunction
	TableLimitValues  ResizableLimits
	MemoryLimitValues ResizableLimits
	Globals           []Global
	NumImportGlobals  int
	EntryIndex        uint32
	EntryDefined      bool
	StartIndex        uint32
	StartDefined      bool
	TableFuncs        []uint32

	Text       TextBuffer
	RODataAddr int32
	ROData     DataBuffer
	TrapLinks  [trap.NumTraps]links.L
	FuncLinks  []links.FunctionL
	FuncMap    []int32
	CallMap    []CallSite
	Regs       regalloc.Allocator

	Data         DataBuffer
	MemoryOffset int
}

type Reader

type Reader interface {
	io.Reader
	io.ByteScanner
}

type ResizableLimits

type ResizableLimits struct {
	Initial int
	Maximum int
	Defined bool
}

type TextBuffer added in v0.3.0

type TextBuffer interface {
	gen.Buffer
}

Jump to

Keyboard shortcuts

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