1358 Commits (2855d1771478e1e368fcfeb4d56aecbb4d9429ca)
 

Author SHA1 Message Date
theraven 0698e968ee Added license for toydispatch. 16 years ago
theraven c7bff27827 Removed typed stream support; it's no longer used. 16 years ago
theraven c3a6b866bb Added toydispatch to libobjc. This is an implementation of a tiny subset of libdispatch, requiring no kernel support beyond a standard pthread implementation. It is intended to be used for running asynchronous book-keeping tasks for libobjc, but might also be useful for other things so it's compiled as a separate library. 16 years ago
rfm 9df65418f7 make inline internal functions static. 16 years ago
theraven d58dad7e32 Fixed a bug with category loading. Previously, a method in a category that overrode a method in the superclass would only be picked up by subclasses that were not yet initialized.
Quentin: This was the category loading problem that you saw.  It was dependent upon load order, so was difficult to reproduce, however a Smalltalk category on NSString overriding a method from NSObject demonstrated it (because GSString was always initialized by the time Smalltalk code is loaded because LKCompiler use it, but not by the time ObjC code is loaded).
16 years ago
theraven a2dbc582de Made objc_getProtocol() return a protocol from the protocol table, rather than creating a new one. 16 years ago
theraven 8310615a7c Bug fixes in hash_table.h 16 years ago
theraven 5b4974f259 Made debug warning just a warning. 16 years ago
theraven 38bad343d3 Removed some (non-functional) experimental code from exception.c that was breaking 64-bit compile. 16 years ago
theraven 4e06c2a9f0 Removed NSObject.h dependency from NSBlocks.m 16 years ago
qmathe e92f753091 Restored objc_getProtocol() which seems to have been accidentally removed.
Fixed class_replaceMethod() to update the dispatch table.
16 years ago
theraven 4a9187b1cc Made allocateClassPair() set the name of the metaclass. 16 years ago
theraven e1ae8df5af Initial work on protocol uniquing. Protocols are now added to a table and can be looked up at run time. 16 years ago
theraven bdf97cf64e Added hopscotch table implementation and rewrote the class table to use it. This is done so that the class table and protocol tables can share the same code (currently there is no protocol table).
Note that concurrent resizing has not yet been implemented.  That means that there is a hard limit on the number of classes that can be loaded.  This is currently set to quite a small number for testing, to stress the hash table.  If you're experiencing problems as a result, then please let me know and I will increase it.
16 years ago
theraven 9f602c083c Fixed class_getInstanceSize(); 16 years ago
theraven bd8626e692 Fix warning in last commit. 16 years ago
theraven 752b7ec9d8 Another fix for allocating runtime classes. 16 years ago
theraven da9aafd3ed More fixes for bugs found by Mizuki. 16 years ago
theraven 2a5ba9f18a Fixed class_get_super_class() so that it actually works and simplified class_getSuperclass() to call it directly. This fixes numerous other corner cases, for example you can now throw a constant string as an exception and have it work correctly even if no constant string objects have been sent messages.
Hopefully this will fix a few other Heisenbugs and reduce the strength of the Mottola Effect.
16 years ago
theraven 202006f6b8 Removed some dead variables. 16 years ago
theraven 51ab4a935a Fixed class_getSuperclass() implementation. 16 years ago
theraven 604efa7077 Add new classes to the class table when they are registered. 16 years ago
theraven 81de407358 Fixed method_getNumberOfArguments(), report by Mizuki. 16 years ago
theraven 028a312ecd Fixed bugs found by Mizuki. 16 years ago
theraven 9dc0343c21 Fixed ivar offset checking to take account for alignment. 16 years ago
theraven 6a94efd4cf Removed debugging lines from GNUmakefile that were breaking the build. Thanks to RFM for spotting this... 16 years ago
rfm 6e29945894 Fix missing return 16 years ago
theraven 41f9e12f53 Added a bit more debugging info to the overlapping class error. 16 years ago
theraven 16c3ec8f46 Correctly declare the runtime hooks as extern. Was causing copies of them to show up in the uninitialised data section of libraries that included runtime.h, clobbering the default version and causing a crash when the runtime tried to call them. 16 years ago
qmathe bf2521da40 Fixed undefined pthread references when gnustep-base configure tests whether 'objc really works' 16 years ago
qmathe 8b9c723905 Added object_setClass 16 years ago
theraven 7ba27bd183 Fixed license for NSBlocks.m 16 years ago
theraven 93ac6e7f2f Fixed block class creation so libobjc2 no longer has a static dependency on NSObject. This lets blocks work without Foundation, just as on OS X. This requires GNUstep to call a runtime function when NSObject is loaded. 16 years ago
theraven 4771cd4e43 Added selector lookup functions. Implementations by Eric Wasylishen. 16 years ago
theraven 7af08f5a82 Tweaked the +initialize order to work around some of the insanity in NSObject and NSAutoreleasePool's interaction in GNUstep. This code is incredibly fragile, and on the old runtime sometimes completely fails and crashes during startup, depending on the order in which the files were linked in -base and how the platform linker works. Hopefully now it should work in all cases. 16 years ago
theraven 5f48260c6a Made sure the ObjC mutex is created before it might first be used. 16 years ago
theraven 8efbf98e55 Fixed potential load-order conflict in NSBlocks. 16 years ago
theraven cbf41a1fec Fixed build with clang. 16 years ago
theraven baed61c3e6 Added property support functions, NSBlock base classes and uncaught exception handler. 16 years ago
theraven 40da5b6b50 Fixed build warning on *BSD. 16 years ago
theraven bd73cc4e57 Added run-time abort if the first ivar of a newly-loaded class does not immediately follow on from the previous one. This (hopefully, modulo some potential weirdness related to bitfields) means that we should now get programs refusing to start in most cases where they depend on frameworks that had their ABI change but didn't bump the library version. This seems preferable to the previous behaviour of corrupting memory (note that this won't catch the case where the superclass has its ivars rearranged, but remains exactly the same size and the subclass references the ivars). 16 years ago
theraven 3ffec0a4fb Added missing declarations of exception-handling functions (from ABI spec). 16 years ago
theraven f8b98a73a2 Bug fixes in libobjc2:
- nil_method now returns 0, not receiver.

- Metaclasses actually get their dtables installed with the new ABI.  For some reason this wasn't being done, so class messages didn't work with the new ABI.  Now they do and (at least some) nontrivial programs work.

- Undid commenting out of the code setting the fast ivar access pointers.  I can't remember why this was commented out, but it seems not to break anything.  I have an LLVM pass that makes compiled code access these pointers, but it's not committed yet.
16 years ago
theraven 29790da51c Fixed bug in loading categories. 16 years ago
theraven b2bc15c64e Removed assertion. I'm not entirely sure why it was there, but it was preventing Gorm running (along with anything else that provided categories on subclassed classes). I need some more testing to make sure that this didn't break anything else, but Gorm now runs correctly with the new runtime, so it seems like an improvement... 16 years ago
theraven 5bb7c43244 Fixed accidental insertion of methods into the uninitialized dtable. 16 years ago
theraven 546f31df69 Fixed a load of ->dtable references up to dtable_for_class() calls. Now no longer does the Wrong Thing™ if you do silly things like modifying a class's dtable in +initialize (which, sadly, GNUstep does for NSConstantString). 16 years ago
theraven b69b7c05d8 Removed unwind.h dependency. Tidied up a few warnings generated by clang. 17 years ago
theraven 2800dee1f4 Changed "unwind.h" to <unwind.h> 17 years ago
theraven 1e1e23827c Fixed new ABI method lookup function for +initialize safety. 17 years ago