3 ms·
This technique is commonly called "tagged pointer" http://en.wikipedia.org/wiki/Tagged_pointer http://en.wikipedia.org/wiki/Tagged_pointer They are commonly u
by ot 15y ago
This technique is commonly called "tagged pointer"
http://en.wikipedia.org/wiki/Tagged_pointer http://en.wikipedia.org/wiki/Tagged_pointer
They are commonly used in interpreter implementations to distinguish between pointers and integers (if the LSB is 0 then the value is a pointer, otherwise (v >> 1) is an integer value)
- sb 15y agoJust for the record and to provide additional references, the technique of reusing a pointer for integer representation is rather old, for example fixnums refer to the same technique in Lisp implementation, IIRC, in Smalltalk this refers to SmallIntegers.