[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: endianness of lua bytecode?
- From: Fabio Mascarenhas <mascarenhas@...>
- Date: Mon, 1 Nov 2004 20:32:51 -0200
Yes, the loader corrects for endianess, you can dump in a big endian
and load in a little endian machine, and vice-versa. There can be
other issues, though. The loader will complain if the sizes of int,
size_t, double, and the VM instructions are different, and fail. Lua
bytecodes are not supposed to be cross-platform.
--
Fabio
On Mon, 1 Nov 2004 13:54:09 -0800, Ando Sonenblick <ando@spritec.com> wrote:
> Fabio,
>
> thx for the insight. So, if the endianness of the byte code dump is
> stored within the dump does that mean that I can take the bytecode that
> was "compiled" from text on a little endian machine, save it to disk,
> then load it on a machine that is big endian and run the dump and lua
> will properly notice the endianness mismatch and byte swap as
> necessary?
>
> Or can you simply not take byte code from one endian machine onto an
> opposite endian machine?
>
> thx,
> ando
>