[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [Suggestion] Embed bytecode in source code
- From: Tim Hill <drtimhill@...>
- Date: Tue, 3 Nov 2015 21:46:52 -0800
> On Nov 3, 2015, at 8:43 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
>
> 2015-11-04 3:53 GMT+02:00 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
>>> Isn't Lua bytecode platform-agnostic?
>>
>> Not at all. It is very platform dependent.
>
> At the top of a binary chunk appears information about the platform,
> e.g. endianness, sizes of various integer types and so on. Would it
> be possible to write a cross-recompiler exploiting Lua 5.3's string
> pack/unpack that would convert bytecode for the same Lua version
> from one architecture to another?
>
+1. We have done that in-house, but I dislike creating something that uses knowledge of undocumented internals and that we will certainly have to update as new versions of Lua are released.
—Tim