[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MOP Comments Part 2.



    Date: Tue, 8 Dec 87 16:32:00 CST
    From: Patrick H Dussud <DUSSUD%jenner.csc.ti.com@RELAY.CS.NET>

    Section: The slot inheritance protocol

	    The generic function collect-slotds (class local-slots cpl) collects an
	    ordered list of effective slot descriptions for this class.  It takes
	    the local-slots as an argument, and recursively builds up the list of
	    all slots that need to be in this class.  It calls
	    compute-effective-slotd to combine multiple definitions of a single slot
	    found in classes on the class precedence list.

    I think that the word recursively is a mistake here, 

right, the word recursively is wrong.  Collect-slotds does not call
itself recursively, it goes through the cpl collecting all the slot
descriptions.  We'll fix this.
				 
				 I don't know why this function needs LOCAL-SLOTS
    and CPL if that's the local slots and the cpl of CLASS.

Good question.  I think this is holdover from an old way of doing things
or perhaps is just to make things trivially faster in PCL.

    Section: The Instance Structure Protocol
    I would like to see some objectives for this section:
    - Do we want a metaclass writer be to able to write, portably, a new metaclass
    and be able to optimize creation and slot access as much as the native
    implementation of STANDARD-CLASS, or
    - Do we expect the programmer to get something functional but not very
    fast ?
    I assume that we want to meet the first objective, because otherwise, I don't
    see much value in providing something relatively complex that does
    not do much.

The first objective was the one we had in mind.  We will try to add some
statements that convey this.

    To summarize, if we want the OPTIMIZE-INSTANCE-ACCESS method to generate a call
    to a non generic, implementation optimized function, this function CANNOT infer
    the allocation type of the slot from its name at compile time. This needs to be
    done at runtime.

Right, I am glad you noticed this, its a horrible bug in the current
writeup.  It was intended to be the way you described and in going from
whiteboard to text editor it got all screwed up.  I will try to fix this
tomorrow and get out a new draft. 
 
	     Patrick.

Tomorrow's draft will (hopefully) have these corrections, an improved
named-class definition protocol and an improved class update protocol.
-------