On Tue, Nov 3, 2009 at 2:53 AM, Alexander Gladysh <email@example.com>
I would be interested in LuaJIT-compatible backend for Metalua. This
is, indeed, a way to rule, if not the whole world, but at least quite
a part of it! ;-)
There are some bytecode changes due for Lua 5.2 anyway, so that will be the occasion to go back to bytecode generator issues.
Generating sources would have it limits: a couple of Metalua constructs don't exist in Lua, and fixing line numbers in tracebacks would be tricky (they should be in sync with the Metalua source, not with an hypothetical plain Lua intermediate representation).
The "proper" way would probably be to fork a LuaJIT version with a dedicated interface, but it won't be trivial: I guess LuaJIT expects some sort of regularity in jumps (such as "no jumps from outside to inside a block"), and statements-in-an-_expression_-context violate a couple of Lua invariants.