lua-users home
lua-l archive

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

Axel Kittenberger <> writes:
> 2011/2/23 Yura Sokolov <>:
>> I just made patch for NaN packing of TValue on x86 machines (as in luajit2).
> Can you say in simple words what "NaN packing of TValues" means?

TValue is the C type Lua uses to hold values.

Normally it consists of a tag field and a union of the various C types
that a Lua value can contain, but LuaJIT uses only a single double,
encoding non-number values as NaNs (a consequence of this is that no
64-bit type except for doubles can be represented exactly, so LuaJIT can
only use part of the address space on 64-bit machines, etc).


Optimist, n. A proponent of the doctrine that black is white.