Improved performance

This commit is contained in:
Eduard Urbach 2024-08-02 11:41:21 +02:00
parent c67056d405
commit 270e7e27a0
Signed by: eduard
GPG key ID: 49226B848C78F6C8
11 changed files with 29 additions and 32 deletions

View file

@ -10,7 +10,7 @@ import (
// CompileLoop compiles a loop instruction.
func (f *Function) CompileLoop(loop *ast.Loop) error {
f.count.loop++
label := fmt.Sprintf("%s_loop_%d", f.Name, f.count.loop)
label := fmt.Sprintf("%s_loop_%d", f.UniqueName, f.count.loop)
f.AddLabel(label)
scope := f.PushScope(loop.Body, f.File.Bytes)
scope.InLoop = true