That exists already in Lion with NSNumber objects: some types of pointers to NSNumbers actually use the low bits of the pointer to indicate the type and the rest of the pointer to pack the value; resulting in not needing to actually allocate an object off the heap (which is why direct isa access was depreciated). Given that objects must be 16-byte aligned - and that alignment requirement isn't likely to go down, but rather up in the future; using the low bits doesn't really cause the same issue that using the high bits did.
Oh, and it bit the Mac too - anybody remember the Mode32 extension from the System 7 era? More info can be found here: http://objectivistc.tumblr.com/post/7872364181/tagged-pointers-and-fast-pathed-cfnumber-integers-in On Aug 14, 2012, at 12:09 AM, Vincent Habchi <vi...@macports.org> wrote: > Le 13 août 2012, à 23:47, Mike Abdullah <cocoa...@mikeabdullah.net> scripsit: > >> An idea I've vaguely wondered about would be turning the isa variable into a >> tagged pointer. If you know nothing is accessing it directly (to do so was >> deprecated with the modern runtime), then, say, the last 4 bits of the >> pointer could be used to record the retain count. Once they're used up (for >> those rare, highly retained > > Using part of pointer to do something else than record an address is > perilous. I remember, once again in the old days of the 68000 on the Atari > ST, which had a 24-bit external address bus (and not 20 as I wrote before on > some other thread), and 32-bit internal address registers, some developers > had figured out to use the MSB (unused) of these address registers (pointers) > to store extra information. Now, two years later the 68020 with full 32-bit > external address bus was released, and suddenly all the code relying on that > trick broke on the TT and later machines… > > Vincent > > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/bdurbrow%40rattlesnakehillsoftworks.com > > This email sent to bdurb...@rattlesnakehillsoftworks.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com