Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ErrBadInstruction is raised when the VM encounters an Opcode that has not // been properly mapped ErrBadInstruction = "unknown instruction encountered: %s" // ErrEmptyArgStack is raised when the VM encounters an instruction to pop // the argument stack, but the head of the stack is empty ErrEmptyArgStack = "attempt to pop empty argument stack" )
Error messages
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allocator ¶
type Allocator struct {
// contains filtered or unexported fields
}
func NewAllocator ¶
func NewAllocator() *Allocator
type Closure ¶
type Closure struct { *Procedure // contains filtered or unexported fields }
func (*Closure) CheckArity ¶
CheckArity performs a compile-time arity check for the Closure
type Procedure ¶
type Procedure struct { ArityChecker data.ArityChecker isa.Runnable // contains filtered or unexported fields }
Procedure encapsulates the initial environment of an abstract machine
func MakeProcedure ¶
func MakeProcedure(run *isa.Runnable, arity data.ArityChecker) *Procedure
func (*Procedure) Call ¶
Call allows an abstract machine Procedure to be called to instantiate a Closure. Only the compiler invokes this calling interface.
func (*Procedure) CheckArity ¶
CheckArity performs a compile-time arity check for the Procedure
Click to show internal directories.
Click to hide internal directories.