Documentation ¶
Index ¶
- Constants
- func BoolConst(x *Expression) bool
- type Block
- type Def
- type Expression
- type Flags
- type Formatter
- type Function
- func (f *Function) DropStack(until int)
- func (f *Function) FinishImport() []*Def
- func (f *Function) ImportInstruction(ip int, instr code.Instruction, scope *FunctionScope)
- func (f *Function) LabelTypes(idx int) []wasm.ValueType
- func (f *Function) Scope(module code.Scope) *FunctionScope
- func (f *Function) Unreachable() bool
- type FunctionScope
- type Use
- type Uses
Constants ¶
View Source
const ( FlagsLoadLocal = 1 << iota FlagsLoadGlobal FlagsLoadMem FlagsStoreLocal FlagsStoreGlobal FlagsStoreMem FlagsMayTrap FlagsPseudo FlagsBackend = 1 << 16 FlagsLoadMask = (FlagsLoadMem << 1) - 1 FlagsStoreMask = (FlagsStoreMem << 1) - 1 )
View Source
const ( PseudoBoolConst = 0 + iota PseudoI32ConvertBool PseudoBackend = 128 )
View Source
const ValueTypeBool = 1
Variables ¶
This section is empty.
Functions ¶
func BoolConst ¶
func BoolConst(x *Expression) bool
Types ¶
type Block ¶
type Block struct { Entry *Expression Else *Expression End *Expression Label int StackHeight int BranchTarget bool Unreachable bool NeverReachable bool Ins []wasm.ValueType Outs []wasm.ValueType InTemp int OutTemp int }
type Expression ¶
type Expression struct { Function *Function IP int Instr code.Instruction Uses Uses Flags Flags // contains filtered or unexported fields }
func (*Expression) IsPseudo ¶
func (x *Expression) IsPseudo() bool
type Function ¶
type Function struct { Formatter Formatter Signature wasm.FunctionSig Locals []wasm.ValueType UsedLocals []bool Stack []*Use Temps int Blocks []*Block Labels int Body []*Def // contains filtered or unexported fields }
func ImportFunction ¶
func ImportFunction(typeIndex uint32, signature wasm.FunctionSig, body wasm.FunctionBody, scope code.Scope, formatter Formatter) Function
func NewFunction ¶
func NewFunction(typeIndex uint32, signature wasm.FunctionSig, body wasm.FunctionBody, scope code.Scope, formatter Formatter) Function
func (*Function) FinishImport ¶
func (*Function) ImportInstruction ¶
func (f *Function) ImportInstruction(ip int, instr code.Instruction, scope *FunctionScope)
func (*Function) Unreachable ¶
type FunctionScope ¶
func (*FunctionScope) GetLocalType ¶
func (s *FunctionScope) GetLocalType(localidx uint32) (wasm.ValueType, bool)
type Use ¶
type Use struct { Function *Function Type wasm.ValueType AllFlags Flags Locals bitset.BitSet Temp int X *Expression }
func UseExpression ¶
func UseExpression(type_ wasm.ValueType, x *Expression) *Use
func (*Use) IsZeroIConst ¶
Click to show internal directories.
Click to hide internal directories.