Improved code generation
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user