chiark / gitweb /
src/: Minor formatting tweaks.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 15 Dec 2015 18:30:18 +0000 (18:30 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 29 May 2016 13:01:45 +0000 (14:01 +0100)
src/c-types-impl.lisp
src/class-layout-impl.lisp
src/class-output.lisp

index 56eee890a0b64262957906a792690a0b8a3ee7ad..59225b2e9fec49a4060ed435251d2987598a8c54 100644 (file)
@@ -501,8 +501,7 @@ (defmethod print-c-type
                  ~:>"
          (c-type-subtype type)
          (mapcar (lambda (arg)
-                   (if (eq arg :ellipsis)
-                       arg
+                   (if (eq arg :ellipsis) arg
                        (list (argument-name arg) (argument-type arg))))
                  (c-function-arguments type))))
 
@@ -552,8 +551,7 @@ (defun commentify-argument-names (arguments)
    That is, with each argument name passed through
    `commentify-argument-name'."
   (mapcar (lambda (arg)
-           (if (eq arg :ellipsis)
-               arg
+           (if (eq arg :ellipsis) arg
                (make-argument (commentify-argument-name (argument-name arg))
                               (argument-type arg))))
          arguments))
index 1af591db2f50b918b0e406afafac2e321bb986f2..3779a69e013a1ef45e36e174ea8878bbb3936745 100644 (file)
@@ -117,7 +117,7 @@ (defmethod compute-sod-effective-method
                                           (sod-class-methods super)
                                           :key #'sod-method-message
                                           :test-not #'eql))
-                               (sod-class-precedence-list class))))
+                                (sod-class-precedence-list class))))
     (make-instance (sod-message-effective-method-class message)
                   :message message
                   :class class
index f47bc7e251fa690b16c7ebcd05b25ee8a28649e9..a975ebe7cce09c0b6e188bb9a86c0a48dea96bf5 100644 (file)
@@ -40,12 +40,10 @@ (defmethod hook-output progn ((ilayout ilayout) reason sequencer)
     (dolist (ichain ichains) (hook-output ichain reason sequencer))))
 
 (defmethod hook-output progn ((ichain ichain) reason sequencer)
-  (dolist (item (ichain-body ichain))
-    (hook-output item reason sequencer)))
+  (dolist (item (ichain-body ichain)) (hook-output item reason sequencer)))
 
 (defmethod hook-output progn ((islots islots) reason sequencer)
-  (dolist (slot (islots-slots islots))
-    (hook-output slot reason sequencer)))
+  (dolist (slot (islots-slots islots)) (hook-output slot reason sequencer)))
 
 (defmethod hook-output progn ((vtable vtable) reason sequencer)
   (with-slots (body) vtable
@@ -195,9 +193,8 @@ (defmethod hook-output progn ((class sod-class) (reason (eql :h)) sequencer)
 ;;;--------------------------------------------------------------------------
 ;;; Instance structure.
 
-(defmethod hook-output progn ((slot sod-slot)
-                             (reason (eql 'islots))
-                             sequencer)
+(defmethod hook-output progn
+    ((slot sod-slot) (reason (eql 'islots)) sequencer)
   (sequence-output (stream sequencer)
     (((sod-slot-class slot) :islots :slots)
      (pprint-logical-block (stream nil :prefix "  " :suffix ";")
@@ -245,9 +242,8 @@ (defmethod hook-output progn ((ichain ichain) (reason (eql :h)) sequencer)
                                 (sod-class-nickname super)))
                         (sod-class-chain chain-tail))))))))
 
-(defmethod hook-output progn ((ichain ichain)
-                             (reason (eql 'ilayout))
-                             sequencer)
+(defmethod hook-output progn
+    ((ichain ichain) (reason (eql 'ilayout)) sequencer)
   (with-slots ((class %class) chain-head chain-tail) ichain
     (sequence-output (stream sequencer)
       ((class :ilayout :slots)
@@ -275,9 +271,8 @@ (defmethod hook-output progn ((islots islots) (reason (eql :h)) sequencer)
 ;;;--------------------------------------------------------------------------
 ;;; Vtable structure.
 
-(defmethod hook-output progn ((method sod-method)
-                             (reason (eql :h))
-                             sequencer)
+(defmethod hook-output progn
+    ((method sod-method) (reason (eql :h)) sequencer)
   (with-slots ((class %class)) method
     (sequence-output (stream sequencer)
       ((class :methods)
@@ -328,9 +323,8 @@ (defmethod hook-output progn ((vtmsgs vtmsgs) (reason (eql :h)) sequencer)
               (vtmsgs-struct-tag subclass class)
               (sod-class-nickname class))))))
 
-(defmethod hook-output progn ((vtmsgs vtmsgs)
-                             (reason (eql 'vtmsgs))
-                             sequencer)
+(defmethod hook-output progn
+    ((vtmsgs vtmsgs) (reason (eql 'vtmsgs)) sequencer)
   (when (vtmsgs-entries vtmsgs)
     (with-slots ((class %class) subclass) vtmsgs
       (sequence-output (stream sequencer)
@@ -347,9 +341,8 @@ (defmethod hook-output progn ((vtmsgs vtmsgs)
        ((subclass :vtmsgs class :end)
         (format stream "};~2%"))))))
 
-(defmethod hook-output progn ((entry method-entry)
-                             (reason (eql 'vtmsgs))
-                             sequencer)
+(defmethod hook-output progn
+    ((entry method-entry) (reason (eql 'vtmsgs)) sequencer)
   (let* ((method (method-entry-effective-method entry))
         (message (effective-method-message method))
         (class (effective-method-class method))
@@ -362,9 +355,8 @@ (defmethod hook-output progn ((entry method-entry)
         (pprint-c-type pointer-type stream (method-entry-slot-name entry)))
        (terpri stream)))))
 
-(defmethod hook-output progn ((cptr class-pointer)
-                             (reason (eql :h))
-                             sequencer)
+(defmethod hook-output progn
+    ((cptr class-pointer) (reason (eql :h)) sequencer)
   (with-slots ((class %class) chain-head metaclass meta-chain-head) cptr
     (sequence-output (stream sequencer)
       ((class :vtable chain-head :slots)
@@ -379,9 +371,8 @@ (defmethod hook-output progn ((boff base-offset) (reason (eql :h)) sequencer)
       ((class :vtable chain-head :slots)
        (write-line "  size_t _base;" stream)))))
 
-(defmethod hook-output progn ((choff chain-offset)
-                             (reason (eql :h))
-                             sequencer)
+(defmethod hook-output progn
+    ((choff chain-offset) (reason (eql :h)) sequencer)
   (with-slots ((class %class) chain-head target-head) choff
     (sequence-output (stream sequencer)
       ((class :vtable chain-head :slots)
@@ -433,9 +424,8 @@ (defmethod hook-output progn ((class sod-class) (reason (eql :c)) sequencer)
 ;;;--------------------------------------------------------------------------
 ;;; Direct and effective methods.
 
-(defmethod hook-output progn ((method delegating-direct-method)
-                             (reason (eql :c))
-                             sequencer)
+(defmethod hook-output progn
+    ((method delegating-direct-method) (reason (eql :c)) sequencer)
   (with-slots ((class %class) body) method
     (unless body
       (return-from hook-output))
@@ -448,9 +438,8 @@ (defmethod hook-output progn ((method delegating-direct-method)
       ((class :direct-method method :end)
        (format stream "#undef CALL_NEXT_METHOD~%")))))
 
-(defmethod hook-output progn ((method sod-method)
-                             (reason (eql :c))
-                             sequencer)
+(defmethod hook-output progn
+    ((method sod-method) (reason (eql :c)) sequencer)
   (with-slots ((class %class) body) method
     (unless body
       (return-from hook-output))
@@ -470,9 +459,8 @@ (defmethod hook-output progn ((method sod-method)
       ((class :direct-method method :end)
        (terpri stream)))))
 
-(defmethod hook-output progn ((method basic-effective-method)
-                             (reason (eql :c))
-                             sequencer)
+(defmethod hook-output progn
+    ((method basic-effective-method) (reason (eql :c)) sequencer)
   (with-slots ((class %class) functions) method
     (sequence-output (stream sequencer)
       ((class :effective-methods)
@@ -498,9 +486,8 @@ (defmethod hook-output progn ((vtable vtable) (reason (eql :c)) sequencer)
       ((class :vtable chain-head :end)
        (format stream "} };~2%")))))
 
-(defmethod hook-output progn ((cptr class-pointer)
-                             (reason (eql :c))
-                             sequencer)
+(defmethod hook-output progn
+    ((cptr class-pointer) (reason (eql :c)) sequencer)
   (with-slots ((class %class) chain-head metaclass meta-chain-head) cptr
     (sequence-output (stream sequencer)
       :constraint ((class :vtable chain-head :start)
@@ -528,9 +515,8 @@ (defmethod hook-output progn ((boff base-offset) (reason (eql :c)) sequencer)
               (ilayout-struct-tag class)
               (sod-class-nickname chain-head))))))
 
-(defmethod hook-output progn ((choff chain-offset)
-                             (reason (eql :c))
-                             sequencer)
+(defmethod hook-output progn
+    ((choff chain-offset) (reason (eql :c)) sequencer)
   (with-slots ((class %class) chain-head target-head) choff
     (sequence-output (stream sequencer)
       :constraint ((class :vtable chain-head :start)
@@ -557,9 +543,8 @@ (defmethod hook-output progn ((vtmsgs vtmsgs) (reason (eql :c)) sequencer)
       ((subclass :vtable chain-head :vtmsgs class :end)
        (format stream "  },~%")))))
 
-(defmethod hook-output progn ((entry method-entry)
-                             (reason (eql :c))
-                             sequencer)
+(defmethod hook-output progn
+    ((entry method-entry) (reason (eql :c)) sequencer)
   (with-slots ((method %method) chain-head chain-tail role) entry
     (let* ((message (effective-method-message method))
           (class (effective-method-class method))
@@ -573,9 +558,8 @@ (defmethod hook-output progn ((entry method-entry)
 ;;;--------------------------------------------------------------------------
 ;;; Filling in the class object.
 
-(defmethod hook-output progn ((ichain ichain)
-                             (reason (eql 'class))
-                             sequencer)
+(defmethod hook-output progn
+    ((ichain ichain) (reason (eql 'class)) sequencer)
   (with-slots ((class %class) chain-head) ichain
     (sequence-output (stream sequencer)
       :constraint ((*instance-class* :object :start)
@@ -588,9 +572,8 @@ (defmethod hook-output progn ((ichain ichain)
       ((*instance-class* :object chain-head :ichain :end)
        (format stream "  } },~%")))))
 
-(defmethod hook-output progn ((islots islots)
-                             (reason (eql 'class))
-                             sequencer)
+(defmethod hook-output progn
+    ((islots islots) (reason (eql 'class)) sequencer)
   (with-slots ((class %class)) islots
     (let ((chain-head (sod-class-chain-head class)))
       (sequence-output (stream sequencer)
@@ -604,9 +587,8 @@ (defmethod hook-output progn ((islots islots)
        ((*instance-class* :object class :slots :end)
         (format stream "      },~%"))))))
 
-(defmethod hook-output progn ((vtptr vtable-pointer)
-                             (reason (eql 'class))
-                             sequencer)
+(defmethod hook-output progn
+    ((vtptr vtable-pointer) (reason (eql 'class)) sequencer)
   (with-slots ((class %class) chain-head chain-tail) vtptr
     (sequence-output (stream sequencer)
       :constraint ((*instance-class* :object chain-head :ichain :start)
@@ -647,9 +629,8 @@ (defgeneric output-class-initializer (slot instance stream)
                           (sod-slot-name direct-slot)
                           (sod-initializer-value-form init)))))))
 
-(defmethod hook-output progn ((slot sod-class-effective-slot)
-                             (reason (eql 'class))
-                             sequencer)
+(defmethod hook-output progn
+    ((slot sod-class-effective-slot) (reason (eql 'class)) sequencer)
   (let ((instance *instance-class*)
        (func (effective-slot-prepare-function slot)))
     (when func
@@ -657,9 +638,8 @@ (defmethod hook-output progn ((slot sod-class-effective-slot)
        ((instance :object :prepare)
         (funcall func instance stream))))))
 
-(defmethod hook-output progn ((slot effective-slot)
-                             (reason (eql 'class))
-                             sequencer)
+(defmethod hook-output progn
+    ((slot effective-slot) (reason (eql 'class)) sequencer)
   (with-slots ((class %class) (dslot slot)) slot
     (let ((instance *instance-class*)
          (super (sod-slot-class dslot)))