Commit Graph

18 Commits

Author SHA1 Message Date
theraven
b04cccf46b Fixed some issues in runtime.c when looking up methods. This fixes some issues with DO.
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.
2010-05-16 20:39:54 +00:00
theraven
0d78186238 Some bug fixes and tidies.
I now have an out-of-tree replacement for the dtable stuff, so sarray.{h,c} will be going away soon.  The replacement offers similar (slightly worse currently) performance in microbenchmarks, but uses half as much memory (Gorm goes from 95MB to 48MB on my machine).  This will be committed once it's been tweaked a little bit.
2010-05-14 21:47:35 +00:00
theraven
0957cbe425 Factored out dtable stuff into dtable_legacy.c so that it can be replaced and so that we can do some profiling of the replacement to make sure it doesn't introduce performance regressions. 2010-05-14 17:53:35 +00:00
theraven
2d84b96a72 Tidied up some bits by creating private headers for private data structures.
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.
2010-05-13 22:29:56 +00:00
qmathe
7656e1f9aa Commented out 'firstslot' unused variable, otherwise Clang reports it as an error. 2010-05-04 11:22:23 +00:00
theraven
96f51da81e Commented out some premature termination code. This is a bit of a hack; we're now repeatedly adding the same methods to dtables, which is ugly. We ought instead to be able to test if something is a lazy copy. 2010-05-03 13:35:09 +00:00
theraven
0abdc2a574 Small cleanups from last commit. 2010-03-12 22:59:36 +00:00
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).
2010-01-21 20:27:02 +00:00
theraven
202006f6b8 Removed some dead variables. 2010-01-06 15:34:28 +00:00
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. 2009-11-24 13:23:47 +00:00
theraven
cbf41a1fec Fixed build with clang. 2009-11-17 23:28:58 +00:00
theraven
baed61c3e6 Added property support functions, NSBlock base classes and uncaught exception handler. 2009-11-17 21:13:41 +00:00
theraven
29790da51c Fixed bug in loading categories. 2009-11-13 18:28:01 +00:00
theraven
5bb7c43244 Fixed accidental insertion of methods into the uninitialized dtable. 2009-10-24 15:56:42 +00:00
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). 2009-10-24 15:16:14 +00:00
theraven
d010cc60ea Fix for threading bug with +initialize. Some limitations:
- Now only one thread may be in any +initialize method at once.
- Not yet implemented for the new ABI lookup function.

The first I don't see as a limitation; if anything having +initialize methods
be guaranteed not to run concurrently may be convenient.  The second I will fix
soon.
2009-09-20 12:46:45 +00:00
theraven
bba507bf70 Removed incorrect comment from blocks runtime. Tweaked runtime.h to make it show the new functions even in GNU-compat mode and made sure the object-substitution hook is called even when object substitution can't be used, so GNUstep can use it for the 10.5 NSObject runtime functions. 2009-09-10 22:09:03 +00:00
theraven
323e3dfaeb Added new runtime library, based on GCC 4.4 libobjc, libobjc_tr and Objective2.framework. 2009-09-08 16:18:59 +00:00