chiark / gitweb /
src/c-types-parse.lisp: Introduce a pluggable parser for declspecs.
[sod] / src / class-layout-proto.lisp
index bf1480bae4da70f09112a28548e8c9ea4b16a837..d34bf8b143dd11805281ff08ad31747d353f5b1b 100644 (file)
@@ -7,7 +7,7 @@
 
 ;;;----- 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
@@ -31,7 +31,7 @@ (cl:in-package #:sod)
 (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))
@@ -65,7 +65,7 @@ (defgeneric compute-effective-slot (class slot)
 
 (export '(islots islots-class islots-subclass islots-slots))
 (defclass islots ()
-  ((class :initarg :class :type sod-class :reader islots-class)
+  ((%class :initarg :class :type sod-class :reader islots-class)
    (subclass :initarg :subclass :type sod-class :reader islots-subclass)
    (slots :initarg :slots :type list :reader islots-slots))
   (:documentation
@@ -88,7 +88,7 @@ (defgeneric compute-islots (class subclass)
 (export '(vtable-pointer vtable-pointer-class
          vtable-pointer-chain-head vtable-pointer-chain-tail))
 (defclass vtable-pointer ()
-  ((class :initarg :class :type sod-class :reader vtable-pointer-class)
+  ((%class :initarg :class :type sod-class :reader vtable-pointer-class)
    (chain-head :initarg :chain-head :type sod-class
               :reader vtable-pointer-chain-head)
    (chain-tail :initarg :chain-tail :type sod-class
@@ -106,7 +106,7 @@ (defclass vtable-pointer ()
 
 (export '(ichain ichain-class ichain-head ichain-tail ichain-body))
 (defclass ichain ()
-  ((class :initarg :class :type sod-class :reader ichain-class)
+  ((%class :initarg :class :type sod-class :reader ichain-class)
    (chain-head :initarg :chain-head :type sod-class :reader ichain-head)
    (chain-tail :initarg :chain-tail :type sod-class :reader ichain-tail)
    (body :initarg :body :type list :reader ichain-body))
@@ -133,7 +133,7 @@ (defgeneric compute-ichain (class chain)
 
 (export '(ilayout ilayout-class ilayout-ichains))
 (defclass ilayout ()
-  ((class :initarg :class :type sod-class :reader ilayout-class)
+  ((%class :initarg :class :type sod-class :reader ilayout-class)
    (ichains :initarg :ichains :type list :reader ilayout-ichains))
   (:documentation
    "All of the instance layout for a class.
@@ -151,8 +151,10 @@ (defgeneric compute-ilayout (class)
 
 ;;; vtmsgs
 
+(export '(vtmsgs vtmsgs-class vtmsgs-subclass
+         vtmsgs-chain-head vtmsgs-chain-tail vtmsgs-entries))
 (defclass vtmsgs ()
-  ((class :initarg :class :type sod-class :reader vtmsgs-class)
+  ((%class :initarg :class :type sod-class :reader vtmsgs-class)
    (subclass :initarg :subclass :type sod-class :reader vtmsgs-subclass)
    (chain-head :initarg :chain-head :type sod-class
               :reader vtmsgs-chain-head)
@@ -169,24 +171,24 @@ (defclass vtmsgs ()
    CHAIN-HEAD.  The CHAIN-TAIL is the most specific superclass of SUBCLASS on
    this chain.  The ENTRIES are a list of `method-entry' objects."))
 
-(export 'compte-vtmsgs)
+(export 'compute-vtmsgs)
 (defgeneric compute-vtmsgs (class subclass chain-head chain-tail)
   (:documentation
-   "Return a VTMSGS object containing method entries for CLASS.
+   "Return a `vtmsgs' object containing method entries for CLASS.
 
    The CHAIN-HEAD describes which chain the method entries should be
    constructed for.
 
-   The default method simply calls MAKE-METHOD-ENTRY for each of the methods
-   and wraps a VTMSGS object around them.  This ought to be enough for almost
-   all purposes."))
+   The default method simply calls `make-method-entry' for each of the
+   methods and wraps a `vtmsgs' object around them.  This ought to be enough
+   for almost all purposes."))
 
 ;;; class-pointer
 
 (export '(class-pointer class-pointer-class class-pointer-chain-head
          class-pointer-metaclass class-pointer-meta-chain-head))
 (defclass class-pointer ()
-  ((class :initarg :class :type sod-class :reader class-pointer-class)
+  ((%class :initarg :class :type sod-class :reader class-pointer-class)
    (chain-head :initarg :chain-head :type sod-class
               :reader class-pointer-chain-head)
    (metaclass :initarg :metaclass :type sod-class
@@ -198,7 +200,7 @@ (defclass class-pointer ()
 
    This is somewhat complicated because there are two degrees of freedom.  An
    instance of `class-pointer' is a pointer from a vtable to an `ichain' of
-   the the class's metaclass instance.  In particular, `class-pointer'
+   the the class's metaclass instance.  In particular, `class-pointer'
    instance represents a pointer in a vtable constructed for CLASS and
    attached to the chain headed by CHAIN-HEAD; it points to an instance of
    METACLASS, and specifically to the `ichain' substructure corresponding to
@@ -216,7 +218,7 @@ (defgeneric make-class-pointer (class chain-head metaclass meta-chain-head)
 
 (export '(base-offset base-offset-class base-offset-chain-head))
 (defclass base-offset ()
-  ((class :initarg :class :type sod-class :reader base-offset-class)
+  ((%class :initarg :class :type sod-class :reader base-offset-class)
    (chain-head :initarg :chain-head :type sod-class
               :reader base-offset-chain-head))
   (:documentation
@@ -237,7 +239,7 @@ (defgeneric make-base-offset (class chain-head)
 (export '(chain-offset chain-offset-class
          chain-offset-chain-head chain-offset-target-head))
 (defclass chain-offset ()
-  ((class :initarg :class :type sod-class :reader chain-offset-class)
+  ((%class :initarg :class :type sod-class :reader chain-offset-class)
    (chain-head :initarg :chain-head :type sod-class
               :reader chain-offset-chain-head)
    (target-head :initarg :target-head :type sod-class
@@ -263,7 +265,7 @@ (defgeneric make-chain-offset (class chain-head target-head)
 (export '(vtable vtable-class vtable-body
          vtable-chain-head vtable-chain-tail))
 (defclass vtable ()
-  ((class :initarg :class :type sod-class :reader vtable-class)
+  ((%class :initarg :class :type sod-class :reader vtable-class)
    (chain-head :initarg :chain-head :type sod-class
               :reader vtable-chain-head)
    (chain-tail :initarg :chain-tail :type sod-class