lua-users home
lua-l archive

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


> I also don't understand why LOADK can load boolean values (taking up a
> slot in the constant table in the process) when LOADBOOL exists

Lua never generates LOADK for a boolean value; it uses LOADBOOL.
However, the presence of booleans in the 'k' array allows some simple
optimizations, such as the use of a single opcode for things like
a[true] = 10  or  a[i] = false.

-- Roberto