lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 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