chiark / gitweb /
src/: Enhance `definst' to allow general BVL syntax.
[sod] / src / classes.lisp
index 6a486984f22728d3962399617a35cd35b6702a0f..94ace121a9c3e9ef7a83b54d43c7cde11809b8b8 100644 (file)
@@ -7,7 +7,7 @@
 
 ;;;----- Licensing notice ---------------------------------------------------
 ;;;
 
 ;;;----- Licensing notice ---------------------------------------------------
 ;;;
-;;; This file is part of the Sensble Object Design, an object system for C.
+;;; This file is part of the Sensible Object Design, an object system for C.
 ;;;
 ;;; SOD is free software; you can redistribute it and/or modify
 ;;; it under the terms of the GNU General Public License as published by
 ;;;
 ;;; SOD is free software; you can redistribute it and/or modify
 ;;; it under the terms of the GNU General Public License as published by
@@ -76,20 +76,20 @@ (defclass sod-class ()
    (methods :initarg :methods :initform nil
            :type list :accessor sod-class-methods)
 
    (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)
 
    (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.
 
   (:documentation
    "Classes describe the layout and behaviour of objects.
 
@@ -194,7 +194,7 @@ (defclass sod-class ()
        specific) for the class and all of its superclasses.
 
    Finally, slots concerning the instance and vtable layout of the class are
        specific) for the class and all of its superclasses.
 
    Finally, slots concerning the instance and vtable layout of the class are
-   computed on demand via methods on `slot-unbound'.
+   computed on demand (see `define-on-demand-slot').
 
      * The ILAYOUT describes the layout for an instance of the class.  It's
        quite complicated; see the documentation of the `ilayout' class for
 
      * The ILAYOUT describes the layout for an instance of the class.  It's
        quite complicated; see the documentation of the `ilayout' class for
@@ -294,14 +294,11 @@ (defclass sod-initializer ()
    and `sod-instance-initializer'."))
 
 (defmethod print-object ((initializer sod-initializer) stream)
    and `sod-instance-initializer'."))
 
 (defmethod print-object ((initializer sod-initializer) stream)
-  (if *print-escape*
-      (print-unreadable-object (initializer stream :type t)
-       (format stream "~A = ~A"
-               (sod-initializer-slot initializer)
-               initializer))
-      (format stream "~:[{~A}~;~A~]"
-             (eq (sod-initializer-value-kind initializer) :single)
-             (sod-initializer-value-form initializer))))
+  (with-slots (slot value-kind value-form) initializer
+    (if *print-escape*
+       (print-unreadable-object (initializer stream :type t)
+         (format stream "~A = ~A" slot value-form))
+       (format stream "~:[{~A}~;~A~]" (eq value-kind :single) value-form))))
 
 (export 'sod-class-initializer)
 (defclass sod-class-initializer (sod-initializer)
 
 (export 'sod-class-initializer)
 (defclass sod-class-initializer (sod-initializer)