mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-26 06:22:33 -08:00
clos: add-method: call add-direct-method for specializers
Previously we didn't call it due to bootstrapping issues, but now we convert functions to methods after early methods are fixed up and their classes are also updated, so we can. This fix improves conformance.
This commit is contained in:
parent
653cba539f
commit
acc5162680
1 changed files with 4 additions and 10 deletions
|
|
@ -166,22 +166,16 @@ their lambda lists ~A and ~A are not congruent."
|
|||
;; i) Adding it to the list of methods
|
||||
(push method (generic-function-methods gf))
|
||||
(setf (method-generic-function method) gf)
|
||||
;; ii) Updating the specializers list of the generic
|
||||
;; function. Notice that we should call add-direct-method for each
|
||||
;; specializer but specializer objects are not yet implemented
|
||||
#+(or)
|
||||
;; ii) Updating the specializers list of the generic function.
|
||||
(dolist (spec (method-specializers method))
|
||||
(add-direct-method spec method))
|
||||
;; iii) Computing a new discriminating function... Well, since the
|
||||
;; core ECL does not need the discriminating function because we
|
||||
;; always use the same one, we just update the spec-how list of the
|
||||
;; generic function.
|
||||
;; iii) Computing a new discriminating function... Well, since the core ECL
|
||||
;; does not need the discriminating function because we always use the same
|
||||
;; one, we just update the spec-how list of the generic function..
|
||||
(compute-g-f-spec-list gf)
|
||||
(set-generic-function-dispatch gf)
|
||||
;; iv) Update dependents.
|
||||
(update-dependents gf (list 'add-method method))
|
||||
;; v) Register with specializers
|
||||
(register-method-with-specializers method)
|
||||
gf)
|
||||
|
||||
(defun remove-method (gf method)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue