gnustep-dev
[Top][All Lists]
Advanced

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

Re: NSSound Reimplementation


From: Richard Frith-Macdonald
Subject: Re: NSSound Reimplementation
Date: Thu, 16 Jul 2009 18:59:46 +0100


On 16 Jul 2009, at 18:00, David Chisnall wrote:

On 16 Jul 2009, at 17:26, Lars Sonchocky-Helldorf wrote:

Maybe it's not clear to everybody what benefits your patch introduces. So maybe it would be a good idea to give a short enumeration of all the gains to the broader public (I know you're good at writing technical articles since I read quite a few off them :-)).

As I wrote in my first email, it provides the same benefits as Apple's non-fragile ABI:

You can add or re-arrange instance variables in a class without breaking the ABI. You can also remove private instance variables. Instance variable offsets are now stored in a global variable, rather than being hard-coded, and are set when the class is loaded by the runtime. This needs a small amount of compiler and runtime support. The runtime support was in the diff I sent to this list, the compiler support is in clang (and hopefully someone will add equivalent support to GCC).

Unlike the Apple implementation, it does not require the superclass to be compiled with the non-fragile ABI, so you can still compile GNUstep with the old ABI and then create subclasses of GNUstep classes compiled with the non-fragile ABI. If you rearrange or add ivars in a GNUstep class, then the subclass will still work correctly, as long as it was compiled with -fnonfragile-abi.

One thing I don't understand about the whole issue of adding ivars is how it is supposed to work with key value coding since, in KVC you can get/set the value of an ivar by name, but with non-fragile ivars you can presumably have multiple ivars with the same name. What does KVC do in that situation?




reply via email to

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