41 Commits (224de356cbb2c8a3267c406723558763aaa17536)

Author SHA1 Message Date
theraven 4c9acdf153 ARM stuff. 14 years ago
theraven 4796a41e4e Finished implementing the new runtime APIs. 14 years ago
theraven 4e3e71c750 Tweak 64-bit support for small objects. 15 years ago
theraven 8af52846b7 Small object (hidden in a pointer) support. 15 years ago
theraven 4ffb19230f Make sure that the statics used to store internal tables are marked as roots. 15 years ago
theraven 0cb2ea01bc Simplify the finalization code slightly. 15 years ago
theraven d51500184c More cleanups. Stop using __ identifiers for internal stuff now that it's properly marked private and we don't have to worry about conflicts. 15 years ago
theraven 6c7cf4a5a6 Add visibility attributes on all internal functions so that we aren't ever exporting them outside of libobjc. 15 years ago
theraven 95ef5a93f9 Always use the first version of a class that's loaded twice until the merging code is a bit better tested. 15 years ago
thebeing ee7817cf57 Implement a hook that allows the compiler to register the aliases used with the
@compatibility_alias directive so that they can be resolved at runtime.
15 years ago
theraven faa741b133 Added some header documentation for runtime functions. 15 years ago
theraven e0719a9c62 Added Objective-C++ exception handling support. Allows throwing Objective-C objects with throw or @throw and catching them with catch() or @catch. 15 years ago
theraven 5df6a42107 Log a warning when loading the same class twice. 15 years ago
theraven db53012509 Disabled loaded class test. 15 years ago
theraven ca2c7d1d9d Stop treating NSObject as magic and do what OS X does with regard to root objects and metaclasses. 15 years ago
theraven 5574585b0f Don't load the same class twice. 15 years ago
theraven 8db63b976f Initial work on developer mode (allows classes to be replaced at run time with new versions, by cooperating IDEs). This support is part of ongoing work to provide fix-and-continue functionality with Clang / Cling and LanguageKit. 15 years ago
theraven f66a69561a Fix metametaclass setup. 15 years ago
theraven 76bb7762ff Properly resolve the metaclass's isa pointer. 15 years ago
theraven b6abe490ab Remove some obsolete comments. 16 years ago
ericwa ed1c9d41eb libobjc2: Add a pile of NULL checks. In general, any public function should be able to handle NULL for any object/class/selector/pointer to opaque structure without blowing up. 16 years ago
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