[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] DO-SYMBOLS and DO-ALL-SYMBOLS don't have implicit
From: |
Camm Maguire |
Subject: |
Re: [Gcl-devel] DO-SYMBOLS and DO-ALL-SYMBOLS don't have implicit tagbodies |
Date: |
28 Oct 2002 21:27:59 -0500 |
Greetings! The problem here appears to lie with symbol-macrolet, as
opposed to setf et. al. At least there appears to be a problem
masking any other problem in the latter. Several test failures
involve this issue.
"Paul F. Dietz" <address@hidden> writes:
> Camm Maguire wrote:
> (symbol-macrolet ((x (aref a (incf i)))
> (y (aref a (incf i))))
> (let ((a (copy-seq #(0 1 2 3 4 5 6 7 8 9)))
> (i 0))
> (psetq x (aref a (incf i))
> y (aref a (incf i)))
> (values a i)))
>
> is equivalent to
>
> (let ((a (copy-seq #(0 1 2 3 4 5 6 7 8 9)))
> (i 0))
> (psetf (aref a (incf i)) (aref a (incf i))
> (aref a (incf i)) (aref a (incf i)))
> (values a i))
>
Here is what I get:
(macroexpand '(symbol-macrolet ((x (aref a (incf i)))
(y (aref a (incf i))))
(let ((a (copy-seq #(0 1 2 3 4 5 6 7 8 9)))
(i 0))
(psetq x (aref a (incf i))
y (aref a (incf i)))
(values a i)))
)
(PROGN
(LET ((A (COPY-SEQ #(0 1 2 3 4 5 6 7 8 9))) (I 0))
(LET* ((#:G257108 (AREF A (INCF I))) (#:G257109 (AREF A (INCF I))))
(SETF (AREF A (INCF I)) #:G257108)
(SETF (AREF A (INCF I)) #:G257109)
NIL)
(VALUES A I)))
T
>
I'm looking through pcl/boot.lisp to try to understand where this is
occurring. I'm hesitant to change anything in here, apart from the
impl/gcl directory, as pcl is supposed to be standard and portable.
Any hints from those more familiar are appreciated.
Take care,
> which is equivalent to
>
> (let ((a (copy-seq #(0 1 2 3 4 5 6 7 8 9))))
> (psetf (aref a 1) (aref a 2)
> (aref a 3) (aref a 4))
> (values a 4))
>
> which should return
>
> #(0 2 2 4 4 5 6 7 8 9)
> 4
>
> Paul
>
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
Re: [Gcl-devel] DO-SYMBOLS and DO-ALL-SYMBOLS don't have implicit tagbodies, Camm Maguire, 2002/10/18