[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Tail-call regression from Lua 5.3 to 5.4
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 29 Aug 2023 12:54:44 -0300
> Wouldn't it be possible to allow tail-calls if a to-be-closed variable
> is set to nil? Or does this introduce other runtime overhead?
Tail calls are created at compile time, but Lua only knows whether
a to-be-closed variable is nil at run time. Maybe we could create
some kind of "conditional tail call" instruction that checks at
run time whether it could do the tail call, but I don't think that
it is worth the complexity.
-- Roberto