[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: poll on luac
- From: Kein-Hong Man <mkh@...>
- Date: Sat, 04 Jun 2005 10:39:24 +0800
Luiz Henrique de Figueiredo wrote:
[snip]
I'm convinced that the best route to byte order or cross-compiling is
third-party dump/undump pairs. The files ldump.c and lundump.c are
completely replaceable; they export a single, well-defined, entry point.
The format of precompiled chunks is not sacred at all; you can use any
format, as long as ldump.c and lundump.c agree about it. (For instance,
Rici Lake is considering writing a text format for precompiled chunks.)
For the Lua core, I prefer a simple and fast one. For cross-compiling,
it should be simple to change ldump.c for instance. We just have to wait
till someone writes it and makes it available.
It doesn't appear to be that trivial. Here is my list:
(a) change values of some opcodes, operand encoding order,
encoding of RK
(b) LFIELDS_PER_FLUSH has changed, so I believe table
initialization code will need fixing
(c) the meaning of OP_SETLIST changed, and OP_SETLISTO's
functionality has been folded into OP_SETLIST
(d) OP_NEWTABLE's hash operand need to be recalculated
(e) optionally add OP_FORPREP to replace the subtract stuff
(f) take out OP_TFORPREP and warn the user
(g) not sure if I need to do anything with OP_VARARG...
(h) various changes to binary chunk header format (chunk header,
prototype header), warnings and checks for non-standard sizes
I currently maintain 5.0.2 and 5.1wk binary chunk disassemblers
separately; good cross compiling between them will definitely need
a bit of work...
--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia