[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Basic questions about Gorm
From: |
David Chisnall |
Subject: |
Re: Basic questions about Gorm |
Date: |
Sat, 9 Apr 2011 10:32:53 +0100 |
On 8 Apr 2011, at 22:24, Ivan Vučica wrote:
> Problem is in the compiler. I think GCC 4.6 introduced Objective-C 2.0
> features. You can try using clang compiler, and you'd probably need to switch
> to libobjc2 runtime; I did not, but your mileage may vary. If you're under
> Debian (which, although it contains a deceptively named package "libobjc2",
> does not include the actual "libobjc2") I have a small blog post about this:
Not quite. GNUstep-base includes a compatibility framework that implements
most of this stuff on top of the old GCC Objective-C runtime. All of the
property-related stuff should work. The additional things you get from
libobjc2 are:
- Property introspection (I think - clang emits this data for both ABIs, so we
can probably add this if it's missing)
- Unique protocols (two protocols returned by @protocol() may give different
sets of methods - this requires a little bit of help from the compiler, not
sure if GCC 4.6 does it)
- Cacheable method lookup (requires support from your compiler's optimiser to
be really useful - currently only implemented as LLVM optimisation passes, so
only useable with clang and LanguageKit)
- Accelerated proxies (-forwardingTargetForSelector: is very cheap)
- Non-fragile ivars (requires a compiler that supports the new ABI, currently
only clang)
- Type-checked method lookup (calls a handler when you call a method with the
wrong signature, by default just logs a message in debug mode or does nothing
in release mode, can throw an exception or generate a fixup method).
David
-- Sent from my Cray X1
Re: Basic questions about Gorm, Riccardo Mottola, 2011/04/08