Currently Slime cannot display arglist information for methods when running ABCL since ABCL does not export the required parts of the MOP. Most of the required functionality is already present in ABCL, so I've implemented the missing functionality (basically only the generic function COMPUTE-APPLICABLE-METHODS-USING-CLASSES), turned the function SLOT-DEFINITION-NAME into a generic function and created a patch that exports the new functionality. More precisely the externally visible changes are:
* SLOT-DEFINITION-NAME is now a generic function with a single method specialized on SLOT-DEFINITION and not a (non-generic) function with unspecialized argument. * Generic functions and methods for SLOT-DEFINITION-ALLOCATION, SLOT-DEFINITION-INITARGS, SLOT-DEFINITION-INITFORM and SLOT-DEFINITION-INITFUNCTIONS are defined and exported from the MOP package. For each of these implementations the method argument is specialized on SLOT-DEFINITION and the implementation simply delegates to the corresponding % SLOT-DEFINITION-* function. * COMPUTE-APPLICABLE-METHODS-USING-CLASSES is implemented as generic function and exported from the MOP package.
The behavior of these functions should be as specified in AMOP, but there are some caveats:
1. I have not checked my implementation of C-A-M-U-C against any other CLOS implementation, so I might have made mistakes or misunderstood something. 2. The methods for SLOT-DEFINITION-ALLOCATION, etc. are specialized on SLOT-DEFINITION and not, as specified in AMOP, on STANDARD-SLOT-DEFINITION since ABCL does not seem to implement the latter class. I don't know enough about ABCL to know what the preferred way of introducing STANDARD-SLOT-DEFINITION would be; re-implementing the slot-definition part in Lisp, subclassing Lisp classes from the Java class, or defining subclasses of existing classes in Java all seem like viable solutions.
To implement these things I've made some minor internal changes; in particular:
1. I've extracted a function to sort methods from the implementation of %COMPUTE-APPLICABLE-METHODS since this algorithm is now needed in COMPUTE-APPLICABLE-METHODS-USING-CLASSES as well. 2. I've renamed METHOD-APPLICABLE-P-USING-CLASSES to METHOD-APPLICABLE-USING-CLASSES-P, changed its implementation and extended its implementation to take into account EQL specializers. 3. I've removed the autoload for SLOT-DEFINITION-NAME. I don't know enough about the ABCL compiler to understand what the purpose of autoloading some things is, so I don't know whether autoloads for SLOT-DEFINITION-NAME et al. should be added somewhere. Leaving them out does not seem to break anything but it might have undesired consequences that I have missed.
The patch contains a few tests to verify that it does not completely break the compiler, but not a complete test-suite for the new functionality.
Current Slime needs a one line patch to enable arglist display for the patched ABCL; I've included this patch as well.
Best regards,
Matthias
The patch contains a few tests to verify that it does not completely break the compiler, but not a complete test-suite for the new functionality. Current Slime needs a one line patch to enable arglist display for the patched ABCL; I've included this patch as well.
Thanks for the patch, I'll be applying it shortly.
The tests don't seem to have the Classpath exception (neither do the existing ones), I guess that's intentional. Just something I noticed. That's fine, so no actions necessary.
2010/1/24 Ville Voutilainen ville.voutilainen@gmail.com:
Thanks for the patch, I'll be applying it shortly.
Committed on the trunk, r12395.
On 1/24/10 1:44 PM, Matthias Hölzl wrote:
[…]
Current Slime needs a one line patch to enable arglist display for the patched ABCL; I've included this patch as well.
Committed to SLIME HEAD. Thanks!
armedbear-devel@common-lisp.net