lua-users home
lua-l archive

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

> I don't like much the idea of a "compilation mode" that would affect
> the way tail calls are compiled.

Me neither. The pseudo-patch I outlined is a runtime mode, with no
visibility in a Lua program; the idea was that if you were desperate,
you could get a hypothetical debugger to disable tail calls and then
you could see the call history. Whether or not it would help you would
be a different question.

You would want to be cautious because it would change the way, for 
getfenv and setfenv work. But I think those are problematic anyway (and
for precisely the reason that counting activation records is incompatible
with tail call optimization.)