[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Proper Tail Calls Lua 5.2
- From: Derek Bailey <dbaileychess@...>
- Date: Sat, 13 Feb 2016 21:01:04 -0800
If func(x) returns multiple values and you do
return func(x), something_else()
it is going to adjust the func(x) it to a single value.
I am curious if this adjustment happens before or after the call to "something_else". If it gets resolved before, the something_else can be a proper tail call, otherwise it won't be a true tail call because the arguments have to get adjusted and therefore the stack frame must be preserved.