X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/blobdiff_plain/7de8c6661211bce3a2b2739b461f33a370294979..ced609b8c5cc865f25cf5cce91a3d7dc9c85bdee:/src/method-impl.lisp diff --git a/src/method-impl.lisp b/src/method-impl.lisp index f0fd3fc..0564d81 100644 --- a/src/method-impl.lisp +++ b/src/method-impl.lisp @@ -53,11 +53,7 @@ (define-on-demand-slot basic-message argument-tail (message) (c-function-arguments (sod-message-type message))))) (define-on-demand-slot basic-message no-varargs-tail (message) - (mapcar (lambda (arg) - (if (eq arg :ellipsis) - (make-argument *sod-ap* c-type-va-list) - arg)) - (sod-message-argument-tail message))) + (reify-variable-argument-tail (sod-message-argument-tail message))) (defmethod sod-message-method-class ((message basic-message) (class sod-class) pset) @@ -147,11 +143,8 @@ (defmethod check-method-type ((method daemon-direct-method) (message sod-message) (type c-function-type)) (with-slots ((msgtype %type)) message - (unless (c-type-equal-p (c-type-subtype type) c-type-void) - (error "Method return type ~A must be `void'" (c-type-subtype type))) - (unless (argument-lists-compatible-p (c-function-arguments msgtype) - (c-function-arguments type)) - (error "Method arguments ~A don't match message ~A" type msgtype)))) + (check-method-return-type type c-type-void) + (check-method-argument-lists type msgtype))) (export 'delegating-direct-method) (defclass delegating-direct-method (basic-direct-method) @@ -420,10 +413,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))) @@ -516,7 +508,7 @@ (defmethod compute-method-entry-functions ((method basic-effective-method)) (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)