13 Commits (2855d1771478e1e368fcfeb4d56aecbb4d9429ca)

Author SHA1 Message Date
David Chisnall abf629b1f7 Make some private symbols private. 7 years ago
David Chisnall 4973b8d58a Dom't build an unused private function.
This is useful when debugging, but it's not used by default.
8 years ago
David Chisnall b37815caf7 Remove unreachable case statement. 8 years ago
David Chisnall 5107130277 Move the data for sparse arrays into the tree structure.
This saves one load on the message send path for each tree depth (2
loads in the common case, 3 if you have a lot of selectors), which
should improve cache usage considerably.

Note: This is a checkpoint commit.  Currently, every objc_msgSend()
implementation except for x86-64 is broken.
10 years ago
theraven 9e93a413d1 Print some memory usage statistics on exit if LIBOBJC_MEMORY_PROFILE is
defined.
13 years ago
theraven eb234ea26a Fix the case where the number of selectors grows to more than 2^16 and we need
to fall back to 3-level dtables.  

Added a test case that registers far more selectors than a sane program
contains and tries to use them.
13 years ago
theraven 4fc7030973 Remove some obsolete FIXMEs. 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 779b28abeb Lots of tidying, removing legacy stuff. 16 years ago
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.
16 years ago
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. 16 years ago
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.
16 years ago
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.
16 years ago