|
From: SourceForge.net <no...@so...> - 2011-04-22 19:53:39
|
Bugs item #3291585, was opened at 2011-04-22 14:46 Message generated for change (Comment added) made by sds You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=3291585&group_id=1355 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: clisp Group: ANSI compliance issue Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: belovedeagle (belovedeagle) Assigned to: Sam Steingold (sds) Summary: (setf (values (values) b c) (...)) misplaces values Initial Comment: Clisp 2.48 gives: (setf (values (values) b c) (values 'x 'y 'z)) => nil; x; y b => x c => y but should be: (setf ...) => nil; y; z b => y c => z (macroexpand '(setf (values (values) b c) form)) should be roughly the same as (macroexpand '(setf (values (values a) b c) form)) but clisp fails to include a (pop #:values-0000) for the first value place in the former situation: [9]> (macroexpand '(setf (values (values) b c) form)) (LET* ((#:VALUES-2935 (MULTIPLE-VALUE-LIST FORM)) (#:NEW-2933 (POP #:VALUES-2935)) (#:NEW-2934 (POP #:VALUES-2935))) (VALUES (VALUES) (SETQ B #:NEW-2933) (SETQ C #:NEW-2934))) ; T [10]> (macroexpand '(setf (values (values a) b c) form)) (LET* ((#:VALUES-2939 (MULTIPLE-VALUE-LIST FORM)) (#:NEW-2936 (POP #:VALUES-2939)) (#:NEW-2937 (POP #:VALUES-2939)) (#:NEW-2938 (POP #:VALUES-2939))) (VALUES (VALUES (SETQ A #:NEW-2936)) (SETQ B #:NEW-2937) (SETQ C #:NEW-2938))) ; T ---------------------------------------------------------------------- >Comment By: Sam Steingold (sds) Date: 2011-04-22 15:53 Message: note that macroexpand-1 is more instructive in this case... ---------------------------------------------------------------------- Comment By: Sam Steingold (sds) Date: 2011-04-22 15:49 Message: thank you for your bug report. the bug has been fixed in the source tree (mercurial/hg). you can either wait for the next release (recommended) or check out the current mercurial tree (see http://clisp.org) and build CLISP from the sources (be advised that between releases the source tree is very unstable and may not even build on your platform). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=3291585&group_id=1355 |