From bee9e8db55f8338885f1268ccb5c4d9f3a9a2fb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Mon, 13 Apr 2020 13:44:31 +0200 Subject: [PATCH] clos: finalize-inheritance: revert a non-conforming change finalize-inheritance is expected to run regardless of the fact that class has been already finalized. I suppose that it is in case when compute-slot-* methods are specialized to return something else. --- src/clos/standard.lsp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/clos/standard.lsp b/src/clos/standard.lsp index 4cc5da686..f8ee2031c 100644 --- a/src/clos/standard.lsp +++ b/src/clos/standard.lsp @@ -301,10 +301,6 @@ because it contains a reference to the undefined class~% ~A" (return-from finalize-inheritance (finalize-inheritance x)))) - ;; Don't try to finalize a class that is already finalized. - (when (class-finalized-p class) - (return-from finalize-inheritance)) - (setf (class-precedence-list class) cpl) (let ((slots (compute-slots class))) (setf (class-slots class) slots @@ -362,11 +358,8 @@ because it contains a reference to the undefined class~% ~A" ;; As mentioned above, when a parent is finalized, it is responsible for ;; invoking FINALIZE-INHERITANCE on all of its children. Obviously, ;; this only makes sense when the class has been defined. - (let ((subclasses (reverse (class-direct-subclasses class)))) - (dolist (subclass subclasses) - (setf (class-finalized-p subclass) nil)) - (dolist (subclass subclasses) - (finalize-unless-forward subclass))) + (dolist (subclass (reverse (class-direct-subclasses class))) + (finalize-unless-forward subclass)) ;; ;; We create various caches to more rapidly find the slot locations and ;; slot definitions.