[Openmcl-devel] ns-date initializers on OSX 10.8
Gary Byers
gb at clozure.com
Sat Jan 5 11:23:23 PST 2013
As you may or may not recall, Apple invented tagging within the last year.
Most NSObjects are represented as an aligned pointer (the low N bits
are 0, where N=4 IIRC) whose first word is an ObjC class or metaclass
object; with 10.8, they started representing some kinds of NSNumber
instances as immediate objects where the low nibble was some
distinguished non-zero value (that meant "some kind of NSNumber instance)
and the upper 60 bits or so contained some immediate value and possibly some
other type info. I'm fairly sure that I looked and found that as of 10.8 only
one of the ~15 available values was used (for this NSNumber case.)
That (using "low tags" to represent immutable objects) is a reasonable
thing to do; I somehow missed the memo where they announced that such a change
was forthcoming but managed to get support for this change into CCL before the
10.8 release. (Or maybe just a little after.)
Your followup message suggested that this may have just been some sort of artifact,
but it's possible that Apple has decided that at least some kinds of NSDate could
also benefit from an immediate representation. (If so, the memo's late again.)
I don't see this as of 10.8.2.
On Sat, 5 Jan 2013, Paul Krueger wrote:
> When I try to create ns:ns-date objects in CCL (1.9-dev-r15559M-trunk (DarwinX8664)) while running on OSX 10.8 I get the following:
>
> ? (#/init (#/alloc ns:ns-date))
> #<A Foreign Pointer #x41B69891A426BEFD> <=== Not recognized as an ns-date instance
> ? (#/init (#/alloc ns:ns-object))
> #<NS-OBJECT [uninitialized] (#x25EDA860)>
>
> All ns:ns-date initializers also return macptrs that CCL doesn't recognize as instances of ns-date or any other type of ns-object.
>
> If I pass a pointer created by any ns-date initializer to an interface object that is expecting an ns-date object, it seems to take it and display it correctly. I just can't interact with that object in Lisp. So for example if it is changed in the interface and I get it back, I can't tell what was changed.
>
> Is this because I'm running on a 10.8 system with an objective-c bridge for 10.6 or is something else going on? This isn't new functionality since 10.6, but did something internally change that screwed things up? This is the first class where I've run into this problem.
>
> Recommendations?
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>
More information about the Openmcl-devel
mailing list