[Openmcl-devel] defsetf question
bryan o'connor
bryan-openmcl at lunch.org
Thu Jan 20 15:52:50 PST 2005
the spec says that the long form of defsetf encloses the body
in a block named after the access function.
i think openmcl is doing the wrong thing and putting the block
around the eventual setf-expansion instead of the body that's
evaluated to generate the setf-expansion.
i wanted to make sure i was interpreting the spec correctly before
changing it.
an example:
? (defsetf foo (x) (y) (return-from foo `(setf (car ,x) ,y)))
> Error in process listener(1): While compiling an anonymous function :
> Can't RETURN-FROM block : FOO.
? (defsetf foo (x) (y) `(return-from foo (setf (car ,x) ,y)))
FOO
? (get-setf-expansion '(foo x))
(#:G73)
(X)
(#:G72)
((LAMBDA (#:X) (BLOCK FOO (RETURN-FROM FOO (SETF (CAR #:X) #:G72))))
#:G73)
(FOO #:G73)
thanks,
...bryan
More information about the Openmcl-devel
mailing list