src/classes.lisp, src/class-finalize-impl.lisp: Don't export slot writers.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 22 Sep 2015 10:27:38 +0000 (11:27 +0100)
Make accessors to finalization-time slots be plain readers, and use
`slot-value' explicitly to set them at the right time.

src/class-finalize-impl.lisp
src/classes.lisp

index b0e31ce..6bbc4f1 100644 (file)
       ((nil)
 
        ;; If this fails, mark the class as a loss.
-       (setf (sod-class-state class) :broken)
+       (setf (slot-value class 'state) :broken)
 
        ;; Finalize all of the superclasses.  There's some special pleading
        ;; here to make bootstrapping work: we don't try to finalize the
           (finalize-sod-class metaclass)))
 
        ;; Stash the class's type.
-       (setf (sod-class-type class)
+       (setf (slot-value class '%type)
             (make-class-type (sod-class-name class)))
 
        ;; Clobber the lists of items if they've not been set.
         (setf (values chain-head chain chains) (compute-chains class)))
 
        ;; Done.
-       (setf (sod-class-state class) :finalized)
+       (setf (slot-value class 'state) :finalized)
        t)
 
       (:broken
index afbb485..3187837 100644 (file)
    (methods :initarg :methods :initform nil
            :type list :accessor sod-class-methods)
 
-   (class-precedence-list :type list :accessor sod-class-precedence-list)
+   (class-precedence-list :type list :reader sod-class-precedence-list)
 
-   (%type :type c-class-type :accessor sod-class-type)
+   (%type :type c-class-type :reader sod-class-type)
 
-   (chain-head :type sod-class :accessor sod-class-chain-head)
-   (chain :type list :accessor sod-class-chain)
-   (chains :type list :accessor sod-class-chains)
+   (chain-head :type sod-class :reader sod-class-chain-head)
+   (chain :type list :reader sod-class-chain)
+   (chains :type list :reader sod-class-chains)
 
-   (%ilayout :type ilayout :accessor sod-class-ilayout)
-   (effective-methods :type list :accessor sod-class-effective-methods)
-   (vtables :type list :accessor sod-class-vtables)
+   (%ilayout :type ilayout :reader sod-class-ilayout)
+   (effective-methods :type list :reader sod-class-effective-methods)
+   (vtables :type list :reader sod-class-vtables)
 
    (state :initform nil :type (member nil :finalized broken)
-         :accessor sod-class-state))
+         :reader sod-class-state))
   (:documentation
    "Classes describe the layout and behaviour of objects.