X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/7f2917d28642cfbdf590ff26f0cdd91a79b1c489..ba8bae5fe1f190d4a61a4ab63b52725bc0e07c9b:/src/method-impl.lisp diff --git a/src/method-impl.lisp b/src/method-impl.lisp index 6f6caad..725a0ec 100644 --- a/src/method-impl.lisp +++ b/src/method-impl.lisp @@ -7,7 +7,7 @@ ;;;----- Licensing notice --------------------------------------------------- ;;; -;;; This file is part of the Sensble Object Design, an object system for C. +;;; This file is part of the Sensible Object Design, an object system for C. ;;; ;;; SOD is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by @@ -55,7 +55,7 @@ (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)) + (make-argument *sod-ap* c-type-va-list) arg)) (sod-message-argument-tail message))) @@ -147,7 +147,7 @@ (message sod-message) (type c-function-type)) (with-slots ((msgtype %type)) message - (unless (c-type-equal-p (c-type-subtype type) (c-type void)) + (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)) @@ -178,8 +178,7 @@ (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)) + (cons (make-argument *sod-master-ap* c-type-va-list) (butlast msgargs)) msgargs))) (c-type (fun (lisp return-type) @@ -197,8 +196,7 @@ method))))) . (if (varargs-message-p message) - (cons (make-argument *sod-master-ap* - (c-type va-list)) + (cons (make-argument *sod-master-ap* c-type-va-list) method-args) method-args))))) @@ -275,7 +273,7 @@ (declare (ignore slot-names)) (with-slots (message target) codegen (setf target - (if (eq (c-type-subtype (sod-message-type message)) (c-type void)) + (if (eq (c-type-subtype (sod-message-type message)) c-type-void) :void :return)))) @@ -454,14 +452,16 @@ ("me" (* (class tail))) . raw-entry-args)))) (codegen-push codegen) - (ensure-var codegen *sod-ap* (c-type va-list)) - (emit-inst codegen - (make-va-start-inst *sod-ap* - (argument-name parm-n))) + (ensure-var codegen *sod-ap* c-type-va-list) (convert-stmts codegen entry-target return-type (lambda (target) - (deliver-expr codegen target call))) - (emit-inst codegen (make-va-end-inst *sod-ap*)) + (emit-inst codegen + (make-va-start-inst + *sod-ap* + (argument-name parm-n))) + (deliver-expr codegen target call) + (emit-inst codegen + (make-va-end-inst *sod-ap*)))) (codegen-pop-function codegen main main-type)))))) ;; Generate the method body. We'll work out what to do with it later.