[Dev-luatex] Dump sharing - redundant copying/allocations

Taco Hoekwater taco at bittext.nl
Tue Jul 20 19:56:12 CEST 2021


Hi,

> On 20 Jul 2021, at 18:01, Michal Vlasák <lahcim8 at gmail.com> wrote:
> 
> Hello,
> 
> when NO_DUMP_SHARE is not defined and the system is Little endian, then
> for the possibility of sharing format files between architectures all
> dumped multi-byte valules are byte swapped by the function "swap_items"
> in "tex/texfileio.c".
> 
> The origin of the function is in Web2C's "texmfmp.c" and it seems that
> it was added to LuaTeX in the version 1.08 when the source was converted
> from CWeb (or am I reading the history wrong?).

That code has been around since 2010 (luatex 0.60-ish). I can’t remember
exactly why I did that odd copying to a temp array, but I do remember that 
that particular function was quite problematic w.r.t. endianness and 
(cross)compiler issues (read: bugs, as in “internal compiler error").

Best wishes,
Taco

— 
Taco Hoekwater              E: taco at bittext.nl
genderfluid (all pronouns)





More information about the dev-luatex mailing list