chiark / gitweb /
src/method-impl.lisp: Abolish the `emf-entry-tail' variable.
[sod] / src / method-impl.lisp
index e4aaae36d8df7ce300cb29b253051ef9d784f19d..db1e8d66a7aa0a56545efd08bd2851dd2ae6ff6e 100644 (file)
@@ -420,10 +420,9 @@ (defmethod compute-method-entry-functions ((method basic-effective-method))
         ;; Effective method function details.
         (emf-name (effective-method-function-name method))
         (ilayout-type (c-type (* (struct (ilayout-struct-tag class)))))
-        (emf-arg-tail (sod-message-no-varargs-tail message))
         (emf-type (c-type (fun (lisp return-type)
                                ("sod__obj" (lisp ilayout-type))
-                               . emf-arg-tail))))
+                               . entry-args))))
 
     (flet ((setup-entry (tail)
             (let ((head (sod-class-chain-head tail)))
@@ -438,7 +437,15 @@ (defmethod compute-method-entry-functions ((method basic-effective-method))
                    (type (c-type (fun (lisp return-type)
                                       ("me" (* (class tail)))
                                       . entry-args))))
-              (codegen-pop-function codegen name type)
+              (codegen-pop-function codegen name type
+               "~@(~@[~A ~]entry~) function ~:_~
+                for method `~A.~A' ~:_~
+                via chain headed by `~A' ~:_~
+                defined on `~A'."
+               (if parm-n "Indirect argument-tail" nil)
+               (sod-class-nickname message-class)
+               (sod-message-name message)
+               head class)
 
               ;; If this is a varargs method then we've made the
               ;; `:valist' role.  Also make the `nil' role.
@@ -458,7 +465,15 @@ (defmethod compute-method-entry-functions ((method basic-effective-method))
                                    (deliver-expr codegen target call)
                                    (deliver-call codegen :void "va_end"
                                                  *sod-ap*)))
-                  (codegen-pop-function codegen main main-type))))))
+                  (codegen-pop-function codegen main main-type
+                   "Variable-length argument list ~:_~
+                    entry function ~:_~
+                    for method `~A.~A' ~:_~
+                    via chain headed by `~A' ~:_~
+                    defined on `~A'."
+               (sod-class-nickname message-class)
+               (sod-message-name message)
+               head class))))))
 
       ;; Generate the method body.  We'll work out what to do with it later.
       (codegen-push codegen)
@@ -492,10 +507,15 @@ (defmethod compute-method-entry-functions ((method basic-effective-method))
                 ;; function and call it a lot.
                 (codegen-build-function codegen emf-name emf-type vars
                  (nconc insts (and result
-                                   (list (make-return-inst result)))))
+                                   (list (make-return-inst result))))
+                 "Effective method function ~:_for `~A.~A' ~:_~
+                  defined on `~A'."
+                 (sod-class-nickname message-class)
+                 (sod-message-name message)
+                 (effective-method-class method))
 
                 (let ((call (apply #'make-call-inst emf-name "sod__obj"
-                                   (mapcar #'argument-name emf-arg-tail))))
+                                   (mapcar #'argument-name entry-args))))
                   (dolist (tail chain-tails)
                     (setup-entry tail)
                     (deliver-expr codegen entry-target call)