Thursday, November 24, 2011

GNUstep Objective-C Runtime 1.6 Released

GNUstep Objective-C Runtime 1.6 features:
  • Compatibility with the new runtime APIs introduced with Mac OS X 10.7 / iOS 5.
  • Support for small objects (ones hidden inside a pointer). On 32-bit systems, the runtime permits one small object class, on 64-bit systems it permits 4. This is used by GNUstep for small NSNumber and NSString instances, and these are used by LanguageKit for message sending to small integers.
  • Support for prototype-style object orientation. You can now add methods, as well as associated references, to individual objects, and clone them. The runtime now supports everything required for the JavaScript object model, including the ability to use blocks as methods on x86, x86-64 and ARM.
  • Support for Apple-compatible objc_msgSend() functions for x86, x86-64, and ARM. Using these approximately halves the cost of message sending operations and results in a 10% smaller total binary size.
  • A fully maintained POSIX Makefile to make bootstrapping builds and packaging easier. This will be used automatically if GNUstep Make is not installed.
  • Improvements to the included LLVM optimisation passes. Testing on a 2.8GHz Xeon, a loop of 200,000,000 class messages took 0.8 seconds with all optimisations enabled (including speculative inlining). With -Os, the test took 2 seconds. With explicit IMP caching in the source code, the test took 1.2 seconds. For reference, the same test using the GCC Objective-C runtime took 11 seconds (when compiled with either Clang/LLVM or GCC).

Wednesday, July 20, 2011

GNUstep Objective-C Runtime 1.5 Released

This runtime was designed to support the features of Objective-C 2 for use with GNUstep and other Objective-C programs. Highlights of this release include:

  • Support for Apple-compatible garbage collection APIs, along with extensions to support CoreFoundation-style explicit reference counting in a garbage collected environment. This uses the Boehm garbage collector and is enabled by specifying boehm_gc=yes when building. This requires version 7.1 or later of libgc. Code compiled with -fobjc-gc can be mixed with code that implements normal reference counting and with code compiled with -fobjc-gc-only. The runtime supports both GC and non-GC code when compiled with GC support and will automatically select the correct behavior depending on the loaded code.

  • The runtime will now use Boehm GC for several internal data structures, if it is built with GC enabled. This avoids the need for defensive programming with respect to thread safety in several places.

  • This is the first release to provide a superset of the functionality provided by the Mac Objective-C runtime, as shipped with OS X 10.6.

  • Full support for Automatic Reference Counting (ARC), compatible with OS X 10.7 and iOS 5, including support for __weak references.

  • The LLVM optimisation passes have been improved and better tested. Code compiled with them now passes the EtoileFoundation test suite.