From b84b7f3a3c58909c6e252aba8c97148c9ad917b7 Mon Sep 17 00:00:00 2001 From: William Harold Newman Date: Tue, 16 Jul 2002 03:09:43 +0000 Subject: [PATCH] 0.7.5.12: 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 | 35 +++++++++++++++++++++++++++++++++++ NEWS | 6 ++++++ src/code/target-load.lisp | 12 +++++++----- tests/load.pure.lisp | 22 ++++++++++++++++++++++ version.lisp-expr | 2 +- 5 files changed, 71 insertions(+), 6 deletions(-) create mode 100644 tests/load.pure.lisp diff --git a/BUGS b/BUGS index bd48e96..7f5faab 100644 --- 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 + #)[: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 --- 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 diff --git a/src/code/target-load.lisp b/src/code/target-load.lisp index b36fefb..11de3e3 100644 --- a/src/code/target-load.lisp +++ b/src/code/target-load.lisp @@ -42,7 +42,8 @@ ;;;; 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)) @@ -184,14 +185,15 @@ (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 index 0000000..f12a9bd --- /dev/null +++ b/tests/load.pure.lisp @@ -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) diff --git a/version.lisp-expr b/version.lisp-expr index 1a82d3c..e70fd5b 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4