On Sat, Aug 17, 2002 at 08:55:05PM +0400, Alexey Dejneka wrote:
> This patch closes bugs 65, 70, 109 and one reported by Peter Denno on
> cmucl-imp 2002-08-12.
Thank you! It will be very nice to have those bugs closed.
However, the new assertion in the patch fails on the following code
(based on :NEW-BUGS-LEGACY-18 in new-bugs.lisp in my local version of
(defun b (x)
(labels ((f (y &optional (z 0))
(if y (f (+ y z)))))))
My first impulse is to do something along the lines of
- (aver (not (eq home clambda)))
+ ;; Alas, that a Lisp compiler treats cycles as a special
+ ;; case! Code like
+ ;; (defun b (x)
+ ;; (labels ((f (y &optional (z 0))
+ ;; (if y (f (+ y z)))))))
+ ;; can end up here with (EQ HOME CLAMBDA). F is unreachable,
+ ;; because it has no external references, but meanwhile it's
+ ;; optimized, because it has a reference to itself, and Python deals
+ ;; with orphaned code in a way which is fundamentally analogous
+ ;; to refcounting instead of true GC. In this special case, the
+ ;; transformations below would be fundamentally irrelevant (since
+ ;; the code is unreachable) so we skip them instead of inviting
+ ;; strange special-case failures.
+ (unless (eq home clambda)
However, maybe it'd be better just to delete the AVER altogether. Or
maybe something subtler is called for? Since you've amply demonstrated
that you understand this code probably better than anyone in the
world, I thought I'd ask for your help before trying too hard to
figure this out for myself.
William Harold Newman <william.newman@...>
<Krystof> But I think I can trump PCL cleanup with Alexey "CMUCL God in disguise" Dejenka
PGP key fingerprint 85 CE 1C BA 79 8D 51 8C B9 25 FB EE E0 C3 E5 7C