X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/66836e149e29c12c8bf4884ff91de7d9a9c879cb..e75eb63d81df077c02c6c74439fb14a34d4fb93e:/src/method-impl.lisp diff --git a/src/method-impl.lisp b/src/method-impl.lisp index f3673d8..49c6676 100644 --- a/src/method-impl.lisp +++ b/src/method-impl.lisp @@ -98,6 +98,9 @@ (call-next-method) (primary-method-class message))) +(defmethod primary-method-class ((message simple-message)) + 'basic-direct-method) + ;;;-------------------------------------------------------------------------- ;;; Direct method classes. @@ -320,19 +323,18 @@ 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))))) @@ -459,7 +461,7 @@ ;; 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) @@ -519,12 +521,11 @@ (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. @@ -533,7 +534,7 @@ (defclass standard-message (simple-message) () (:documentation - "Message class for standard method combination. + "Message class for standard method combinations. Standard method combination is a simple method combination where the primary methods are invoked as a delegation chain, from most- to