-;;;--------------------------------------------------------------------------
-;;; 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")))
-