Re: Question about SETFIELD nil emission in table constructor codegen
'Bernard L'île' via lua-l <[email protected]>
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <[email protected]> |
Concerning literal tables, I've always asked myself why the compiler does not build table literals with only constant members at compile time and stores them in a constant pool, as it already does for strings and scalars. As a further optimizations, table literals with variable components *could* (but need not) be built at compile time and then augmented with setfield opcodes to fill in the variable parts. bil til schrieb am Samstag, 28. Februar 2026 um 09:44:50 UTC+1: > Am Sa., 28. Feb. 2026 um 03:24 Uhr schrieb 重归混沌 <[email protected]>: > > > > for constructor fields that are statically unique and explicitly nil, is > there any specific semantic reason these SETFIELD instructions must still > be emitted? Or is this mainly a > > Lua compiler generally is NOT optimizing in any way... . > > ... the code is in full programmer control (and responsibility :) ). > -- You received this message because you are subscribed to the Google Groups "lua-l" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/lua-l/52ddf9da-3cbe-4319-a5ee-13a7ae11290en%40googlegroups.com.