Re: [j-devel] PATCH: multiple assignments for SETQ in compiled code

On Sun, 20 Jan 2008 at 10:47:12 -0800, Robert Dodier wrote:
> Hello,
>
> I am working w/ a copy of ABCL pulled from CVS a couple of days ago.
>
> I find the following triggers an error "Too many
> arguments for SETQ." when I put it in a file named
> u.lisp and call: (compile-file "u.lisp")
>
> (defvar bar-1)
> (defvar bar-2)
> (defun u (y)
> ((lambda (x) (setq bar-1 x bar-2 (* 2 x))) y))
>
> (IIRC this code does not trigger that error in interpreted code
> although I can't test that right at the moment since I have
> patched my copy of ABCL.)
>
> Here is a patch which allows SETQ to accept multiple
> assignments in compiled code.
>
> I would be very grateful if someone will apply this patch.
I've fixed this bug in CVS (0.0.10.14).
The real underlying problem was that the precompiler wasn't processing
lambda forms in the operator position of a function call, so
PRECOMPILE-SETQ wasn't getting a chance to do its job. I fixed this
in PRECOMPILE-FUNCTION-CALL, so no change is necessary in P1-SETQ.
Thanks!
-Peter

Thread view

Hello,
I am working w/ a copy of ABCL pulled from CVS a couple of days ago.
I find the following triggers an error "Too many
arguments for SETQ." when I put it in a file named
u.lisp and call: (compile-file "u.lisp")
(defvar bar-1)
(defvar bar-2)
(defun u (y)
((lambda (x) (setq bar-1 x bar-2 (* 2 x))) y))
(IIRC this code does not trigger that error in interpreted code
although I can't test that right at the moment since I have
patched my copy of ABCL.)
Here is a patch which allows SETQ to accept multiple
assignments in compiled code.
I would be very grateful if someone will apply this patch.
All the best,
Robert Dodier
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

On Sun, 20 Jan 2008 at 10:47:12 -0800, Robert Dodier wrote:
> Hello,
>
> I am working w/ a copy of ABCL pulled from CVS a couple of days ago.
>
> I find the following triggers an error "Too many
> arguments for SETQ." when I put it in a file named
> u.lisp and call: (compile-file "u.lisp")
>
> (defvar bar-1)
> (defvar bar-2)
> (defun u (y)
> ((lambda (x) (setq bar-1 x bar-2 (* 2 x))) y))
>
> (IIRC this code does not trigger that error in interpreted code
> although I can't test that right at the moment since I have
> patched my copy of ABCL.)
>
> Here is a patch which allows SETQ to accept multiple
> assignments in compiled code.
>
> I would be very grateful if someone will apply this patch.
I've fixed this bug in CVS (0.0.10.14).
The real underlying problem was that the precompiler wasn't processing
lambda forms in the operator position of a function call, so
PRECOMPILE-SETQ wasn't getting a chance to do its job. I fixed this
in PRECOMPILE-FUNCTION-CALL, so no change is necessary in P1-SETQ.
Thanks!
-Peter