Documentation ¶
Overview ¶
Package context contains the context objects for the executors that perform a specific action on the Wasm code tree (Module) that they operate on. The executors keep track of their execution state in these context objects.
Index ¶
- Constants
- type Analyzer
- func (a *Analyzer) Fail(format string, args ...interface{})
- func (a *Analyzer) Pop() value.DataType
- func (a *Analyzer) PopExpected(expected value.DataType) value.DataType
- func (a *Analyzer) PopMulti(values []value.DataType)
- func (a *Analyzer) Push(dataType value.DataType)
- func (a *Analyzer) PushMulti(dataTypes []value.DataType)
- type Label
- type Reader
- func (r *Reader) GetByte() byte
- func (r *Reader) GetBytes(count uint32) []byte
- func (r *Reader) GetDataType() value.DataType
- func (r *Reader) GetDataTypes() []value.DataType
- func (r *Reader) GetF32() float32
- func (r *Reader) GetF64() float64
- func (r *Reader) GetI32() int32
- func (r *Reader) GetI64() int64
- func (r *Reader) GetLimits()
- func (r *Reader) GetString() string
- func (r *Reader) GetU32() uint32
- func (r *Reader) GetU64() uint64
- func (r *Reader) Size() uint32
- type Runner
- type Writer
- func (w *Writer) Data() []byte
- func (w *Writer) PutByte(val byte)
- func (w *Writer) PutBytes(data []byte)
- func (w *Writer) PutDataType(dataType value.DataType)
- func (w *Writer) PutDataTypes(dataTypes []value.DataType)
- func (w *Writer) PutF32(val float32)
- func (w *Writer) PutF64(val float64)
- func (w *Writer) PutI32(val int32)
- func (w *Writer) PutI64(val int64)
- func (w *Writer) PutLimits(min uint32, max uint32)
- func (w *Writer) PutString(val string)
- func (w *Writer) PutU32(val uint32)
- func (w *Writer) PutU64(val uint64)
- func (w *Writer) Size() uint32
Constants ¶
View Source
const PAGE_SIZE = 0x10000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer struct { BlockMark int Code []helper.Instruction Error error Frame []value.DataType FuncNr uint32 IP int Labels []*Label Locals int MaxSP int MinSP int Module *sections.Module SP int }
func NewAnalyzer ¶
func (*Analyzer) PopExpected ¶
type Label ¶
type Label struct { BlockInst helper.Instruction BlockType *sections.FuncType HasElse bool Target helper.Instruction Unreachable bool UnwindSP int }
type Reader ¶
type Reader struct { Flag byte Error error Max uint32 Min uint32 Module *sections.Module Opcode byte IP int // contains filtered or unexported fields }
func (*Reader) GetDataType ¶
func (*Reader) GetDataTypes ¶
type Runner ¶
type Runner struct { Addr uint32 Buffer []byte CallDepth int Error error Frame []sections.Variable Host interfaces.HostInterface Module *sections.Module Next helper.Instruction SP int }
func NewRunner ¶
func NewRunner(m *sections.Module, host interfaces.HostInterface) *Runner
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (*Writer) PutDataType ¶
func (*Writer) PutDataTypes ¶
Click to show internal directories.
Click to hide internal directories.