[Ecls-list] ECL & Closer-mop

Pascal Costanza pc at p-cos.net
Sun Nov 18 22:38:40 UTC 2012


Hi,

I'm back in the land of the living… ;)

And I have two bugs to report:

- Previously, ECL had a way of specifying :optimize-slot-access for classes to state whether slot access should go through the CLOS MOP slot access functions or should be optimized. Judging from the source code for ECL, this is still supposed to be supported, but it seems that the defclass macro, or some level in between before shared-initialize cannot handle this option anymore.

- It seems that slot-unbound is not correctly handled. Here is a test case:

> (use-package :clos)

T
> (defclass my-class (standard-class) () ())

#<The STANDARD-CLASS COMMON-LISP-USER::MY-CLASS>
> (defmethod validate-superclass ((class my-class) (class standard-class)) t)

#<standard-method VALIDATE-SUPERCLASS (#<The STANDARD-CLASS COMMON-LISP-USER::MY-CLASS>
                                       #<The STANDARD-CLASS STANDARD-CLASS>)>
> (defmethod slot-unbound ((class my-class) object slot-name)
    (print :unbound) (print slot-name) (call-next-method))

#<standard-method SLOT-UNBOUND (#<The STANDARD-CLASS COMMON-LISP-USER::MY-CLASS>
                                #<The BUILT-IN-CLASS T> #<The BUILT-IN-CLASS T>)>
> (defclass person () (name employer) (:metaclass my-class))

#<The COMMON-LISP-USER::MY-CLASS COMMON-LISP-USER::PERSON>
> (defvar *p* (make-instance 'person))

*P*
> (slot-value *p* 'name)

SI:UNBOUND


Best,
Pascal

On 12 Oct 2012, at 12:53, Juan Jose Garcia-Ripoll <juanjose.garciaripoll at gmail.com> wrote:

> I have uploaded a set of changes that turn the last set of accessors into true generic functions. There were also some optimizations in the implementation of accessors.
> 
> The patches attached seem to make closer-mop build with ECL at least sufficiently well as to allow ContextL also to build. Closer-mop tests' also run fine, though they also did in the past, so it is no real check.
> 
> Just to be sure, this is the last patch I am uploading right now
> 
> commit bca1f4053a039ee65aaf5dde4c39d3ceccc1bf91
> Author: Juan Jose Garcia Ripoll <jjgarcia at users.sourceforge.net>
> Date:   Fri Oct 12 12:14:27 2012 +0200
> 
>     All accessors are now generic functions, including slot definition's ones
> 
> 
> Juanjo
> 
> -- 
> Instituto de Física Fundamental, CSIC
> c/ Serrano, 113b, Madrid 28006 (Spain) 
> http://juanjose.garciaripoll.googlepages.com
> <closer.diff>

--
Pascal Costanza



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20121118/54d65b31/attachment.html>


More information about the ecl-devel mailing list