wa

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: BSD-3-Clause Imports: 0 Imported by: 7

Documentation

Overview

Package wa contains miscellaneous WebAssembly-related things.

Index

Constants

View Source
const (
	PageBits = 16
	PageSize = 1 << PageBits
)
View Source
const (
	Int   = ScalarCategory(0)
	Float = ScalarCategory(1)
)
View Source
const (
	Size32 = Size(4)
	Size64 = Size(8)
)
View Source
const (
	Void = Type(0)
	I32  = Type(4 | Int)
	I64  = Type(8 | Int)
	F32  = Type(4 | Float)
	F64  = Type(8 | Float)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncType

type FuncType struct {
	Params  []Type
	Results []Type
}

func (FuncType) Equal

func (f FuncType) Equal(other FuncType) bool

func (FuncType) String

func (f FuncType) String() (s string)

type GlobalType

type GlobalType byte

func MakeGlobalType

func MakeGlobalType(t Type, mutable bool) (g GlobalType)

func (GlobalType) Encode

func (g GlobalType) Encode() (buf [2]byte)

Encode as WebAssembly. Result is undefined if GlobalType representation is not valid.

func (GlobalType) Mutable

func (g GlobalType) Mutable() bool

func (GlobalType) Type

func (g GlobalType) Type() Type

type ScalarCategory

type ScalarCategory uint8

func (ScalarCategory) String

func (cat ScalarCategory) String() string

type Size

type Size uint8

type Type

type Type uint8

func (Type) Category

func (t Type) Category() ScalarCategory

Category of a non-void type.

func (Type) Encode

func (t Type) Encode() byte

Encode as WebAssembly. Result is undefined if Type representation is not valid.

func (Type) Size

func (t Type) Size() Size

Size in bytes.

func (Type) String

func (t Type) String() string

Directories

Path Synopsis
Package opcode enumerates WebAssembly instructions.
Package opcode enumerates WebAssembly instructions.

Jump to

Keyboard shortcuts

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