From fbaef3d425f87f52c77780f10a124e7acb74445c Mon Sep 17 00:00:00 2001 From: gerd <gerd> Date: Tue, 17 Jun 2003 09:45:40 +0000 Subject: [PATCH] * src/pcl/pkg.lisp ("PCL"): Export no-primary-method. * src/pcl/defcombin.lisp (compute-effective-method): Use %no-primary-method. --- general-info/release-19a.txt | 6 ++++++ pcl/defcombin.lisp | 7 +++---- pcl/pkg.lisp | 5 +++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/general-info/release-19a.txt b/general-info/release-19a.txt index 1560a6227..f3d10b550 100644 --- a/general-info/release-19a.txt +++ b/general-info/release-19a.txt @@ -180,6 +180,12 @@ New in this release: all methods returned constant values, and some methods were qualified, or the generic function didn't use the standard method combination. + - For standard method combination and method combinations defined + with the short form of DEFINE-METHOD-COMBINATION: If there are + no applicable primary methods when a generic function is + called, the generic function PCL:NO-PRIMARY-METHOD is called. + The default method of this generic function signals a + continuable error of type PCL:NO-PRIMARY-METHOD-ERROR. * Improvements to Hemlock, the Emacs-like editor: diff --git a/pcl/defcombin.lisp b/pcl/defcombin.lisp index 1255c736b..b819a7757 100644 --- a/pcl/defcombin.lisp +++ b/pcl/defcombin.lisp @@ -25,7 +25,7 @@ ;;; ************************************************************************* (file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/defcombin.lisp,v 1.23 2003/05/04 13:11:22 gerd Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/defcombin.lisp,v 1.24 2003/06/17 09:45:40 gerd Exp $") (in-package :pcl) @@ -174,7 +174,7 @@ :definition-source method :documentation doc)) -(defmethod compute-effective-method ((generic-function generic-function) +(defmethod compute-effective-method ((gf generic-function) (combin short-method-combination) applicable-methods) (let ((type (method-combination-type combin)) @@ -215,8 +215,7 @@ `(,operator ,@(mapcar (lambda (m) `(call-method ,m ())) primary))))) (cond ((null primary) - `(error "~@<No ~S methods for the generic function ~S.~@:>" - ',type ',generic-function)) + `(%no-primary-method ',gf .args.)) ((null around) main-method) (t `(call-method ,(car around) diff --git a/pcl/pkg.lisp b/pcl/pkg.lisp index a1b025962..37f6a2e88 100644 --- a/pcl/pkg.lisp +++ b/pcl/pkg.lisp @@ -26,7 +26,7 @@ ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/pkg.lisp,v 1.27 2003/05/28 10:41:47 gerd Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/pkg.lisp,v 1.28 2003/06/17 09:45:40 gerd Exp $") ;;; ;;; CMUCL 18a: Jan-1998 -- Changing to DEFPACKAGE. @@ -98,7 +98,8 @@ (:export "EFFECTIVE-METHOD" "FAST-METHOD" "SLOT-ACCESSOR" "CLASS-PREDICATE") - (:export "FLUSH-EMF-CACHE") + (:export "FLUSH-EMF-CACHE" "NO-PRIMARY-METHOD" + "NO-PRIMARY-METHOD-ERROR") (:export "STANDARD-INSTANCE" "FUNCALLABLE-STANDARD-INSTANCE" -- GitLab