theraven
eee7956bce
Cleaner version of the last fix.
16 years ago
theraven
d4fe4f522e
Fixed typo in comment in runtime.c.
...
Fixed unsafe dtable access in message lookup.
16 years ago
theraven
d770ed9688
Correct version of last fix...
16 years ago
theraven
de4b63e41d
Fix for root class using non-fragile ABI.
16 years ago
rfm
d89b28c40c
check for nil superclass before dereferencing
16 years ago
theraven
fa488d6cea
Fix for non-fragile ivar fixup when classes are loaded in the wrong order.
16 years ago
rfm
0e7441570b
fixup bad function prototype
16 years ago
rfm
fb97e23e50
fix class_respondsToSelector()
16 years ago
rfm
5786a73e46
I'm pretty sure that, when resizing a table, we want to copy the non-null nodes rather than the null ones.
16 years ago
rfm
45b2641793
allow link with toydispatch
16 years ago
theraven
2350156aba
More GCKit work. Most stuff is working now, with the big exception being tracing of collectable regions. Test case demonstrates this failure and the success of everything else.
16 years ago
theraven
81f0c58a86
Fixed const warning.
16 years ago
theraven
7c03c0d3f1
Fixed double-free problems in GCKit. Fixed removal from hash tables. Added enumerator helper for when you remove objects from a map while enumerating. Removed tracing statements that were identifying bugs that have now been fixed.
16 years ago
theraven
8642bf7b8d
Fixed statement order in hash_table.h
16 years ago
theraven
1f1c5b5b1a
Added test for strong-cast assign (assign to traced memory allocated with GCAllocateCollectable()). Fixed bugs that it showed.
16 years ago
theraven
5b1911b4f4
Initial commit of GCKit (moved from Étoilé and the missing 90% mostly implemented). GCKit implements cycle detection on the heap and tracing on the stack and designated heap regions, with support for weak references. It is designed for implementing OS X 10.5-compatible GC semantics.
...
Although GCKit is mostly finished, it is still not well tested. It contains bugs, and possibly dragons. Do not use it. If you disregard this advice, do not file any bug reports. If you disregard this instruction, then I will point and laugh at you.
16 years ago
theraven
ffc041fc82
Added missing file.
16 years ago
theraven
8058495e39
Fix crash with gcc-compiled protocols.
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
98a2cd07d4
Removed debugging line included by accident with last commit.
16 years ago
theraven
614e20229e
Fixed copy and paste error in toydispatch.
16 years ago
theraven
64bedddcb3
Ugly hack to fixup NXConstantString references to NSConstantString if linked against Foundation. Now, if you forget to specify -fconstant-string-class=NSConstantString when compiling, stuff will still work and GNUstep won't get confused.
16 years ago
theraven
e1feabad27
Restored stub version of objc_get_stream_class_version to prevent linking with -base failing.
16 years ago
theraven
d3c4703b46
Removed bits of Object that depended on the horrible stuff in archive.c.
16 years ago
theraven
dfa14d5d34
Made Object less magic. For now, because there are some weird people who want to use Objective-C without Foundation, Object is still included. If you compile without defining GNUSTEP (which GNUstep Make does automatically) then you get the old behaviour. If you build with GNUSTEP defined:
...
+load will not be sent until both NSObject and NSConstantString have been seen.
NSObject will be set as the superclass for all metaclasses, not Object.
This is in line with Cocoa and should make it a bit easier for people porting code who have categories on NSObject and are confused that they don't work as expected.
Object and NXConstantString are now deprecated. They're staying here because I use them for producing reduced test cases for the runtime and compiler, but they shouldn't be used. I will probably remove them from the default build soon.
16 years ago
theraven
0698e968ee
Added license for toydispatch.
16 years ago
theraven
c7bff27827
Removed typed stream support; it's no longer used.
16 years ago
theraven
c3a6b866bb
Added toydispatch to libobjc. This is an implementation of a tiny subset of libdispatch, requiring no kernel support beyond a standard pthread implementation. It is intended to be used for running asynchronous book-keeping tasks for libobjc, but might also be useful for other things so it's compiled as a separate library.
16 years ago
rfm
9df65418f7
make inline internal functions static.
16 years ago
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).
16 years ago
theraven
a2dbc582de
Made objc_getProtocol() return a protocol from the protocol table, rather than creating a new one.
16 years ago
theraven
8310615a7c
Bug fixes in hash_table.h
16 years ago
theraven
5b4974f259
Made debug warning just a warning.
16 years ago
theraven
38bad343d3
Removed some (non-functional) experimental code from exception.c that was breaking 64-bit compile.
16 years ago
theraven
4e06c2a9f0
Removed NSObject.h dependency from NSBlocks.m
16 years ago
qmathe
e92f753091
Restored objc_getProtocol() which seems to have been accidentally removed.
...
Fixed class_replaceMethod() to update the dispatch table.
16 years ago
theraven
4a9187b1cc
Made allocateClassPair() set the name of the metaclass.
16 years ago
theraven
e1ae8df5af
Initial work on protocol uniquing. Protocols are now added to a table and can be looked up at run time.
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
theraven
9f602c083c
Fixed class_getInstanceSize();
16 years ago
theraven
bd8626e692
Fix warning in last commit.
16 years ago
theraven
752b7ec9d8
Another fix for allocating runtime classes.
16 years ago
theraven
da9aafd3ed
More fixes for bugs found by Mizuki.
16 years ago
theraven
2a5ba9f18a
Fixed class_get_super_class() so that it actually works and simplified class_getSuperclass() to call it directly. This fixes numerous other corner cases, for example you can now throw a constant string as an exception and have it work correctly even if no constant string objects have been sent messages.
...
Hopefully this will fix a few other Heisenbugs and reduce the strength of the Mottola Effect.
16 years ago
theraven
202006f6b8
Removed some dead variables.
16 years ago
theraven
51ab4a935a
Fixed class_getSuperclass() implementation.
16 years ago
theraven
604efa7077
Add new classes to the class table when they are registered.
16 years ago
theraven
81de407358
Fixed method_getNumberOfArguments(), report by Mizuki.
16 years ago
theraven
028a312ecd
Fixed bugs found by Mizuki.
16 years ago
theraven
9dc0343c21
Fixed ivar offset checking to take account for alignment.
16 years ago