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 ¶
View Source
const ( Type1Pfx uint32 = 8 << 28 Type2Pfx uint32 = 7 << 28 Type3Pfx uint32 = 6 << 28 Type4Pfx uint32 = 5 << 28 Type5Pfx uint32 = 4 << 28 Type6Pfx uint32 = 3 << 28 Type0Pfx uint32 = 0 )
View Source
const ( Register = RegType(iota) Upvalue )
Register types
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 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.