lua-users home
lua-l archive

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


>In note that lua2c is marked as lua5 methinks it is
>still lua4, which begs the question whether lhf might
>one day do a lua 5 version?

I hope so, because lua2c is by far the most popular of my Lua tools.

Unfortunately, converting the register-based bytecode emitted by Lua 5 to C
is not as easy as converting the stack-based bytecode emitted by Lua 4.
lua2c was simple for Lua 4 because C uses a stack-based API to talk to Lua.

On the other hand, the C API hasn't changed that much from 4 to 5 and so the
current lua2c still emits useful code, code that works for Lua 5, in many if
not most cases. Of course, you still need luac from Lua 4 and you may have to
edit some of the emitted code, but I think the current lua2c is still useful
and still shines in code fragments, such as
	a = b[i].name

I'm very much interested in having a lua2c for Lua 5 but I couldn't find the
time to look into it carefully. I'll try to find the time...
--lhf