0.pre7.39:
authorWilliam Harold Newman <william.newman@airmail.net>
Wed, 3 Oct 2001 20:03:25 +0000 (20:03 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Wed, 3 Oct 2001 20:03:25 +0000 (20:03 +0000)
merged MNA fd-stream.lisp patch (sbcl-devel 2001-09-10)
merged AD EXPAND-DEFGENERIC patch (sbcl-devel 2001-09-10)
stuffed DEFUN EXPAND-DEFGENERIC into DEFMACRO DEFGENERIC
merged AD DIRECTORY patch (sbcl-devel 2001-09-22)
swapped FunctionPointer and InstancePointer type codes for PPC
convenience (as per dan sbcl-devel 2001-09-22)
incremented fasl file version number again
tweaked clean.sh so it will delete CVS update crud

CREDITS
NEWS
clean.sh
src/code/early-fasl.lisp
src/code/fd-stream.lisp
src/code/filesys.lisp
src/compiler/generic/early-objdef.lisp
src/compiler/srctran.lisp
src/pcl/boot.lisp
tests/clos.impure.lisp
version.lisp-expr

diff --git a/CREDITS b/CREDITS
index b49666d..1fa39cc 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -523,6 +523,11 @@ Douglas Crosher:
   of the type system's handling of the CONS type to allow ANSI-style
   (CONS FOO BAR) types.
 
+Alexey Dejneka:
+  He has fixed many bugs in SBCL. I can't find a nice summary theme,
+  though, except that appears that at least some of them come from
+  going over the BUGS file to find outstanding problems to fix.
+
 Robert MacLachlan:
   He has continued to answer questions about, and contribute fixes to, 
   the CMU CL project. Some of these fixes, especially for compiler
diff --git a/NEWS b/NEWS
index 9c0bb26..8dd7344 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -830,6 +830,26 @@ changes in sbcl-0.7.0 relative to sbcl-0.6.13:
   in general that I picked up as I worked on this specific problem,
   reduced my opinion of its maintainability enough that I deleted it 
   instead of trying to fix it. 
+* The compiler, especially the IR1 phase of the compiler, has been
+  tweaked somewhat to support the new implementation of DEFUN and
+  of the static linking hack used for cold init. In particular,
+  the property of "is externally visible" is now orthogonal to
+  the property of "is optimized/specialized for being called
+  at LOAD time, with no arguments and no argument checking".
+  The old FUNCTIONAL-KIND=:TOP-LEVEL type code which
+  conflated these two properties has been replaced with the
+  FUNCTIONAL-HAS-EXTERNAL-REFERENCES-P flag. This has minor
+  beneficial consequences for the logic of #'CL:COMPILE and other
+  things. Like the rewrite of EVAL, it has also quite possibly 
+  introduced some new bugs, but since the new logic is simpler and
+  more orthogonal, hopefully it will be easier to clean up bugs
+  in the new code than it was in the old code.
+* The rewritten compiler is still a little unsteady on its feet.
+  In particular, the debugging information it produces is sometimes
+  broken, and the support for inlining FOO when you
+  (DECLAIM (INLINE FOO)) then do (DEFUN FOO ..) in a non-null
+  lexical environment has been temporarily weakened (because the
+  old clever code depended on correct debugging information).
 * There are new compiler optimizations for various functions: FIND,
   POSITION, FIND-IF, POSITION-IF, FILL, COERCE, TRUNCATE, FLOOR, and
   CEILING. Mostly these should be transparent, but there's one 
@@ -840,16 +860,17 @@ changes in sbcl-0.7.0 relative to sbcl-0.6.13:
   it will issue WARNINGs about the type mismatches. It's not clear
   how to make the compiler smart enough to fix this in general, but
   a workaround is given in the entry for 117 in the BUGS file.
+* (Because of the interaction between the two previous items --
+  occasional inlining problems and new inline expansions -- the
+  new FIND, POSITION, FIND-IF, and POSITION-IF code won't really
+  kick in properly until debugging information is straightened out
+  in some future version.)
 * DEFSTRUCT and DEFCLASS have been substantially updated to take
   advantage of the new EVAL-WHEN stuff and to clean them up in 
   general, and they are now more ANSI-compliant in a number of
   ways. Martin Atzmueller is responsible for a lot of this.
 * A bug in LOOP operations on hash tables has been fixed, thanks
   to a bug report and patch from Alexey Dejneka.
-* The default value of *BYTES-CONSED-BETWEEN-GCS* has been 
-  doubled, to 4 million. (If your application spends a lot of time
-  GCing and you have a lot of RAM, you might want to experiment with
-  increasing it even more.)
 * PPRINT-LOGICAL-BLOCK now copies the *PRINT-LINES* value on entry
   and uses that copy, rather than the current dynamic value, when
   it's trying to decide whether to truncate output . Thus e.g.
@@ -860,19 +881,28 @@ changes in sbcl-0.7.0 relative to sbcl-0.6.13:
              (print (aref possiblybigthings i) stream)))))
   should truncate the logical block only at 50 lines, instead of 
   often truncating it at 8 lines.
-* :SB-CONSTRAIN-FLOAT-TYPE, :SB-PROPAGATE-FLOAT-TYPE, and
-  :SB-PROPAGATE-FUN-TYPE are no longer considered to be optional
-  features. Instead, the code that they used to control is always
-  built into the system.
-* The support for (DECLAIM (INLINE FOO)) followed by (DEFUN FOO ..) in 
-  a non-null lexical environment has been weakened. (It will still
-  compile, but the compiler will be much less determined to inline FOO
-  than it used to be.)
+* Martin Atzmueller fixed several other bugs:
+  ** correct ERROR type for various file operations
+  ** removing dead code
+* Alexey Dejneka fixed many bugs:
+  ** misbehavior of WRITE-STRING/WRITE-LINE
+  ** LOOP over keys of a hash table
+  ** bogus entries in BUGS
+  ** DIRECTORY when similar filenames are present
+  ** DEFGENERIC with :METHOD options
 ?? Old operator names in the style DEF-FOO are now deprecated in favor
   of new corresponding names DEFINE-FOO, for consistency with the
   naming convention used in the ANSI standard). This mostly affects
   internal symbols, but a few external symbols like
   SB-ALIEN:DEF-ALIEN-FUNCTION are also affected.
+* :SB-CONSTRAIN-FLOAT-TYPE, :SB-PROPAGATE-FLOAT-TYPE, and
+  :SB-PROPAGATE-FUN-TYPE are no longer considered to be optional
+  features. Instead, the code that they used to control is always
+  built into the system.
+* The default value of *BYTES-CONSED-BETWEEN-GCS* has been 
+  doubled, to 4 million. (If your application spends a lot of time
+  GCing and you have a lot of RAM, you might want to experiment with
+  increasing it even more.)
 * minor incompatible change: DEFINE-ALIEN-FUNCTION (also known by 
   the old deprecated name DEF-ALIEN-FUNCTION) now does DECLAIM FTYPE
   for the defined function, since declaiming return types involving
@@ -888,26 +918,12 @@ changes in sbcl-0.7.0 relative to sbcl-0.6.13:
   its anonymous FTP service, and with it my original plan for
   distributing them separately. For now, if you need them you can
   download an old sbcl source release and get them from there.
-?? The compiler, especially the IR1 phase of the compiler, has been
-  tweaked somewhat to support the new implementation of DEFUN and
-  of the static linking hack used for cold init. In particular,
-  the property of "is externally visible" is now orthogonal to
-  the property of "is optimized/specialized for being called
-  at LOAD time, with no arguments and no argument checking".
-  The old FUNCTIONAL-KIND=:TOP-LEVEL type code which
-  conflated these two properties has been replaced with the
-  FUNCTIONAL-HAS-EXTERNAL-REFERENCES-P flag. This has minor
-  beneficial consequences for the logic of #'CL:COMPILE and other
-  things. Like the rewrite of EVAL, it has also quite possibly 
-  introduced some new bugs, but since the new logic is simpler and
-  more orthogonal, hopefully it will be easier to clean up bugs
-  in the new code than it was in the old code.
 * lots of other tidying up internally: renaming things so that names
   are more systematic and consistent, converting C macros to inline
   functions, systematizing indentation, making symbol packaging
   more logical, and so forth
 * The fasl file version number changed again, for about a dozen
-  reasons, some of which are obvious above.
+  reasons, some of which are apparent above.
 
 planned incompatible changes in 0.7.x:
 * The debugger prompt sequence now goes "5]", "5[2]", "5[3]", etc.
index 7c6756c..29af859 100755 (executable)
--- a/clean.sh
+++ b/clean.sh
@@ -57,6 +57,8 @@ done
 #     certainly not source
 #   *~, #*#, TAGS
 #     common names for editor temporary files
+#   .#*
+#     rubbish left behind by CVS updates
 #   *.htm, *.html
 #     The system doc sources are SGML, any HTML is
 #     automatically-generated output.
@@ -68,6 +70,7 @@ find . \( \
        -type l -or \
        -name '*~' -or \
        -name '#*#' -or \
+       -name '.#*' -or \
        -name '?*.x86f' -or \
        -name '?*.axpf' -or \
        -name '?*.lbytef' -or \
index 32161b0..9bd0c45 100644 (file)
@@ -38,7 +38,7 @@
 
 ;;; This value should be incremented when the system changes in such
 ;;; a way that it will no longer work reliably with old fasl files.
-(defconstant +fasl-file-version+ 17)
+(defconstant +fasl-file-version+ 18)
 ;;; 2 = sbcl-0.6.4 uses COMPILE-OR-LOAD-DEFGENERIC.
 ;;; 3 = sbcl-0.6.6 uses private symbol, not :EMPTY, for empty HASH-TABLE slot.
 ;;; 4 = sbcl-0.6.7 uses HAIRY-DATA-VECTOR-REF and HAIRY-DATA-VECTOR-SET
@@ -72,6 +72,9 @@
 ;;;      interpreter, changed %DEFUN and DEFSTRUCT, changed the
 ;;;      meaning of FOP-FSET, and changed the layouts of various
 ;;;      internal compiler structures (e.g. DEFSTRUCT CLAMBDA)
+;;; 18 = sbcl-0.pre7.39 swapped FUNCTION-POINTER-TYPE and
+;;;      INSTANCE-POINTER-TYPE low-level type codes to help with
+;;;      the PPC port
 
 ;;; the conventional file extension for our fasl files
 (declaim (type simple-string *fasl-file-type*))
index 4b6f09d..c6a1052 100644 (file)
         :format-control "~@<~?: ~2I~_~A~:>"
         :format-arguments (list note-format (list stream) (strerror errno))))
 (defun simple-file-perror (note-format pathname errno)
-  (error 'simple-stream-error
+  (error 'simple-file-error
         :pathname pathname
         :format-control "~@<~?: ~2I~_~A~:>"
         :format-arguments
index 746db69..8464a2c 100644 (file)
    TRUENAMEing and the semantics of the Unix filesystem (symbolic links..)
    means this function can sometimes return files which don't have the same
    directory as PATHNAME."
-  (let ((truenames nil)
-       (merged-pathname (merge-pathnames pathname
+  (let (;; We create one entry in this hash table for each truename,
+       ;; as an asymptotically fast way of removing duplicates (which
+       ;; can arise when e.g. multiple symlinks map to the same
+       ;; truename).
+       (truenames (make-hash-table :test #'equal))
+        (merged-pathname (merge-pathnames pathname
                                          (make-pathname :name :wild
                                                         :type :wild
                                                         :version :wild))))
     (!enumerate-matches (match merged-pathname)
-      (let ((*ignore-wildcards* t))
-       (push (truename (if (eq (sb!unix:unix-file-kind match) :directory)
-                           (concatenate 'string match "/")
-                           match))
-             truenames)))
-    ;; FIXME: The DELETE-DUPLICATES here requires quadratic time,
-    ;; which is unnecessarily slow. That might not be an issue,
-    ;; though, since the time constant for doing TRUENAME on every
-    ;; directory entry is likely to be (much) larger, and the cost of
-    ;; all those TRUENAMEs on a huge directory might even be quadratic
-    ;; in the directory size. Someone who cares about enormous
-    ;; directories might want to check this. -- WHN 2001-06-19
-    (sort (delete-duplicates truenames :test #'string= :key #'pathname-name)
-         #'string< :key #'pathname-name)))
+      (let ((*ignore-wildcards* t)
+            (truename (truename (if (eq (sb!unix:unix-file-kind match)
+                                       :directory)
+                                    (concatenate 'string match "/")
+                                    match))))
+        (setf (gethash (namestring truename) truenames)
+             truename)))
+    (mapcar #'cdr
+           ;; Sorting isn't required by the ANSI spec, but sorting
+           ;; into some canonical order seems good just on the
+           ;; grounds that the implementation should have repeatable
+           ;; behavior when possible.
+            (sort (loop for name being each hash-key in truenames
+                       using (hash-value truename)
+                        collect (cons name truename))
+                  #'string<
+                 :key #'car))))
 \f
 ;;;; translating Unix uid's
 ;;;;
index 389844c..699c30e 100644 (file)
@@ -14,7 +14,7 @@
 ;;; FIXME: It's clever using :SUFFIX -TYPE for these things, but it's
 ;;; a pain for people just learning to find their way around the code
 ;;; who want to use lexical search to figure out where things like
-;;; EVEN-FIXNUM type are defined. Remove the :SUFFIXes and just expand
+;;; EVEN-FIXNUM-TYPE are defined. Remove the :SUFFIXes and just expand
 ;;; out the full names. Or even define them in DEF-FROB EVEN-FIXNUM-TYPE
 ;;; style so searches like 'def.*even-fixnum-type' can find them.
 
   ;; defined in the first DEFENUM. -- AL 20000216
   (defenum (:suffix -type)
     even-fixnum
-    function-pointer
+    ;; Note: CMU CL, and SBCL < 0.pre7.39, had FUNCTION-POINTER-TYPE
+    ;; here. We swapped FUNCTION-POINTER-TYPE and
+    ;; INSTANCE-POINTER-TYPE in sbcl-0.pre7.39 in order to help with a
+    ;; low-level pun in the function call sequence on the PPC port.
+    ;; For more information, see the PPC port code. -- WHN 2001-10-03
+    instance-pointer
     other-immediate-0
     list-pointer
     odd-fixnum
-    instance-pointer
+    function-pointer
     other-immediate-1
     other-pointer))
 
index 0fd8c48..9df0d78 100644 (file)
                        ;; The bound exists, so keep it open still.
                        (list new-val))))
                   (t
-                   (error "Unknown bound type in make-interval!")))))
+                   (error "unknown bound type in MAKE-INTERVAL")))))
     (%make-interval :low (normalize-bound low)
                    :high (normalize-bound high))))
 
              :low (bound-mul (interval-low x) (interval-low y))
              :high (bound-mul (interval-high x) (interval-high y))))
            (t
-            (error "This shouldn't happen!"))))))
+            (error "internal error in INTERVAL-MUL"))))))
 
 ;;; Divide two intervals.
 (defun interval-div (top bot)
              :low (bound-div (interval-low top) (interval-high bot) t)
              :high (bound-div (interval-high top) (interval-low bot) nil)))
            (t
-            (error "This shouldn't happen!"))))))
+            (error "internal error in INTERVAL-DIV"))))))
 
 ;;; Apply the function F to the interval X. If X = [a, b], then the
 ;;; result is [f(a), f(b)]. It is up to the user to make sure the
           (logand x ,mask)))))
 \f
 ;;;; arithmetic and logical identity operation elimination
-;;;;
-;;;; Flush calls to various arith functions that convert to the
-;;;; identity function or a constant.
 
+;;; Flush calls to various arith functions that convert to the
+;;; identity function or a constant.
+;;;
+;;; FIXME: Rewrite as DEF-FROB.
 (dolist (stuff '((ash 0 x)
                 (logand -1 x)
                 (logand 0 0)
   '(%negate y))
 (deftransform * ((x y) (rational (constant-argument (member 0))) *
                 :when :both)
-  "convert (* x 0) to 0."
+  "convert (* x 0) to 0"
   0)
 
 ;;; Return T if in an arithmetic op including continuations X and Y,
 (dolist (x '(eq char= equal))
   (%deftransform x '(function * *) #'simple-equality-transform))
 
-;;; Similar to SIMPLE-EQUALITY-PREDICATE, except that we also try to
-;;; convert to a type-specific predicate or EQ:
+;;; This is similar to SIMPLE-EQUALITY-PREDICATE, except that we also
+;;; try to convert to a type-specific predicate or EQ:
 ;;; -- If both args are characters, convert to CHAR=. This is better than
 ;;;    just converting to EQ, since CHAR= may have special compilation
 ;;;    strategies for non-standard representations, etc.
 
 (defoptimizer (array-element-type derive-type) ((array))
   (let* ((array-type (continuation-type array)))
-    #!+sb-show
-    (format t "~& defoptimizer array-elt-derive-type - array-element-type ~~
-~A~%" array-type)
     (labels ((consify (list)
               (if (endp list)
                   '(eql nil)
                       ((consp element-type)
                        (specifier-type (consify element-type)))
                       (t
-                       (error "Can't grok type ~A~%" element-type))))))
+                       (error "can't understand type ~S~%" element-type))))))
       (cond ((array-type-p array-type)
             (get-element-type array-type))
            ((union-type-p array-type)             
index 37afe01..6c9c9d4 100644 (file)
@@ -157,9 +157,6 @@ bootstrapping.
       standard-compute-effective-method))))
 \f
 (defmacro defgeneric (function-name lambda-list &body options)
-  (expand-defgeneric function-name lambda-list options))
-
-(defun expand-defgeneric (function-name lambda-list options)
   (let ((initargs ())
        (methods ()))
     (flet ((duplicate-option (name)
@@ -171,11 +168,6 @@ bootstrapping.
                    (arglist (elt qab arglist-pos))
                    (qualifiers (subseq qab 0 arglist-pos))
                    (body (nthcdr (1+ arglist-pos) qab)))
-              (when (not (equal (cadr (getf initargs :method-combination))
-                                qualifiers))
-                (error "bad method specification in DEFGENERIC ~A~%~
-                        -- qualifier mismatch for lambda list ~A"
-                       function-name arglist))
               `(defmethod ,function-name ,@qualifiers ,arglist ,@body))))
       (macrolet ((initarg (key) `(getf initargs ,key)))
        (dolist (option options)
index 90b5120..295e360 100644 (file)
@@ -33,8 +33,8 @@
 (assert (= (wiggle (make-struct-a :x 6 :y 5))
            (jiggle (make-struct-b :x 19 :y 6 :z 2))))
 
-;;; Compiling DEFGENERIC should prevent "undefined function" style warnings
-;;; from code within the same file.
+;;; Compiling DEFGENERIC should prevent "undefined function" style
+;;; warnings from code within the same file.
 (defgeneric gf-defined-in-this-file ((x number) (y number)))
 (defun function-using-gf-defined-in-this-file (x y n)
   (unless (minusp n)
 (defmethod no-applicable-method ((zut-n-a-m (eql #'zut-n-a-m)) &rest args)
   (format t "~&No applicable method for ZUT-N-A-M ~S, yet.~%" args))
 (zut-n-a-m 1 2 3)
-\f
 
-;; structure-class tests setup
+;;; bug reported and fixed by Alexey Dejneka sbcl-devel 2001-09-10:
+;;; This DEFGENERIC shouldn't cause an error.
+(defgeneric ad-gf (a) (:method :around (x) x))
+\f
+;;; structure-class tests setup
 (defclass structure-class-foo1 () () (:metaclass cl:structure-class))
 (defclass structure-class-foo2 (structure-class-foo1)
   () (:metaclass cl:structure-class))
 
-;; standard-class tests setup
+;;; standard-class tests setup
 (defclass standard-class-foo1 () () (:metaclass cl:standard-class))
 (defclass standard-class-foo2 (standard-class-foo1)
   () (:metaclass cl:standard-class))
 
-
 (assert (typep (class-of (make-instance 'structure-class-foo1))
                'structure-class))
 (assert (typep (make-instance 'structure-class-foo1) 'structure-class-foo1))
 (assert (typep (make-instance 'standard-class-foo1) 'standard-class-foo1))
-
+\f
 ;;;; success
 
 (sb-ext:quit :unix-status 104)
index cf864c6..098ea80 100644 (file)
@@ -18,4 +18,4 @@
 ;;; for internal versions, especially for internal versions off the
 ;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
 
-"0.pre7.38"
+"0.pre7.39"