[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bugs in 2/4 Version with Lucid2.1
- To: email@example.com
- Subject: Bugs in 2/4 Version with Lucid2.1
- From: Gregor.pa@Xerox.COM
- Date: Mon, 8 Feb 88 12:53 PST
- Cc: CommonLoops.pa@Xerox.COM
- Fcc: BD:>Gregor>mail>outgoing-mail-1.text
- In-reply-to: The message of 8 Feb 88 11:32 PST from firstname.lastname@example.org
- Line-fold: no
Date: 8 Feb 88 14:32 EST
I have found two problems in trying to compile the Feb 4 version of
PCL under Lucid 2.1. I have fixes, I think , but I am uncertain of
just what happened here. Did others encounter these problems?
First, in lucid-low.lisp at line 108 we had
(defmacro cache-no (pointer mask)
`(lucid::logand& ,mask ,pointer))
Yes, go ahead and change that to %logand& in your version of the low
file. In the next release I will conditionalize that for #-LCL3.0.
Second, with-slots* was broken -- it failed to change setq to
setf when required. As an example of the problem,
The problem seemed to arise in with-slots-internal.
The original code would work interpreted, but not compiled.
Is this due to overly zealous optimization in the Lucid compiler?
Yes. Many of the better Common Lisp compilers have bugs like this. Out
of curiosity, does the following change (which is a little less ugly)
also fix the bug?
(defun with-slots-internal (specs form context translate-fn &aux entry)
(cond ((not (eq context :eval)) form)
(if (setq entry (assoc form specs))
(funcall translate-fn (cadr entry))
((not (listp form)) form)
((member (car form) '(setq setf))
;; Have to be careful. We must only convert the form to a SETF
;; form when we convert one of the 'logical' variables to a form
;; Otherwise we will get looping in implementations where setf
;; is a macro which expands into setq or vice versa.
(let ((kind (car form)))
(labels ((scan-setf (tail)
(if (null tail)
(if (setq entry (assoc (car tail) specs))
(progn (setq kind 'setf)
(funcall translate-fn (cadr entry)))
(scan-setf (cddr tail))))))
(walker::recons form kind (scan-setf (cdr form))))))
If you could check this out I would appreciate it. I will then put
whichever fix is appropriate in the sources.