lua-users home
lua-l archive

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


Vyacheslav Egorov wrote:
[snip]
"Given Metalua is written IN Lua (to my knowledge) - should it be used by
LuaJIT-2, will it use the new byte-codes automatically or does it have them
defined as constants that would need to be changed/altered?"

The answer is no: even if Lua JIT had bytecode frontend, metalua would
not be able to adapt itself automatically. Metalua inherited it's
backend from Yueliang which is just rewrite of several modules
(lcode.c, ldump.c) from C into pure Lua. When this modules change in
original Lua sources, metalua backend must be changed to accommodate
it.

IIRC, I don't think Metalua has any constraints, beyond where the author wants to take it.

Yueliang's constraint is an artificial one in order to have convenient roughly-one-to-one correspondence as an academic toy. Thus Yueliang intentionally does not do anything much beyond being a mimic, while Fabien is taking Metalua in many interesting directions.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia