20 Commits (d70523947b692e02644774eaddbba2dc821261fd)

Author SHA1 Message Date
theraven 42a545fc7c In some irritating circumstances, the load order can cause a +load message to trigger other code, which sends messages with selectors that have not been mapped yet.
The runtime was handling the message lookup correctly in this case, but only as a side-effect of the fallback code from when type-dependent dispatch is not possible.  This resulted in a confusing warning message, telling you that you were calling a method with an incorrect signature, when the two signatures that it printed were the same.

This case is now handled correctly, so the warning disappears (unless you really are calling a method with the wrong signature and have TDD enabled).
16 years ago
theraven 9986294a51 Fix setting the superclass for metaclasses correctly. 16 years ago
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).
16 years ago
theraven 666c84c129 Test the correct class when resolving superclasses. 16 years ago
theraven 0e374db1db Added support for type-dependent dispatch to libobjc2. 16 years ago
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.
16 years ago
theraven 779b28abeb Lots of tidying, removing legacy stuff. 16 years ago
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... 16 years ago
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.
16 years ago
thebeing 13964517ef Small 64bit fix. 16 years ago
theraven de71ebb6b1 Rewritten class loading. 16 years ago
theraven a1329e22de A bit more class table tidying. 16 years ago
theraven 7f6f798074 Rewrote some of the class table code to be slightly cleaner. 16 years ago
theraven 09ed66f819 Fixed use of uninitialized variable. 16 years ago
theraven e85975a36e Don't make NSObject a subclass of NSObject. Thanks to Truls Becken! 16 years ago
theraven a35ece500f Rewrote objc_getClassList() to use class table directly.
Fixed missing UNLOCK() from last commit.
16 years ago
theraven 0abdc2a574 Small cleanups from last commit. 16 years ago
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.)
16 years ago
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.
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