src/class-make-impl.lisp: Abstract out the guts of `guess-metaclass'.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 20 Sep 2015 09:59:44 +0000 (10:59 +0100)
commitf95caf08eea8939e1cadee0cbd8fd7daa1039124
treee29409859ea47f6f8926966f296e44cb10a5a840
parent8e36de0e30786727d872f21bf10eb7a579f15dd6
src/class-make-impl.lisp: Abstract out the guts of `guess-metaclass'.

It's mostly trying to pick out a maximum value from a partially ordered
set.  This is a useful primitive, so factor it out.

This also exposes a hack in the previous `guess-metaclass'
implementation.  It would, somewhat sneakily, manage to return nil if
given an empty superclass list, which is ideal for the builtin module,
which hasn't built the metaclass yet and must fill it in later.  Leave
this hack in, but make it more explicit.
src/class-make-impl.lisp