lua-users home
lua-l archive

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

Mike Pall wrote:

Roberto Ierusalimschy wrote:
is there a limitation in luac?

luac: constant table overflow

(some 140.000 table entries)
There is a limitation (both in luac and lua), but it
should be almost twice this size (2^18)...

He's probably using key = "value" pairs (two constants per entry). :-)

indeed, basically a "return { key1=value1, ... }"

[To clarify: it's a limit on the number of constants for the code of a
single function, which in turn limits the size of a single table
constructor. There's no limit (other than memory) for the number of
elements in a table. Gigabyte-sized tables get a bit unwieldy, though.]

is there a reason for this limitation?