lua-users home
lua-l archive

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

Joshua Jensen wrote:
>> The parser stores all constant key/value pairs into a lazily
>> allocated template table. It only emits store instructions for
>> variable keys or values. If a template table has been created,
>> it's put into the constant section. The table creation instruction
>> TNEW is then patched to the table duplication instruction TDUP.
> I run into the table size problem often enough to be annoying.  Is it  
> possible to apply your work in LJ2 as a standard Lua 5.1 patch?

Not easily. You'd first need to modify the whole parser and code
generator to add lazy constifying of string literals (VKSTR, like
VKNUM). Otherwise all parsed strings end up in the constant pool
which sort of defeats the whole idea.