Commit Graph

9 Commits

Author SHA1 Message Date
theraven
ad16172625 First pass at implementing Apple-compatible GC using Boehm. Still needs some tidying, but the following work:
- __strong pointers, preventing objects from being freed

_ __weak pointers are automatically freed when the last remaining __strong pointer goes away

- objc_gc_{retain,release}_np() functions, which can be used to implement CFRetain() and CFRelease() (adds an reference count - the object will not be collected until after its last retain is gone.
2011-05-22 23:02:04 +00:00
theraven
62536ce247 Added more header comments. 2011-03-22 00:08:45 +00:00
theraven
a2db6f58be Made the selector name field into a union of the name (unregistered selectors) and the selector id / index (registered selectors), to more accurately reflect how it is used in the code. 2011-03-15 17:27:26 +00:00
theraven
b1b9baf382 Finished rewrite of message sending. Deleted lots of legacy stuff. 2010-06-03 15:17:12 +00:00
theraven
1a60fabf96 More 64-bit fixes. 2010-05-17 15:22:19 +00:00
theraven
b04cccf46b Fixed some issues in runtime.c when looking up methods. This fixes some issues with DO.
Removed GNU dtable and sparse array implementations, replaced entirely now with versions based on the Étoilé runtime.  Performance is roughly equivalent in microbenchmarks, memory usage is significantly lower (Gorm goes from 95MB to 50MB on my machine - this will be even more pronounced on 64-bit systems), which should improve cache usage considerably.  Still room for some performance tuning, however.
2010-05-16 20:39:54 +00:00
theraven
4be9799259 Unrolled the SparseArrayLookup loop. This means we only need one jump, instead of 2, which gives the same performance as the old GNU code and about half the memory usage. It's really, really, ugly code though - I need to teach the compiler to do this optimisation so I don't have to. 2010-05-15 13:27:20 +00:00
theraven
0d78186238 Some bug fixes and tidies.
I now have an out-of-tree replacement for the dtable stuff, so sarray.{h,c} will be going away soon.  The replacement offers similar (slightly worse currently) performance in microbenchmarks, but uses half as much memory (Gorm goes from 95MB to 48MB on my machine).  This will be committed once it's been tweaked a little bit.
2010-05-14 21:47:35 +00:00
theraven
2d84b96a72 Tidied up some bits by creating private headers for private data structures.
Imported selector table code frm the Étoilé runtime.  We can now make dispatch type dependent with a -D switch.  Not enabled yet, but it will be enabled in a warning mode soon - I consider preferable to the existing GNU and Apple solution of corrupting the stack.
2010-05-13 22:29:56 +00:00