intermediate

package
v0.0.0-...-bcc578f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Add

type Add struct {
	Statement
	// contains filtered or unexported fields
}

func NewAdd

func NewAdd(s1, s2, d flamego.Register, c string) *Add

func (*Add) Emit

func (a *Add) Emit() []byte

func (*Add) EmittedSize

func (a *Add) EmittedSize() uint32

func (*Add) Instruction

func (a *Add) Instruction() flamego.Instruction

func (*Add) String

func (a *Add) String() string

type Addressable

type Addressable interface {
	AbsoluteAddress() uint32
	RelativeAddress(uint32) int32
	SetAddress(uint32)
}

type Align

type Align struct {
	Statement
	// contains filtered or unexported fields
}

func NewAlign

func NewAlign(v uint64, c string) *Align

func (*Align) Emit

func (a *Align) Emit() []byte

func (*Align) EmittedSize

func (a *Align) EmittedSize() uint32

func (*Align) String

func (a *Align) String() string

func (*Align) Value

func (a *Align) Value() uint64

type And

type And struct {
	Statement
	// contains filtered or unexported fields
}

func NewAnd

func NewAnd(s1, s2, d flamego.Register, c string) *And

func (*And) Emit

func (a *And) Emit() []byte

func (*And) EmittedSize

func (a *And) EmittedSize() uint32

func (*And) Instruction

func (a *And) Instruction() flamego.Instruction

func (*And) String

func (a *And) String() string

type Call

type Call struct {
	Statement
	// contains filtered or unexported fields
}

func NewCall

func NewCall(r flamego.Register, c string) *Call

func (*Call) Emit

func (a *Call) Emit() []byte

func (*Call) EmittedSize

func (a *Call) EmittedSize() uint32

func (*Call) Instruction

func (a *Call) Instruction() flamego.Instruction

func (*Call) String

func (a *Call) String() string

type Clear

type Clear struct {
	Statement
	// contains filtered or unexported fields
}

func NewClearWithConstant

func NewClearWithConstant(a flamego.Register, n string, c string) *Clear

func NewClearWithLabel

func NewClearWithLabel(a flamego.Register, l string, c string) *Clear

func NewClearWithOffset

func NewClearWithOffset(a flamego.Register, o uint32, c string) *Clear

func (*Clear) Emit

func (a *Clear) Emit() []byte

func (*Clear) EmittedSize

func (a *Clear) EmittedSize() uint32

func (*Clear) Instruction

func (a *Clear) Instruction() flamego.Instruction
func (a *Clear) Link(l Linker) error

func (*Clear) String

func (a *Clear) String() string

type Data

type Data struct {
	Statement
	// contains filtered or unexported fields
}

func NewDataWithLabel

func NewDataWithLabel(l *Label, c string) *Data

func NewDataWithName

func NewDataWithName(n string, c string) *Data

func NewDataWithValue

func NewDataWithValue(v uint64, c string) *Data

func (*Data) Emit

func (d *Data) Emit() []byte

func (*Data) EmittedSize

func (d *Data) EmittedSize() uint32
func (d *Data) Link(l Linker) error

func (*Data) String

func (d *Data) String() string

func (*Data) Value

func (d *Data) Value() uint64

type Divide

type Divide struct {
	Statement
	// contains filtered or unexported fields
}

func NewDivide

func NewDivide(s1, s2, d flamego.Register, c string) *Divide

func (*Divide) Emit

func (a *Divide) Emit() []byte

func (*Divide) EmittedSize

func (a *Divide) EmittedSize() uint32

func (*Divide) Instruction

func (a *Divide) Instruction() flamego.Instruction

func (*Divide) String

func (a *Divide) String() string

type Emittable

type Emittable interface {
	Addressable
	EmittedSize() uint32
	Emit() []byte
}

type Flush

type Flush struct {
	Statement
	// contains filtered or unexported fields
}

func NewFlushWithConstant

func NewFlushWithConstant(a flamego.Register, n string, c string) *Flush

func NewFlushWithLabel

func NewFlushWithLabel(a flamego.Register, l string, c string) *Flush

func NewFlushWithOffset

func NewFlushWithOffset(a flamego.Register, o uint32, c string) *Flush

func (*Flush) Emit

func (a *Flush) Emit() []byte

func (*Flush) EmittedSize

func (a *Flush) EmittedSize() uint32

func (*Flush) Instruction

func (a *Flush) Instruction() flamego.Instruction
func (a *Flush) Link(l Linker) error

func (*Flush) String

func (a *Flush) String() string

type Halt

type Halt struct {
	Statement
}

func NewHalt

func NewHalt(c string) *Halt

func (*Halt) Emit

func (a *Halt) Emit() []byte

func (*Halt) EmittedSize

func (a *Halt) EmittedSize() uint32

func (*Halt) Instruction

func (a *Halt) Instruction() flamego.Instruction

func (*Halt) String

func (a *Halt) String() string

type Interrupt

type Interrupt struct {
	Statement
	// contains filtered or unexported fields
}

func NewInterrupt

func NewInterrupt(v flamego.InterruptValue, c string) *Interrupt

func (*Interrupt) Emit

func (a *Interrupt) Emit() []byte

func (*Interrupt) EmittedSize

func (a *Interrupt) EmittedSize() uint32

func (*Interrupt) Instruction

func (a *Interrupt) Instruction() flamego.Instruction

func (*Interrupt) String

func (a *Interrupt) String() string

type Jump

type Jump struct {
	Statement
	// contains filtered or unexported fields
}

func NewJump

func NewJump(cc isa.JumpConditionCode, d string, r flamego.Register, c string) *Jump

func (*Jump) Emit

func (a *Jump) Emit() []byte

func (*Jump) EmittedSize

func (a *Jump) EmittedSize() uint32

func (*Jump) Instruction

func (a *Jump) Instruction() flamego.Instruction
func (a *Jump) Link(l Linker) error

func (*Jump) String

func (a *Jump) String() string

type Label

type Label struct {
	Statement
	// contains filtered or unexported fields
}

func NewLabel

func NewLabel(c string) *Label

func NewLabelWithName

func NewLabelWithName(n, c string) *Label

func (*Label) String

func (l *Label) String() string

type LeftShift

type LeftShift struct {
	Statement
	// contains filtered or unexported fields
}

func NewLeftShift

func NewLeftShift(s1, s2, d flamego.Register, c string) *LeftShift

func (*LeftShift) Emit

func (a *LeftShift) Emit() []byte

func (*LeftShift) EmittedSize

func (a *LeftShift) EmittedSize() uint32

func (*LeftShift) Instruction

func (a *LeftShift) Instruction() flamego.Instruction

func (*LeftShift) String

func (a *LeftShift) String() string

type Linkable

type Linkable interface {
	Link(Linker) error
}

type Linker

type Linker interface {
	Addressables() []Addressable
	Constant(string) (*Data, error)
	Constants() map[string]*Data
	Label(string) (*Label, error)
	Labels() map[string]*Label
}

type Load

type Load struct {
	Statement
	// contains filtered or unexported fields
}

func NewLoadWithConstant

func NewLoadWithConstant(a flamego.Register, n string, d flamego.Register, c string) *Load

func NewLoadWithLabel

func NewLoadWithLabel(a flamego.Register, l string, d flamego.Register, c string) *Load

func NewLoadWithOffset

func NewLoadWithOffset(a flamego.Register, o uint32, d flamego.Register, c string) *Load

func (*Load) Emit

func (a *Load) Emit() []byte

func (*Load) EmittedSize

func (a *Load) EmittedSize() uint32

func (*Load) Instruction

func (a *Load) Instruction() flamego.Instruction
func (a *Load) Link(l Linker) error

func (*Load) String

func (a *Load) String() string

type LoadC

type LoadC struct {
	Statement
	// contains filtered or unexported fields
}

func NewLoadCWithConstant

func NewLoadCWithConstant(n string, r flamego.Register, c string) *LoadC

func NewLoadCWithLabel

func NewLoadCWithLabel(l string, r flamego.Register, c string) *LoadC

func NewLoadCWithNumber

func NewLoadCWithNumber(n uint32, r flamego.Register, c string) *LoadC

func (*LoadC) Emit

func (a *LoadC) Emit() []byte

func (*LoadC) EmittedSize

func (a *LoadC) EmittedSize() uint32

func (*LoadC) Instruction

func (a *LoadC) Instruction() flamego.Instruction
func (a *LoadC) Link(l Linker) error

func (*LoadC) String

func (a *LoadC) String() string

type Lock

type Lock struct {
	Statement
}

func NewLock

func NewLock(c string) *Lock

func (*Lock) Emit

func (a *Lock) Emit() []byte

func (*Lock) EmittedSize

func (a *Lock) EmittedSize() uint32

func (*Lock) Instruction

func (a *Lock) Instruction() flamego.Instruction

func (*Lock) String

func (a *Lock) String() string

type Modulo

type Modulo struct {
	Statement
	// contains filtered or unexported fields
}

func NewModulo

func NewModulo(s1, s2, d flamego.Register, c string) *Modulo

func (*Modulo) Emit

func (a *Modulo) Emit() []byte

func (*Modulo) EmittedSize

func (a *Modulo) EmittedSize() uint32

func (*Modulo) Instruction

func (a *Modulo) Instruction() flamego.Instruction

func (*Modulo) String

func (a *Modulo) String() string

type Multiply

type Multiply struct {
	Statement
	// contains filtered or unexported fields
}

func NewMultiply

func NewMultiply(s1, s2, d flamego.Register, c string) *Multiply

func (*Multiply) Emit

func (a *Multiply) Emit() []byte

func (*Multiply) EmittedSize

func (a *Multiply) EmittedSize() uint32

func (*Multiply) Instruction

func (a *Multiply) Instruction() flamego.Instruction

func (*Multiply) String

func (a *Multiply) String() string

type Noop

type Noop struct {
	Statement
}

func NewNoop

func NewNoop(c string) *Noop

func (*Noop) Emit

func (a *Noop) Emit() []byte

func (*Noop) EmittedSize

func (a *Noop) EmittedSize() uint32

func (*Noop) Instruction

func (a *Noop) Instruction() flamego.Instruction

func (*Noop) String

func (a *Noop) String() string

type Not

type Not struct {
	Statement
	// contains filtered or unexported fields
}

func NewNot

func NewNot(s, d flamego.Register, c string) *Not

func (*Not) Emit

func (a *Not) Emit() []byte

func (*Not) EmittedSize

func (a *Not) EmittedSize() uint32

func (*Not) Instruction

func (a *Not) Instruction() flamego.Instruction

func (*Not) String

func (a *Not) String() string

type Or

type Or struct {
	Statement
	// contains filtered or unexported fields
}

func NewOr

func NewOr(s1, s2, d flamego.Register, c string) *Or

func (*Or) Emit

func (a *Or) Emit() []byte

func (*Or) EmittedSize

func (a *Or) EmittedSize() uint32

func (*Or) Instruction

func (a *Or) Instruction() flamego.Instruction

func (*Or) String

func (a *Or) String() string

type Pop

type Pop struct {
	Statement
	// contains filtered or unexported fields
}

func NewPop

func NewPop(m uint16, c string) *Pop

func (*Pop) Emit

func (a *Pop) Emit() []byte

func (*Pop) EmittedSize

func (a *Pop) EmittedSize() uint32

func (*Pop) Instruction

func (a *Pop) Instruction() flamego.Instruction

func (*Pop) String

func (a *Pop) String() string

type Push

type Push struct {
	Statement
	// contains filtered or unexported fields
}

func NewPush

func NewPush(m uint16, c string) *Push

func (*Push) Emit

func (a *Push) Emit() []byte

func (*Push) EmittedSize

func (a *Push) EmittedSize() uint32

func (*Push) Instruction

func (a *Push) Instruction() flamego.Instruction

func (*Push) String

func (a *Push) String() string

type Return

type Return struct {
	Statement
}

func NewReturn

func NewReturn(c string) *Return

func (*Return) Emit

func (a *Return) Emit() []byte

func (*Return) EmittedSize

func (a *Return) EmittedSize() uint32

func (*Return) Instruction

func (a *Return) Instruction() flamego.Instruction

func (*Return) String

func (a *Return) String() string

type RightShift

type RightShift struct {
	Statement
	// contains filtered or unexported fields
}

func NewRightShift

func NewRightShift(s1, s2, d flamego.Register, c string) *RightShift

func (*RightShift) Emit

func (a *RightShift) Emit() []byte

func (*RightShift) EmittedSize

func (a *RightShift) EmittedSize() uint32

func (*RightShift) Instruction

func (a *RightShift) Instruction() flamego.Instruction

func (*RightShift) String

func (a *RightShift) String() string

type Signal

type Signal struct {
	Statement
	// contains filtered or unexported fields
}

func NewSignal

func NewSignal(r flamego.Register, c string) *Signal

func (*Signal) Emit

func (a *Signal) Emit() []byte

func (*Signal) EmittedSize

func (a *Signal) EmittedSize() uint32

func (*Signal) Instruction

func (a *Signal) Instruction() flamego.Instruction

func (*Signal) String

func (a *Signal) String() string

type Sleep

type Sleep struct {
	Statement
}

func NewSleep

func NewSleep(c string) *Sleep

func (*Sleep) Emit

func (a *Sleep) Emit() []byte

func (*Sleep) EmittedSize

func (a *Sleep) EmittedSize() uint32

func (*Sleep) Instruction

func (a *Sleep) Instruction() flamego.Instruction

func (*Sleep) String

func (a *Sleep) String() string

type Statement

type Statement struct {
	// contains filtered or unexported fields
}

func (*Statement) AbsoluteAddress

func (s *Statement) AbsoluteAddress() uint32

func (*Statement) RelativeAddress

func (s *Statement) RelativeAddress(a uint32) int32

func (*Statement) SetAddress

func (s *Statement) SetAddress(a uint32)

func (*Statement) String

func (s *Statement) String() string

type Store

type Store struct {
	Statement
	// contains filtered or unexported fields
}

func NewStoreWithConstant

func NewStoreWithConstant(a flamego.Register, n string, s flamego.Register, c string) *Store

func NewStoreWithLabel

func NewStoreWithLabel(a flamego.Register, l string, s flamego.Register, c string) *Store

func NewStoreWithOffset

func NewStoreWithOffset(a flamego.Register, o uint32, s flamego.Register, c string) *Store

func (*Store) Emit

func (a *Store) Emit() []byte

func (*Store) EmittedSize

func (a *Store) EmittedSize() uint32

func (*Store) Instruction

func (a *Store) Instruction() flamego.Instruction
func (a *Store) Link(l Linker) error

func (*Store) String

func (a *Store) String() string

type Subtract

type Subtract struct {
	Statement
	// contains filtered or unexported fields
}

func NewSubtract

func NewSubtract(s1, s2, d flamego.Register, c string) *Subtract

func (*Subtract) Emit

func (a *Subtract) Emit() []byte

func (*Subtract) EmittedSize

func (a *Subtract) EmittedSize() uint32

func (*Subtract) Instruction

func (a *Subtract) Instruction() flamego.Instruction

func (*Subtract) String

func (a *Subtract) String() string

type Uninterrupt

type Uninterrupt struct {
	Statement
	// contains filtered or unexported fields
}

func NewUninterrupt

func NewUninterrupt(r flamego.Register, c string) *Uninterrupt

func (*Uninterrupt) Emit

func (a *Uninterrupt) Emit() []byte

func (*Uninterrupt) EmittedSize

func (a *Uninterrupt) EmittedSize() uint32

func (*Uninterrupt) Instruction

func (a *Uninterrupt) Instruction() flamego.Instruction

func (*Uninterrupt) String

func (a *Uninterrupt) String() string

type Unlock

type Unlock struct {
	Statement
}

func NewUnlock

func NewUnlock(c string) *Unlock

func (*Unlock) Emit

func (a *Unlock) Emit() []byte

func (*Unlock) EmittedSize

func (a *Unlock) EmittedSize() uint32

func (*Unlock) Instruction

func (a *Unlock) Instruction() flamego.Instruction

func (*Unlock) String

func (a *Unlock) String() string

type Xor

type Xor struct {
	Statement
	// contains filtered or unexported fields
}

func NewXor

func NewXor(s1, s2, d flamego.Register, c string) *Xor

func (*Xor) Emit

func (a *Xor) Emit() []byte

func (*Xor) EmittedSize

func (a *Xor) EmittedSize() uint32

func (*Xor) Instruction

func (a *Xor) Instruction() flamego.Instruction

func (*Xor) String

func (a *Xor) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL