-(eval-when (#-sb-xc :compile-toplevel :load-toplevel :execute)
- ;; the appropriate initialization value for the CPL slot of a CONDITION,
- ;; calculated by looking at the INHERITS information in the LAYOUT
- ;; of the CONDITION
- (defun condition-class-cpl-from-layout (condition)
- (declare (type condition condition))
- (let* ((class (sb!xc:find-class condition))
- (layout (class-layout class))
- (superset (map 'list #'identity (layout-inherits layout))))
- (delete-if (lambda (superclass)
- (not (typep superclass 'condition-class)))
- superset))))
-