Fixed inconsistent lifetimes

This commit is contained in:
Eduard Urbach 2025-02-28 19:37:06 +01:00
parent efecfc3b7c
commit 6fef3bccf6
Signed by: eduard
GPG key ID: 49226B848C78F6C8
10 changed files with 41 additions and 37 deletions

View file

@ -3,7 +3,6 @@ package core
import (
"encoding/binary"
"git.urbach.dev/cli/q/src/asm"
"git.urbach.dev/cli/q/src/errors"
"git.urbach.dev/cli/q/src/eval"
"git.urbach.dev/cli/q/src/token"
@ -38,20 +37,7 @@ func (f *Function) EvaluateToken(t token.Token) (eval.Value, error) {
if variable != nil {
f.UseVariable(variable)
if variable.Value.Alive == 0 {
return variable.Value, nil
}
tmp := f.NewRegister()
f.RegisterRegister(asm.MOVE, tmp, variable.Value.Register)
value := eval.Register{
Typ: variable.Value.Typ,
Register: tmp,
}
return value, nil
return variable.Value, nil
}
if function != nil {