From e1ba5a0d68ff8d4c8e688cd6a951aea1d56b1b61 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Sun, 15 Sep 2002 14:20:22 +0000 Subject: [PATCH] 0.7.7.24: Fix PROBE-FILE bug on pathnames with VERSION :UNSPECIFIC (reported 2002-09-15 on #lisp IRC) Type declamation fix for *DISASSEM-INST-SPACE* ... declare the type after the type is defined Try to tell Python a bit more about COMPLEX vectors ... vector arguments to VECTOR-PUSH, FILL-POINTER et al. must be COMPLEX Lotso BUGS; :LITTLE-ENDIAN, :MIPS, :HPPA comments --- BUGS | 40 ++++++++++++++++++++++++++++++++++++++++ base-target-features.lisp-expr | 20 ++++++++++---------- src/code/filesys.lisp | 2 +- src/compiler/array-tran.lisp | 23 +++++++++++++++++++++++ src/compiler/disassem.lisp | 5 ++++- version.lisp-expr | 2 +- 6 files changed, 79 insertions(+), 13 deletions(-) diff --git a/BUGS b/BUGS index 60c6505..d9e91f4 100644 --- a/BUGS +++ b/BUGS @@ -1353,6 +1353,46 @@ WORKAROUND: 196: "confusing error message for unREAL second arg to ATAN" (fixed in sbcl-0.7.7.18) +197: "failed AVER on compiling or evaluating function constants" + (reported by Antonio Martinez sbcl-devel 2002-09-12) + When compiling or evaluating function constants, such as in + (EVAL `(LAMBDA () (FUNCALL ,(LAMBDA () NIL)))) + I get the following error message: + debugger invoked on condition of type SB-INT:BUG: + failed AVER: "(LEAF-HAS-SOURCE-NAME-P LEAF)" + + Although this seems a dubious use of function constants, it would be + good either to make it work or to produce a useful error message. + +198: "conflicting THEs are not necessarily all checked" + (reported by APD sbcl-devel 2002-09-14) + (DEFUN FOO (X) + (LET (Y) + (SETF Y (THE SINGLE-FLOAT (THE INTEGER X))) + (LIST Y Y))) + + (FOO 3) => error "3 is not of type SINGLE-FLOAT" + (FOO 3F0) => (3F0 3F0) + + APD also reports that this code has not worked as intended in SBCL + since the days of sbcl-0.7.0, while CMUCL correctly detects the type + error ("is not of type NIL") for all inputs. + +199: "hairy FUNCTION types confuse the compiler" + (reported by APD sbcl-devel 2002-09-15) + (DEFUN MUR (F) + (EQ NIL (FUNCALL F))) + + (DEFUN FOO (F X) + (DECLARE (TYPE (AND FUNCTION (SATISFIES MUR)) F)) + (FUNCALL F X)) + + fails to compile, printing + failed AVER: + "(AND (EQ (IR2-CONTINUATION-PRIMITIVE-TYPE 2CONT) FUNCTION-PTYPE) (EQ CHECK T))" + + APD further reports that this bug is not present in CMUCL. + DEFUNCT CATEGORIES OF BUGS IR1-#: These labels were used for bugs related to the old IR1 interpreter. diff --git a/base-target-features.lisp-expr b/base-target-features.lisp-expr index db5dfbc..2bef560 100644 --- a/base-target-features.lisp-expr +++ b/base-target-features.lisp-expr @@ -244,12 +244,12 @@ ;; any Sun UltraSPARC (possibly also non-Ultras -- currently untested) ;; :ppc ;; any PowerPC CPU - ;; - ;; (No other CPUs are supported by SBCL as of 0.7.5, but MIPS or HPPA - ;; support could be ported from CMU CL if anyone is sufficiently - ;; motivated to do so, or if you're *really* motivated, you could - ;; write a port from scratch for a new CPU architecture.) - ;; + ;; :hppa + ;; any PA-RISC CPU + ;; :mips + ;; any MIPS CPU (in little-endian mode with :little-endian -- currently + ;; untested) + ;; ;; (CMU CL also had a :pentium feature, which affected the definition ;; of some floating point vops. It was present but not enabled or ;; documented in the CMU CL code that SBCL is derived from, and has @@ -279,8 +279,8 @@ ;; with the SunOS kernel. ;; :osf1 = We're intended to run under Tru64 (aka Digital Unix ;; aka OSF/1). - ;; (No others are supported by SBCL as of 0.7.5, but :hpux or - ;; :irix support could be ported from CMU CL if anyone is - ;; sufficiently motivated to do so, and it'd even be possible, - ;; though harder, to port the system to Microsoft Windows.) + ;; (No others are supported by SBCL as of 0.7.5, but :hpux or :irix + ;; support could be ported from CMU CL if anyone is sufficiently + ;; motivated to do so, and it'd even be possible, though harder, to + ;; port the system to Microsoft Windows or MacOS X.) ) diff --git a/src/code/filesys.lisp b/src/code/filesys.lisp index 2841bf5..2e80dcb 100644 --- a/src/code/filesys.lisp +++ b/src/code/filesys.lisp @@ -618,7 +618,7 @@ (unless (or (null type) (eq type :unspecific)) (/noshow0 "tweaking FILE for more-or-less-:UNSPECIFIC case") (setf file (concatenate 'string file "." type))) - (unless (member version '(nil :newest :wild)) + (unless (member version '(nil :newest :wild :unspecific)) (/noshow0 "tweaking FILE for more-or-less-:WILD case") (setf file (concatenate 'string file "." (quick-integer-to-string version)))) diff --git a/src/compiler/array-tran.lisp b/src/compiler/array-tran.lisp index 6d9a690..06685d9 100644 --- a/src/compiler/array-tran.lisp +++ b/src/compiler/array-tran.lisp @@ -51,6 +51,11 @@ (array-type-specialized-element-type type)))) (continuation-type new-value)) +(defun assert-array-complex (array) + (assert-continuation-type array + (make-array-type :complexp t + :element-type *wild-type*))) + ;;; Return true if ARG is NIL, or is a constant-continuation whose ;;; value is NIL, false otherwise. (defun unsupplied-or-nil (arg) @@ -138,6 +143,24 @@ '(*)) (t '*)))))) + +;;; Complex array operations should assert that their array argument +;;; is complex. In SBCL, vectors with fill-pointers are complex. +(defoptimizer (fill-pointer derive-type) ((vector)) + (assert-array-complex vector)) +(defoptimizer (%set-fill-pointer derive-type) ((vector index)) + (declare (ignorable index)) + (assert-array-complex vector)) + +(defoptimizer (vector-push derive-type) ((object vector)) + (declare (ignorable object)) + (assert-array-complex vector)) +(defoptimizer (vector-push-extend derive-type) + ((object vector &optional index)) + (declare (ignorable object index)) + (assert-array-complex vector)) +(defoptimizer (vector-pop derive-type) ((vector)) + (assert-array-complex vector)) ;;;; constructors diff --git a/src/compiler/disassem.lisp b/src/compiler/disassem.lisp index 2341203..5dbf562 100644 --- a/src/compiler/disassem.lisp +++ b/src/compiler/disassem.lisp @@ -35,7 +35,6 @@ (declaim (type hash-table *disassem-insts*)) (defvar *disassem-inst-space* nil) -(declaim (type (or null inst-space) *disassem-inst-space*)) ;;; minimum alignment of instructions, in bytes (defvar *disassem-inst-alignment-bytes* sb!vm:n-word-bytes) @@ -260,6 +259,10 @@ (def!method print-object ((ispace inst-space) stream) (print-unreadable-object (ispace stream :type t :identity t))) +;;; now that we've defined the structure, we can declaim the type of +;;; the variable: +(declaim (type (or null inst-space) *disassem-inst-space*)) + (defstruct (inst-space-choice (:conc-name ischoice-) (:copier nil)) (common-id dchunk-zero :type dchunk) ; applies to *parent's* mask diff --git a/version.lisp-expr b/version.lisp-expr index 7d3465a..f993ac3 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; internal versions off the main CVS branch, it gets hairier, e.g. ;;; "0.pre7.14.flaky4.13".) -"0.7.7.23" +"0.7.7.24" -- 1.7.10.4