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:

http://lua-users.org/lists/lua-l/2008-02/msg00243.html

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
end

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,
http://lua-users.org/lists/lua-l/2009-08/msg00051.html

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, http://lua-users.org/lists/lua-l/2009-07/msg00489.html

--
- tom
telliamed@whoopdedo.org