chiark / gitweb /
src/class-make-proto.lisp: Remove `define-sod-class'.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 5 Jan 2016 18:42:53 +0000 (18:42 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 29 May 2016 13:40:40 +0000 (14:40 +0100)
Nobody's using it, and it's out of date.

doc/SYMBOLS
doc/meta.tex
src/class-make-proto.lisp

index 8ae77fe23fb801be82b9563d9db8ca0cad0c8472..d9587ee34b1e0b37939e1531aa7b224f1559bf7f 100644 (file)
@@ -244,7 +244,6 @@ class-layout-proto.lisp
 class-make-proto.lisp
   check-message-type                            generic
   check-method-type                             generic
-  define-sod-class                              macro
   guess-metaclass                               generic
   make-sod-class                                function
   make-sod-class-initializer                    generic
index 52a89cfe5560348210d62a5e371598873214c5e6..6ed1d6adc3e0d84e341b057c72a5cc662ca34ca6 100644 (file)
       @> @<class>}
 \end{describe}
 
-\begin{describe}{mac}
-    {define-sod-class @<name> (@<superclass>^*) \\ \ind
-      @{ @<keyword> @<value> @}^* \\
-      @<declaration>^* \\
-      @<form>^*}
-\end{describe}
-
 \begin{describe*}
     {\dhead{lmac}{slot @<name> @<type> @{ @<keyword> @<value> @}^*}
      \dhead{lmac}{instance-initializer @<nick> @<name>
index df4b4f080fa04ee9676d5c32c78f12d9417e0c68..7305807cc5f7d31ee8535914dca8e03db977122e 100644 (file)
@@ -214,74 +214,4 @@ (defgeneric check-method-type (method message type)
    This is separated out of `shared-initialize', where it's called, so that
    it can be overridden conveniently by subclasses."))
 
-;;;--------------------------------------------------------------------------
-;;; Builder macros.
-
-(export 'define-sod-class)
-(defmacro define-sod-class (name (&rest superclasses) &body body)
-  "Construct a new SOD class called NAME in the current module.
-
-   The new class has the named direct SUPERCLASSES, which should be a list of
-   strings.
-
-   The BODY begins with a sequence of alternating keyword/value pairs
-   defining properties for the new class.  The keywords are (obviously) not
-   evaluated, but the value forms are.
-
-   The remainder of the BODY are a sequence of forms to be evaluated as an
-   implicit `progn'.  Additional macros are available to the BODY, to make
-   defining the class easier.
-
-   In the following, NAME is a string giving a C identifier; NICK is a string
-   giving the nickname of a superclass; TYPE is a C type using S-expression
-   notation.
-
-     * message NAME TYPE &rest PLIST
-
-     * method NICK NAME TYPE BODY &rest PLIST
-
-     * slot NAME TYPE &rest PLIST
-
-     * instance-initializer NICK NAME VALUE-KIND VALUE-FORM &rest PLIST
-
-     * class-initializer NICK NAME VALUE-KIND VALUE-FORM &rest PLIST"
-
-  (let ((plist nil)
-       (classvar (gensym "CLASS-")))
-    (loop
-      (when (or (null body)
-               (not (keywordp (car body))))
-       (return))
-      (push (pop body) plist)
-      (push (pop body) plist))
-    `(let ((,classvar (make-sod-class ,name
-                                     (mapcar #'find-sod-class
-                                             (list ,@superclasses))
-                                     (make-property-set
-                                      ,@(nreverse plist)))))
-       (macrolet ((message (name type &rest plist)
-                   `(make-sod-message ,',classvar ,name (c-type ,type)
-                                      (make-property-set ,@plist)))
-                 (method (nick name type body &rest plist)
-                   `(make-sod-method ,',classvar ,nick ,name (c-type ,type)
-                                     ,body (make-property-set ,@plist)))
-                 (slot (name type &rest plist)
-                   `(make-sod-slot ,',classvar ,name (c-type ,type)
-                                   (make-property-set ,@plist)))
-                 (instance-initializer
-                     (nick name value-kind value-form &rest plist)
-                   `(make-sod-instance-initializer ,',classvar ,nick ,name
-                                                   ,value-kind ,value-form
-                                                   (make-property-set
-                                                    ,@plist)))
-                 (class-initializer
-                     (nick name value-kind value-form &rest plist)
-                   `(make-sod-class-initializer ,',classvar ,nick ,name
-                                                ,value-kind ,value-form
-                                                (make-property-set
-                                                 ,@plist))))
-        ,@body
-        (finalize-sod-class ,classvar)
-        (add-to-module *module* ,classvar)))))
-
 ;;;----- That's all, folks --------------------------------------------------