1 ;;;; various DEFSETFs, pulled into one file for convenience in doing
2 ;;;; them as early in the build process as possible so as to avoid
3 ;;;; hassles with invoking SETF FOO before DEFSETF FOO and thus
4 ;;;; compiling a call to some nonexistent function #'(SETF FOO)
6 ;;;; This software is part of the SBCL system. See the README file for
9 ;;;; This software is derived from the CMU CL system, which was
10 ;;;; written at Carnegie Mellon University and released into the
11 ;;;; public domain. The software is in the public domain and is
12 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
13 ;;;; files for more information.
15 (sb!int
:/show0
"entering defsetfs.lisp")
17 ;;; from alieneval.lisp
18 (in-package "SB!ALIEN")
19 (defsetf slot %set-slot
)
20 (defsetf deref
(alien &rest indices
) (value)
21 `(%set-deref
,alien
,value
,@indices
))
22 (defsetf %heap-alien %set-heap-alien
)
25 (in-package "SB!BIGNUM")
26 (defsetf %bignum-ref %bignum-set
)
28 ;;; from bit-bash.lisp
30 (defsetf word-sap-ref %set-word-sap-ref
)
32 ;;; from debug-int.lisp
34 (defsetf stack-ref %set-stack-ref
)
35 (defsetf debug-var-value %set-debug-var-value
)
36 (defsetf debug-var-value %set-debug-var-value
)
37 (defsetf breakpoint-info %set-breakpoint-info
)
39 ;;; from defstruct.lisp
40 (in-package "SB!KERNEL")
41 (defsetf %instance-ref %instance-set
)
44 (defsetf %raw-instance-ref
/word %raw-instance-set
/word
)
45 (defsetf %raw-instance-ref
/single %raw-instance-set
/single
)
46 (defsetf %raw-instance-ref
/double %raw-instance-set
/double
)
47 (defsetf %raw-instance-ref
/complex-single %raw-instance-set
/complex-single
)
48 (defsetf %raw-instance-ref
/complex-double %raw-instance-set
/complex-double
)
52 (defsetf %raw-ref-single %raw-set-single
)
53 (defsetf %raw-ref-double %raw-set-double
)
55 (defsetf %raw-ref-complex-single %raw-set-complex-single
)
56 (defsetf %raw-ref-complex-double %raw-set-complex-double
)
59 (defsetf %instance-layout %set-instance-layout
)
60 (defsetf %funcallable-instance-info %set-funcallable-instance-info
)
61 (defsetf %funcallable-instance-layout %set-funcallable-instance-layout
)
63 ;;; from early-setf.lisp
64 (in-package "SB!IMPL")
66 ;;; KLUDGE: Various of these (e.g. AREF and BIT) have DEFUN (SETF FOO) versions
67 ;;; too. Do we really need both? -- WHN 19990921
68 #-sb-xc-host
(defsetf car %rplaca
)
69 #-sb-xc-host
(defsetf cdr %rplacd
)
70 #-sb-xc-host
(defsetf caar
(x) (v) `(%rplaca
(car ,x
) ,v
))
71 #-sb-xc-host
(defsetf cadr
(x) (v) `(%rplaca
(cdr ,x
) ,v
))
72 #-sb-xc-host
(defsetf cdar
(x) (v) `(%rplacd
(car ,x
) ,v
))
73 #-sb-xc-host
(defsetf cddr
(x) (v) `(%rplacd
(cdr ,x
) ,v
))
74 #-sb-xc-host
(defsetf caaar
(x) (v) `(%rplaca
(caar ,x
) ,v
))
75 #-sb-xc-host
(defsetf cadar
(x) (v) `(%rplaca
(cdar ,x
) ,v
))
76 #-sb-xc-host
(defsetf cdaar
(x) (v) `(%rplacd
(caar ,x
) ,v
))
77 #-sb-xc-host
(defsetf cddar
(x) (v) `(%rplacd
(cdar ,x
) ,v
))
78 #-sb-xc-host
(defsetf caadr
(x) (v) `(%rplaca
(cadr ,x
) ,v
))
79 #-sb-xc-host
(defsetf caddr
(x) (v) `(%rplaca
(cddr ,x
) ,v
))
80 #-sb-xc-host
(defsetf cdadr
(x) (v) `(%rplacd
(cadr ,x
) ,v
))
81 #-sb-xc-host
(defsetf cdddr
(x) (v) `(%rplacd
(cddr ,x
) ,v
))
82 #-sb-xc-host
(defsetf caaaar
(x) (v) `(%rplaca
(caaar ,x
) ,v
))
83 #-sb-xc-host
(defsetf cadaar
(x) (v) `(%rplaca
(cdaar ,x
) ,v
))
84 #-sb-xc-host
(defsetf cdaaar
(x) (v) `(%rplacd
(caaar ,x
) ,v
))
85 #-sb-xc-host
(defsetf cddaar
(x) (v) `(%rplacd
(cdaar ,x
) ,v
))
86 #-sb-xc-host
(defsetf caadar
(x) (v) `(%rplaca
(cadar ,x
) ,v
))
87 #-sb-xc-host
(defsetf caddar
(x) (v) `(%rplaca
(cddar ,x
) ,v
))
88 #-sb-xc-host
(defsetf cdadar
(x) (v) `(%rplacd
(cadar ,x
) ,v
))
89 #-sb-xc-host
(defsetf cdddar
(x) (v) `(%rplacd
(cddar ,x
) ,v
))
90 #-sb-xc-host
(defsetf caaadr
(x) (v) `(%rplaca
(caadr ,x
) ,v
))
91 #-sb-xc-host
(defsetf cadadr
(x) (v) `(%rplaca
(cdadr ,x
) ,v
))
92 #-sb-xc-host
(defsetf cdaadr
(x) (v) `(%rplacd
(caadr ,x
) ,v
))
93 #-sb-xc-host
(defsetf cddadr
(x) (v) `(%rplacd
(cdadr ,x
) ,v
))
94 #-sb-xc-host
(defsetf caaddr
(x) (v) `(%rplaca
(caddr ,x
) ,v
))
95 #-sb-xc-host
(defsetf cadddr
(x) (v) `(%rplaca
(cdddr ,x
) ,v
))
96 #-sb-xc-host
(defsetf cdaddr
(x) (v) `(%rplacd
(caddr ,x
) ,v
))
97 #-sb-xc-host
(defsetf cddddr
(x) (v) `(%rplacd
(cdddr ,x
) ,v
))
98 #-sb-xc-host
(defsetf first %rplaca
)
99 #-sb-xc-host
(defsetf second
(x) (v) `(%rplaca
(cdr ,x
) ,v
))
100 #-sb-xc-host
(defsetf third
(x) (v) `(%rplaca
(cddr ,x
) ,v
))
101 #-sb-xc-host
(defsetf fourth
(x) (v) `(%rplaca
(cdddr ,x
) ,v
))
102 #-sb-xc-host
(defsetf fifth
(x) (v) `(%rplaca
(cddddr ,x
) ,v
))
103 #-sb-xc-host
(defsetf sixth
(x) (v) `(%rplaca
(cdr (cddddr ,x
)) ,v
))
104 #-sb-xc-host
(defsetf seventh
(x) (v) `(%rplaca
(cddr (cddddr ,x
)) ,v
))
105 #-sb-xc-host
(defsetf eighth
(x) (v) `(%rplaca
(cdddr (cddddr ,x
)) ,v
))
106 #-sb-xc-host
(defsetf ninth
(x) (v) `(%rplaca
(cddddr (cddddr ,x
)) ,v
))
107 #-sb-xc-host
(defsetf tenth
(x) (v) `(%rplaca
(cdr (cddddr (cddddr ,x
))) ,v
))
108 #-sb-xc-host
(defsetf rest %rplacd
)
109 #-sb-xc-host
(defsetf elt %setelt
)
110 #-sb-xc-host
(defsetf aref %aset
)
111 #-sb-xc-host
(defsetf row-major-aref %set-row-major-aref
)
112 #-sb-xc-host
(defsetf svref %svset
)
113 #-sb-xc-host
(defsetf char %charset
)
114 #-sb-xc-host
(defsetf bit %bitset
)
115 #-sb-xc-host
(defsetf schar %scharset
)
116 #-sb-xc-host
(defsetf sbit %sbitset
)
117 (defsetf %array-dimension %set-array-dimension
)
118 (defsetf sb
!kernel
:%raw-bits sb
!kernel
:%set-raw-bits
)
119 (defsetf sb
!kernel
:%vector-raw-bits sb
!kernel
:%set-vector-raw-bits
)
120 #-sb-xc-host
(defsetf symbol-value set
)
121 #-sb-xc-host
(defsetf symbol-plist %set-symbol-plist
)
122 #-sb-xc-host
(defsetf nth %setnth
)
123 #-sb-xc-host
(defsetf fill-pointer %set-fill-pointer
)
124 (defsetf sap-ref-8 %set-sap-ref-8
)
125 (defsetf signed-sap-ref-8 %set-signed-sap-ref-8
)
126 (defsetf sap-ref-16 %set-sap-ref-16
)
127 (defsetf signed-sap-ref-16 %set-signed-sap-ref-16
)
128 (defsetf sap-ref-32 %set-sap-ref-32
)
129 (defsetf signed-sap-ref-32 %set-signed-sap-ref-32
)
130 (defsetf sap-ref-64 %set-sap-ref-64
)
131 (defsetf signed-sap-ref-64 %set-signed-sap-ref-64
)
132 (defsetf sap-ref-word %set-sap-ref-word
)
133 (defsetf signed-sap-ref-word %set-signed-sap-ref-word
)
134 (defsetf sap-ref-sap %set-sap-ref-sap
)
135 (defsetf sap-ref-single %set-sap-ref-single
)
136 (defsetf sap-ref-double %set-sap-ref-double
)
137 #!+long-float
(defsetf sap-ref-long %set-sap-ref-long
)
138 #-sb-xc-host
(defsetf subseq
(sequence start
&optional
(end nil
)) (v)
139 `(progn (replace ,sequence
,v
:start1
,start
:end1
,end
)
142 ;;; from fdefinition.lisp
143 (in-package "SB!IMPL")
144 #-sb-xc-host
(defsetf fdefinition %set-fdefinition
)
147 (in-package "SB!KERNEL")
148 (defsetf code-header-ref code-header-set
)
149 (defsetf %raw-bits %set-raw-bits
)
151 ;;; from serve-event.lisp
152 (in-package "SB!IMPL")
153 (defsetf object-set-operation %set-object-set-operation
155 "Set the handler function for an object set operation.")
159 (defsetf context-register %set-context-register
)
160 (defsetf context-float-register %set-context-float-register
)
162 (sb!int
:/show0
"leaving defsetfs.lisp")