Reorganized file structure
This commit is contained in:
parent
8b595ef3ce
commit
722d07c321
57 changed files with 431 additions and 614 deletions
17
src/build/Finalize.go
Normal file
17
src/build/Finalize.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package build
|
||||
|
||||
import (
|
||||
"git.akyoto.dev/cli/q/src/build/asm"
|
||||
)
|
||||
|
||||
// Finalize generates the final machine code.
|
||||
func Finalize(functions map[string]*Function) ([]byte, []byte) {
|
||||
a := asm.New()
|
||||
|
||||
for _, f := range functions {
|
||||
a.Merge(&f.Assembler)
|
||||
}
|
||||
|
||||
code, data := a.Finalize()
|
||||
return code, data
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue