lua-users home
lua-l archive

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


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

-- 
--__-__-____------_--_-_-_-___-___-____-_--_-___--____
Doug Rogers - ICI - V:703.893.2007x220 www.innocon.com
-_-_--_------____-_-_-___-_--___-_-___-_-_---_--_-__-_