[mcclim-devel] Method browser applicable methods improvement

Willem Broekema metawilm at gmail.com
Sun Mar 2 13:08:04 UTC 2008


In the method browser, the function
COMPUTE-APPLICABLE-METHODS-FROM-SPECIALIZERS determines the applicable
methods by first creating a list of prototype instances for the
specializers. The instances are then fed to
COMPUTE-APPLICABLE-METHODS.

The problem is that fetching prototype instances of built-in classes
is brittle (the function is not part of ANSI), e.g. in Allegro:

CL-USER(78): (mop::class-prototype (find-class 'integer))
Error: The slot EXCL::PROTOTYPE is missing from the object
#<BUILT-IN-CLASS INTEGER> of class #<STANDARD-CLASS BUILT-IN-CLASS>
       during operation SLOT-VALUE
  [condition type: PROGRAM-ERROR]

Restart actions (select using :continue):
 0: Try accessing the slot again
 1: Return a value
 2: Return to Top Level (an "abort" restart).
 3: Abort entirely from this (lisp) process.

See also this discussion:
http://groups.google.nl/group/comp.lang.lisp/browse_frm/thread/a15fd265fa3b540d/f68a63ee410a7f68?lnk=st#f68a63ee410a7f68

The attached patch makes the method browser robust against unavailable
prototype instances, and documents where things still to wrong.

Cheers,
- Willem
-------------- next part --------------
A non-text attachment was scrubbed...
Name: method-browser-prototype.patch
Type: text/x-patch
Size: 2187 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/mcclim-devel/attachments/20080302/620e7ff2/attachment.bin>


More information about the mcclim-devel mailing list