From: Nikodemus Siivola Date: Mon, 7 Aug 2006 14:31:45 +0000 (+0000) Subject: 0.9.15.13: make PATHNAME not unsafely-flushable X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=0aad9fb773a97e400b727dd8673494491e56a464;p=sbcl.git 0.9.15.13: make PATHNAME not unsafely-flushable * Reported by Richard Kreuter on sbcl-help. * Add DEFTRANSFORMS for common cases. --- diff --git a/NEWS b/NEWS index 1478cfb..a6b852b 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ changes in sbcl-0.9.16 relative to sbcl-0.9.15: * bug fix: use of MAKE-METHOD in method combination now works even in the presence of user-defined method classes. (reported by Bruno Haible and Pascal Costanza) + * bug fix: erronous calls to PATHNAME were being optimized away. + (reported by Richard Kreuter) changes in sbcl-0.9.15 relative to sbcl-0.9.14: * added support for the ucs-2 external format. (contributed by Ivan diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp index 4d0debb..d5e465b 100644 --- a/src/compiler/fndb.lisp +++ b/src/compiler/fndb.lisp @@ -1165,7 +1165,7 @@ (defknown load-logical-pathname-translations (string) t ()) (defknown logical-pathname-translations (logical-host-designator) list ()) -(defknown pathname (pathname-designator) pathname (unsafely-flushable)) +(defknown pathname (pathname-designator) pathname ()) (defknown truename (pathname-designator) pathname ()) (defknown parse-namestring diff --git a/src/compiler/srctran.lisp b/src/compiler/srctran.lisp index 81c309d..8897534 100644 --- a/src/compiler/srctran.lisp +++ b/src/compiler/srctran.lisp @@ -3708,6 +3708,12 @@ (funcall control *standard-output* ,@arg-names) nil))) +(deftransform pathname ((pathspec) (pathname) *) + 'pathspec) + +(deftransform pathname ((pathspec) (string) *) + '(values (parse-namestring pathspec))) + (macrolet ((def (name) `(defoptimizer (,name optimizer) ((control &rest args)) @@ -4069,3 +4075,4 @@ `(let* ((acons (assoc quality-name policy)) (result (or (cdr acons) 1))) result)) + diff --git a/tests/pathnames.impure.lisp b/tests/pathnames.impure.lisp index 6993c55..1365bba 100644 --- a/tests/pathnames.impure.lisp +++ b/tests/pathnames.impure.lisp @@ -387,5 +387,8 @@ (assert (not (pathname-directory p))) p)))) +;;; reported by Richard Kreuter: PATHNAME used to be unsafely-flushable +(assert (eq :false (if (ignore-errors (pathname nil)) :true :false))) + ;;;; success diff --git a/version.lisp-expr b/version.lisp-expr index b004c9f..8cc77bd 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.9.15.12" +"0.9.15.13"