From acc51626804ef577c997668a6f854ca5ac17b0a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Wed, 15 Dec 2021 15:00:44 +0100 Subject: [PATCH] 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. --- src/clos/fixup.lsp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/clos/fixup.lsp b/src/clos/fixup.lsp index b1234d330..b0aef5184 100644 --- a/src/clos/fixup.lsp +++ b/src/clos/fixup.lsp @@ -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)