X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/cb35f25edb5a344605ec0501c7118dc0e595b875..0c4559280eea9f0268866198be50b6f0395b4251:/src/method-impl.lisp diff --git a/src/method-impl.lisp b/src/method-impl.lisp index 49c6676..86fd4cd 100644 --- a/src/method-impl.lisp +++ b/src/method-impl.lisp @@ -192,12 +192,17 @@ (slot-name (eql 'next-method-type))) (declare (ignore class)) (let* ((message (sod-method-message method)) - (type (sod-message-type message))) + (return-type (c-type-subtype (sod-message-type message))) + (msgargs (sod-message-argument-tail message)) + (arguments (if (varargs-message-p message) + (cons (make-argument *sod-master-ap* + (c-type va-list)) + (butlast msgargs)) + msgargs))) (setf (slot-value method 'next-method-type) - (c-type (fun (lisp (c-type-subtype type)) + (c-type (fun (lisp return-type) ("me" (* (class (sod-method-class method)))) - . - (c-function-arguments type)))))) + . arguments))))) (defmethod slot-unbound (class (method delegating-direct-method) @@ -448,7 +453,8 @@ (varargs-prologue () (ensure-var codegen *sod-master-ap* (c-type va-list)) (emit-inst codegen - (make-va-start-inst *sod-master-ap* parm-n))) + (make-va-start-inst *sod-master-ap* + (argument-name parm-n)))) (varargs-epilogue () (emit-inst codegen (make-va-end-inst *sod-master-ap*))) (finish-entry (tail)