SETF for structures that are specialized vectors

This commit is contained in:
Juan Jose Garcia Ripoll 2009-02-07 16:44:51 +01:00
parent b9436ff2f2
commit 7308dc932d

View file

@ -316,8 +316,11 @@ Does not check if the third gang is a single-element list."
(defun setf-structure-access (struct type index newvalue)
(declare (si::c-local))
(case type
((LIST VECTOR) `(sys:elt-set ,struct ,index ,newvalue))
(cond
((or (eq type 'list) (eq type 'vector))
`(sys:elt-set ,struct ,index ,newvalue))
((consp type)
`(si::aset ,newvalue (the ,type ,struct) ,index))
(t `(sys::structure-set ,struct ',type ,index ,newvalue))))
(defun setf-expand (l env)