wa

package
v0.31.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: BSD-3-Clause Imports: 0 Imported by: 0

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
	Result Type
}

func (FuncType) Equal

func (f FuncType) Equal(other FuncType) bool

func (FuncType) String

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

type GlobalType added in v0.12.0

type GlobalType byte

func MakeGlobalType added in v0.12.0

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

func (GlobalType) Encode added in v0.12.0

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

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

func (GlobalType) Mutable added in v0.12.0

func (g GlobalType) Mutable() bool

func (GlobalType) Type added in v0.12.0

func (g GlobalType) Type() Type

type ScalarCategory

type ScalarCategory uint8

func (ScalarCategory) String

func (cat ScalarCategory) String() string

type Size added in v0.25.0

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 added in v0.12.0

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