Moved register state to scopes
This commit is contained in:
parent
3bd5b20af3
commit
545c8dd4f6
22 changed files with 230 additions and 129 deletions
|
@ -12,7 +12,7 @@ func (f *Function) CompileLoop(loop *ast.Loop) error {
|
|||
f.count.loop++
|
||||
label := fmt.Sprintf("%s_loop_%d", f.Name, f.count.loop)
|
||||
f.AddLabel(label)
|
||||
f.pushScope()
|
||||
f.pushScope(loop.Body)
|
||||
err := f.CompileAST(loop.Body)
|
||||
f.popScope()
|
||||
f.Jump(asm.JUMP, label)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue