X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/blobdiff_plain/3a774b55edfea441c1715994924c2999e9202143..73eceea64f35d47eeecb808cb7bfecb6bac4299b:/src/class-finalize-impl.lisp diff --git a/src/class-finalize-impl.lisp b/src/class-finalize-impl.lisp index 772ad6f..e7fc45a 100644 --- a/src/class-finalize-impl.lisp +++ b/src/class-finalize-impl.lisp @@ -338,27 +338,6 @@ (defmethod compute-chains ((class sod-class)) (gethash super table)) (cdr class-precedence-list))))))))) -;;;-------------------------------------------------------------------------- -;;; Metaclasses. - -(defmethod guess-metaclass ((class sod-class)) - "Default metaclass-guessing function for classes. - - Return the most specific metaclass of any of the CLASS's direct - superclasses." - - ;; During bootstrapping, our superclasses might not have their own - ;; metaclasses resolved yet. If we find this, then throw `bootstrapping' - ;; so that `shared-initialize' on `sod-class' can catch it (or as a shot - ;; across the bows of anyone else who calls us). - (finalization-error (:bad-metaclass) - (select-minimal-class-property (sod-class-direct-superclasses class) - (lambda (super) - (if (slot-boundp super 'metaclass) - (slot-value super 'metaclass) - (throw 'bootstrapping nil))) - #'sod-subclass-p class "metaclass"))) - ;;;-------------------------------------------------------------------------- ;;; Sanity checking. @@ -579,11 +558,6 @@ (defmethod finalize-sod-class ((class sod-class)) ;; clone of the CPL and chain establishment code. If the interface changes ;; then `bootstrap-classes' will need to be changed too. - ;; Set up the metaclass if it's not been set already. This is delayed - ;; to give bootstrapping a chance to set up metaclass and superclass - ;; circularities. - (default-slot (class 'metaclass) (guess-metaclass class)) - ;; Finalize all of the superclasses. There's some special pleading here to ;; make bootstrapping work: we don't try to finalize the metaclass if we're ;; a root class (no direct superclasses -- because in that case the