0.7.5.12:
authorWilliam Harold Newman <william.newman@airmail.net>
Tue, 16 Jul 2002 03:09:43 +0000 (03:09 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Tue, 16 Jul 2002 03:09:43 +0000 (03:09 +0000)
fixed (LOAD "foo.fasl" :IF-DOES-NOT-EXIST NIL) bug reported
by Gregory Wright sbcl-devel 2002-07-15
found bug 188. I hope entomotomy will have some logic to avoid
this kind of stupid fix-a-reported-bug-report-a-bug
primitivity!

BUGS
NEWS
src/code/target-load.lisp
tests/load.pure.lisp [new file with mode: 0644]
version.lisp-expr

diff --git a/BUGS b/BUGS
index bd48e96..7f5faab 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -1421,6 +1421,41 @@ WORKAROUND:
       ;; go away.) 
       (sb-c::%dvai v i))
 
+188: "compiler performance fiasco involving type inference and UNION-TYPE"
+  In sbcl-0.7.5.11 on a 700 MHz Pentium III, 
+    (time (compile
+           nil
+           '(lambda ()
+              (declare (optimize (safety 3)))
+              (declare (optimize (compilation-speed 2)))
+              (declare (optimize (speed 1) (debug 1) (space 1)))
+              (let ((fn "if-this-file-exists-the-universe-is-strange"))
+                (load fn :if-does-not-exist nil)
+                (load (concatenate 'string fn ".lisp") :if-does-not-exist nil)
+                (load (concatenate 'string fn ".fasl") :if-does-not-exist nil)
+                (load (concatenate 'string fn ".misc-garbage")
+                      :if-does-not-exist nil)))))
+  reports  
+                134.552 seconds of real time
+                133.35156 seconds of user run time
+                0.03125 seconds of system run time
+                   [Run times include 2.787 seconds GC run time.]
+                0 page faults and
+                246883368 bytes consed.
+  BACKTRACE from Ctrl-C in the compilation shows that the compiler is
+  thinking about type relationships involving types like
+     #<UNION-TYPE
+       (OR (INTEGER 576 576)
+           (INTEGER 1192 1192)
+           (INTEGER 2536 2536)
+           (INTEGER 1816 1816)
+           (INTEGER 2752 2752)
+           (INTEGER 1600 1600)
+           (INTEGER 2640 2640)
+           (INTEGER 1808 1808)
+           (INTEGER 1296 1296)
+           ...)>)[:EXTERNAL]
+
 DEFUNCT CATEGORIES OF BUGS
   IR1-#:
     These labels were used for bugs related to the old IR1 interpreter.
diff --git a/NEWS b/NEWS
index e9b978a..4bdbcd5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1162,6 +1162,12 @@ changes in sbcl-0.7.5 relative to sbcl-0.7.4:
     a wild pathname to load, loads all files matching that pathname.
     Instead, an error of type FILE-ERROR is signalled.
 
+changes in sbcl-0.7.6 relative to sbcl-0.7.5:
+  * bug fix: LOAD :IF-DOES-NOT-EXIST NIL now works when file type is
+    specified. (This was at the root of some bad interactions between
+    SBCL and ILISP: thanks to Gregory Wright for diagnosing this and
+    reporting the bug.)
+
 planned incompatible changes in 0.7.x:
 * When the profiling interface settles down, maybe in 0.7.x, maybe
   later, it might impact TRACE. They both encapsulate functions, and
index b36fefb..11de3e3 100644 (file)
@@ -42,7 +42,8 @@
 \f
 ;;;; LOAD itself
 
-;;; a helper function for LOAD: Load the stuff in a file when we have the name.
+;;; a helper function for LOAD: Load the stuff in a file when we have
+;;; the name.
 (defun internal-load (pathname truename if-does-not-exist verbose print
                      &optional contents)
   (declare (type (member nil :error) if-does-not-exist))
             (load-as-fasl filespec verbose print)
             (load-as-source filespec verbose print))
         (let* ((pathname (pathname filespec))
-               (physical-pathname (translate-logical-pathname pathname)))
-          (if (or (probe-file physical-pathname) (pathname-type physical-pathname))
+               (physical-pathname (translate-logical-pathname pathname))
+               (probed-file (probe-file physical-pathname)))
+          (if (or probed-file
+                  (pathname-type physical-pathname))
               (internal-load physical-pathname
-                             (truename physical-pathname)
+                             probed-file
                              internal-if-does-not-exist
                              verbose
                              print)
-              
               (internal-load-default-type pathname
                                           internal-if-does-not-exist
                                           verbose
diff --git a/tests/load.pure.lisp b/tests/load.pure.lisp
new file mode 100644 (file)
index 0000000..f12a9bd
--- /dev/null
@@ -0,0 +1,22 @@
+;;;; miscellaneous tests of LOOP-related stuff
+
+;;;; This software is part of the SBCL system. See the README file for
+;;;; more information.
+;;;;
+;;;; While most of SBCL is derived from the CMU CL system, the test
+;;;; files (like this one) were written from scratch after the fork
+;;;; from CMU CL.
+;;;; 
+;;;; This software is in the public domain and is provided with
+;;;; absolutely no warranty. See the COPYING and CREDITS files for
+;;;; more information.
+
+(in-package "CL-USER")
+
+;;; As reported by Gregory Wright sbcl-devel 2002-07-15, SBCL 0.7.5
+;;; didn't honor the LOAD :IF-DOES-NOT-EXIST argument when the type of
+;;; the LOADed file was specified.
+(load "i-am-not" :if-does-not-exist nil)
+(load "i-am-not.lisp" :if-does-not-exist nil)
+(load "i-am-not.fasl" :if-does-not-exist nil)
+(load "i-am-not.misc-garbage" :if-does-not-exist nil)
index 1a82d3c..e70fd5b 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.7.5.11"
+"0.7.5.12"