Versions in this module Expand all Collapse all v1 v1.0.5 Dec 28, 2023 v1.0.4 Dec 28, 2023 v1.0.3 Dec 28, 2023 v1.0.2 Dec 28, 2023 v1.0.1 Dec 28, 2023 v1.0.0 Dec 28, 2023 Changes in this version + const EntrypointLabel + var NopInclusiveRange = InclusiveRange + func Format(ops []UnionOperation) string + type CompilationResult struct + Functions []wasm.Index + Globals []wasm.GlobalType + HasDataInstances bool + HasElementInstances bool + HasMemory bool + HasTable bool + IROperationSourceOffsetsInWasmBinary []uint64 + LabelCallers map[Label]uint32 + Operations []UnionOperation + Types []wasm.FunctionType + UsesMemory bool + type Compiler struct + func NewCompiler(enabledFeatures api.CoreFeatures, callFrameStackSizeInUint64 int, ...) (*Compiler, error) + func (c *Compiler) Next() (*CompilationResult, error) + type Float byte + const Float32 + const Float64 + func (s Float) String() (ret string) + type InclusiveRange struct + End int32 + Start int32 + func InclusiveRangeFromU64(v uint64) InclusiveRange + func (i InclusiveRange) AsU64() uint64 + type Label uint64 + func NewLabel(kind LabelKind, frameID uint32) Label + func (l Label) FrameID() int + func (l Label) IsReturnTarget() bool + func (l Label) Kind() LabelKind + func (l Label) String() (ret string) + type LabelKind = byte + const LabelKindContinuation + const LabelKindElse + const LabelKindHeader + const LabelKindNum + const LabelKindReturn + type MemoryArg struct + Alignment uint32 + Offset uint32 + type OperationKind uint16 + const OperationKindAbs + const OperationKindAdd + const OperationKindAnd + const OperationKindBr + const OperationKindBrIf + const OperationKindBrTable + const OperationKindBuiltinFunctionCheckExitCode + const OperationKindCall + const OperationKindCallIndirect + const OperationKindCeil + const OperationKindClz + const OperationKindConstF32 + const OperationKindConstF64 + const OperationKindConstI32 + const OperationKindConstI64 + const OperationKindCopysign + const OperationKindCtz + const OperationKindDataDrop + const OperationKindDiv + const OperationKindDrop + const OperationKindElemDrop + const OperationKindEq + const OperationKindEqz + const OperationKindExtend + const OperationKindF32DemoteFromF64 + const OperationKindF32ReinterpretFromI32 + const OperationKindF64PromoteFromF32 + const OperationKindF64ReinterpretFromI64 + const OperationKindFConvertFromI + const OperationKindFloor + const OperationKindGe + const OperationKindGlobalGet + const OperationKindGlobalSet + const OperationKindGt + const OperationKindI32ReinterpretFromF32 + const OperationKindI32WrapFromI64 + const OperationKindI64ReinterpretFromF64 + const OperationKindITruncFromF + const OperationKindLabel + const OperationKindLe + const OperationKindLoad + const OperationKindLoad16 + const OperationKindLoad32 + const OperationKindLoad8 + const OperationKindLt + const OperationKindMax + const OperationKindMemoryCopy + const OperationKindMemoryFill + const OperationKindMemoryGrow + const OperationKindMemoryInit + const OperationKindMemorySize + const OperationKindMin + const OperationKindMul + const OperationKindNe + const OperationKindNearest + const OperationKindNeg + const OperationKindOr + const OperationKindPick + const OperationKindPopcnt + const OperationKindRefFunc + const OperationKindRem + const OperationKindRotl + const OperationKindRotr + const OperationKindSelect + const OperationKindSet + const OperationKindShl + const OperationKindShr + const OperationKindSignExtend32From16 + const OperationKindSignExtend32From8 + const OperationKindSignExtend64From16 + const OperationKindSignExtend64From32 + const OperationKindSignExtend64From8 + const OperationKindSqrt + const OperationKindStore + const OperationKindStore16 + const OperationKindStore32 + const OperationKindStore8 + const OperationKindSub + const OperationKindTableCopy + const OperationKindTableFill + const OperationKindTableGet + const OperationKindTableGrow + const OperationKindTableInit + const OperationKindTableSet + const OperationKindTableSize + const OperationKindTrunc + const OperationKindUnreachable + const OperationKindV128Abs + const OperationKindV128Add + const OperationKindV128AddSat + const OperationKindV128AllTrue + const OperationKindV128And + const OperationKindV128AndNot + const OperationKindV128AnyTrue + const OperationKindV128AvgrU + const OperationKindV128BitMask + const OperationKindV128Bitselect + const OperationKindV128Ceil + const OperationKindV128Cmp + const OperationKindV128Const + const OperationKindV128Div + const OperationKindV128Dot + const OperationKindV128ExtAddPairwise + const OperationKindV128ExtMul + const OperationKindV128Extend + const OperationKindV128ExtractLane + const OperationKindV128FConvertFromI + const OperationKindV128FloatDemote + const OperationKindV128FloatPromote + const OperationKindV128Floor + const OperationKindV128ITruncSatFromF + const OperationKindV128Load + const OperationKindV128LoadLane + const OperationKindV128Max + const OperationKindV128Min + const OperationKindV128Mul + const OperationKindV128Narrow + const OperationKindV128Nearest + const OperationKindV128Neg + const OperationKindV128Not + const OperationKindV128Or + const OperationKindV128Pmax + const OperationKindV128Pmin + const OperationKindV128Popcnt + const OperationKindV128Q15mulrSatS + const OperationKindV128ReplaceLane + const OperationKindV128Shl + const OperationKindV128Shr + const OperationKindV128Shuffle + const OperationKindV128Splat + const OperationKindV128Sqrt + const OperationKindV128Store + const OperationKindV128StoreLane + const OperationKindV128Sub + const OperationKindV128SubSat + const OperationKindV128Swizzle + const OperationKindV128Trunc + const OperationKindV128Xor + const OperationKindXor + func (o OperationKind) String() (ret string) + type Shape = byte + const ShapeF32x4 + const ShapeF64x2 + const ShapeI16x8 + const ShapeI32x4 + const ShapeI64x2 + const ShapeI8x16 + type SignedInt byte + const SignedInt32 + const SignedInt64 + const SignedUint32 + const SignedUint64 + func (s SignedInt) String() (ret string) + type SignedType byte + const SignedTypeFloat32 + const SignedTypeFloat64 + const SignedTypeInt32 + const SignedTypeInt64 + const SignedTypeUint32 + const SignedTypeUint64 + func (s SignedType) String() (ret string) + type UnionOperation struct + B1 byte + B2 byte + B3 bool + Kind OperationKind + U1 uint64 + U2 uint64 + U3 uint64 + Us []uint64 + func NewOperationAbs(b Float) UnionOperation + func NewOperationAdd(b UnsignedType) UnionOperation + func NewOperationAnd(b UnsignedInt) UnionOperation + func NewOperationBr(target Label) UnionOperation + func NewOperationBrIf(thenTarget, elseTarget Label, thenDrop InclusiveRange) UnionOperation + func NewOperationBrTable(targetLabelsAndRanges []uint64) UnionOperation + func NewOperationBuiltinFunctionCheckExitCode() UnionOperation + func NewOperationCall(functionIndex uint32) UnionOperation + func NewOperationCallIndirect(typeIndex, tableIndex uint32) UnionOperation + func NewOperationCeil(b Float) UnionOperation + func NewOperationClz(b UnsignedInt) UnionOperation + func NewOperationConstF32(value float32) UnionOperation + func NewOperationConstF64(value float64) UnionOperation + func NewOperationConstI32(value uint32) UnionOperation + func NewOperationConstI64(value uint64) UnionOperation + func NewOperationCopysign(b Float) UnionOperation + func NewOperationCtz(b UnsignedInt) UnionOperation + func NewOperationDataDrop(dataIndex uint32) UnionOperation + func NewOperationDiv(b SignedType) UnionOperation + func NewOperationDrop(depth InclusiveRange) UnionOperation + func NewOperationElemDrop(elemIndex uint32) UnionOperation + func NewOperationEq(b UnsignedType) UnionOperation + func NewOperationEqz(b UnsignedInt) UnionOperation + func NewOperationExtend(signed bool) UnionOperation + func NewOperationF32DemoteFromF64() UnionOperation + func NewOperationF32ReinterpretFromI32() UnionOperation + func NewOperationF64PromoteFromF32() UnionOperation + func NewOperationF64ReinterpretFromI64() UnionOperation + func NewOperationFConvertFromI(inputType SignedInt, outputType Float) UnionOperation + func NewOperationFloor(b Float) UnionOperation + func NewOperationGe(b SignedType) UnionOperation + func NewOperationGlobalGet(index uint32) UnionOperation + func NewOperationGlobalSet(index uint32) UnionOperation + func NewOperationGt(b SignedType) UnionOperation + func NewOperationI32ReinterpretFromF32() UnionOperation + func NewOperationI32WrapFromI64() UnionOperation + func NewOperationI64ReinterpretFromF64() UnionOperation + func NewOperationITruncFromF(inputType Float, outputType SignedInt, nonTrapping bool) UnionOperation + func NewOperationLabel(label Label) UnionOperation + func NewOperationLe(b SignedType) UnionOperation + func NewOperationLoad(unsignedType UnsignedType, arg MemoryArg) UnionOperation + func NewOperationLoad16(signedInt SignedInt, arg MemoryArg) UnionOperation + func NewOperationLoad32(signed bool, arg MemoryArg) UnionOperation + func NewOperationLoad8(signedInt SignedInt, arg MemoryArg) UnionOperation + func NewOperationLt(b SignedType) UnionOperation + func NewOperationMax(b Float) UnionOperation + func NewOperationMemoryCopy() UnionOperation + func NewOperationMemoryFill() UnionOperation + func NewOperationMemoryGrow() UnionOperation + func NewOperationMemoryInit(dataIndex uint32) UnionOperation + func NewOperationMemorySize() UnionOperation + func NewOperationMin(b Float) UnionOperation + func NewOperationMul(b UnsignedType) UnionOperation + func NewOperationNe(b UnsignedType) UnionOperation + func NewOperationNearest(b Float) UnionOperation + func NewOperationNeg(b Float) UnionOperation + func NewOperationOr(b UnsignedInt) UnionOperation + func NewOperationPick(depth int, isTargetVector bool) UnionOperation + func NewOperationPopcnt(b UnsignedInt) UnionOperation + func NewOperationRefFunc(functionIndex uint32) UnionOperation + func NewOperationRem(b SignedInt) UnionOperation + func NewOperationRotl(b UnsignedInt) UnionOperation + func NewOperationRotr(b UnsignedInt) UnionOperation + func NewOperationSelect(isTargetVector bool) UnionOperation + func NewOperationSet(depth int, isTargetVector bool) UnionOperation + func NewOperationShl(b UnsignedInt) UnionOperation + func NewOperationShr(b SignedInt) UnionOperation + func NewOperationSignExtend32From16() UnionOperation + func NewOperationSignExtend32From8() UnionOperation + func NewOperationSignExtend64From16() UnionOperation + func NewOperationSignExtend64From32() UnionOperation + func NewOperationSignExtend64From8() UnionOperation + func NewOperationSqrt(b Float) UnionOperation + func NewOperationStore(unsignedType UnsignedType, arg MemoryArg) UnionOperation + func NewOperationStore16(arg MemoryArg) UnionOperation + func NewOperationStore32(arg MemoryArg) UnionOperation + func NewOperationStore8(arg MemoryArg) UnionOperation + func NewOperationSub(b UnsignedType) UnionOperation + func NewOperationTableCopy(srcTableIndex, dstTableIndex uint32) UnionOperation + func NewOperationTableFill(tableIndex uint32) UnionOperation + func NewOperationTableGet(tableIndex uint32) UnionOperation + func NewOperationTableGrow(tableIndex uint32) UnionOperation + func NewOperationTableInit(elemIndex, tableIndex uint32) UnionOperation + func NewOperationTableSet(tableIndex uint32) UnionOperation + func NewOperationTableSize(tableIndex uint32) UnionOperation + func NewOperationTrunc(b Float) UnionOperation + func NewOperationUnreachable() UnionOperation + func NewOperationV128Abs(shape Shape) UnionOperation + func NewOperationV128Add(shape Shape) UnionOperation + func NewOperationV128AddSat(shape Shape, signed bool) UnionOperation + func NewOperationV128AllTrue(shape Shape) UnionOperation + func NewOperationV128And() UnionOperation + func NewOperationV128AndNot() UnionOperation + func NewOperationV128AnyTrue() UnionOperation + func NewOperationV128AvgrU(shape Shape) UnionOperation + func NewOperationV128BitMask(shape Shape) UnionOperation + func NewOperationV128Bitselect() UnionOperation + func NewOperationV128Ceil(shape Shape) UnionOperation + func NewOperationV128Cmp(cmpType V128CmpType) UnionOperation + func NewOperationV128Const(lo, hi uint64) UnionOperation + func NewOperationV128Div(shape Shape) UnionOperation + func NewOperationV128Dot() UnionOperation + func NewOperationV128ExtAddPairwise(originShape Shape, signed bool) UnionOperation + func NewOperationV128ExtMul(originShape Shape, signed bool, useLow bool) UnionOperation + func NewOperationV128Extend(originShape Shape, signed bool, useLow bool) UnionOperation + func NewOperationV128ExtractLane(laneIndex byte, signed bool, shape Shape) UnionOperation + func NewOperationV128FConvertFromI(destinationShape Shape, signed bool) UnionOperation + func NewOperationV128FloatDemote() UnionOperation + func NewOperationV128FloatPromote() UnionOperation + func NewOperationV128Floor(shape Shape) UnionOperation + func NewOperationV128ITruncSatFromF(originShape Shape, signed bool) UnionOperation + func NewOperationV128Load(loadType V128LoadType, arg MemoryArg) UnionOperation + func NewOperationV128LoadLane(laneIndex, laneSize byte, arg MemoryArg) UnionOperation + func NewOperationV128Max(shape Shape, signed bool) UnionOperation + func NewOperationV128Min(shape Shape, signed bool) UnionOperation + func NewOperationV128Mul(shape Shape) UnionOperation + func NewOperationV128Narrow(originShape Shape, signed bool) UnionOperation + func NewOperationV128Nearest(shape Shape) UnionOperation + func NewOperationV128Neg(shape Shape) UnionOperation + func NewOperationV128Not() UnionOperation + func NewOperationV128Or() UnionOperation + func NewOperationV128Pmax(shape Shape) UnionOperation + func NewOperationV128Pmin(shape Shape) UnionOperation + func NewOperationV128Popcnt(shape Shape) UnionOperation + func NewOperationV128Q15mulrSatS() UnionOperation + func NewOperationV128ReplaceLane(laneIndex byte, shape Shape) UnionOperation + func NewOperationV128Shl(shape Shape) UnionOperation + func NewOperationV128Shr(shape Shape, signed bool) UnionOperation + func NewOperationV128Shuffle(lanes []uint64) UnionOperation + func NewOperationV128Splat(shape Shape) UnionOperation + func NewOperationV128Sqrt(shape Shape) UnionOperation + func NewOperationV128Store(arg MemoryArg) UnionOperation + func NewOperationV128StoreLane(laneIndex byte, laneSize byte, arg MemoryArg) UnionOperation + func NewOperationV128Sub(shape Shape) UnionOperation + func NewOperationV128SubSat(shape Shape, signed bool) UnionOperation + func NewOperationV128Swizzle() UnionOperation + func NewOperationV128Trunc(shape Shape) UnionOperation + func NewOperationV128Xor() UnionOperation + func NewOperationXor(b UnsignedInt) UnionOperation + func (o UnionOperation) String() string + type UnsignedInt byte + const UnsignedInt32 + const UnsignedInt64 + func (s UnsignedInt) String() (ret string) + type UnsignedType byte + const UnsignedTypeF32 + const UnsignedTypeF64 + const UnsignedTypeI32 + const UnsignedTypeI64 + const UnsignedTypeUnknown + const UnsignedTypeV128 + func (s UnsignedType) String() (ret string) + type V128CmpType = byte + const V128CmpTypeF32x4Eq + const V128CmpTypeF32x4Ge + const V128CmpTypeF32x4Gt + const V128CmpTypeF32x4Le + const V128CmpTypeF32x4Lt + const V128CmpTypeF32x4Ne + const V128CmpTypeF64x2Eq + const V128CmpTypeF64x2Ge + const V128CmpTypeF64x2Gt + const V128CmpTypeF64x2Le + const V128CmpTypeF64x2Lt + const V128CmpTypeF64x2Ne + const V128CmpTypeI16x8Eq + const V128CmpTypeI16x8GeS + const V128CmpTypeI16x8GeU + const V128CmpTypeI16x8GtS + const V128CmpTypeI16x8GtU + const V128CmpTypeI16x8LeS + const V128CmpTypeI16x8LeU + const V128CmpTypeI16x8LtS + const V128CmpTypeI16x8LtU + const V128CmpTypeI16x8Ne + const V128CmpTypeI32x4Eq + const V128CmpTypeI32x4GeS + const V128CmpTypeI32x4GeU + const V128CmpTypeI32x4GtS + const V128CmpTypeI32x4GtU + const V128CmpTypeI32x4LeS + const V128CmpTypeI32x4LeU + const V128CmpTypeI32x4LtS + const V128CmpTypeI32x4LtU + const V128CmpTypeI32x4Ne + const V128CmpTypeI64x2Eq + const V128CmpTypeI64x2GeS + const V128CmpTypeI64x2GtS + const V128CmpTypeI64x2LeS + const V128CmpTypeI64x2LtS + const V128CmpTypeI64x2Ne + const V128CmpTypeI8x16Eq + const V128CmpTypeI8x16GeS + const V128CmpTypeI8x16GeU + const V128CmpTypeI8x16GtS + const V128CmpTypeI8x16GtU + const V128CmpTypeI8x16LeS + const V128CmpTypeI8x16LeU + const V128CmpTypeI8x16LtS + const V128CmpTypeI8x16LtU + const V128CmpTypeI8x16Ne + type V128LoadType = byte + const V128LoadType128 + const V128LoadType16Splat + const V128LoadType16x4s + const V128LoadType16x4u + const V128LoadType32Splat + const V128LoadType32x2s + const V128LoadType32x2u + const V128LoadType32zero + const V128LoadType64Splat + const V128LoadType64zero + const V128LoadType8Splat + const V128LoadType8x8s + const V128LoadType8x8u