2 ms·
Apple's been using that for more than a decade: https://www.mikeash.com/pyblog/friday-qa-2012-07-27-lets-build-tagged-pointers.html https://www.mikeash.com/pybl
by masklinn 2y ago
Apple's been using that for more than a decade: https://www.mikeash.com/pyblog/friday-qa-2012-07-27-lets-build-tagged-pointers.html https://www.mikeash.com/pyblog/friday-qa-2012-07-27-lets-bui... http://www.sealiesoftware.com/blog/archive/2013/09/24/objc_explain_Non-pointer_isa.html http://www.sealiesoftware.com/blog/archive/2013/09/24/objc_e...
OCaml's also been using tagging to mark unboxed type pretty much from the start, nearly 30 years ago: https://dev.realworldocaml.org/runtime-memory-layout.html#:~:text=OCaml%20values%20don't%20all,the%20block%20word%20is%20zero https://dev.realworldocaml.org/runtime-memory-layout.html#:~....
- duskwuff 2y agoAnd it's not like Apple isn't aware of the dangers, either; they used top-byte tagging on the 68000, and it took them a lot of time and effort to migrate away from that to support 16+ MB systems.
- gpderetta 2y agoIIRC the issue was that 68000 would transparently mask the top bits, so code could get away with avoiding the explicit masking, which of course breaks when you move to a larger address space. More modern cpus enforce specific bit patterns for the MSBs, so broken code would be caught immediately.