Versions in this module Expand all Collapse all v1 v1.0.1 Mar 29, 2024 v1.0.0 Mar 15, 2024 Changes in this version + func AppendAccess(filed string, loc Location, ops []Op, locations []Location, binary *Binary, ...) ([]Op, []Location) + func AppendApply(numArgs uint8, loc Location, ops []Op, locations []Location) ([]Op, []Location) + func AppendCall(name string, numArgs uint8, loc Location, ops []Op, locations []Location, ...) ([]Op, []Location) + func AppendJump(jumpDelta int, conditional bool, loc Location, ops []Op, locations []Location) ([]Op, []Location) + func AppendLoadConstCharValue(v rune, stack StackKind, loc Location, ops []Op, locations []Location, ...) ([]Op, []Location) + func AppendLoadConstFloatValue(v float64, stack StackKind, loc Location, ops []Op, locations []Location, ...) ([]Op, []Location) + func AppendLoadConstIntValue(v int64, stack StackKind, loc Location, ops []Op, locations []Location, ...) ([]Op, []Location) + func AppendLoadConstStringValue(v string, stack StackKind, loc Location, ops []Op, locations []Location, ...) ([]Op, []Location) + func AppendLoadConstUnitValue(stack StackKind, loc Location, ops []Op, locations []Location, binary *Binary) ([]Op, []Location) + func AppendLoadGlobal(ptr Pointer, loc Location, ops []Op, locations []Location) ([]Op, []Location) + func AppendLoadLocal(name string, loc Location, ops []Op, locations []Location, binary *Binary, ...) ([]Op, []Location) + func AppendMakeObject(kind ObjectKind, numArgs int, loc Location, ops []Op, locations []Location) ([]Op, []Location) + func AppendMakePattern(kind PatternKind, name string, numNested uint8, loc Location, ops []Op, ...) ([]Op, []Location) + func AppendMakePatternLong(kind PatternKind, numNested uint32, loc Location, ops []Op, ...) ([]Op, []Location) + func AppendSwapPop(loc Location, mode SwapPopMode, ops []Op, locations []Location) ([]Op, []Location) + func AppendUpdate(field string, loc Location, ops []Op, locations []Location, binary *Binary, ...) ([]Op, []Location) + func Version() int + type Binary struct + CompilerVersion uint32 + Consts []PackedConst + Entry FullIdentifier + Exports map[FullIdentifier]Pointer + Funcs []Func + Packages map[QualifiedIdentifier]int32 + Strings []string + func NewBinary() *Binary + func Read(reader io.Reader) (bin *Binary, err error) + func (b *Binary) Write(writer io.Writer, debug bool) (err error) + type BinaryHash struct + CompiledPaths []QualifiedIdentifier + ConstMap map[PackedConst]ConstHash + FuncsMap map[FullIdentifier]Pointer + StringMap map[string]StringHash + func NewBinaryHash() *BinaryHash + func (h *BinaryHash) HashConst(v PackedConst, bin *Binary) ConstHash + func (h *BinaryHash) HashString(v string, bin *Binary) StringHash + type ConstHash uint32 + type ConstHashKind uint8 + const ConstHashKindFloat + const ConstHashKindInt + const ConstHashKindNone + type ConstKind uint8 + const ConstKindChar + const ConstKindFloat + const ConstKindInt + const ConstKindString + const ConstKindUnit + type FullIdentifier string + type Func struct + FilePath string + Locations []Location + Name StringHash + NumArgs uint32 + Ops []Op + type Location struct + Column uint32 + Line uint32 + type ObjectKind uint8 + const ObjectKindList + const ObjectKindOption + const ObjectKindRecord + const ObjectKindTuple + type Op uint64 + func (o Op) Decompose() (OpKind, uint8, uint8, uint32) + func (o Op) WithDelta(i int32) Op + type OpKind uint32 + const OpKindAccess + const OpKindApply + const OpKindCall + const OpKindJump + const OpKindLoadConst + const OpKindLoadGlobal + const OpKindLoadLocal + const OpKindMakeObject + const OpKindMakePattern + const OpKindSwapPop + const OpKindUpdate + type PackedConst interface + Float func() float64 + Int func() int64 + Kind func() ConstHashKind + Pack func() uint64 + type PackedFloat struct + Value float64 + func (c PackedFloat) Float() float64 + func (c PackedFloat) Int() int64 + func (c PackedFloat) Kind() ConstHashKind + func (c PackedFloat) Pack() uint64 + type PackedInt struct + Value int64 + func (c PackedInt) Float() float64 + func (c PackedInt) Int() int64 + func (c PackedInt) Kind() ConstHashKind + func (c PackedInt) Pack() uint64 + type PatternKind uint8 + const PatternKindAlias + const PatternKindAny + const PatternKindCons + const PatternKindConst + const PatternKindDataOption + const PatternKindList + const PatternKindNamed + const PatternKindRecord + const PatternKindTuple + type Pointer uint32 + type QualifiedIdentifier string + type StackKind uint8 + const StackKindObject + const StackKindPattern + type StringHash uint32 + type SwapPopMode uint8 + const SwapPopModeBoth + const SwapPopModePop