0.9.1.35:
authorChristophe Rhodes <csr21@cam.ac.uk>
Fri, 10 Jun 2005 09:01:32 +0000 (09:01 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Fri, 10 Jun 2005 09:01:32 +0000 (09:01 +0000)
Fix PFD "Weird SBCL bug..." sbcl-devel 2005-06-09
... MORE PROGRAM-ERRORs.

src/pcl/boot.lisp
src/pcl/methods.lisp
version.lisp-expr

index b08d3a3..87c30fe 100644 (file)
@@ -1009,15 +1009,21 @@ bootstrapping.
           (cond ((null args)
                  (if (eql nreq 0)
                      (invoke-fast-method-call emf)
-                     (error "wrong number of args")))
+                     (error 'simple-program-error
+                            :format-control "invalid number of arguments: 0"
+                            :format-arguments nil)))
                 ((null (cdr args))
                  (if (eql nreq 1)
                      (invoke-fast-method-call emf (car args))
-                     (error "wrong number of args")))
+                     (error 'simple-program-error
+                            :format-control "invalid number of arguments: 1"
+                            :format-arguments nil)))
                 ((null (cddr args))
                  (if (eql nreq 2)
                      (invoke-fast-method-call emf (car args) (cadr args))
-                     (error "wrong number of args")))
+                     (error 'simple-program-error
+                            :format-control "invalid number of arguments: 2"
+                            :format-arguments nil)))
                 (t
                  (apply (fast-method-call-function emf)
                         (fast-method-call-pv-cell emf)
@@ -1028,7 +1034,10 @@ bootstrapping.
            args
            (method-call-call-method-args emf)))
     (fixnum
-     (cond ((null args) (error "1 or 2 args were expected."))
+     (cond ((null args)
+           (error 'simple-program-error
+                  :format-control "invalid number of arguments: 0"
+                  :format-arguments nil))
           ((null (cdr args))
            (let* ((slots (get-slots (car args)))
                    (value (clos-slots-ref slots emf)))
@@ -1036,16 +1045,19 @@ bootstrapping.
                  (slot-unbound-internal (car args) emf)
                  value)))
           ((null (cddr args))
-             (setf (clos-slots-ref (get-slots (cadr args)) emf)
-                  (car args)))
-          (t (error "1 or 2 args were expected."))))
+           (setf (clos-slots-ref (get-slots (cadr args)) emf)
+                 (car args)))
+          (t (error 'simple-program-error
+                    :format-control "invalid number of arguments"
+                    :format-arguments nil))))
     (fast-instance-boundp
      (if (or (null args) (cdr args))
-        (error "1 arg was expected.")
-       (let ((slots (get-slots (car args))))
-        (not (eq (clos-slots-ref slots
-                                 (fast-instance-boundp-index emf))
-                 +slot-unbound+)))))
+        (error 'simple-program-error
+               :format-control "invalid number of arguments"
+               :format-arguments nil)
+        (let ((slots (get-slots (car args))))
+          (not (eq (clos-slots-ref slots (fast-instance-boundp-index emf))
+                   +slot-unbound+)))))
     (function
      (apply emf args))))
 \f
index 4b68b67..d956759 100644 (file)
 
 
 (defun error-need-at-least-n-args (function n)
-  (error "~@<The function ~2I~_~S ~I~_requires at least ~W argument~:P.~:>"
-        function
-        n))
+  (error 'simple-program-error
+        :format-control "~@<The function ~2I~_~S ~I~_requires ~
+                          at least ~W argument~:P.~:>"
+        :format-arguments (list function n)))
 
 (defun types-from-args (generic-function arguments &optional type-modifier)
   (multiple-value-bind (nreq applyp metatypes nkeys arg-info)
index 31c04c9..bf815ee 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.1.34"
+"0.9.1.35"