src/method-impl.lisp (method-keyword-argument-lists): Fix indentation.
[sod] / src / method-impl.lisp
index 1256376..2300ac6 100644 (file)
                 ("me" (* (class (sod-method-class method))))
                 . method-args))))
 
+(defmethod sod-method-description ((method basic-direct-method))
+  (with-slots (role) method
+    (if role (string-downcase role)
+       "primary")))
+
 (defmethod sod-method-function-name ((method basic-direct-method))
   (with-slots ((class %class) role message) method
     (format nil "~A__~@[~(~A~)_~]method_~A__~A" class role
 ;;;--------------------------------------------------------------------------
 ;;; Effective method classes.
 
+(defmethod method-keyword-argument-lists
+    ((method effective-method) direct-methods)
+  (with-slots (message) method
+    (and (keyword-message-p message)
+        (mapcar (lambda (m)
+                  (let ((type (sod-method-type m)))
+                    (cons (c-function-keywords type)
+                          (format nil "method for ~A on ~A (at ~A)"
+                                  message
+                                  (sod-method-class m)
+                                  (file-location m)))))
+                direct-methods))))
+
 (defmethod shared-initialize :after
     ((method effective-method) slot-names &key direct-methods)
   (declare (ignore slot-names))
 
   ;; Set the keyword argument list.
   (with-slots (message keywords) method
-    (setf keywords (and (keyword-message-p message)
-                       (merge-keyword-lists
-                        (mapcar (lambda (m)
-                                  (let ((type (sod-method-type m)))
-                                    (cons (c-function-keywords type)
-                                          (format nil "method for ~A on ~A"
-                                                  message
-                                                  (sod-method-class m)))))
-                                direct-methods))))))
+    (setf keywords
+         (merge-keyword-lists (method-keyword-argument-lists
+                               method direct-methods)))))
 
 (export '(basic-effective-method
          effective-method-around-methods effective-method-before-methods
                                       *null-pointer* 0)))
               (call-next-method)))))))
 
-(defmethod compute-method-entry-functions
-    ((method simple-effective-method))
-  (if (effective-method-primary-methods method)
+(defmethod effective-method-live-p ((method simple-effective-method))
+  (effective-method-primary-methods method))
+
+(defmethod compute-method-entry-functions :around ((method effective-method))
+  (if (effective-method-live-p method)
       (call-next-method)
       nil))