lua-users home
lua-l archive

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

On 02/24/2011 06:24 PM, Joshua Jensen wrote:

It is found here:

I was experimenting with it the other day and noticed the following code
crashes inside lparser.c:

function Func()
running = true; finalize running = false end
if running then return false end
return Idle_loop() -- Tail call

The patch doesn't look like it uses the OP_TAILCALL instruction at all,
missing out on valuable savings.

Does anyone have an update or even a better way to do this? It doesn't
appear to be exactly efficient. I'd love to find a patch that just does
injection of the code in this manner:

Did you see the the later thread on RAII,

I think that was the patch I eventually used. Somewhere in that thread I also worked out a pure Lua solution that may suit your needs. Found it, at the end of this message,

- tom