Documentation
¶
Index ¶
- func ConstructPatterns(song *sointu.Song) ([][]byte, [][]byte, error)
- type Compiler
- type CompilerMacros
- type FeatureSetMacros
- type SongMacros
- type WasmMacros
- func (wm *WasmMacros) Align() string
- func (wm *WasmMacros) Block(value int) string
- func (wm *WasmMacros) Data() []byte
- func (wm *WasmMacros) DataB(value byte) string
- func (wm *WasmMacros) DataD(value uint32) string
- func (wm *WasmMacros) DataW(value uint16) string
- func (wm *WasmMacros) GetLabel(label string) int
- func (wm *WasmMacros) MemoryPages() int
- func (wm *WasmMacros) SetBlockLabel(label string) string
- func (wm *WasmMacros) SetDataLabel(label string) string
- func (wm *WasmMacros) ToByte(value int) byte
- type X86Macros
- func (p *X86Macros) AX() string
- func (p *X86Macros) BP() string
- func (p *X86Macros) BX() string
- func (p *X86Macros) COM() string
- func (p *X86Macros) CX() string
- func (p *X86Macros) Call(funcname string) (string, error)
- func (p *X86Macros) Constants() string
- func (p *X86Macros) DI() string
- func (p *X86Macros) DPTR() string
- func (p *X86Macros) DX() string
- func (p *X86Macros) Data(label string) string
- func (p *X86Macros) Export(name string, numParams int) string
- func (p *X86Macros) ExportFunc(name string, params ...string) string
- func (p *X86Macros) Float(value float32) string
- func (p *X86Macros) FmtStack() string
- func (p *X86Macros) Func(funcname string, scope ...string) (string, error)
- func (p *X86Macros) HasCall(funcname string) bool
- func (p *X86Macros) INP() string
- func (p *X86Macros) Input(unit string, port string) (string, error)
- func (p *X86Macros) Int(value int) string
- func (p *X86Macros) LoadFPUState() string
- func (p *X86Macros) Modulation(unit string, port string) (string, error)
- func (p *X86Macros) PTRSIZE() int
- func (p *X86Macros) PTRWORD() string
- func (p *X86Macros) Pop(register string) string
- func (p *X86Macros) PopRegs(params ...string) string
- func (p *X86Macros) Prepare(value string, regs ...string) (string, error)
- func (p *X86Macros) Push(value string, name string) string
- func (p *X86Macros) PushRegs(params ...string) string
- func (p *X86Macros) SI() string
- func (p *X86Macros) SP() string
- func (p *X86Macros) SaveFPUState() string
- func (p *X86Macros) SaveStack(scope string) string
- func (p *X86Macros) SectBss(name string) string
- func (p *X86Macros) SectData(name string) string
- func (p *X86Macros) SectText(name string) string
- func (p *X86Macros) Stack(name string) (string, error)
- func (p *X86Macros) TailCall(funcname string) (string, error)
- func (p *X86Macros) Use(value string, regs ...string) (string, error)
- func (p *X86Macros) VAL() string
- func (p *X86Macros) WRK() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Compiler ¶
type Compiler struct {
Template *template.Template
OS string
Arch string
Output16Bit bool
RowSync bool
}
func NewFromTemplates ¶
type CompilerMacros ¶
type CompilerMacros struct {
Clip bool
Library bool
Sine int // TODO: how can we elegantly access global constants in template, without wrapping each one by one
Trisaw int
Pulse int
Gate int
Sample int
Compiler
}
func NewCompilerMacros ¶
func NewCompilerMacros(c Compiler) *CompilerMacros
type FeatureSetMacros ¶
type FeatureSetMacros struct {
vm.FeatureSet
}
func (*FeatureSetMacros) GetOp ¶
func (p *FeatureSetMacros) GetOp(instruction string) int
func (*FeatureSetMacros) HasOp ¶
func (p *FeatureSetMacros) HasOp(instruction string) bool
func (*FeatureSetMacros) Mono ¶
func (p *FeatureSetMacros) Mono(unitType string) bool
func (*FeatureSetMacros) Stereo ¶
func (p *FeatureSetMacros) Stereo(unitType string) bool
func (*FeatureSetMacros) StereoAndMono ¶
func (p *FeatureSetMacros) StereoAndMono(unitType string) bool
type SongMacros ¶
func NewSongMacros ¶
func NewSongMacros(s *sointu.Song) *SongMacros
type WasmMacros ¶
WasmMacros are the macros called from .wat templates
NOTE! Due to the single pass nature of the compilation and the way memory is organized, you should initialize all initialized data in the .wat files using DataB, DataW and DataD macros _before_ any calls to Block. Block allocates uninitialized data blocks from the memory.
func NewWasmMacros ¶
func NewWasmMacros() *WasmMacros
func (*WasmMacros) Align ¶
func (wm *WasmMacros) Align() string
func (*WasmMacros) Block ¶
func (wm *WasmMacros) Block(value int) string
func (*WasmMacros) Data ¶
func (wm *WasmMacros) Data() []byte
func (*WasmMacros) DataB ¶
func (wm *WasmMacros) DataB(value byte) string
func (*WasmMacros) DataD ¶
func (wm *WasmMacros) DataD(value uint32) string
func (*WasmMacros) DataW ¶
func (wm *WasmMacros) DataW(value uint16) string
func (*WasmMacros) GetLabel ¶
func (wm *WasmMacros) GetLabel(label string) int
func (*WasmMacros) MemoryPages ¶
func (wm *WasmMacros) MemoryPages() int
func (*WasmMacros) SetBlockLabel ¶
func (wm *WasmMacros) SetBlockLabel(label string) string
func (*WasmMacros) SetDataLabel ¶
func (wm *WasmMacros) SetDataLabel(label string) string
func (*WasmMacros) ToByte ¶
func (wm *WasmMacros) ToByte(value int) byte
type X86Macros ¶
type X86Macros struct {
Stacklocs []string
Amd64 bool
OS string
DisableSections bool
// contains filtered or unexported fields
}
func NewX86Macros ¶
func (*X86Macros) LoadFPUState ¶
func (*X86Macros) Modulation ¶
func (*X86Macros) SaveFPUState ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.