X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/blobdiff_plain/1a93d254557901b878e962129242ae6a56f72106..b0ff693c25bf81f935efa15a44fdad6ce95e9f91:/src/method-impl.lisp diff --git a/src/method-impl.lisp b/src/method-impl.lisp index 279f841..49c6676 100644 --- a/src/method-impl.lisp +++ b/src/method-impl.lisp @@ -323,19 +323,18 @@ (defun basic-effective-method-body (codegen target method body) method (let* ((message-type (sod-message-type message)) (return-type (c-type-subtype message-type)) - (voidp (eq return-type (c-type void))) (basic-tail (effective-method-basic-argument-names method))) (flet ((method-kernel (target) (dolist (before before-methods) (invoke-method codegen :void basic-tail before)) - (if (or voidp (null after-methods)) + (if (null after-methods) (funcall body target) (convert-stmts codegen target return-type (lambda (target) (funcall body target) (dolist (after (reverse after-methods)) (invoke-method codegen :void - after basic-tail))))))) + basic-tail after))))))) (invoke-delegation-chain codegen target basic-tail around-methods #'method-kernel))))) @@ -462,7 +461,7 @@ (defmethod compute-method-entry-functions ((method basic-effective-method)) ;; Generate the method body. We'll work out what to do with it later. (codegen-push codegen) - (let* ((result (if (eq return-type (c-type void)) nil + (let* ((result (if (eq return-type c-type-void) nil (temporary-var codegen return-type))) (emf-target (or result :void))) (compute-effective-method-body method codegen emf-target) @@ -522,12 +521,11 @@ (defmethod compute-method-entry-functions (defmethod compute-effective-method-body ((method simple-effective-method) codegen target) - (with-slots (message basic-argument-names primary-methods) method - (basic-effective-method-body codegen target method - (lambda (target) - (simple-method-body method - codegen - target))))) + (basic-effective-method-body codegen target method + (lambda (target) + (simple-method-body method + codegen + target)))) ;;;-------------------------------------------------------------------------- ;;; Standard method combination.