[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Disabling tail calls
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 30 Sep 2010 14:25:10 -0300
> My current solution is to have a patched lua interpreter/compiler at hand with
> a small modification to treat OP_TAILCALL simply as OP_CALL
Isn't it enough to disable the line below in retstat (lparser.c:1251)?
This prevents the parser from generating tail calls.
If you have precompiled code that uses tail calls, then you'll probably
have to delete the whole case OP_TAILCALL in lvm.c and have OP_TAILCALL
be handled by OP_CALL.