[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Stack traces with tail calls: disabling tail recursion?
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 26 Feb 2014 11:18:35 +0200
On Wed, Feb 26, 2014 at 10:53 AM, Thijs Schreijer
> Some preprocessor magic could do the trick I think.
True, but it is intrusive. If the task is to modify code that leads
to tail recursion, it becomes a parsing job (lexical substitution like
LuaMacro won't do the job)
Actually, original idea of modifying Lua to emit plain return opcodes
seems the best, esp. if it could be done optionally by a switch.
Would this effect program semantics in any other way, apart from
potential stack overflows?