Update of /cvsroot/sbcl/sbcl/src/code
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26821/src/code
Modified Files:
array.lisp
Log Message:
1.0.6.3: thread and interrupt safe CLOS cache
* New cache implementation. While the patch appears to modify
src/pcl/cache.lisp, it is really a wholesale reimplementation.
-- Use compare-and-swap to provide atomicity where necessary.
-- Layouts are write-once, but cached values can be replaced
atomically.
-- Expanding the cache (or dropping invalidated and incomplete
entries) copies the cache.
-- Use ..EMPTY.. as a sentinel value to denote unused cache line
slot.
-- Cache index zero is no longer special.
-- Maximum cache size is limited to avoid ridiculously huge caches.
-- API changes in the cache code: MAKE-CACHE replaces GET-CACHE.
PROBE-CACHE now returns a primary indicating a hit or a miss,
and returns the probed value as the second return value.
* Move remaining non-cache related code from cache.lisp.
* Delete unused closure-based dispatch code (src/pcl/dlisp2.lisp). If
we want to support a compilerless build at some future date this
code can be always resurrected from the CVS -- or better yet, can
be re-implemented.
* Delete MAKE-FINAL-ONE-INDEX-ACCESSOR-DFUN, inlining it to the
call-sites for easier understanding. (Yes, there is such a thing as
too much abstraction.)
Index: array.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/code/array.lisp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- array.lisp 19 May 2007 12:01:03 -0000 1.67
+++ array.lisp 28 May 2007 18:52:26 -0000 1.68
@@ -56,6 +56,7 @@
(values vector index))
(values array index)))
+(declaim (inline simple-vector-compare-and-swap))
(defun simple-vector-compare-and-swap (vector index old new)
#!+(or x86 x86-64)
(%simple-vector-compare-and-swap vector
|