Versions in this module Expand all Collapse all v0 v0.2.0 Oct 11, 2024 Changes in this version + const ErrDuplicateName + const ErrLabelAlreadyAnchored + const ErrNoLocalScope + type Cell struct + Name data.Local + Type CellType + type CellType int + const ReferenceCell + const RestCell + const ValueCell + type Encoded struct + Closure data.Locals + Code isa.Instructions + Constants data.Vector + Globals env.Namespace + func (e *Encoded) Runnable() *isa.Runnable + func (e *Encoded) WithCode(c isa.Instructions) *Encoded + func (e *Encoded) WithConstants(c data.Vector) *Encoded + type Encoder interface + AddConstant func(data.Value) isa.Operand + AddLocal func(data.Local, CellType) *IndexedCell + Child func() Encoder + Emit func(isa.Opcode, ...isa.Operand) + Encode func() *Encoded + Globals func() env.Namespace + NewLabel func() isa.Operand + PopLocals func() + PopParams func() + PushLocals func() + PushParams func(data.Locals, bool) + ResolveClosure func(data.Local) (*IndexedCell, bool) + ResolveLocal func(data.Local) (*IndexedCell, bool) + ResolveParam func(data.Local) (*IndexedCell, bool) + ResolveScoped func(data.Local) (*ScopedCell, bool) + func NewEncoder(globals env.Namespace) Encoder + type IndexedCell struct + Index isa.Operand + type IndexedCells []*IndexedCell + type Locals map[data.Local]*IndexedCell + type Scope int + const ArgScope + const ClosureScope + const LocalScope + type ScopedCell struct