[Bese-devel] make-load-form

Ian Eslick eslick at csail.mit.edu
Sun Dec 11 22:50:23 UTC 2005


My understanding is that finalize-inheritance will not fail if called 
multiple times.  There's a nice discussion here:  
http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/8636fb5d2cdd7aef/8e8d6d75d51f8535?lnk=st&q=finalize-inheritance+allegro+error+class+not+finalized&rnum=1&hl=en#8e8d6d75d51f8535

I think this is an interaction between the mop ordering of when 
make-load-form is called on the base class 'form' during the creation of 
the first instance of subclass 'application-form' during the compilation 
of (defmethod place ((place place))) in backtracking.lisp where 
with-call/cc is expanded and then calls walk which instantiates 
application-form leading to the mop instance creation & class 
finalization procedures being executed in a particular order.

My guess is that the classes are finalized in order of inheratence but 
that your use of the mop methods on the base class in the (defmethod 
make-load-form ((object form) ...) ...) are called before the subclasses 
have been finalized.

I'm not sure what the clean solution is although it may just be to call 
finalize explicitly in a 'eval-when' form after all the classes are 
defined.  I don't see that you have any forward-referenced classes so 
there shouldn't be any surprises.

I hope that made sense!

Ian

Marco Baringer wrote:

>Ian Eslick <eslick at csail.mit.edu> writes:
>
>  
>
>>I added a call to finalize just before the call to class-slots to
>>ensure finalization since, ostensibly, the class heirarchy is in fact
>>completely defined when you start using walk-form.  Not sure exactly
>>why it isn't called beforehand but wanted to provide a heads up on
>>that.
>>    
>>
>
>i'm pretty sure finalize-inheritance must be called before an instance
>of the class is made, and since make-load-form must be called on an
>existing instance i don't see why finalize-inheritance isn't being
>called. any mop gurus listening?
>
>i'll add the call to finalize-inheritance anyway (is it safe to call
>finalize-inheritance multiple times like that?)
>
>  
>



More information about the bese-devel mailing list