From 16f9fb7227bf77da748dd6fc03e58c6a9e84ab70 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Tue, 22 Sep 2015 11:27:11 +0100 Subject: [PATCH] src/classes.lisp, src/class-finalize-impl.lisp: Don't export slot writers. 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 | 6 +++--- src/classes.lisp | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/class-finalize-impl.lisp b/src/class-finalize-impl.lisp index b0e31ce..6bbc4f1 100644 --- a/src/class-finalize-impl.lisp +++ b/src/class-finalize-impl.lisp @@ -350,7 +350,7 @@ ((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 @@ -366,7 +366,7 @@ (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. @@ -388,7 +388,7 @@ (setf (values chain-head chain chains) (compute-chains class))) ;; Done. - (setf (sod-class-state class) :finalized) + (setf (slot-value class 'state) :finalized) t) (:broken diff --git a/src/classes.lisp b/src/classes.lisp index afbb485..3187837 100644 --- a/src/classes.lisp +++ b/src/classes.lisp @@ -76,20 +76,20 @@ (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. -- 2.11.0