[cmucl-imp] Re: Compiled COMPILE forms at load time Bug
Raymond Toy
toy.raymond at gmail.com
Mon Mar 15 15:01:17 CET 2010
On 3/12/10 11:45 AM, Helmut Eller wrote:
> * Raymond Toy [2010-03-12 12:35+0100] writes:
>
>
>> So COMPILE has silently zapped the structure. We should probably print
>> he warning for this too.
>>
> Yes, definitely. Also for this:
>
> (defstruct xyz a)
> (setf (fdefinition 'xyz-a) (lambda () 42))
>
I added a hook to *setf-fdefinition-hook* to check for this case. Works
ok, but now I can't compile clx/depdefs.lisp. CMUCL complains about
redefining reply-size and buffer-lock which are slot accessor
functions. But I haven't figured out from the code where the
redefinition is coming from.
Also, consider this:
(defstruct abc a b c)
(defun abc-a () 42)
CMUCL undefines the structure, but
(defstruct abc a)
produces an error about incompatibly redefining the structure.
>
>> Note that in both cases any existing structures will be in a bad state.
>> They still exist, but there's not much you can do with them.
>>
> Compiled could would continue to work since accessors are inlined. Also
> (type-of (make-xyz)) still works. The printer is effed up, though.
>
If we undefined the structure, I would expect make-xyz (or make-abc) not
to work.
What to do?
Ray
More information about the cmucl-imp
mailing list