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.
2011-04-14 16:44:34 +00:00
theraven
6c7cf4a5a6
Add visibility attributes on all internal functions so that we aren't ever exporting them outside of libobjc.
2011-04-14 12:25:17 +00:00
theraven
95ef5a93f9
Always use the first version of a class that's loaded twice until the merging code is a bit better tested.
2011-04-08 09:11:21 +00:00
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.
2011-03-25 20:01:43 +00:00
theraven
faa741b133
Added some header documentation for runtime functions.
2011-03-21 23:54:42 +00:00
theraven
e0719a9c62
Added Objective-C++ exception handling support. Allows throwing Objective-C objects with throw or @throw and catching them with catch() or @catch.
2011-03-20 20:38:12 +00:00
theraven
5df6a42107
Log a warning when loading the same class twice.
2011-03-09 14:43:45 +00:00
theraven
db53012509
Disabled loaded class test.
2011-02-25 09:13:37 +00:00
theraven
ca2c7d1d9d
Stop treating NSObject as magic and do what OS X does with regard to root objects and metaclasses.
2011-02-23 12:00:11 +00:00
theraven
5574585b0f
Don't load the same class twice.
2011-02-19 23:58:03 +00:00
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.
2011-01-15 12:37:02 +00:00
theraven
f66a69561a
Fix metametaclass setup.
2010-10-05 12:37:05 +00:00
theraven
76bb7762ff
Properly resolve the metaclass's isa pointer.
2010-10-04 22:33:30 +00:00
theraven
b6abe490ab
Remove some obsolete comments.
2010-09-26 21:32:22 +00:00
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.
2010-09-25 20:56:19 +00:00
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).
2010-08-31 20:40:08 +00:00
theraven
9986294a51
Fix setting the superclass for metaclasses correctly.
2010-07-21 16:08:01 +00:00
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