From jdcal at yahoo.com Thu Apr 14 13:26:07 2005 From: jdcal at yahoo.com (Jeff Caldwell) Date: Thu, 14 Apr 2005 06:26:07 -0700 (PDT) Subject: [closer-devel] slot-value-using-class stack overflow Message-ID: <20050414132607.5946.qmail@web50608.mail.yahoo.com> Hello, I am working in LWL 4.3. In closer-mop.lisp's cl:defmethod slot-value-using-class (class standard-class), the code (if slotd (if (default-reader slotd) (slot-value-using-class class object slotd) .... causes recursion and stack overflow when my code, which uses c2mop, specializes slot-value-using-class with a class inheriting from standard-effective-slot-definition. My slot-value-using-class is called first. When I call-next-method, c2mop's slot-value-using-class is called. The recursive call above reinvokes my code. A first stab at a work around for the code above fixes the recursion: (slot-value-using-class (find-class 'standard-class) object slotd) Also, I tried to implement slot attributes as definined in AMOP pp.83-90 (or close to those pages, that's from memory). I ended up with a condition where code somewhere was trying to access the attributes slot defined in attributes-mixin. However, the code was trying to get the slot from another slot instance, which caused the condition to be signaled. Changing my code's package file to use CLOS instead of CLOSER-MOP, i.e. going back to the straight LW MOP, fixed everything. I didn't have time to nail that problem down any further. Jeff Caldwell __________________________________ Do you Yahoo!? Make Yahoo! your home page http://www.yahoo.com/r/hs From jdcal at yahoo.com Sun Apr 17 02:26:09 2005 From: jdcal at yahoo.com (Jeff Caldwell) Date: Sat, 16 Apr 2005 19:26:09 -0700 (PDT) Subject: [closer-devel] Example code for problems Message-ID: <20050417022609.70930.qmail@web50607.mail.yahoo.com> Hello, I finally found time to put together sample code demonstrating the problems I reported earlier. Instructions for recreating the problems are included at the top of the code file. It looks like learning about Closer will teach me more about the MOP and about the differences between implementations. Thanks, Pascal. Jeff __________________________________ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail -------------- next part -------------- A non-text attachment was scrubbed... Name: c2mop-attributes.lisp Type: application/octet-stream Size: 7804 bytes Desc: c2mop-attributes.lisp URL: From pc at p-cos.net Sun Apr 17 14:56:21 2005 From: pc at p-cos.net (Pascal Costanza) Date: Sun, 17 Apr 2005 16:56:21 +0200 Subject: [closer-devel] Apologies Message-ID: <334e1937311e7463b11aec18cee93847@p-cos.net> Hi everyone, I am very sorry, but apparently I wasn't subscribed to my own mailing lists, probably due to changes to my email addresses not so long ago. Therefore, I have missed the mails to this mailing list. Needless to say that I appreciate your input a lot, and if you have gotten the contrary impression from my non-responses, please be assured that this was not intended. Thanks a lot to Jeff informing me about this. Here is a wrap up: - Marco has posted a patch for making *mop-feature-test-path* work. I have incorporated that patch in the source code. - Jeff has posted code that shows that my attempt at fixing the slot instance access protocols in LispWorks failed. His proposed fix doesn't work, but contains an idea how to fix things in a more straightforward way, namely to explicitly pass (find-class 'standard-class) to the slot-xxx-using-class functions. I have incorporated that idea into Closer to MOP, which allowed to get rid of a major portion of the source code. (That's always a good sign.) Unfortunately, some of the other fixes to the LispWorks MOP don't work anymore because of this. It would probably be possible to incorporate them again, but on the other hand, they are already fixed in LispWorks 4.4. (They are related to initialization of accessor methods, accessor-method-slot-definition, and reader/writer-method-class.) If someone really, really needs those fixes, I can do that. Please let me know. Ah, BTW, Jeff's code now works on my machine. I am going to publish the new version of Closer to MOP soon. Again, sorry for the delay, and let me know whether I have missed something else. Cheers, Pascal -- 2nd European Lisp and Scheme Workshop July 26 - Glasgow, Scotland - co-located with ECOOP 2005 http://lisp-ecoop05.bknr.net/ From pc at p-cos.net Sun Apr 17 15:39:00 2005 From: pc at p-cos.net (Pascal Costanza) Date: Sun, 17 Apr 2005 17:39:00 +0200 Subject: [closer-devel] New versions of MFT and C2MOP Message-ID: Hi, I have just released new versions of the MOP Feature Tests, and the Closer 2 MOP compatibility package. Download them from the project website at http://common-lisp.net/project/closer/ Cheers, Pascal -- 2nd European Lisp and Scheme Workshop July 26 - Glasgow, Scotland - co-located with ECOOP 2005 http://lisp-ecoop05.bknr.net/