[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua bytecodes and endian-ness
- From: Doug Rogers <rogers@...>
- Date: Mon, 12 Jun 2006 09:32:48 -0400
D Burgess wrote:
> Is it also possible to make the bytecode either independent
> or cross-compilable for sizeof(lua_Integer)?
Originally I held the same opinion, but now I acknowledge that the
problem is more difficult than just endianness. Even floating point
representations might differ (Alpha supports both IEEE and VAX floating
point!). So... for which platforms will the SEALs (Supreme and Esteemed
Authors of Lua) provide this universal bytecode dumping and loading?
In my own embedded target arena, a universal bytecode format would be
very beneficial since I could then exclude the parser. But embedded
targets are also the ones that require the most varied implementations
of the loader. Let those implementations modify lundump.c to their own
benefit, rather than force the SEALs to maintain packing and unpacking
code for a bunch of implementations. More powerful platforms could load
strings (perhaps compressed) and compile them. A weakly keyed table
could be used to map the string representation with the compiled chunk.
As usual there are lots of options, many already discussed.
I have chosen to include the parser, even though it chews up a lot of
precious FLASH. That allows me to run the Lua interpreter directly
through the serial port.
Doug Rogers - ICI - V:703.893.2007x220 www.innocon.com