[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: issue QUOTE-MAY-COPY, version 2
- To: jeff%aiai.edinburgh.ac.uk@NSS.Cs.Ucl.AC.UK, sandra%defun@cs.utah.edu
- Subject: Re: issue QUOTE-MAY-COPY, version 2
- From: cperdue@Sun.COM (Cris Perdue)
- Date: Tue, 3 Jan 89 09:46:22 PST
- Cc: KMP@scrc-stony-brook.arpa, cl-compiler@sail.stanford.edu
> > Could it be that something like the following might return NIL?
> >
> > (let ((a (gensym)))
> > (eql (funcall (compile nil `(lambda () ',a)))
> > (funcall (compile nil `(lambda () ',a)))))
> >
> > Or even
> >
> > (let ((a (gensym)))
> > (eval `(eql ',a ',a)))
Let's leave QUOTE with its current definition, in which it does not
copy ever, and define both of these to always return "true". It shouldn't
even matter what type of object a is bound to.
>
> Rather than making an exception for gensyms, I'm inclined to believe
> that *all* sharing of structures within an expression passed to EVAL,
> a function passed to COMPILE, or the entire contents of a file
> compiled with COMPILE-FILE ought to be preserved. I don't think it
> would be unreasonable for your first example to return NIL, but I
> think the second one ought to return true (regardless of whether the
> value of A is a gensym or some other kind of object).
>
> This really falls under issue CONSTANT-CIRCULAR-COMPILATION . . .
Sandra's point, when applied to COMPILE-FILE, does indeed at least
overlap with CONSTANT-CIRCULAR-COMPILATION. Let's require sharing
to be preserved when *DUMP-CIRCLE* is turned on. How about that?
Also, it is important to understand that if the fasdumper
does not detect shared structure, as when *DUMP-CIRCLE* or the
equivalent is NOT turned on, the "inverse" of constant coalescing
occurs -- one object in the source may turn into 2 if it appears
in multiple places. I know that this point has been made
before, I'm just repeating it.