Commit Graph

14 Commits

Author SHA1 Message Date
theraven
f3d2b7034c Small object + ARC tweaks. 2011-07-26 17:56:37 +00:00
theraven
2288ff54e3 Don't try to enable GC in ARC mode. 2011-07-26 17:42:22 +00:00
theraven
7b6ba21ce5 Small bug fixes:
- 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.
2011-07-04 11:28:33 +00:00
theraven
d1199844cb Lock the GC mode once something has queried it. All of the GNUstep code that
does run-time detection of whether to use GC calls objc_collecting_enabled()
(sometimes indirectly, via NSGarbageCollector) to see if we're in GC mode.
After any of these calls, it is not safe to switch modes.
2011-05-28 15:10:03 +00:00
theraven
fe5d1b892a Tweak GC check, make sure GC_init() is called even when ObjC code isn't using GC (stuff internal to the runtime may be) 2011-05-28 14:38:02 +00:00
theraven
3508ab6ccf Fixed ABI compatibility test. 2011-05-26 14:24:36 +00:00
theraven
e05c9c2ff5 More GC fixes 2011-05-26 13:28:31 +00:00
theraven
ae4eea1597 Some bug fixes for GC mode. 2011-05-25 10:09:13 +00:00
theraven
22c20eb930 Removed spurious debugging line. Removed left-over check that stopped GC_Optional modules from enabling the GC. 2011-05-24 13:40:51 +00:00
theraven
444688895a Updated Makefile to compile correctly again.
Added a really ugly hack so that the ABI versions of the three .m files are not checked.  This will (hopefully!) prevent the GC being enabled when libobjc is loaded after being compiled with -fobjc-gc.
2011-05-24 09:44:13 +00:00
theraven
929f8f95b4 Improved a few GC functions.
Added objc-auto.h header, providing (documented) public interfaces to this
functionality.
2011-05-23 11:11:51 +00:00
theraven
ad16172625 First pass at implementing Apple-compatible GC using Boehm. Still needs some tidying, but the following work:
- __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.
2011-05-22 23:02:04 +00:00
theraven
6c7cf4a5a6 Add visibility attributes on all internal functions so that we aren't ever exporting them outside of libobjc. 2011-04-14 12:25:17 +00:00
theraven
7c72069fd9 Rewrote ABI compatibility testing. Makes it easier to define new, incompatible ABIs in future without breaking everything. 2010-06-02 13:18:24 +00:00