Documentation
¶
Index ¶
Constants ¶
View Source
const ( SecType byte = 1 SecImports byte = 2 SecFunction byte = 3 SecExport byte = 7 SecCode byte = 10 )
View Source
const ( LocalTypeI32 byte = 0x7F LocalTypeF32 byte = 0x7D )
View Source
const ( OpCodeEnd byte = 0x0B OpCodeReturn byte = 0x0F OpCodeCallFunction byte = 0x10 OpCodeLocalGet byte = 0x20 OpCodeLocalSet byte = 0x21 OpCodeI32Const byte = 0x41 OpCodeI32Add byte = 0x6A OpCodeI32Sub byte = 0x6B OpCodeI32Mul byte = 0x6C OpCodeI32SignedDivision byte = 0x6D OpCodeI32And byte = 0x71 OpCodeF32Const byte = 0x43 OpCodeF32Neg byte = 0x8C OpCodeF32Add byte = 0x92 OpCodeF32Sub byte = 0x93 OpCodeF32Mul byte = 0x94 OpCodeF32Division byte = 0x95 )
Variables ¶
This section is empty.
Functions ¶
func EncodeSLEB128 ¶
Encodes signed integers to Little Endian Binary 128-bit format
func EncodeULEB128 ¶
Encodes unsigned integers to Little Endian Binary 128-bit format
Types ¶
type WASMModule ¶
type WASMModule struct {
// contains filtered or unexported fields
}
func NewModule ¶
func NewModule(program *ast.Program) *WASMModule
func (*WASMModule) Generate ¶
func (m *WASMModule) Generate() error
func (*WASMModule) Save ¶
func (m *WASMModule) Save(filename string) error
Click to show internal directories.
Click to hide internal directories.