globaldb.lisp WHERE-FROM priority comment incorrect
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
New
|
Undecided
|
Unassigned |
Bug Description
globaldb.lisp says:
;;; where this information came from:
;;; :ASSUMED = from uses of the object
;;; :DEFINED = from examination of the definition
;;; :DEFINED-METHOD = implicit, incremental declaration by CLOS.
;;; :DECLARED = from a declaration
;;; :DEFINED trumps :ASSUMED, :DEFINED-METHOD trumps :DEFINED,
;;; and :DECLARED trumps :DEFINED-METHOD.
However...
(declaim (ftype (function (t) t) baz-declared))
(sb-impl::info :function :where-from 'baz-declared) ;; => :DECLARED T
(defgeneric baz-declared (x))
(sb-impl::info :function :where-from 'baz-declared) ;; => :DEFINED-METHOD T
Chain...
pcl/boot.lisp: DEFGENERIC expands into COMPILE-
* COMPILE-
* LOAD-DEFGENERIC calls ENSURE-
* ENSURE-
* NOTE-GF-SIGNATURE unconditionally sets WHERE-FROM to :DEFINED-METHOD.
Fix...
I suppose NOTE-GF-SIGNATURE could honor :DECLARED, but who knows what that would break and the benefit is minor. N-G-S is deliberately clobbering the much more important declared function signature for good reasons, so to be consistent should clobber everything.
So probably better to just fix comment... patch attached.
$ git log -n 1
commit a55e271b1f4c7b3
$ sbcl --version
SBCL 1.5.4