Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOptimizer ¶
func AddOptimizer(o Optimization)
Types ¶
type Code ¶
type Code struct {
// contains filtered or unexported fields
}
func (*Code) NextInstruction ¶
func (c *Code) NextInstruction() *Instruction
type CodeBlock ¶
type CodeBlock struct { Name string Filename string LocalCount int MaxStackSize int MaxBlockSize int Constants []object.Object // Created at compile time Locals []string // Created by compile time Names []string // Created at compile time Code []byte Native bool ClassMethod bool LineOffsets []uint16 }
func (*CodeBlock) Type ¶
func (cb *CodeBlock) Type() object.ObjectType
type InstSet ¶
type InstSet struct { Head *Instruction Tail *Instruction }
func NewInstSet ¶
func NewInstSet() *InstSet
type Instruction ¶
type Instruction struct { Instr opcode.Opcode Args []uint16 // len = 1 or 2 ArgLabels []string // len = 1 or 2, name of label for corresponding argument, prefix "~" means relative Label string // Label names this instruction for linking later Next *Instruction Line uint }
func (*Instruction) IsLoad ¶
func (i *Instruction) IsLoad() bool
func (*Instruction) Size ¶
func (i *Instruction) Size() uint16
func (*Instruction) String ¶
func (i *Instruction) String() string
type Optimization ¶
type Optimization func(*InstSet, *codeBlockCompiler)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.