Versions in this module Expand all Collapse all v0 v0.2.1 Jul 23, 2021 v0.2.0 Jul 23, 2021 Changes in this version + const NGEN_ENV_API_PREFIX + const NGEN_FP_HEADER + const NGEN_FUNCTION_PREFIX + const NGEN_HEADER + const NGEN_INS_LABEL_PREFIX + const NGEN_LOCAL_PREFIX + const NGEN_VALUE_PREFIX + type BasicBlock struct + Code []Instr + JmpCond TyValueID + JmpKind TyJmpKind + JmpTargets []int + YieldValue TyValueID + type CFGraph struct + Blocks []BasicBlock + func (g *CFGraph) ToInsSeq() []Instr + type FixupInfo struct + CodePos int + TablePos int + type GasPolicy interface + GetCost func(key Instr) int64 + type Instr struct + Immediates []int64 + Op string + Target TyValueID + Values []TyValueID + func (ins *Instr) BranchTargets() []int + type InterpreterCode struct + Bytes []byte + JITDone bool + JITInfo interface{} + NumLocals int + NumParams int + NumRegs int + NumReturns int + type Location struct + BrHead bool + CodePos int + FixupList []FixupInfo + IfBlock bool + LoopPreserveTop bool + PreserveTop bool + StackDepth int + type Module struct + Base *wasm.Module + DisableFloatingPoint bool + FunctionNames map[int]string + func LoadModule(raw []byte) (*Module, error) + func (m *Module) CompileForInterpreter(gp GasPolicy) ([]InterpreterCode, error) + func (m *Module) CompileWithNGen(gp GasPolicy, numGlobals uint64) (string, error) + type SSAFunctionCompiler struct + CallIndexOffset int + Code []Instr + Locations []*Location + Module *wasm.Module + Source *disasm.Disassembly + Stack []TyValueID + StackValueSets map[int][]TyValueID + UsedValueIDs map[TyValueID]struct{} + ValueID TyValueID + func NewSSAFunctionCompiler(m *wasm.Module, d *disasm.Disassembly) *SSAFunctionCompiler + func (c *SSAFunctionCompiler) Compile(importTypeIDs []int) + func (c *SSAFunctionCompiler) FilterFloatingPoint() + func (c *SSAFunctionCompiler) FixupLocationRef(loc *Location, wasUnreachable bool) + func (c *SSAFunctionCompiler) InsertGasCounters(gp GasPolicy) + func (c *SSAFunctionCompiler) NGen(selfID uint64, numParams uint64, numLocals uint64, numGlobals uint64) string + func (c *SSAFunctionCompiler) NewCFGraph() *CFGraph + func (c *SSAFunctionCompiler) NextValueID() TyValueID + func (c *SSAFunctionCompiler) PopStack(n int) []TyValueID + func (c *SSAFunctionCompiler) PushStack(values ...TyValueID) + func (c *SSAFunctionCompiler) RegAlloc() int + func (c *SSAFunctionCompiler) Serialize() []byte + type SimpleGasPolicy struct + GasPerInstruction int64 + func (p *SimpleGasPolicy) GetCost(key Instr) int64 + type TyJmpKind uint8 + const JmpEither + const JmpReturn + const JmpTable + const JmpUncond + const JmpUndef + type TyValueID uint64