Documentation ¶
Index ¶
- Constants
- type Addr
- type BinOp
- type Bool
- type Code
- type Compiler
- type Constant
- type Flag
- type Float
- type Int
- type JumpOp
- type Label
- type Lit16
- type Lit8
- type NilType
- type Opcode
- func MkType0(f Flag, rA Reg) Opcode
- func MkType1(op BinOp, rA, rB, rC Reg) Opcode
- func MkType2(f Flag, rA, rB, rC Reg) Opcode
- func MkType3(f Flag, op UnOpK16, rA Reg, k Lit16) Opcode
- func MkType4a(f Flag, op UnOp, rA, rB Reg) Opcode
- func MkType4b(f Flag, op UnOpK, rA Reg, k Lit8) Opcode
- func MkType5(f Flag, op JumpOp, rA Reg, k Lit16) Opcode
- func MkType6(f Flag, rA, rB Reg, m uint8) Opcode
- func (c Opcode) Disassemble(d *UnitDisassembler, i int) string
- func (c Opcode) GetA() Reg
- func (c Opcode) GetB() Reg
- func (c Opcode) GetC() Reg
- func (c Opcode) GetF() bool
- func (c Opcode) GetM() uint8
- func (c Opcode) GetN() uint16
- func (c Opcode) GetR() uint8
- func (c Opcode) GetType() uint8
- func (c Opcode) GetX() BinOp
- func (c Opcode) GetY() uint8
- func (c Opcode) GetZ() UnOp
- func (c Opcode) HasSubtypeFlagSet() bool
- func (c Opcode) HasType0() bool
- func (c Opcode) HasType1() bool
- func (c Opcode) HasType2or4() bool
- func (c Opcode) HasType4a() bool
- func (c Opcode) HasType6() bool
- func (c Opcode) SetN(n uint16) Opcode
- func (c Opcode) TypePfx() uint32
- type Reg
- type RegType
- type String
- type UnOp
- type UnOpK
- type UnOpK16
- type Unit
- type UnitDisassembler
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Code ¶
type Code struct { Name string StartOffset, EndOffset uint UpvalueCount int16 RegCount int16 UpNames []string }
func (Code) ShortString ¶
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
func NewCompiler ¶
type Opcode ¶
type Opcode uint32
Opcode is the type of opcodes
func (Opcode) Disassemble ¶
func (c Opcode) Disassemble(d *UnitDisassembler, i int) string
func (Opcode) HasSubtypeFlagSet ¶
func (Opcode) HasType2or4 ¶
type RegType ¶
type RegType uint8
RegType represents the type of a register
const ( Register RegType = 0 Upvalue = 1 )
Register types
type UnitDisassembler ¶
type UnitDisassembler struct {
// contains filtered or unexported fields
}
func NewUnitDisassembler ¶
func NewUnitDisassembler(unit *Unit) *UnitDisassembler
func (*UnitDisassembler) Disassemble ¶
func (d *UnitDisassembler) Disassemble(w io.Writer)
func (*UnitDisassembler) GetLabel ¶
func (d *UnitDisassembler) GetLabel(offset int) string
func (*UnitDisassembler) SetLabel ¶
func (d *UnitDisassembler) SetLabel(offset int, lbl string)
func (*UnitDisassembler) ShortKString ¶
func (d *UnitDisassembler) ShortKString(ki uint16) string
Click to show internal directories.
Click to hide internal directories.