0.8.16.5: deoopsification
authorNikodemus Siivola <nikodemus@random-state.net>
Tue, 26 Oct 2004 14:49:11 +0000 (14:49 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Tue, 26 Oct 2004 14:49:11 +0000 (14:49 +0000)
          * Fix paths going thru READ-MAYBE-NOTHING that 0.8.16.1
             broke -- discovered by SB-ACLREPL breaking. Also
             add a regression test for the same.
          * Better TYPE-ERRORs from ERROR: ones that actually have
             expected-type and datum slots filled.

src/code/class.lisp
src/code/condition.lisp
src/code/reader.lisp
tests/condition.pure.lisp
tests/reader.pure.lisp
version.lisp-expr

index 056f802..0228dcc 100644 (file)
@@ -709,6 +709,8 @@ NIL is returned when no such class exists."
     (if (or res (not errorp))
        res
        (error 'simple-type-error
+               :datum nil
+               :expected-type 'class
                :format-control "class not yet defined:~%  ~S" 
                :format-arguments (list name)))))
 (defun (setf find-classoid) (new-value name)
index 618db15..2000871 100644 (file)
   "Make an instance of a condition object using the specified initargs."
   ;; Note: ANSI specifies no exceptional situations in this function.
   ;; signalling simple-type-error would not be wrong.
-  (let* ((thing (if (symbolp thing)
-                   (find-classoid thing)
+  (let* ((thing (or (and (symbolp thing) (find-classoid thing nil))
                    thing))
         (class (typecase thing
                  (condition-classoid thing)
index 04c893f..7929c03 100644 (file)
                 (funcall (get-coerced-cmt-entry char *readtable*)
                          stream
                          char))))
-    (when (and retval (not *read-suppress*))
-      (rplacd retval nil))))
+    (if retval (rplacd retval nil))))
 
 (defun read (&optional (stream *standard-input*)
                       (eof-error-p t)
   (do ((char (flush-whitespace input-stream)
             (flush-whitespace input-stream))
        (retlist ()))
-      ((char= char endchar) (nreverse retlist))
+      ((char= char endchar) (unless *read-suppress* (nreverse retlist)))
     (setq retlist (nconc (read-maybe-nothing input-stream char) retlist))))
 \f
 ;;;; basic readmacro definitions
index d40cdba..370ce4b 100644 (file)
          (multiple-value-bind (res err) 
              (ignore-errors (apply #'error args))
            (assert (not res))
-           (assert (typep err 'type-error)))))
+           (assert (typep err 'type-error))
+           (assert (not (nth-value 1 (ignore-errors 
+                                       (type-error-datum err)))))
+           (assert (not (nth-value 1 (ignore-errors 
+                                       (type-error-expected-type err))))))))
   (test '#:no-such-condition)
   (test nil)
   (test t)
   (test 42)
   (test (make-instance 'standard-object)))
-
index 7e964ff..0d22933 100644 (file)
 (multiple-value-bind (res err) (ignore-errors (read-from-string ""))
   (assert (not res))
   (assert (typep err 'end-of-file)))
+
+(assert (equal '((0 . "A") (1 . "B"))
+               (coerce (read-from-string "#((0 . \"A\") (1 . \"B\"))") 
+                       'list)))
index 071203e..5852e53 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.8.16.4"
+"0.8.16.5"