ensure-generic-function method-combination argument broken

Bug #936513 reported by Greg Pfeil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Low
Unassigned

Bug Description

CL specifies that the method-combination argument to ensure-generic-function is a "method combination object". However, SBCL doesn't accept such an object as an argument:

    (let ((mc (sb-pcl:find-method-combination #'make-instance 'standard nil)))
      (ensure-generic-function 'make-instance :method-combination mc))

    => The value #<SB-PCL::STANDARD-METHOD-COMBINATION STANDARD NIL {10002DE003}> is not of type LIST.

I appreciate that SBCL allows '(standard) to be passed as the argument, since CL specifies no way to actually get hold of a method combination object, but since the MOP _does_ specify a way to get the object, it'd be nice if that object were also accepted as an argument.

I actually was using the '(standard) form, but in porting my library to other implementations, I discovered that no everyone likes that. So I tried to go the more standard route, but now I have to conditionalize sbcl.

------
SBCL: 1.0.55.3-5a2c881
uname: Darwin Tiamat.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64
features: (:QPQ-INVARIANT-CHECKS :QPQ-POSTCONDITION-CHECKS :QPQ-PRECONDITION-CHECKS
 :CLOSER-MOP :ASDF-SYSTEM-CONNECTIONS :SWANK :QUICKLISP
 :SPLIT-SEQUENCE-DEPRECATED :ASDF2 :ASDF :ANSI-CL :COMMON-LISP :SBCL :SB-DOC
 :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS :SB-UNICODE :SB-EVAL :SB-SOURCE-LOCATIONS
 :IEEE-FLOATING-POINT :OS-PROVIDES-SUSECONDS-T :OS-PROVIDES-BLKSIZE-T
 :OS-PROVIDES-PUTWC :OS-PROVIDES-DLADDR :OS-PROVIDES-DLOPEN :LITTLE-ENDIAN
 :MULTIPLY-HIGH-VOPS :MEMORY-BARRIER-VOPS :INLINE-CONSTANTS :FLOAT-EQL-VOPS
 :COMPLEX-FLOAT-VOPS :CYCLE-COUNTER :ALIEN-CALLBACKS
 :STACK-ALLOCATABLE-FIXED-OBJECTS :STACK-ALLOCATABLE-LISTS
 :STACK-ALLOCATABLE-VECTORS :STACK-ALLOCATABLE-CLOSURES :RAW-INSTANCE-INIT-VOPS
 :UNWIND-TO-FRAME-AND-CALL-VOP :COMPARE-AND-SWAP-VOPS :LINKAGE-TABLE
 :C-STACK-IS-CONTROL-STACK :STACK-GROWS-DOWNWARD-NOT-UPWARD :GENCGC
 :UD2-BREAKPOINTS :MACH-EXCEPTION-HANDLER :DARWIN :BSD :MACH-O :UNIX
 :DARWIN9-OR-BETTER :INODE64 :X86-64 :SB-CORE-COMPRESSION
 :SB-XREF-FOR-INTERNALS :SB-AFTER-XC-CORE :SB-THREAD)

Tags: pcl
Changed in sbcl:
assignee: nobody → Nikodemus Siivola (nikodemus)
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

commit 1f9c4bb952a1f8b19ee9da0f54e95b2b3aa9111a
Author: Nikodemus Siivola <email address hidden>
Date: Sun May 20 20:11:29 2012 +0300

    make ENSURE-GENERIC-FUNCTION accept method combination arguments

      Previously we only accepted a list designating the method combination, but
      since MOP also specifies a way to grab the actual method combination, we
      should really accept that as well.

      Fixes bug 936513.

Changed in sbcl:
assignee: Nikodemus Siivola (nikodemus) → nobody
status: Triaged → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.