[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: OP_TAILCALL versus OP_CALL question
- From: Dibyendu Majumdar <mobile@...>
- Date: Fri, 20 Mar 2015 22:25:52 +0000
On 20 March 2015 at 22:16, Doug Currie <firstname.lastname@example.org> wrote:
>> I haven't yet figured out how to properly implement OP_TAILCALL in a
>> JITed function.
> The usual approach is to emit code to pop the stack frame and convert the
> tail call to a jump.
In the recursive case, yes, but Lua also uses tail calls for
non-recursive scenarios. For these a different function may be called
so it is not possible to handle this in a JITed function - without
replacing the function being executed as well.