Commit graph

278 commits

Author SHA1 Message Date
David Chisnall
0409dd3080 Some cleanup of NSObject. Call runtime functions, rather than duplicate their implementation, and only conditionally call some non-portable functions.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30597 72102866-910b-0410-8b05-ffd578937521
2010-06-07 02:50:40 +00:00
Richard Frith-MacDonald
2edc03af19 OpenBSD fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30489 72102866-910b-0410-8b05-ffd578937521
2010-05-30 16:06:04 +00:00
Wolfgang Lux
2057a4b58f Use local labels in PowerPC assembler code of GSAtomic{In,De}crement
to avoid a compile error when this code is inlined more than once. In
addition, use the optimized assembler definitions also on PowerPC
machines running Darwin/Mac OS X.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30239 72102866-910b-0410-8b05-ffd578937521
2010-04-26 21:32:22 +00:00
Richard Frith-MacDonald
d365d287cf improve documentation ... really runtime features but we don't have dos for that
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30125 72102866-910b-0410-8b05-ffd578937521
2010-04-12 11:19:08 +00:00
Riccardo Mottola
cb4c554422 Atomic increment and decrement functions for mips
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30020 72102866-910b-0410-8b05-ffd578937521
2010-03-23 00:03:21 +00:00
Richard Frith-MacDonald
f784646663 generalize define from __MINGW32__ to __MINGW__
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30001 72102866-910b-0410-8b05-ffd578937521
2010-03-19 12:10:11 +00:00
Richard Frith-MacDonald
42db2fdf50 Improve debug
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29874 72102866-910b-0410-8b05-ffd578937521
2010-03-08 09:27:48 +00:00
Richard Frith-MacDonald
39fc4419b0 further cleanup ... always use -zone method to get an object's zone ...
so people can safely write subclasses using different allocation schemes.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29847 72102866-910b-0410-8b05-ffd578937521
2010-03-05 09:30:18 +00:00
Richard Frith-MacDonald
a0a018b4c5 remove bogus consistency check
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29784 72102866-910b-0410-8b05-ffd578937521
2010-02-27 06:33:39 +00:00
Richard Frith-MacDonald
14b91c9052 fixups for libobjc2
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29753 72102866-910b-0410-8b05-ffd578937521
2010-02-25 18:49:31 +00:00
Richard Frith-MacDonald
c07dc48eb3 more header reorganisation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29731 72102866-910b-0410-8b05-ffd578937521
2010-02-25 08:36:34 +00:00
Richard Frith-MacDonald
3968c44cec Cleanup some deprecated code
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29730 72102866-910b-0410-8b05-ffd578937521
2010-02-25 08:19:52 +00:00
Richard Frith-MacDonald
b1e904b3ae move GNUstep.h into common.h
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29727 72102866-910b-0410-8b05-ffd578937521
2010-02-25 05:26:57 +00:00
Richard Frith-MacDonald
4497ba7bdd Build with non-fragile ivars.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29715 72102866-910b-0410-8b05-ffd578937521
2010-02-24 10:23:47 +00:00
Richard Frith-MacDonald
8769dd8b6f deprecates some gnustep runtime wrappers
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29697 72102866-910b-0410-8b05-ffd578937521
2010-02-22 10:13:20 +00:00
Richard Frith-MacDonald
dd42cc24ba Move includes to NSObjCRuntime.h to match OSX
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29692 72102866-910b-0410-8b05-ffd578937521
2010-02-20 18:32:07 +00:00
Richard Frith-MacDonald
7cc69dfaae Simplify header inclusion
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29669 72102866-910b-0410-8b05-ffd578937521
2010-02-19 08:12:46 +00:00
Richard Frith-MacDonald
c8a6832349 cosmetic tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29657 72102866-910b-0410-8b05-ffd578937521
2010-02-17 11:47:06 +00:00
Richard Frith-MacDonald
21d597e740 merge back reorganisation branch
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29615 72102866-910b-0410-8b05-ffd578937521
2010-02-14 10:48:10 +00:00
David Chisnall
6bf6ec959b Made NSAllocateObject() and NSDeallocateObject() use / take id instead of NSObject*. This matches Apple's definition and gets rid of 'assignment / initialization from distinct Objective-C type' warnings when you use NSAllocateObject() to create an instance without an explicit cast.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29611 72102866-910b-0410-8b05-ffd578937521
2010-02-13 17:33:23 +00:00
Richard Frith-MacDonald
6c84f23ae1 Coimplete operation queue implementation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29508 72102866-910b-0410-8b05-ffd578937521
2010-02-08 10:34:27 +00:00
Richard Frith-MacDonald
93b94d87b2 Fix error in class for zombie
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29259 72102866-910b-0410-8b05-ffd578937521
2010-01-11 11:29:44 +00:00
Richard Frith-MacDonald
b1976d23bb avoid compiler warnings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29258 72102866-910b-0410-8b05-ffd578937521
2010-01-11 11:23:03 +00:00
Gregory John Casamento
6797a06652 Conditionally compile weak attribute.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29159 72102866-910b-0410-8b05-ffd578937521
2009-12-22 22:12:56 +00:00
David Chisnall
c19a717b67 Added call to objc_create_block_classes_as_subclasses_of() in NSObject's +load method. This is called as soon as NSObject is loaded and creates the _NSBlock family of classes, which are statically allocated in the runtime but not statically initialised. If you create blocks without linking GNUstep-base, the isa pointer in the block will point to a class that has all of its fields set to 0.
Any blocks will have their isa pointer set to the two classes statically allocated in libobjc, but these classes can't be used for message lookup (or introspection) until after the call.  This means that you can't send messages to blocks until after NSObject's +load method has been called.  This shouldn't be a problem in most code, but if you use __attribute__((constructor)) instead of a +load method then be careful about sending messages to blocks (you can still call them as normal). 



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29144 72102866-910b-0410-8b05-ffd578937521
2009-12-20 16:59:41 +00:00
Richard Frith-MacDonald
5a6ce46276 tidy
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29049 72102866-910b-0410-8b05-ffd578937521
2009-11-23 18:07:25 +00:00
David Chisnall
9eb8d1d49b Added fall-back line for forwarding. Now -forwardingProxyForSelector: should work on all runtimes, with all ABIs, it will just be painfully slow on the GCC runtime and the legacy ABI.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29048 72102866-910b-0410-8b05-ffd578937521
2009-11-23 16:43:08 +00:00
Richard Frith-MacDonald
19796a1465 Documentation generation improvments
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29047 72102866-910b-0410-8b05-ffd578937521
2009-11-23 09:42:18 +00:00
Wolfgang Lux
acb28bb1c2 Prevent potential deadlock in multithreaded programs due to an
allocation lock that was never unlocked.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28859 72102866-910b-0410-8b05-ffd578937521
2009-10-20 05:25:04 +00:00
Richard Frith-MacDonald
640ae938c6 Cleanups and minor bugfixes for new code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28665 72102866-910b-0410-8b05-ffd578937521
2009-09-12 07:37:00 +00:00
David Chisnall
47eab60ed8 Added implementations of the hooks provided by the new runtime. This brings
NSObject up to feature-parity with the OS X 10.5 implementation when using the
new runtime and up to feature-parity with the 10.6 implementation if you are
using the new runtime and compiling with clang.

Also removes the objc_mutex_wibble stuff from NSObject in favour of just using
NSLocks (which, with the new implementation, are now faster than using
objc_mutex_stuff).



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28657 72102866-910b-0410-8b05-ffd578937521
2009-09-10 20:14:42 +00:00
David Chisnall
0fc392ad98 * Source/NSObject:
- Tweaked NSObject to use atomic ops with LLVM as well as gcc (this
		  probably isn't actually needed)
		- Fixed SIGFPE problem on FreeBSD using proper interfaces instead of 
		an asm hack.
	* Removes various mframe things from being compiled when ffcall/libffi is
	used (mframe.m, NSConnection.m, NSInvocation.m)
	* Turned a nested function in make_strings.m into a macro.  

Tested by Gregory - blame him for any breakage...



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28462 72102866-910b-0410-8b05-ffd578937521
2009-08-15 21:44:21 +00:00
Richard Frith-MacDonald
9d4d268acd Fix failed commit
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28434 72102866-910b-0410-8b05-ffd578937521
2009-08-04 06:13:37 +00:00
Riccardo Mottola
f3723a5426 Atomic increment and decrement functions for m68k
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28310 72102866-910b-0410-8b05-ffd578937521
2009-05-29 23:10:15 +00:00
Fred Kiefer
d2b68390e5 * Source/NSObject.m: Correct asm for PPC.
Patch by Eric Wasylishen <ewasylishen@gmail.com>
* Source/NSObject.m: Add support for new gcc atomic build
ins. Currently still disabled.
Patch by David Chisnall <theraven@sucs.org>

M    Source/NSObject.m
M    ChangeLog


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28268 72102866-910b-0410-8b05-ffd578937521
2009-05-04 20:07:56 +00:00
Richard Frith-MacDonald
d3398a8044 Fix swizzle
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28222 72102866-910b-0410-8b05-ffd578937521
2009-04-15 08:31:14 +00:00
Richard Frith-MacDonald
79b93a4901 more GC improvements
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28220 72102866-910b-0410-8b05-ffd578937521
2009-04-15 08:03:19 +00:00
Richard Frith-MacDonald
5921606e39 gc improvements
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28192 72102866-910b-0410-8b05-ffd578937521
2009-04-10 08:25:03 +00:00
Adam Fedor
fd2132310b Revert previous patch (David to fix up later).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28174 72102866-910b-0410-8b05-ffd578937521
2009-04-03 14:56:41 +00:00
Richard Frith-MacDonald
c6937301b8 Cleanups suggested/provided by David Chisnall
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28160 72102866-910b-0410-8b05-ffd578937521
2009-03-31 15:49:42 +00:00
Richard Frith-MacDonald
057818ab06 use weak pointers for siblings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28128 72102866-910b-0410-8b05-ffd578937521
2009-03-24 10:53:38 +00:00
Richard Frith-MacDonald
971de91d62 Implement OSX10.5 NSMapTable API
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28086 72102866-910b-0410-8b05-ffd578937521
2009-03-16 10:54:59 +00:00
Richard Frith-MacDonald
d2e2eda24c GC tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28063 72102866-910b-0410-8b05-ffd578937521
2009-03-10 17:12:47 +00:00
Richard Frith-MacDonald
8687a2ed40 gc tweak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28050 72102866-910b-0410-8b05-ffd578937521
2009-03-08 14:29:06 +00:00
Richard Frith-MacDonald
18511be325 Remved some unused code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28047 72102866-910b-0410-8b05-ffd578937521
2009-03-06 11:01:42 +00:00
Richard Frith-MacDonald
24d43481a8 Updates for 10.5 API changes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27962 72102866-910b-0410-8b05-ffd578937521
2009-02-23 20:42:32 +00:00
Richard Frith-MacDonald
d2fa82f877 MacOS-X compatibility fix for GC
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27845 72102866-910b-0410-8b05-ffd578937521
2009-02-11 10:11:33 +00:00
Richard Frith-MacDonald
0d75fb5f66 fix for bug #25543
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27830 72102866-910b-0410-8b05-ffd578937521
2009-02-10 12:49:06 +00:00
Richard Frith-MacDonald
6bccff5fc7 GC changes for MacOS-X compatiblity
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27630 72102866-910b-0410-8b05-ffd578937521
2009-01-19 11:00:33 +00:00
Richard Frith-MacDonald
b830b55dee Change finalization to match MacOS-X
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27581 72102866-910b-0410-8b05-ffd578937521
2009-01-12 18:36:37 +00:00