X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/e0808c472145fc81e52898bc9ac289e10c4f4f41..450a4be6a6d832ce1e54169d9cc7740f5a04dc89:/src/class-layout-proto.lisp diff --git a/src/class-layout-proto.lisp b/src/class-layout-proto.lisp index 0803b18..927700f 100644 --- a/src/class-layout-proto.lisp +++ b/src/class-layout-proto.lisp @@ -31,10 +31,12 @@ (export '(effective-slot effective-slot-class effective-slot-direct-slot effective-slot-initializer)) (defclass effective-slot () - ((%class :initarg :class :type sod-slot :reader effective-slot-class) + ((%class :initarg :class :type sod-class :reader effective-slot-class) (slot :initarg :slot :type sod-slot :reader effective-slot-direct-slot) (initializer :initarg :initializer :type (or sod-initializer null) - :reader effective-slot-initializer)) + :reader effective-slot-initializer) + (initargs :initarg :initargs :initform nil + :type list :reader effective-slot-initargs)) (:documentation "Describes a slot and how it's meant to be initialized. @@ -50,6 +52,14 @@ (:documentation "Return the most specific initializer for SLOT, starting from CLASS.")) +(export 'find-slot-initargs) +(defgeneric find-slot-initargs (class slot) + (:documentation + "Return as a list all of the initargs defined on CLASS to initialize SLOT. + + The list is returned with initargs defined on more specific classes + first.")) + (export 'compute-effective-slot) (defgeneric compute-effective-slot (class slot) (:documentation