From 920782cb237657e912ac154dbc5117b6ac8e1229 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 28 Feb 2021 09:26:44 -0800 Subject: copy-file: get rid of package. * share/txr/stdlib/copy-file.tl (package copy-file): Removed. I cannot remember why I used this, but it was probably because this source file was developed in "user space". Then it likely became an experiment in the use of merge-delete-package to define material in a temporary package which is merged down to the ultimate target package like sys. Why get rid of this? It's causing a problem. The second and subsequent recompile of copy-path-rec causes its internal block not to be optimized away. I spotted this while checking whether a recompile of the library using the fully compiled library is different from the initial compile: copy-path-rec's block is not optimized away. --- share/txr/stdlib/copy-file.tl | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/share/txr/stdlib/copy-file.tl b/share/txr/stdlib/copy-file.tl index 198424af..aaff63f2 100644 --- a/share/txr/stdlib/copy-file.tl +++ b/share/txr/stdlib/copy-file.tl @@ -25,13 +25,7 @@ ;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. (eval-only - (defsymacro copy-size 65536) - - (defpackage copy-file - (:fallback usr sys) - (:use-syms usr:perms usr:times usr:owner usr:symlinks)) - - (in-package copy-file)) + (defsymacro copy-size 65536)) (defstruct copy-path-opts () perms times owner symlinks (euid (geteuid))) @@ -218,6 +212,3 @@ (let ((rst (stat ref-path))) (utimes s 0 nil rst.mtime rst.mtime-nsec)) (utimes s 0 nil 0 t)))) - -(eval-only - (merge-delete-package 'sys)) -- cgit v1.2.3