extensible CAS and CAS extensions
authorNikodemus Siivola <nikodemus@random-state.net>
Wed, 8 Jun 2011 07:58:59 +0000 (10:58 +0300)
committerNikodemus Siivola <nikodemus@random-state.net>
Sat, 12 Nov 2011 13:41:48 +0000 (15:41 +0200)
commitb71b8da241791687e7752f917ca032d937ba2bbf
tree876c5c362ae4c636443010d564885944ed6c2397
parent79578c137282cc8fa8eb34112915dc17a3855224
extensible CAS and CAS extensions

  DEFINE-CAS-EXPANDER and DEFCAS are analogous to DEFINE-SETF-EXPANDER and
  DEFSETF, including CAS-functions similar to SETF-functions:

   (defun (cas foo) (old new ...) ...)

  THis is exported from SB-EXT for users to play with, and used to implement
  our CAS places internally.

  Add support for CAS of:

   * SLOT-VALUE

   * STANDARD-INSTANCE-ACCESS

   * FUNCALLABLE-STANDARD-INSTANCE-ACCESS

  In case of SLOT-VALUE we don't yet support any optimizations or specify
  results when SLOT-VALUE-USING-CLASS or friends are in play -- perhaps later
  we can add

    (CAS SLOT-VALUE-USING-CLASS) &co

  in order to support it for arbitrary instances.

  Adding support for permutation vector optimization should not be too hard
  either, but let's let the dust settle first...
13 files changed:
build-order.lisp-expr
doc/manual/threading.texinfo
package-data-list.lisp-expr
src/code/cas.lisp [new file with mode: 0644]
src/code/cross-misc.lisp
src/code/early-setf.lisp
src/code/late-cas.lisp [new file with mode: 0644]
src/code/late-extensions.lisp
src/code/primordial-extensions.lisp
src/code/target-thread.lisp
src/compiler/generic/objdef.lisp
src/pcl/slots.lisp
tests/compare-and-swap.impure.lisp