discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] Header organization of -base & -gui


From: Lars Sonchocky-Helldorf
Subject: Re: [RFC] Header organization of -base & -gui
Date: Thu, 3 Jul 2003 20:06:33 +0200

On 03.07.2003 18:45:28 David Ayers wrote:
>Markus Hitter wrote:
>
>> Am Donnerstag, 03.07.03 um 15:43 Uhr schrieb David Ayers:
>>
>>> what's the real value of apple-gnu?
>>
>> - using GNUstep functionality without installing another runtime.
>
>Hmm, I though both would be available, but hey, that's another good 
reason.
>
>> - NeXT/Apple runtime is known/believed to perform better than GNU
>> runtime.
>
>I've heard the opposite, but that's irrelevant now.
>
>> - unfortunately, several people tried hard to make it work, but failed
>> for now.
>
>Could you describe what's going wrong?  Is there a bug filed for this?
>Or even better, if you have an FSF assignment, figure out what's wrong
>an post a patch ;-) ?

It has something to do with the class and method cache of the Apple 
runtime, specifically with the function _class_lookupMethodAndLoadCache () in 
it. This function is looking up in a cache if a class is already loaded. If 
not it sends it (or its superclass a initialize message. If then again there is 
any objc message send in the initialize method, the cache will be looked up 
again nad because the class is not 
loaded you'll end up in an infinite loop. You can see how this works if 
you download the objc4 project from Apple 
(http://www.opensource.apple.com/darwinsource/tarballs/10.2.6/apsl/objc4.tar.gz,
 you must be registered for this, but registration is free and Apple 
doesn't spam you) and have a look at /objc4/runtime/objc-class.m

You can also have a look at 
http://groups.google.com/groups?selm=DD750B82-9918-11D6-B3A3-0030654C2998%40hamburg.de&output=gplain
 
if you want to get an idea where I got stuck (darn makefiles :-[ )

This boils down to: Don't send objc messages in initialize if you want to use 
the Apple runtime.

>
>Cheers,
>David
>
>

greetings, Lars




reply via email to

[Prev in Thread] Current Thread [Next in Thread]