X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/blobdiff_plain/b2983f3591981a916f748362d91ff0e2817552cb..refs/heads/mdw/progfmt:/src/class-layout-proto.lisp diff --git a/src/class-layout-proto.lisp b/src/class-layout-proto.lisp index 927700f..5c755a3 100644 --- a/src/class-layout-proto.lisp +++ b/src/class-layout-proto.lisp @@ -68,6 +68,19 @@ (defgeneric compute-effective-slot (class slot) SLOT is a direct slot defined on CLASS or one of its superclasses. (Metaclass initializers are handled using a different mechanism.)")) +(export 'find-class-initializer) +(defgeneric find-class-initializer (slot class) + (:documentation + "Return an initializer value (any printable value) for a class slot SLOT. + + The initializer might come either from the SLOT's defining class (which it + already knows), or from the instance CLASS, of which the defining class is + be (a superclass of) the metaclass. + + This is used as part of `has-class-initializer-p' and the default output + hook for `effective-slot': if you override both of those then you don't + need to override this too.")) + ;;;-------------------------------------------------------------------------- ;;; Instance layout. @@ -266,6 +279,7 @@ (defclass chain-offset () object's metadata; but that would either require a search or we'd have to be able work out the target chain's index in the table.")) +(export 'make-chain-offset) (defgeneric make-chain-offset (class chain-head target-head) (:documentation "Return the offset from CHAIN-HEAD to TARGET-HEAD."))