mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Optimize PROBE-FILE.
In QUERY-FILE-SYSTEM, avoid formatting an error message if no error is requested. FORMAT is not expanded during the build, making it even slower.
This commit is contained in:
parent
d2d74c0af4
commit
615be919f3
|
|
@ -294,10 +294,12 @@
|
|||
:format-control "~@<can't find the ~A of wild pathname ~A~
|
||||
(physicalized from ~A).~:>"
|
||||
:format-arguments (list query-for pathname pathspec)))
|
||||
(flet ((fail (note-format pathname errno)
|
||||
(if errorp
|
||||
(simple-file-perror note-format pathname errno)
|
||||
(return-from query-file-system nil))))
|
||||
(macrolet ((fail (note-format pathname errno)
|
||||
;; Do this as a macro to avoid evaluating format
|
||||
;; calls when ERROP is NIL
|
||||
`(if errorp
|
||||
(simple-file-perror ,note-format ,pathname ,errno)
|
||||
(return-from query-file-system nil))))
|
||||
(let ((filename (native-namestring pathname :as-file t)))
|
||||
#!+win32
|
||||
(case query-for
|
||||
|
|
|
|||
Loading…
Reference in a new issue