> The attached patch cleans up two KLUDGEs in the compiler to do with
> macros that use get-setf-expander, specifically DELETEF-IN and
> PUSH-IN. SBCL still manages to build with this change, and it doesn't
> if you just apply the late-macros.lisp part, so it should be correct.
> The only reason I can think of for how DELETEF-IN and PUSH-IN were
> originally implemented is some sort of performance hack. I didn't
> compare build times for with and without this patch, so I don't know
> if there are any performance implications.
Sorry for the huge delay.
> +;;; Remove ITEM from the list linked by the accessor function NEXT
> +;;; that is stored in PLACE.
> +(def!macro deletef-in (next place item)
> + (let ((n-item (gensym))
> + (n-prev (gensym))
> + (n-current (gensym)))
> + `(let ((,n-item ,item))
> + (if (eq ,place ,n-item)
> + (setf ,place (,next ,n-item))
> + (do ((,n-prev ,place ,n-current)
> + (,n-current (,next ,place)
> + (,next ,n-current)))
> + ((eq ,n-current ,n-item)
> + (setf (,next ,n-prev)
> + (,next ,n-current)))))
> + (values))))
Multiple evaluation of PLACE here.
> +(def!macro push-in (next item place)
> + `(progn
> + (setf (,next ,item) ,place)
> + (setf ,place ,item)
> + (values)))
Multiple evaluation of ITEM here.
I'm also not sure if these will work for some multiple-value setf
-- Nikodemus Schemer: "Buddha is small, clean, and serious."
Lispnik: "Buddha is big, has hairy armpits, and laughs."