lua-users home
lua-l archive

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


> can the luaC function interfaces be configured with const data
> structures instead of having to be constructed at startup in ram
> structures?

If you mean lundump.c, then this has been on my wish list for as long as
I can remember. I think it can be done without much effort for bytecode
and line information: one only needs to add a flag somewhere to make
the garbage collector ignore those parts. Strings are a different problem
because Lua stores them internally in a block that contains other data
before the string data. So, strings would have to be copied. I'm not sure
whether this partial solution would give the savings you're after.

Another possibility is to rewrite the precompiled format to be closer to
the internal structs. This may work for better savings but the string
problem will remain unless the format includes header data for strings.

Bottom line: it can probably be done without too much work but it's not
something that can be simply "configured".
--lhf