Lisp HUG Maillist Archive

CLOS changes in 6.1

I read the release notes for LWW 6.1 and find this :

13.16.1  Initarg checking extended
The system-supplied primary methods for reinitialize-instance, 
update-instance-for-redefined-class and update-instance-fordifferent-class now check the initargs as specified by ANSI Common 
Lisp.  In previous LispWorks releases, only make-instance checked them.

In 6.0, there was this variable :
(setf clos::*CHECK-MAKE-INSTANCE-INITARGS* nil)
whose effect was to turn off this checking  (or that's what I thought). 

Has this variable disappeared? I get errors with 6.1 about invalid initargs arguments 
to reinitialize-instance which I didn't get previously with 6.0.

I would also like to know something about locking instances during make-instance (or reinitialize-instance).
If I define an after method on reinitialize-instance, is the lock on the instance released during this after method ?
(Ok, I could test it quickly I guess).

Thanks in advance for your comments,

--
Fabrice Popineau
-----------------------------
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
------------------------------


Re: CLOS changes in 6.1

Le 22 févr. 2012 à 21:25, Fabrice Popineau a écrit :

> I read the release notes for LWW 6.1 and find this :
> 
> 13.16.1  Initarg checking extended
> The system-supplied primary methods for reinitialize-instance, 
> update-instance-for-redefined-class and update-instance-fordifferent-class now check the initargs as specified by ANSI Common 
> Lisp.  In previous LispWorks releases, only make-instance checked them.
> 
> In 6.0, there was this variable :
> (setf clos::*CHECK-MAKE-INSTANCE-INITARGS* nil)
> whose effect was to turn off this checking  (or that's what I thought). 
> 
> Has this variable disappeared? I get errors with 6.1 about invalid initargs arguments 
> to reinitialize-instance which I didn't get previously with 6.0.

yes, I think you should now use :

(clos::set-clos-initarg-checking nil)


Best,

Jean


> 
> I would also like to know something about locking instances during make-instance (or reinitialize-instance).
> If I define an after method on reinitialize-instance, is the lock on the instance released during this after method ?
> (Ok, I could test it quickly I guess).
> 
> Thanks in advance for your comments,
> 
> -- 
> Fabrice Popineau
> -----------------------------
> SUPELEC
> Département Informatique
> 3, rue Joliot Curie
> 91192 Gif/Yvette Cedex
> Tel direct : +33 (0) 169851950
> Standard : +33 (0) 169851212
> ------------------------------
> 
> 


Re: CLOS changes in 6.1

Unable to parse email body. Email id is 11488

Re: CLOS changes in 6.1

> I would also like to know something about locking instances during
> make-instance (or reinitialize-instance).
> If I define an after method on reinitialize-instance, is the lock on the
> instance released during this after method ?
> (Ok, I could test it quickly I guess).

Make-instance and reinitialize-instance don't lock the instance.  Do you have
specific issues with locks?

 
Sorry for the delay before I could again look at this.. 
No, it doesn't lok the instance, but the class.
My problem until I find a way to do it clean is that I want to be able add slots to class
dynamically when instances are created.

With LWW6.0, I could unlock the lock slot of the class.

With LWW6.1, I found another trick to do it, but I'm afraid it is still ugly : I override the clos::lock-class-redefinition-lock-atomic 
function.
 
I have a small test case that I can post if needed.


Best regards,

Fabrice
Updated at: 2020-12-10 08:36 UTC