Fixed variable lifetime in loops
This commit is contained in:
@ -51,6 +51,10 @@ func (f *Function) CompileCall(root *expression.Expression) error {
|
||||
f.Call(funcName)
|
||||
}
|
||||
|
||||
for _, register := range registers {
|
||||
f.Scope().Free(register)
|
||||
}
|
||||
|
||||
// Pop
|
||||
for i := len(f.cpu.General) - 1; i >= 0; i-- {
|
||||
register := f.cpu.General[i]
|
||||
|
Reference in New Issue
Block a user