Removed outdated code
This commit is contained in:
parent
e951170423
commit
ef11656e47
@ -1,27 +0,0 @@
|
|||||||
package output
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"git.akyoto.dev/cli/q/src/build"
|
|
||||||
"git.akyoto.dev/cli/q/src/build/token"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Compiler implements the arch.Output interface.
|
|
||||||
type Compiler struct{}
|
|
||||||
|
|
||||||
// Compile turns a function into machine code.
|
|
||||||
func (c Compiler) Compile(f *build.Function) {
|
|
||||||
for i, t := range f.Body {
|
|
||||||
if t.Kind == token.Identifier && t.Text() == "print" {
|
|
||||||
// message := f.Body[i+2].Bytes
|
|
||||||
// f.Assembler.MoveRegisterNumber(x64.SyscallNumber, linux.Write)
|
|
||||||
// f.Assembler.MoveRegisterNumber(x64.SyscallArgs[0], 1)
|
|
||||||
// f.Assembler.MoveRegisterData(x64.SyscallArgs[1], message)
|
|
||||||
// f.Assembler.MoveRegisterNumber(x64.SyscallArgs[2], uint64(len(message)))
|
|
||||||
// f.Assembler.Syscall()
|
|
||||||
message := f.Body[i+2].Bytes
|
|
||||||
fmt.Println(message)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user