[Top][All Lists]

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

Re: GNUstep Objective-C v2 ABI update

From: Gregory Casamento
Subject: Re: GNUstep Objective-C v2 ABI update
Date: Mon, 31 Dec 2018 19:17:42 -0500


Thank you for the updates...

On Mon, Dec 31, 2018 at 6:34 AM David Chisnall <address@hidden> wrote:
Hello the list,

It seems that Christmas is about the only time I get to work on
Objective-C things these days.  I started the new ABI project two
Christmases ago and this Christmas I've managed to update all of the
FreeBSD GNUstep ports to use it.  As far as I can tell, everything is
working (I've tried running a few GUI apps and everything seemed happy).

A few highlights of the new ABI:

- A new constant string representation, including space to store a hash
and better unicode support.  This should improve performance for
anything that uses constant strings as dictionary keys.  The compiler
will now emit tiny strings (up to 8 ASCII characters) embedded in the

- Better introspection metadata.  We now have full introspection
metadata for properties (including class properties and properties
declared in categories) and the extended type encodings that
_javascript_Core (WebKit) needs for the _javascript_ bridge.

- Significantly reduced redundancy for selectors and protocols.  The
linker can now deduplicate these within a library, so we get (for
example) one copy of the +alloc selector per library, not one per
compilation unit.  This means that we have significantly smaller (5-10%)
binary sizes, even with the richer reflection metadata.

- Protocols and classes are referenced via an indirection layer, so a
future version of the ABI can be backwards compatible.

- @private and @package are now enforced by the linker.  You cannot
refer to a @package or @private ivar from a different library.  This
means that, aside from reflection, @package and @private ivars are not
part of the public ABI and can be removed without breaking any code that
does not use reflection.

The Windows version still has a few rough corners to iron out.  On
Windows, a DLL cannot contain a global initialised to be a pointer to a
global in another library.  This is normally not a bad thing, because it
enforces modularity, but it does mean that Objective-C classes, for
example, can't be statically initialised to point to their superclasses
(though we can emit code that does this).  Dustin has some patches for
clang that should fix these issues.

I've pushed patches to -base to support the new string representation
and to Gorm to make it use reflection instead of directly accessing
ivars in -gui classes.  I also have a patch to Pantomime that prevents
it from doing the same.

I will review the Gorm changes and apply them.  Thank you. 

Yours GC 


Discuss-gnustep mailing list
Gregory Casamento
GNUstep Lead Developer / OLC, Principal Consultant
http://www.gnustep.org - http://heronsperch.blogspot.com

reply via email to

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