9 Commits

Author SHA1 Message Date
theraven
bfbd52709b Fixed off-by-one error in hash table enumerator, which was causing one class to fail to be resolved. 2010-03-12 18:53:27 +00:00
rfm
5786a73e46 I'm pretty sure that, when resizing a table, we want to copy the non-null nodes rather than the null ones. 2010-02-10 09:36:01 +00:00
theraven
81f0c58a86 Fixed const warning. 2010-02-05 14:11:32 +00:00
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. 2010-02-03 13:46:32 +00:00
theraven
8642bf7b8d Fixed statement order in hash_table.h 2010-02-03 02:33:33 +00:00
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.
2010-02-02 23:36:38 +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
8310615a7c Bug fixes in hash_table.h 2010-01-21 17:34:13 +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