Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ErrNoLocalScope is raised when no local scope has been created ErrNoLocalScope = "no local scopes have been pushed" // ErrDuplicateName is raised when an attempt is made to register a // duplicated name within the same local scope ErrDuplicateName = "name duplicated in scope: %s" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
type Encoder interface { Child() Encoder Emit(isa.Opcode, ...isa.Operand) Code() isa.Instructions StackSize() isa.Operand NewLabel() isa.Operand Globals() env.Namespace Constants() data.Vector AddConstant(data.Value) isa.Operand Closure() IndexedCells ResolveClosure(data.Local) (*IndexedCell, bool) PushParams(data.Locals, bool) PopParams() ResolveParam(data.Local) (*IndexedCell, bool) LocalCount() isa.Operand PushLocals() PopLocals() AddLocal(data.Local, CellType) *IndexedCell ResolveLocal(data.Local) (*IndexedCell, bool) ResolveScoped(data.Local) (*ScopedCell, bool) }
Encoder exposes an interface for stateful compiler encoding
func NewEncoder ¶
NewEncoder instantiates a new Encoder
type IndexedCell ¶
IndexedCell attaches an Index to a Cell
type IndexedCells ¶
type IndexedCells []*IndexedCell
IndexedCells encapsulates a group of IndexedCells
Click to show internal directories.
Click to hide internal directories.