- Don't call C++ constructors if they don't exist.
- Don't check the owner of retain / release methods if they are not implemented.
- Add arc.m as a file to ignore when checking for GC compatibility.
Weak references are still not supported, but code that doesn't use them (i.e. any code that wants to be compatible with OS X 10.6) will work fine.
The current implementation is VERY inefficient and has a large number of missed optimisation opportunities: this is the 'make it right' phase, and should be almost equivalent to explicit retain / release code.
- __strong pointers, preventing objects from being freed
_ __weak pointers are automatically freed when the last remaining __strong pointer goes away
- objc_gc_{retain,release}_np() functions, which can be used to implement CFRetain() and CFRelease() (adds an reference count - the object will not be collected until after its last retain is gone.
objc_resolve_class() does ((Class)objc_getClass((char*)cls->isa->isa))->isa;
but cls->isa->isa was a metaclass object and not a C string if the class was
user-created. objc_allocateClassPair() has been changed to set the
meta-metaclass as a C string and not an object, so that objc_getClass() does
not return Nil.
As a side-effect of this change, method lookups for introspection are now much faster. They use the slot lookup mechanism to find which class has the method declared and then only need to do the linear search on that class, rather than doing the linear search on the entire hierarchy (slow!). If the method is not present, then they can give up after two memory accesses, rather than after searching a few hundred list entries, but that's a less important case.
I also noticed while tracking down this bug that the implementation of methodSignatureForSelector in GNUstep is very inefficient. I'll tweak that next.
Removed GNU dtable and sparse array implementations, replaced entirely now with versions based on the Étoilé runtime. Performance is roughly equivalent in microbenchmarks, memory usage is significantly lower (Gorm goes from 95MB to 50MB on my machine - this will be even more pronounced on 64-bit systems), which should improve cache usage considerably. Still room for some performance tuning, however.
Imported selector table code frm the Étoilé runtime. We can now make dispatch type dependent with a -D switch. Not enabled yet, but it will be enabled in a warning mode soon - I consider preferable to the existing GNU and Apple solution of corrupting the stack.