From: Christophe Rhodes Date: Tue, 15 Jul 2003 09:36:15 +0000 (+0000) Subject: 0.8.0.78.vector-nil-string.14: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=b4831dc945c0754b3ba77881e67c8ea4d0a3d905;p=sbcl.git 0.8.0.78.vector-nil-string.14: Minor frobs, mostly to put behaviour back to as I found it in unimportant bits. I think there's still a small performance problem, which I'm investigating. --- diff --git a/src/code/reader.lisp b/src/code/reader.lisp index 34a35ab..afb6909 100644 --- a/src/code/reader.lisp +++ b/src/code/reader.lisp @@ -316,7 +316,7 @@ (defvar *ouch-ptr*) (declaim (type index *read-buffer-length* *inch-ptr* *ouch-ptr*)) -(declaim (simple-string *read-buffer*)) +(declaim (type (simple-array character (*)) *read-buffer*)) (defmacro reset-read-buffer () ;; Turn *READ-BUFFER* into an empty read buffer. diff --git a/src/compiler/generic/vm-array.lisp b/src/compiler/generic/vm-array.lisp index 435f455..eeada76 100644 --- a/src/compiler/generic/vm-array.lisp +++ b/src/compiler/generic/vm-array.lisp @@ -63,21 +63,24 @@ ;; for an initial element for (ARRAY NIL). -- CSR, 2002-03-07 (nil #:mu 0 simple-array-nil :complex-typecode #.sb!vm:complex-vector-nil-widetag - :importance -3) + :importance 0) (base-char ,(code-char 0) 8 simple-base-string ;; (SIMPLE-BASE-STRINGs are stored with an extra ;; trailing #\NULL for convenience in calling out ;; to C.) :n-pad-elements 1 :complex-typecode #.sb!vm:complex-base-string-widetag - :importance 2) - (single-float 0.0f0 32 simple-array-single-float) - (double-float 0.0d0 64 simple-array-double-float) + :importance 17) + (single-float 0.0f0 32 simple-array-single-float + :importance 6) + (double-float 0.0d0 64 simple-array-double-float + :importance 5) #!+long-float - (long-float 0.0l0 #!+x86 96 #!+sparc 128 simple-array-long-float) + (long-float 0.0l0 #!+x86 96 #!+sparc 128 simple-array-long-float + :importance 4) (bit 0 1 simple-bit-vector :complex-typecode #.sb!vm:complex-bit-vector-widetag - :importance 1) + :importance 16) ;; KLUDGE: The fact that these UNSIGNED-BYTE entries come ;; before their SIGNED-BYTE partners is significant in the ;; implementation of the compiler; some of the cross-compiler @@ -88,27 +91,37 @@ ;; not careful we could get the wrong specialized array when ;; we try to FIND-IF, below. -- CSR, 2002-07-08 ((unsigned-byte 2) 0 2 simple-array-unsigned-byte-2 - :importance -2) + :importance 15) ((unsigned-byte 4) 0 4 simple-array-unsigned-byte-4 - :importance -1) - ((unsigned-byte 8) 0 8 simple-array-unsigned-byte-8) - ((unsigned-byte 16) 0 16 simple-array-unsigned-byte-16) - ((unsigned-byte 32) 0 32 simple-array-unsigned-byte-32) - ((signed-byte 8) 0 8 simple-array-signed-byte-8) - ((signed-byte 16) 0 16 simple-array-signed-byte-16) + :importance 14) + ((unsigned-byte 8) 0 8 simple-array-unsigned-byte-8 + :importance 13) + ((unsigned-byte 16) 0 16 simple-array-unsigned-byte-16 + :importance 12) + ((unsigned-byte 32) 0 32 simple-array-unsigned-byte-32 + :importance 11) + ((signed-byte 8) 0 8 simple-array-signed-byte-8 + :importance 10) + ((signed-byte 16) 0 16 simple-array-signed-byte-16 + :importance 9) ;; KLUDGE: See the comment in PRIMITIVE-TYPE-AUX, ;; compiler/generic/primtype.lisp, for why this is FIXNUM and ;; not (SIGNED-BYTE 30) - (fixnum 0 32 simple-array-signed-byte-30) - ((signed-byte 32) 0 32 simple-array-signed-byte-32) + (fixnum 0 32 simple-array-signed-byte-30 + :importance 8) + ((signed-byte 32) 0 32 simple-array-signed-byte-32 + :importance 7) ((complex single-float) #C(0.0f0 0.0f0) 64 - simple-array-complex-single-float) + simple-array-complex-single-float + :importance 3) ((complex double-float) #C(0.0d0 0.0d0) 128 - simple-array-complex-double-float) + simple-array-complex-double-float + :importance 2) #!+long-float ((complex long-float) #C(0.0l0 0.0l0) #!+x86 192 #!+sparc 256 - simple-array-complex-long-float) - (t 0 32 simple-vector :importance 3)))) + simple-array-complex-long-float + :importance 1) + (t 0 32 simple-vector :importance 18)))) (defvar sb!kernel::*specialized-array-element-types* (map 'list diff --git a/src/compiler/seqtran.lisp b/src/compiler/seqtran.lisp index c0ae9dc..7a4e0fe 100644 --- a/src/compiler/seqtran.lisp +++ b/src/compiler/seqtran.lisp @@ -719,7 +719,8 @@ ;;; ;;; FIXME: currently KLUDGEed because of bug 188 (deftransform concatenate ((rtype &rest sequences) - (t &rest simple-base-string) + (t &rest (or simple-base-string + (simple-array nil (*)))) simple-base-string :policy (< safety 3)) (loop for rest-seqs on sequences @@ -731,8 +732,11 @@ collect `(,n-length (* (length ,n-seq) sb!vm:n-byte-bits)) into lets collect n-length into all-lengths collect next-start into starts - collect `(bit-bash-copy ,n-seq ,vector-data-bit-offset - res ,start ,n-length) + collect `(if (and (typep ,n-seq '(simple-array nil (*))) + (> ,n-length 0)) + (error 'nil-array-accessed-error) + (bit-bash-copy ,n-seq ,vector-data-bit-offset + res ,start ,n-length)) into forms collect `(setq ,next-start (+ ,start ,n-length)) into forms finally diff --git a/version.lisp-expr b/version.lisp-expr index 9786030..f0c5973 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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.0.78.vector-nil-string.13" +"0.8.0.78.vector-nil-string.14"