Commit 846abed0 authored by Marius Gerbershagen's avatar Marius Gerbershagen

threading: signal better errors in get-cas-expansion

    If mp:compare-and-swap was expanding from a place which was not a
    list, it would throw a bogus type error instead of the correct
    "Cannot get the compare-and-swap expansion" error.
parent 663f2fb3
......@@ -227,7 +227,8 @@ the resulting COMPARE-AND-SWAP expansions."
(defun get-cas-expansion (place &optional environment &aux f)
"Returns the COMPARE-AND-SWAP expansion forms and variables as defined
in DEFINE-CAS-EXPANDER for PLACE as six values."
(cond ((setq f (si:get-sysprop (first place) 'CAS-EXPANDER))
(cond ((and (listp place)
(setq f (si:get-sysprop (first place) 'CAS-EXPANDER)))
(apply f environment (rest place)))
;; We try macro expansion with MACROEXPAND-1 as in SETF
((and (setq f (macroexpand-1 place environment)) (not (equal f place)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment