Documentation ¶
Overview ¶
WAT 文本格式的模块。
Index ¶
- func NewBlank() *blank
- func NewComment(name string) *comment
- func NewInstAdd(t ValueType) *instAdd
- func NewInstAnd(t ValueType) *instAnd
- func NewInstBlock(name string) *instBlock
- func NewInstBr(name string) *instBr
- func NewInstBrTable(t []int) *instBrTable
- func NewInstCall(name string) *instCall
- func NewInstCallIndirect(func_type string) *instCallIndirect
- func NewInstConst(typ ValueType, literal string) *instConst
- func NewInstConvert_f32_convert_i32_s() *instConvert_f32_convert_i32_s
- func NewInstConvert_f32_convert_i32_u() *instConvert_f32_convert_i32_u
- func NewInstConvert_f32_convert_i64_s() *instConvert_f32_convert_i64_s
- func NewInstConvert_f32_convert_i64_u() *instConvert_f32_convert_i64_u
- func NewInstConvert_f32_demote_f64() *instConvert_f32_demote_f64
- func NewInstConvert_f64_convert_i32_s() *instConvert_f64_convert_i32_s
- func NewInstConvert_f64_convert_i32_u() *instConvert_f64_convert_i32_u
- func NewInstConvert_f64_convert_i64_s() *instConvert_f64_convert_i64_s
- func NewInstConvert_f64_convert_i64_u() *instConvert_f64_convert_i64_u
- func NewInstConvert_f64_promote_f32() *instConvert_f64_promote_f32
- func NewInstConvert_i32_trunc_f32_s() *instConvert_i32_trunc_f32_s
- func NewInstConvert_i32_trunc_f64_s() *instConvert_i32_trunc_f64_s
- func NewInstConvert_i32_wrap_i64() *instConvert_i32_wrap_i64
- func NewInstConvert_i64_extend_i32_s() *instConvert_i64_extend_i32_s
- func NewInstConvert_i64_extend_i32_u() *instConvert_i64_extend_i32_u
- func NewInstConvert_i64_trunc_f32_s() *instConvert_i64_trunc_f32_s
- func NewInstConvert_i64_trunc_f64_s() *instConvert_i64_trunc_f64_s
- func NewInstDiv(t ValueType) *instDiv
- func NewInstDrop() *instDrop
- func NewInstEq(t ValueType) *instEq
- func NewInstEqz(t ValueType) *instEqz
- func NewInstGe(t ValueType) *instGe
- func NewInstGetGlobal(name string) *instGetGlobal
- func NewInstGetLocal(name string) *instGetLocal
- func NewInstGt(t ValueType) *instGt
- func NewInstIf(instsTrue, instsFalse []Inst, ret []ValueType) *instIf
- func NewInstLe(t ValueType) *instLe
- func NewInstLoad(typ ValueType, offset int, align int) *instLoad
- func NewInstLoad16s(offset int, align int) *instLoad16s
- func NewInstLoad16u(offset int, align int) *instLoad16u
- func NewInstLoad8s(offset int, align int) *instLoad8s
- func NewInstLoad8u(offset int, align int) *instLoad8u
- func NewInstLoop(name string) *instLoop
- func NewInstLt(t ValueType) *instLt
- func NewInstMul(t ValueType) *instMul
- func NewInstNe(t ValueType) *instNe
- func NewInstOr(t ValueType) *instOr
- func NewInstRem(t ValueType) *instRem
- func NewInstReturn() *instReturn
- func NewInstSetGlobal(name string) *instSetGlobal
- func NewInstSetLocal(name string) *instSetLocal
- func NewInstShl(t ValueType) *instShl
- func NewInstShr(t ValueType) *instShr
- func NewInstStore(typ ValueType, offset int, align int) *instStore
- func NewInstStore16(offset int, align int) *instStore16
- func NewInstStore8(offset int, align int) *instStore8
- func NewInstSub(t ValueType) *instSub
- func NewInstUnreachable() *instUnreachable
- func NewInstXor(t ValueType) *instXor
- type F32
- type F64
- type FuncSig
- type FuncType
- type Function
- type Global
- type I32
- type I64
- type ImpFunc
- type ImpObj
- type Import
- type Inst
- type Module
- type ObjType
- type OpCode
- type Table
- type U32
- type U64
- type Value
- type ValueType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewComment ¶
func NewComment(name string) *comment
func NewInstAdd ¶
func NewInstAdd(t ValueType) *instAdd
func NewInstAnd ¶ added in v0.8.0
func NewInstAnd(t ValueType) *instAnd
func NewInstBlock ¶
func NewInstBlock(name string) *instBlock
func NewInstBrTable ¶
func NewInstBrTable(t []int) *instBrTable
func NewInstCall ¶
func NewInstCall(name string) *instCall
func NewInstCallIndirect ¶
func NewInstCallIndirect(func_type string) *instCallIndirect
func NewInstConst ¶
func NewInstConvert_f32_convert_i32_s ¶ added in v0.8.0
func NewInstConvert_f32_convert_i32_s() *instConvert_f32_convert_i32_s
func NewInstConvert_f32_convert_i32_u ¶ added in v0.8.0
func NewInstConvert_f32_convert_i32_u() *instConvert_f32_convert_i32_u
func NewInstConvert_f32_convert_i64_s ¶ added in v0.8.0
func NewInstConvert_f32_convert_i64_s() *instConvert_f32_convert_i64_s
func NewInstConvert_f32_convert_i64_u ¶ added in v0.8.0
func NewInstConvert_f32_convert_i64_u() *instConvert_f32_convert_i64_u
func NewInstConvert_f32_demote_f64 ¶ added in v0.8.0
func NewInstConvert_f32_demote_f64() *instConvert_f32_demote_f64
func NewInstConvert_f64_convert_i32_s ¶ added in v0.8.0
func NewInstConvert_f64_convert_i32_s() *instConvert_f64_convert_i32_s
func NewInstConvert_f64_convert_i32_u ¶ added in v0.8.0
func NewInstConvert_f64_convert_i32_u() *instConvert_f64_convert_i32_u
func NewInstConvert_f64_convert_i64_s ¶ added in v0.8.0
func NewInstConvert_f64_convert_i64_s() *instConvert_f64_convert_i64_s
func NewInstConvert_f64_convert_i64_u ¶ added in v0.8.0
func NewInstConvert_f64_convert_i64_u() *instConvert_f64_convert_i64_u
func NewInstConvert_f64_promote_f32 ¶ added in v0.8.0
func NewInstConvert_f64_promote_f32() *instConvert_f64_promote_f32
func NewInstConvert_i32_trunc_f32_s ¶ added in v0.8.0
func NewInstConvert_i32_trunc_f32_s() *instConvert_i32_trunc_f32_s
func NewInstConvert_i32_trunc_f64_s ¶ added in v0.8.0
func NewInstConvert_i32_trunc_f64_s() *instConvert_i32_trunc_f64_s
func NewInstConvert_i32_wrap_i64 ¶ added in v0.8.0
func NewInstConvert_i32_wrap_i64() *instConvert_i32_wrap_i64
func NewInstConvert_i64_extend_i32_s ¶ added in v0.8.0
func NewInstConvert_i64_extend_i32_s() *instConvert_i64_extend_i32_s
func NewInstConvert_i64_extend_i32_u ¶ added in v0.8.0
func NewInstConvert_i64_extend_i32_u() *instConvert_i64_extend_i32_u
func NewInstConvert_i64_trunc_f32_s ¶ added in v0.8.0
func NewInstConvert_i64_trunc_f32_s() *instConvert_i64_trunc_f32_s
func NewInstConvert_i64_trunc_f64_s ¶ added in v0.8.0
func NewInstConvert_i64_trunc_f64_s() *instConvert_i64_trunc_f64_s
func NewInstDiv ¶
func NewInstDiv(t ValueType) *instDiv
func NewInstDrop ¶
func NewInstDrop() *instDrop
func NewInstEqz ¶
func NewInstEqz(t ValueType) *instEqz
func NewInstGetGlobal ¶
func NewInstGetGlobal(name string) *instGetGlobal
func NewInstGetLocal ¶
func NewInstGetLocal(name string) *instGetLocal
func NewInstLoad ¶
func NewInstLoad16s ¶
func NewInstLoad16u ¶
func NewInstLoad8s ¶
func NewInstLoad8u ¶
func NewInstLoop ¶
func NewInstLoop(name string) *instLoop
func NewInstMul ¶
func NewInstMul(t ValueType) *instMul
func NewInstRem ¶
func NewInstRem(t ValueType) *instRem
func NewInstReturn ¶
func NewInstReturn() *instReturn
func NewInstSetGlobal ¶
func NewInstSetGlobal(name string) *instSetGlobal
func NewInstSetLocal ¶
func NewInstSetLocal(name string) *instSetLocal
func NewInstShl ¶ added in v0.8.0
func NewInstShl(t ValueType) *instShl
func NewInstShr ¶ added in v0.8.0
func NewInstShr(t ValueType) *instShr
func NewInstStore ¶
func NewInstStore16 ¶
func NewInstStore8 ¶
func NewInstSub ¶
func NewInstSub(t ValueType) *instSub
func NewInstUnreachable ¶ added in v0.7.0
func NewInstUnreachable() *instUnreachable
func NewInstXor ¶ added in v0.5.0
func NewInstXor(t ValueType) *instXor
Types ¶
type F32 ¶
type F32 struct {
// contains filtered or unexported fields
}
************************************* F32: *************************************
type F64 ¶
type F64 struct {
// contains filtered or unexported fields
}
************************************* F64: *************************************
type FuncType ¶
************************************* FuncType: *************************************
type Function ¶
type Function struct { InternalName string ExternalName string Results []ValueType Params []Value Locals []Value Insts []Inst }
************************************* Function: *************************************
type I32 ¶
type I32 struct {
// contains filtered or unexported fields
}
************************************* I32: *************************************
type I64 ¶
type I64 struct {
// contains filtered or unexported fields
}
************************************* I64: *************************************
type ImpFunc ¶
type ImpFunc struct { ImpObj // contains filtered or unexported fields }
************************************* ImpFunc: *************************************
func NewImpFunc ¶
type ImpObj ¶
type ImpObj struct {
// contains filtered or unexported fields
}
************************************* ImpObj: *************************************
func (*ImpObj) ModuleName ¶
type Import ¶
type Import interface { Format(indent string) string ModuleName() string ObjName() string Type() ObjType }
************************************* Import: *************************************
type Module ¶
type Module struct { Name string Imports []Import Tables Table FuncTypes []FuncType Globals []Global Funcs []*Function DataSeg []byte BaseWat string }
模块对象
type ObjType ¶
type ObjType int32
************************************* ObjType: *************************************
type OpCode ¶
type OpCode int32
************************************* OpCode: *************************************
type Table ¶
type Table struct {
Elems []string
}
************************************* Table: *************************************
type U32 ¶
type U32 struct {
// contains filtered or unexported fields
}
************************************* U32: *************************************
type U64 ¶
type U64 struct {
// contains filtered or unexported fields
}
************************************* U64: *************************************