1 ;;;; macros which use GET-SETF-EXPANSION in their macroexpander code,
2 ;;;; and hence need special treatment. Currently (19990806) this
3 ;;;; special treatment involves bare calls to SB!XC:DEFMACRO or
4 ;;;; DEFMACRO-MUNDANELY and so this code can't appear in the build
5 ;;;; sequence until after xc DEFMACRO machinery has been set up, and
6 ;;;; so this stuff is separated out of the main compiler/macros.lisp
7 ;;;; file (which has to appear earlier).
9 ;;;; This software is part of the SBCL system. See the README file for
10 ;;;; more information.
12 ;;;; This software is derived from the CMU CL system, which was
13 ;;;; written at Carnegie Mellon University and released into the
14 ;;;; public domain. The software is in the public domain and is
15 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
16 ;;;; files for more information.
21 (sb!xc:defmacro deletef-in (next place item &environment env)
22 (multiple-value-bind (temps vals stores store access)
23 (sb!xc:get-setf-expansion place env)
25 (error "multiple store variables for ~S" place))
26 (let ((n-item (gensym))
30 `(let* (,@(mapcar #'list temps vals)
33 (if (eq ,n-place ,n-item)
34 (let ((,(first stores) (,next ,n-place)))
36 (do ((,n-prev ,n-place ,n-current)
37 (,n-current (,next ,n-place)
39 ((eq ,n-current ,n-item)
41 (,next ,n-current)))))
44 ;;; Push ITEM onto a list linked by the accessor function NEXT that is
47 (sb!xc:defmacro push-in (next item place &environment env)
48 (multiple-value-bind (temps vals stores store access)
49 (sb!xc:get-setf-expansion place env)
51 (error "multiple store variables for ~S" place))
52 `(let (,@(mapcar #'list temps vals)
53 (,(first stores) ,item))
54 (setf (,next ,(first stores)) ,access)
58 ;;; the target-code case of setting boolean attributes
60 (defmacro-mundanely !def-boolean-attribute-setter (test-name
62 &rest attribute-names)
63 (guts-of-!def-boolean-attribute-setter test-name
66 'sb!xc:get-setf-expansion))