18 Commits

Author SHA1 Message Date
theraven
d3122bcfa4 Make sure BOOLs in class tests are always YES or NO.
Make self in +load the correct value (the class, not the metaclass).
2010-07-01 18:03:31 +00:00
theraven
666c84c129 Test the correct class when resolving superclasses. 2010-06-30 10:53:40 +00:00
theraven
0e374db1db Added support for type-dependent dispatch to libobjc2. 2010-06-29 12:42:20 +00:00
qmathe
79899f8a46 Fixed unresolved class list loss when the root class gets resolved.
Hence not all classes were previously resolved at load time.

Was breaking +forwardInvocation: because unresolved classes such as 
GSFFInvocation were not receiving +load right when gnustep-base was loaded.
2010-06-25 19:48:20 +00:00
theraven
779b28abeb Lots of tidying, removing legacy stuff. 2010-06-06 21:11:25 +00:00
theraven
bb8cafaa15 Finished rewriting the loader. It's now cleanly separated into logically-separate components, so there's a chance it might actually be maintainable... 2010-06-02 22:25:12 +00:00
theraven
4ea82e14da Fixed hash functions.
Tweaked class resolve function to make sure that it keeps scanning the list as long as one or more classes is resolved while scanning it.
2010-06-02 11:12:27 +00:00
thebeing
13964517ef Small 64bit fix. 2010-06-02 09:47:57 +00:00
theraven
de71ebb6b1 Rewritten class loading. 2010-06-01 19:41:07 +00:00
theraven
a1329e22de A bit more class table tidying. 2010-06-01 13:15:33 +00:00
theraven
7f6f798074 Rewrote some of the class table code to be slightly cleaner. 2010-06-01 12:59:57 +00:00
theraven
09ed66f819 Fixed use of uninitialized variable. 2010-03-28 19:09:57 +00:00
theraven
e85975a36e Don't make NSObject a subclass of NSObject. Thanks to Truls Becken! 2010-03-13 20:30:30 +00:00
theraven
a35ece500f Rewrote objc_getClassList() to use class table directly.
Fixed missing UNLOCK() from last commit.
2010-03-13 01:45:24 +00:00
theraven
0abdc2a574 Small cleanups from last commit. 2010-03-12 22:59:36 +00:00
theraven
8ce32fd1c9 Rewrote class resolving code. Now it only resolves classes that actually need resolving, rather than iterating over the entire class table.
(This is part 1.  Part 2 will lazily resolve classes.)
2010-03-12 22:47:10 +00:00
theraven
c1a637a990 Allowed hash tables to dynamically resize. This uses toydispatch to free the old version of the table after copying all of the data into the new one, after waiting enough time to allow all potential readers to finish. There are theoretical cases when this can fail, but hopefully no practical ones. The theoretical cases can be removed by making the garbage thread run at a lower priority than all of the other threads in the system.
The protocols table and the class table will now grow as required.  Protocols are now added to the protocols table as they are created, so you should get something sensible and introspectable back when you look up a protocol by name.
2010-01-25 22:56:54 +00:00
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.
2010-01-07 18:22:13 +00:00