0.7.10.29:
authorChristophe Rhodes <csr21@cam.ac.uk>
Sat, 21 Dec 2002 10:53:28 +0000 (10:53 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Sat, 21 Dec 2002 10:53:28 +0000 (10:53 +0000)
Fix compiler crash in new COERCE defoptimizer
... CAREFUL-SPECIFIER-TYPE can return NIL, so handle that case
too.  (Might it not be nice to provide a compiler
warning?  Or should that be left to the IR1-TRANSFORM?)

src/compiler/srctran.lisp
tests/compiler.impure.lisp
version.lisp-expr

index cd363e2..0661685 100644 (file)
      (let* ((specifier (continuation-value type))
            (result-typeoid (careful-specifier-type specifier)))
        (cond
+        ((null result-typeoid) nil)
         ((csubtypep result-typeoid (specifier-type 'number))
          ;; the difficult case: we have to cope with ANSI 12.1.5.3
          ;; Rule of Canonical Representation for Complex Rationals,
index 869cd5a..46f15ef 100644 (file)
@@ -719,7 +719,14 @@ BUG 48c, not yet fixed:
 (assert (equal (bug223-int 4) '(ext int 3)))
 (bug223-wrap)
 (assert (equal (bug223-int 4) '(ext ext int 2)))
-
+\f
+;;; COERCE got its own DEFOPTIMIZER which has to reimplement most of
+;;; SPECIFIER-TYPE-NTH-ARG.  For a while, an illegal type would throw
+;;; you into the debugger on compilation.
+(defun coerce-defopt (x)
+  ;; illegal, but should be compilable.
+  (coerce x '(values t)))
+(assert (null (ignore-errors (coerce-defopt 3))))
 \f
 ;;;; tests not in the problem domain, but of the consistency of the
 ;;;; compiler machinery itself
index b53fc05..881182a 100644 (file)
@@ -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.10.28"
+"0.7.10.29"