From 9d04ed71f1631c18f863fdf52fe3f9a97cff6a96 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Sat, 26 Oct 2002 11:00:07 +0000 Subject: [PATCH] 0.7.9.2: Some PCL fixups (again, thanks to Pierre Mai and Gerd Moellmann) ... make some DEFMETHOD/DEFGENERIC mismatches signal PROGRAM-ERROR ... delete an apparently no-op "optimization" ... comment from Gerd Moellmann on COMPUTE-EFFECTIVE-METHOD (arguably this should live in the user manual instead, when said document gains a section on the MOP) --- src/pcl/boot.lisp | 16 ++++++++-------- src/pcl/cache.lisp | 21 --------------------- src/pcl/generic-functions.lisp | 8 ++++++++ version.lisp-expr | 2 +- 4 files changed, 17 insertions(+), 30 deletions(-) diff --git a/src/pcl/boot.lisp b/src/pcl/boot.lisp index d9c76b1..c2184b3 100644 --- a/src/pcl/boot.lisp +++ b/src/pcl/boot.lisp @@ -1594,12 +1594,12 @@ bootstrapping. (early-method-lambda-list method) (method-lambda-list method))) (flet ((lose (string &rest args) - (error - "attempt to add the method ~S to the generic function ~S.~%~ - But ~A" - method - gf - (apply #'format nil string args))) + (error 'simple-program-error + :format-control "attempt to add the method ~S ~ + to the generic function ~S.~%~ + But ~A" + :format-arguments (list method gf + (apply #'format nil string args)))) (comparison-description (x y) (if (> x y) "more" "fewer"))) (let ((gf-nreq (arg-info-number-required arg-info)) @@ -1615,8 +1615,8 @@ bootstrapping. "the method has ~A optional arguments than the generic function." (comparison-description nopt gf-nopt))) (unless (eq (or keysp restp) gf-key/rest-p) - (error - "The method and generic function differ in whether they accept~%~ + (lose + "the method and generic function differ in whether they accept~%~ &REST or &KEY arguments.")) (when (consp gf-keywords) (unless (or (and restp (not keysp)) diff --git a/src/pcl/cache.lisp b/src/pcl/cache.lisp index 764362e..006728f 100644 --- a/src/pcl/cache.lisp +++ b/src/pcl/cache.lisp @@ -1329,24 +1329,3 @@ (otherwise 6))) (defvar *empty-cache* (make-cache)) ; for defstruct slot initial value forms - -;;; Pre-allocate generic function caches. The hope is that this will -;;; put them nicely together in memory, and that that may be a win. Of -;;; course the first GC copy will probably blow that out, this really -;;; wants to be wrapped in something that declares the area static. -;;; -;;; This preallocation only creates about 25% more caches than PCL -;;; itself uses. Some ports may want to preallocate some more of -;;; these. -;;; -;;; KLUDGE: Isn't something very similar going on in precom1.lisp? Do -;;; we need it both here and there? Why? -- WHN 19991203 -(eval-when (:load-toplevel) - (dolist (n-size '((1 513) (3 257) (3 129) (14 128) (6 65) - (2 64) (7 33) (16 32) (16 17) (32 16) - (64 9) (64 8) (6 5) (128 4) (35 2))) - (let ((n (car n-size)) - (size (cadr n-size))) - (mapcar #'free-cache-vector - (mapcar #'get-cache-vector - (make-list n :initial-element size)))))) diff --git a/src/pcl/generic-functions.lisp b/src/pcl/generic-functions.lisp index cfdf49f..e58c9d5 100644 --- a/src/pcl/generic-functions.lisp +++ b/src/pcl/generic-functions.lisp @@ -400,6 +400,14 @@ (defgeneric (setf class-slot-value) (nv class slot-name)) +;;; CMUCL comment (from Gerd Moellmann/Pierre Mai, 2002-10-19): +;;; +;;; According to AMOP, COMPUTE-EFFECTIVE-METHOD should return two +;;; values. Alas, the second value is only vaguely described in AMOP, +;;; and, when asked on 2002-10-18, Gregor Kiczales said he couldn't +;;; remember what the second value was supposed to be. So, PCL's +;;; COMPUTE-EFFECTIVE-METHOD returns one value as do Allegro and +;;; Lispworks. (defgeneric compute-effective-method (generic-function combin applicable-methods)) diff --git a/version.lisp-expr b/version.lisp-expr index a5363bb..33b868b 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.7.9.1" +"0.7.9.2" -- 1.7.10.4