Reordered counters
This commit is contained in:
@ -8,6 +8,7 @@ import (
|
||||
|
||||
// CompileIf compiles a branch instruction.
|
||||
func (f *Function) CompileIf(branch *ast.If) error {
|
||||
f.count.branch++
|
||||
success := fmt.Sprintf("%s_if_%d_true", f.Name, f.count.branch)
|
||||
fail := fmt.Sprintf("%s_if_%d_false", f.Name, f.count.branch)
|
||||
err := f.CompileCondition(branch.Condition, success, fail)
|
||||
@ -16,7 +17,6 @@ func (f *Function) CompileIf(branch *ast.If) error {
|
||||
return err
|
||||
}
|
||||
|
||||
f.count.branch++
|
||||
f.AddLabel(success)
|
||||
f.pushScope()
|
||||
err = f.CompileAST(branch.Body)
|
||||
|
Reference in New Issue
Block a user