by malkia · 16y ago · 0 comments
quoting http://article.gmane.org/gmane.comp.lang.lua.general/58908
- NaN-tagging: 64 bit tagged values are used for stack slots and table slots. Unboxed floating-point numbers (doubles) are overlayed with tagged object references. The latter can be distinguished from numbers via the use of special NaNs as tags. It's a remote descendant of pointer-tagging.
[The idea dates back to 2006, but I haven't disclosed it before
2008. Special NaNs have been used to overlay pointers before.
Others have used it for tagging later on. The specific layout is
of my own devising.]