Improved label consistency
This commit is contained in:
parent
a8d15a4305
commit
1268344238
11 changed files with 36 additions and 31 deletions
|
@ -1,8 +1,6 @@
|
|||
package core
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.akyoto.dev/cli/q/src/asm"
|
||||
"git.akyoto.dev/cli/q/src/ast"
|
||||
"git.akyoto.dev/cli/q/src/cpu"
|
||||
|
@ -19,8 +17,8 @@ func (f *Function) CompileFor(loop *ast.For) error {
|
|||
f.count.loop++
|
||||
|
||||
var (
|
||||
label = fmt.Sprintf("%s_loop_%d", f.UniqueName, f.count.loop)
|
||||
labelEnd = fmt.Sprintf("%s_loop_%d_end", f.UniqueName, f.count.loop)
|
||||
label = f.CreateLabel("for", f.count.loop)
|
||||
labelEnd = f.CreateLabel("for end", f.count.loop)
|
||||
counter cpu.Register
|
||||
from *expression.Expression
|
||||
to *expression.Expression
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue