Improved code generation
This commit is contained in:
parent
6e22febc01
commit
3c189a025f
23 changed files with 201 additions and 95 deletions
|
@ -3,7 +3,6 @@ package core
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"git.akyoto.dev/cli/q/src/build/asm"
|
||||
"git.akyoto.dev/cli/q/src/build/ast"
|
||||
)
|
||||
|
||||
|
@ -17,8 +16,8 @@ func (f *Function) CompileIf(branch *ast.If) error {
|
|||
return err
|
||||
}
|
||||
|
||||
f.assembler.Label(asm.LABEL, success)
|
||||
defer f.assembler.Label(asm.LABEL, fail)
|
||||
f.AddLabel(success)
|
||||
defer f.AddLabel(fail)
|
||||
f.count.branch++
|
||||
return f.CompileAST(branch.Body)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue