0.8.8.8:
authorChristophe Rhodes <csr21@cam.ac.uk>
Mon, 1 Mar 2004 20:30:23 +0000 (20:30 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Mon, 1 Mar 2004 20:30:23 +0000 (20:30 +0000)
Fix for CLEAR-INPUT
... its optional argument can be NIL or T as well as a stream;
... since we're in the area,
  s/STREAMLIKE/STREAM-DESIGNATOR/
  s/STRINGABLE/STRING-DESIGNATOR/
  s/SYMBOLS/SYMBOLS-DESIGNATOR/
  (and move SYMBOLS-DESIGNATOR and PACKAGE-DESIGNATOR to
  deftypes-for-target.lisp where they belong)
Note *ZAP-ARRAY-DATA-TEMP* as a source of non-threadsafety
in ADJUST-ARRAY

NEWS
contrib/sb-simple-streams/fndb.lisp
doc/internals-notes/threading-specials
package-data-list.lisp-expr
src/code/deftypes-for-target.lisp
src/code/stream.lisp
src/code/string.lisp
src/compiler/fndb.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 42d501a..d53b1a0 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2326,6 +2326,8 @@ changes in sbcl-0.8.9 relative to sbcl-0.8.8:
     ** MAKE-STRING-INPUT-STREAM accepts NIL as a value for :END.
     ** MAKE-STRING-INPUT-STREAM functions correctly for strings with
        element-type NIL.
+    ** CLEAR-INPUT accepts NIL and T for its (optional) stream
+       argument.
 
 planned incompatible changes in 0.8.x:
   * (not done yet, but planned:) When the profiling interface settles
index 6d8579f..2df6088 100644 (file)
@@ -83,7 +83,7 @@ TODO (rudi 2003-05-19): make the above work, make (defknown open) use it.
     ;; :derive-type #'result-type-open-class
     )
 
-  (sb-c:defknown listen (&optional sb-kernel:streamlike
+  (sb-c:defknown listen (&optional sb-kernel:stream-designator
                                    (or null (integer 1 10) (member character)))
     boolean (sb-c::unsafely-flushable sb-c::explicit-check))
 
index aad7915..aa583b6 100644 (file)
@@ -1044,7 +1044,7 @@ SB-IMPL::*CLOSE-IN-PARENT*
 SB-IMPL::*IN-COMPILATION-UNIT*
 SB-IMPL::*CIRCULARITY-HASH-TABLE* 
 SB-IMPL::*LOAD-PRINT-STUFF*
-SB-IMPL::*ZAP-ARRAY-DATA-TEMP* 
+SB-IMPL::*ZAP-ARRAY-DATA-TEMP*       ; FIXME: ADJUST-ARRAY non-threadsafe
 SB-IMPL::*ACTIVE-PROCESSES* 
 SB-IMPL::*SHARP-SHARP-ALIST*     
 SB-IMPL::*BASE-POWER* 
index 43ed578..fc518a3 100644 (file)
@@ -1254,6 +1254,7 @@ is a good idea, but see SB-SYS re. blurring of boundaries."
              "OBJECT-NOT-VECTOR-ERROR" "OBJECT-NOT-WEAK-POINTER-ERROR"
              "ODD-KEY-ARGS-ERROR"
              "OUTPUT-OBJECT" "OUTPUT-UGLY-OBJECT"
+            "PACKAGE-DESIGNATOR"
              "PACKAGE-DOC-STRING"
              "PACKAGE-HASHTABLE-SIZE" "PACKAGE-HASHTABLE-FREE"
              "PACKAGE-INTERNAL-SYMBOLS" "PACKAGE-EXTERNAL-SYMBOLS"
@@ -1302,9 +1303,10 @@ is a good idea, but see SB-SYS re. blurring of boundaries."
              "SINGLE-VALUE-TYPE" "SINGLE-VALUE-SPECIFIER-TYPE"
              "SPECIALIZABLE" "SPECIALIZABLE-VECTOR"
              "SPECIFIER-TYPE" "STACK-REF"
-             "STREAMLIKE" "STRINGABLE"
+             "STREAM-DESIGNATOR" "STRING-DESIGNATOR"
              "STRUCTURE-RAW-SLOT-TYPE-AND-SIZE"
             "SUB-GC"
+            "SYMBOLS-DESIGNATOR"
              "%INSTANCE-LENGTH"
              "%INSTANCE-REF" "%INSTANCE-SET"
              "SYSTEM-AREA-CLEAR"
index 4e657c9..5005775 100644 (file)
 ;;; FIXME: could probably go away
 (sb!xc:deftype form () t)
 
-;;; Maclisp compatibility...
-;;; FIXME: should be STRING-DESIGNATOR (the term used in the ANSI spec)
-(sb!xc:deftype stringable () '(or string symbol character))
+(sb!xc:deftype string-designator () '(or string symbol character))
 
 ;;; a thing legal in places where we want the name of a file
 (sb!xc:deftype filename () '(or string pathname))
 (sb!xc:deftype logical-host-designator ()
   '(or host string))
 
+(sb!xc:deftype package-designator () '(or string-designator sb!xc:package))
+;;; a designator for a list of symbols
+(sb!xc:deftype symbols-designator () '(or list symbol))
+
 ;;; a thing returned by the irrational functions. We assume that they
 ;;; never compute a rational result.
 (sb!xc:deftype irrational ()
   `(or null integer))
 
 ;;; a valid argument to a stream function
-;;;
-;;; FIXME: should probably be STREAM-DESIGNATOR, after the term
-;;; used in the ANSI spec (if this is in fact exactly the same thing)
-(sb!xc:deftype streamlike () '(or stream (member nil t)))
+(sb!xc:deftype stream-designator () '(or stream (member nil t)))
 
 ;;; an object suitable for input to standard functions that accept
 ;;; "environment objects" (of the ANSI glossary)
index 73844a0..43a7fce 100644 (file)
 
 (defun %write-string (string stream start end)
   (declare (type string string))
-  (declare (type streamlike stream))
+  (declare (type stream-designator stream))
   (declare (type index start end))
   (let ((stream (out-synonym-of stream)))
     (cond ((ansi-stream-p stream)
index f5aa2fa..b1fe487 100644 (file)
@@ -23,7 +23,7 @@
        (t
         (error 'simple-type-error
                :datum x
-               :expected-type 'stringable
+               :expected-type 'string-designator
                :format-control "~S cannot be coerced to a string."
                :format-arguments (list x)))))
 
index 0d8fc9f..2c653e4 100644 (file)
 \f
 ;;;; from the "Packages" chapter:
 
-(sb!xc:deftype package-designator () '(or stringable sb!xc:package))
-(sb!xc:deftype symbols () '(or list symbol))
-
 (defknown gentemp (&optional string package-designator) symbol)
 
-(defknown make-package (stringable &key
-                                  (:use list)
-                                  (:nicknames list)
-                                  ;; ### extensions...
-                                  (:internal-symbols index)
-                                  (:external-symbols index))
+(defknown make-package (string-designator &key
+                                         (:use list)
+                                         (:nicknames list)
+                                         ;; ### extensions...
+                                         (:internal-symbols index)
+                                         (:external-symbols index))
   sb!xc:package)
 (defknown find-package (package-designator) (or sb!xc:package null)
   (flushable))
 (defknown find-symbol (string &optional package-designator)
   (values symbol (member :internal :external :inherited nil))
   (flushable))
-(defknown (export import) (symbols &optional package-designator) (eql t))
+(defknown (export import) (symbols-designator &optional package-designator) 
+  (eql t))
 (defknown unintern (symbol &optional package-designator) boolean)
-(defknown unexport (symbols &optional package-designator) (eql t))
-(defknown shadowing-import (symbols &optional package-designator) (eql t))
+(defknown unexport (symbols-designator &optional package-designator) (eql t))
+(defknown shadowing-import (symbols-designator &optional package-designator)
+  (eql t))
 (defknown shadow ((or symbol string list) &optional package-designator)
   (eql t))
 (defknown (use-package unuse-package)
   ((or list package-designator) &optional package-designator) (eql t))
-(defknown find-all-symbols (stringable) list (flushable))
+(defknown find-all-symbols (string-designator) list (flushable))
 \f
 ;;;; from the "Numbers" chapter:
 
 (defknown char-int (character) char-code (movable foldable flushable))
 (defknown char-name (character) (or simple-string null)
   (movable foldable flushable))
-(defknown name-char (stringable) (or character null)
+(defknown name-char (string-designator) (or character null)
   (movable foldable flushable))
 (defknown code-char (char-code) base-char
   ;; By suppressing constant folding on CODE-CHAR when the
 (defknown char (string index) character (foldable flushable))
 (defknown schar (simple-string index) character (foldable flushable))
 
-(sb!xc:deftype stringable () '(or character string symbol))
-
 (defknown (string= string-equal)
-  (stringable stringable &key (:start1 index) (:end1 sequence-end)
+  (string-designator string-designator &key (:start1 index) (:end1 sequence-end)
              (:start2 index) (:end2 sequence-end))
   boolean
   (foldable flushable))
 (defknown (string< string> string<= string>= string/= string-lessp
                   string-greaterp string-not-lessp string-not-greaterp
                   string-not-equal)
-  (stringable stringable &key (:start1 index) (:end1 sequence-end)
+  (string-designator string-designator &key (:start1 index) (:end1 sequence-end)
              (:start2 index) (:end2 sequence-end))
   (or index null)
   (foldable flushable))
   simple-string (flushable))
 
 (defknown (string-trim string-left-trim string-right-trim)
-  (sequence stringable) simple-string (flushable))
+  (sequence string-designator) simple-string (flushable))
 
 (defknown (string-upcase string-downcase string-capitalize)
-  (stringable &key (:start index) (:end sequence-end))
+  (string-designator &key (:start index) (:end sequence-end))
   simple-string (flushable))
 
 (defknown (nstring-upcase nstring-downcase nstring-capitalize)
   (string &key (:start index) (:end sequence-end))
   string ())
 
-(defknown string (stringable) string
+(defknown string (string-designator) string
   (flushable explicit-check))
 \f
 ;;;; internal non-keyword versions of string predicates:
 
 (defknown (string<* string>* string<=* string>=* string/=*)
-  (stringable stringable index sequence-end index sequence-end)
+  (string-designator string-designator index sequence-end index sequence-end)
   (or index null)
   (foldable flushable))
 
 (defknown string=*
-  (stringable stringable index sequence-end index sequence-end)
+  (string-designator string-designator index sequence-end index sequence-end)
   boolean
   (foldable flushable))
 \f
   (values callable boolean)
   ())
 (defknown (pprint-fill pprint-linear)
-  (streamlike t &optional t t)
+  (stream-designator t &optional t t)
   null
   ())
 (defknown pprint-tabular
-  (streamlike t &optional t t unsigned-byte)
+  (stream-designator t &optional t t unsigned-byte)
   null
   ())
 (defknown pprint-indent
-  ((member :block :current) real &optional streamlike)
+  ((member :block :current) real &optional stream-designator)
   null
   ())
 (defknown pprint-newline
-  ((member :linear :fill :miser :mandatory) &optional streamlike)
+  ((member :linear :fill :miser :mandatory) &optional stream-designator)
   null
   ())
 (defknown pprint-tab
   ((member :line :section :line-relative :section-relative)
-   unsigned-byte unsigned-byte &optional streamlike)
+   unsigned-byte unsigned-byte &optional stream-designator)
   null
   ())
 (defknown set-pprint-dispatch
 
 ;;; may return any type due to eof-value...
 (defknown (read read-preserving-whitespace read-char-no-hang read-char)
-  (&optional streamlike t t t) t (explicit-check))
+  (&optional stream-designator t t t) t (explicit-check))
 
-(defknown read-delimited-list (character &optional streamlike t) list
+(defknown read-delimited-list (character &optional stream-designator t) list
   (explicit-check))
-(defknown read-line (&optional streamlike t t t) (values t boolean)
+(defknown read-line (&optional stream-designator t t t) (values t boolean)
   (explicit-check))
-(defknown unread-char (character &optional streamlike) t
+(defknown unread-char (character &optional stream-designator) t
   (explicit-check))
-(defknown peek-char (&optional (or character (member nil t)) streamlike t t t)
+(defknown peek-char (&optional (or character (member nil t)) 
+                              stream-designator t t t)
   t
   (explicit-check))
-(defknown listen (&optional streamlike) boolean (flushable explicit-check))
+(defknown listen (&optional stream-designator) boolean (flushable explicit-check))
 
-(defknown clear-input (&optional stream) null (explicit-check))
+(defknown clear-input (&optional stream-designator) null (explicit-check))
 
 (defknown read-from-string
   (string &optional t t
 
 (defknown write
   (t &key
-     (:stream streamlike)
+     (:stream stream-designator)
      (:escape t)
      (:radix t)
      (:base (integer 2 36))
   (any explicit-check)
   :derive-type #'result-type-first-arg)
 
-(defknown (prin1 print princ) (t &optional streamlike) t (any explicit-check)
+(defknown (prin1 print princ) (t &optional stream-designator) 
+  t 
+  (any explicit-check)
   :derive-type #'result-type-first-arg)
 
 ;;; xxx-TO-STRING functions are not foldable because they depend on
 
 (defknown (prin1-to-string princ-to-string) (t) simple-string (flushable))
 
-(defknown write-char (character &optional streamlike) character
+(defknown write-char (character &optional stream-designator) character
   (explicit-check))
 (defknown (write-string write-line)
-  (string &optional streamlike &key (:start index) (:end sequence-end))
+  (string &optional stream-designator &key (:start index) (:end sequence-end))
   string
   (explicit-check))
 
 (defknown (terpri finish-output force-output clear-output)
-  (&optional streamlike) null
+  (&optional stream-designator) null
   (explicit-check))
 
-(defknown fresh-line (&optional streamlike) boolean
+(defknown fresh-line (&optional stream-designator) boolean
   (explicit-check))
 
 (defknown write-byte (integer stream) integer
   (explicit-check))
 
-(defknown format ((or streamlike string) (or string function) &rest t)
+(defknown format ((or (member nil t) stream string) 
+                 (or string function) &rest t)
   (or string null)
   (explicit-check))
 
   t)
 (defknown dribble (&optional filename &key (:if-exists t)) (values))
 
-(defknown apropos      (stringable &optional package-designator t) (values))
-(defknown apropos-list (stringable &optional package-designator t) list
+(defknown apropos      (string-designator &optional package-designator t) (values))
+(defknown apropos-list (string-designator &optional package-designator t) list
   (flushable))
 
 (defknown get-decoded-time ()
index 9872d8f..294293c 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.8.7"
+"0.8.8.8"