[Ecls-list] News about CVS & MOP

Juan Jose Garcia Ripoll juan.ripoll at mpq.mpg.de
Mon Mar 20 02:01:01 UTC 2006


Hi,

first of all Erik Enge will soon set up a project for ECL at the
Common-Lisp.net server.

I have decided to move all of CVS there, because it would be impractical
to mirror every change which is done in SourceForge, and because in any
case it is relatively easy to move complete CVS trees around.

As an interim measure, people who really need to access the latest
version of ECL can resort to the nightly tarballs of the CVS tree:
	http://sourceforge.net/docs/E04/en/#nightly_tarballs

Finally, I had some time this weekend to work on the MOP. I have heavily
massaged the changes suggested by Dan Corkill and this is the result:

 - SLOT-VALUE, SLOT-BOUNDP, etc, together with MOP SLOT*-USING-CLASS
generic functions now rely entirely on slot-definition objects.

 - Effective slot definitions now have a "location" slot. Around methods
for COMPUTE-SLOTS assign a location to each slot definition that has
allocation :INSTANCE or :CLASS.

 - A new defclass option, :optimize-slot-access, which defaults to T,
controls whether the slots accessors should address directly the values
in the class or use SLOT-VALUE. It should be set to NIL when one intends
to redefine the SLOT-*-USING-CLASS methods.

 - Implemented [FUNCALLABLE-]STANDARD-INSTANCE-ACCESS. They are synonyms
for SI:INSTANCE-REF and are, as such, inlined and _very_ unsafe. Use
with care.

 - Two nonstandard slots have been removed from standard-methods.
Keeping track of which methods were in a defgeneric function is done
using the property list of the methods.

What I have not yet implemented is the standard-accessor-method. I would
like to understand why this is really needed and how it should work. I
have read my copy of the AMOP and the specification is rather weak.

>From my understanding, the creation of the slot accessors is left
entirely to the implementation, which can provide any code it wishes.
The only place where the programmer can intercept this is by supplying
its own method classes for the accessor functions. However I do not see
how this can help him/her to change the code which is run when a slot is
accessed. Any help here will be most welcome.

Right now, with the CVS version, ECL will allow you to completely
redefine the slot accessing routines by doing the following:

1) Supply (:optimize-slot-access nil) as an option to your DEFCLASS
forms.

2) Define your own slot definition class and specialize
SLOT-VALUE-USING-CLASS, SLOT-BOUNDP-USING-CLASS, etc, to your class.

3) If you do not wish the slot to be stored in memory, choose another
allocation class. This will prevent COMPUTE-SLOTS from assigning a
location to it.

Regards,

Juanjo

-- 
Max-Planck-Institut für Quantenoptik
Hans-Kopfermann-Str. 1, Garching, D-85748, Germany
Phone: +49 89 32905 345   Fax: +49 89 32905 336
http://www.mpq.mpg.de/Theorygroup/CIRAC/





More information about the ecl-devel mailing list