lua-users home
lua-l archive

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


LuaJIT also doesn't have this problems because literals including tables are stored in separate segment of bytecode in different format which doesn't break after 255 elements
On Oct 7, 2023 at 00:29 +0300, Andrey Dobrovolsky <ken@soborka.net>, wrote:
Hi,
I want to propose much better solution of the big nested lists parsing
problem.
The circumstances causing register pool exhaustion may be described as
the list part followed by the next level constructor. The solution may
be very simple and efficient - constructor as the list element must
force storing of already processed list items. Such solution is easy and
discards all the limitations on the nesting depth but "C stack overflow".
The patch for lua-5.4.6 attached.

Original
readelf -s liblua.a | grep constructor
59: 000032b0 670 FUNC LOCAL DEFAULT 7 constructor

Patched
readelf -s liblua.a | grep constructor
59: 000032b0 715 FUNC LOCAL DEFAULT 7 constructor

Best regards!

Andrey Dobrovolsky