13 Commits (71e38a048fc06fea0c2015662540d46a33b5c45d)

Author SHA1 Message Date
David Chisnall e23882fb23 Rewrite the selector table in C++.
This replaces a few home-grown datastructures with third-party ones that
get a lot more testing:

 - The home-grown hopscotch hash table is moved to using robin map.  The
   original was designed to be lock free, but we've been using it behind
   a lock for ages.
 - The selector list is now a std::vector.
 - The types list now use std::forward_list.

This also removes a couple of code paths that haven't been used since we
started using the new ABI data structures internally and upgrading at
load time.

The new code tries to differentiate in the static type system between
registered and unregistered selectors.  The check for whether a selector
is registered is fragile and depends on no selector being mapped or
allocated in memory below the total number of selectors.  This check can
now disappear on most code paths.

On a single test machine (not guaranteed to be representative) the test
suite now completes around 20% faster.
3 years ago
David Chisnall 00d23b0013 Fix LOCK_SCOPE to allow multiple locks per scope. 8 years ago
Dustin L. Howett 430ab75014 win32: use native threading APIs instead of pthreads
* use fiber local storage if NO_PTHREADS is defined
* use critical sections instead of mutexes

Contributing-author: Ben Viglietta <benvi@microsoft.com>
8 years ago
theraven 0ed2182b83 Add explicit cast for pthread lock initialiser. 13 years ago
ivucica a6b6a9779c Fixed INIT_LOCK() on Android by casting to pthread_mutex_t.
Based on David's suggestion: http://lists.gnu.org/archive/html/gnustep-dev/2013-03/msg00082.htm
13 years ago
theraven e35b0a09e1 windows.h defines its own BOOL, just to be special. Redefine this as WINBOOL to work around the incompatibility with ObjC.
Patch by Mathieu Suen!
15 years ago
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. 15 years ago
theraven 62536ce247 Added more header comments. 15 years ago
theraven 7f6f798074 Rewrote some of the class table code to be slightly cleaner. 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 9c65b1c84c Added types support to blocks runtime, tidied up UNIX98 stuff. 17 years ago
rfm 102084ab7c Changes to compile on CentOS-5.3 17 years ago
theraven 323e3dfaeb Added new runtime library, based on GCC 4.4 libobjc, libobjc_tr and Objective2.framework. 17 years ago