wag: github.com/tsavola/wag/object Index | Files | Directories

package object

import "github.com/tsavola/wag/object"

Package object contains ObjectMapper implementations.

Index

Package Files

callmap.go doc.go funcmap.go

func FindCallSite Uses

func FindCallSite(a []CallSite, retAddr uint32) (i int, found bool)

type CallMap Uses

type CallMap struct {
    FuncMap
    CallSites []CallSite
}

CallMap implements compile.ObjectMapper. It stores function addresses, and sites of function calls and suspension points. Other trap and instruction information is not stored.

Initial CallSites capacity may be allocated by initializing the field with a non-nil, empty array.

func (*CallMap) FindCall Uses

func (m *CallMap) FindCall(retAddr uint32,
) (init bool, funcIndex, callIndex int, stackOffset int32, retOffset uint32)

func (*CallMap) InitObjectMap Uses

func (m *CallMap) InitObjectMap(numImportFuncs, numOtherFuncs int)

func (*CallMap) PutCallSite Uses

func (m *CallMap) PutCallSite(retAddr uint32, stackOffset int32)

type CallSite Uses

type CallSite struct {
    RetAddr     uint32 // The address immediately after the call instruction
    StackOffset int32  // Calling function's stack usage at time of call
}

CallSite represents an offset within the text section (machine code) where a function call is made.

The struct size or layout will not change between minor versions.

type FuncMap Uses

type FuncMap struct {
    FuncAddrs []uint32
}

FuncMap implements compile.ObjectMapper. It stores function addresses, but no call, trap or instruction information.

FuncAddrs may be preallocated by initializing the field with a non-nil, empty array.

func (*FuncMap) FindCall Uses

func (m *FuncMap) FindCall(retAddr uint32,
) (init bool, funcIndex, callIndex int, stackOffset int32, retOffset uint32)

func (*FuncMap) FindFunc Uses

func (m *FuncMap) FindFunc(addr uint32) (index int, found bool)

func (*FuncMap) InitObjectMap Uses

func (m *FuncMap) InitObjectMap(numImportFuncs, numOtherFuncs int)

func (*FuncMap) PutCallSite Uses

func (*FuncMap) PutCallSite(uint32, int32)

func (*FuncMap) PutFuncAddr Uses

func (m *FuncMap) PutFuncAddr(addr uint32)

Directories

PathSynopsis
abi
debugPackage debug contains DebugObjectMapper implementations.
debug/dump
stackPackage stack provides runtime call stack manipulation functions.
stack/stacktrace

Package object imports 2 packages (graph) and is imported by 9 packages. Updated 2020-10-29. Refresh now. Tools for package owners.