Moved register state to scopes
This commit is contained in:
@ -34,13 +34,13 @@ func (f *Function) Compare(comparison *expression.Expression) error {
|
||||
return f.Execute(comparison.Token, f.cpu.Output[0], right)
|
||||
}
|
||||
|
||||
tmp := f.cpu.MustFindFree(f.cpu.General)
|
||||
tmp := f.Scope().MustFindFree(f.cpu.General)
|
||||
err := f.ExpressionToRegister(left, tmp)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer f.cpu.Free(tmp)
|
||||
defer f.Scope().Free(tmp)
|
||||
return f.Execute(comparison.Token, tmp, right)
|
||||
}
|
||||
|
Reference in New Issue
Block a user