Move compile-directory. Punt sf- and compile-directory?.
authorMatt Birkholz <puck@birchwood-abbey.net>
Thu, 23 Oct 2014 07:58:41 +0000 (00:58 -0700)
committerMatt Birkholz <puck@birchwood-abbey.net>
Fri, 14 Nov 2014 00:47:31 +0000 (17:47 -0700)
Sf-directory? and friend appear to have been broken since
directory-processor started expecting output-type to be a thunk.

Moving compile-directory out of sf/butils.scm and into
compiler/base/toplev.scm eliminates free variable references noted by
CREF.

12 files changed:
src/compiler/base/toplev.scm
src/compiler/machines/C/compiler.pkg
src/compiler/machines/alpha/compiler.pkg
src/compiler/machines/bobcat/compiler.pkg
src/compiler/machines/i386/compiler.pkg
src/compiler/machines/mips/compiler.pkg
src/compiler/machines/spectrum/compiler.pkg
src/compiler/machines/svm/compiler.pkg
src/compiler/machines/vax/compiler.pkg
src/compiler/machines/x86-64/compiler.pkg
src/sf/butils.scm
src/sf/sf.pkg

index c1a94708c192a0ba3ef6ab9d7ba71caea7ee04c7..9ef69f2041d997d6197269be9f05d52594ee4bc1 100644 (file)
@@ -238,6 +238,14 @@ USA.
 \f
 ;;;; Alternate Entry Points
 
+(define compile-directory
+  (directory-processor
+   "bin"
+   (lambda ()
+     (compiler:compiled-code-pathname-type))
+   (lambda (pathname output-directory)
+     (compile-bin-file pathname output-directory))))
+
 (define (compile-scode scode #!optional keep-debugging-info?)
   (compiler-output->compiled-expression
    (compile-scode/no-file
index eba2d8327aecf4f2a7383284f681dd68b47c4be7..afd750051a3d63fe946c26abd83c7b6630fe9a50 100644 (file)
@@ -239,6 +239,7 @@ USA.
   (export ()
          cbf
          cf
+         compile-directory
          compile-bin-file
          compile-file
          compile-file:force?
@@ -285,7 +286,9 @@ USA.
   (import (runtime unparser)
          *unparse-uninterned-symbols-by-name?*)
   (import (runtime load)
-         fasload-object-file))
+         fasload-object-file)
+  (import (scode-optimizer build-utilities)
+         directory-processor))
 \f
 (define-package (compiler debug)
   (files "base/debug")
index f00d371a1d5767045f2ccd1df1b912454839e74c..ff6f6fc0005bdaaa27f30ba353fc43ee8ef31d5f 100644 (file)
@@ -214,6 +214,7 @@ USA.
   (export ()
          cbf
          cf
+         compile-directory
          compile-bin-file
          compile-procedure
          compile-scode
@@ -242,7 +243,9 @@ USA.
          make-dbg-info-vector
          split-inf-structure!)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*))
+         *unparse-uninterned-symbols-by-name?*)
+  (import (scode-optimizer build-utilities)
+         directory-processor))
 \f
 (define-package (compiler debug)
   (files "base/debug")
index ca1ac8209e5b8e3ed03dbe6c1bd5005d90ea9dbe..1a2132374f666374f8bdb8d6a848b91cecbf809d 100644 (file)
@@ -215,6 +215,7 @@ USA.
   (export ()
          cbf
          cf
+         compile-directory
          compile-bin-file
          compile-procedure
          compile-scode
@@ -248,7 +249,9 @@ USA.
          make-dbg-info-vector
          split-inf-structure!)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*))
+         *unparse-uninterned-symbols-by-name?*)
+  (import (scode-optimizer build-utilities)
+         directory-processor))
 \f
 (define-package (compiler debug)
   (files "base/debug")
index 744c297f2a99c8907c5e9fa6485f05bf5e541968..74e9a7ba47e1845b85fbc6c5c4200947770353b3 100644 (file)
@@ -239,6 +239,7 @@ USA.
   (export ()
          cbf
          cf
+         compile-directory
          compile-bin-file
          compile-file
          compile-file:force?
@@ -271,7 +272,9 @@ USA.
          make-dbg-info-vector
          split-inf-structure!)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*))
+         *unparse-uninterned-symbols-by-name?*)
+  (import (scode-optimizer build-utilities)
+         directory-processor))
 \f
 (define-package (compiler debug)
   (files "base/debug")
index 167cfda651019b635f18bef35ada18c2fd34a43e..022e8160c9d5afcd310a7ec4d51e0fdbd2cdbde5 100644 (file)
@@ -215,6 +215,7 @@ USA.
   (export ()
          cbf
          cf
+         compile-directory
          compile-bin-file
          compile-procedure
          compile-scode
@@ -248,7 +249,9 @@ USA.
          make-dbg-info-vector
          split-inf-structure!)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*))
+         *unparse-uninterned-symbols-by-name?*)
+  (import (scode-optimizer build-utilities)
+         directory-processor))
 \f
 (define-package (compiler debug)
   (files "base/debug")
index c286aa648958e4441d8bed9f3472b7252a353e87..c1cb5a655440c92982b4b36561943ca4bfc95763 100644 (file)
@@ -215,6 +215,7 @@ USA.
   (export ()
          cbf
          cf
+         compile-directory
          compile-bin-file
          compile-file
          compile-file:force?
@@ -252,7 +253,9 @@ USA.
          make-dbg-info-vector
          split-inf-structure!)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*))
+         *unparse-uninterned-symbols-by-name?*)
+  (import (scode-optimizer build-utilities)
+         directory-processor))
 \f
 (define-package (compiler debug)
   (files "base/debug")
index 92f4d93f432bb7b77485bf821563ef206712a855..c014eccd40b456e3cd09cabc949a478cebae12d7 100644 (file)
@@ -247,6 +247,7 @@ USA.
   (export ()
          cbf
          cf
+         compile-directory
          compile-bin-file
          compile-file
          compile-file:force?
@@ -279,7 +280,9 @@ USA.
          make-dbg-info-vector
          split-inf-structure!)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*))
+         *unparse-uninterned-symbols-by-name?*)
+  (import (scode-optimizer build-utilities)
+         directory-processor))
 \f
 (define-package (compiler debug)
   (files "base/debug")
index 4381ef48da07b14109448c269ed8392c3cee7deb..5c194864916d9ec6620b4ae1b72a993d37bea229 100644 (file)
@@ -215,6 +215,7 @@ USA.
   (export ()
          cbf
          cf
+         compile-directory
          compile-bin-file
          compile-procedure
          compile-scode
@@ -243,7 +244,9 @@ USA.
          make-dbg-info-vector
          split-inf-structure!)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*))
+         *unparse-uninterned-symbols-by-name?*)
+  (import (scode-optimizer build-utilities)
+         directory-processor))
 \f
 (define-package (compiler debug)
   (files "base/debug")
index ab88d19c6169baf4864bb9d334a7bf5b9e878a76..0924fd783523120d080ada1ec549873fb071ec50 100644 (file)
@@ -239,6 +239,7 @@ USA.
   (export ()
          cbf
          cf
+         compile-directory
          compile-bin-file
          compile-file
          compile-file:force?
@@ -271,7 +272,9 @@ USA.
          make-dbg-info-vector
          split-inf-structure!)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*))
+         *unparse-uninterned-symbols-by-name?*)
+  (import (scode-optimizer build-utilities)
+         directory-processor))
 \f
 (define-package (compiler debug)
   (files "base/debug")
index 0108064b19a63cbde52a67fac24bfb17df09d88e..195cf915adb7137ac574d1cc9f9f483f2e63e12a 100644 (file)
@@ -66,25 +66,6 @@ USA.
    (lambda (pathname output-directory)
      (sf pathname output-directory))))
 
-(define compile-directory
-  (directory-processor
-   "bin"
-   (lambda ()
-     (compiler:compiled-code-pathname-type))
-   (lambda (pathname output-directory)
-     (compile-bin-file pathname output-directory))))
-
-(define sf-directory?)
-(define compile-directory?)
-(let ((show-pathname
-       (lambda (pathname output-directory)
-        output-directory
-        (newline)
-        (write-string "Process file: ")
-        (write-string (enough-namestring pathname)))))
-  (set! sf-directory? (directory-processor "scm" "bin" show-pathname))
-  (set! compile-directory? (directory-processor "bin" "com" show-pathname)))
-
 (define (sf-conditionally filename #!optional echo-up-to-date?)
   (let ((kernel
         (lambda (filename)
index 9e591711b242410513f865fd4ebb62a06747b0ba..84d1eef7b5f2f599c20153b826d9612c1eb33799 100644 (file)
@@ -158,8 +158,5 @@ USA.
   (files "butils")
   (parent ())
   (export ()
-          compile-directory
-          compile-directory?
           sf-conditionally
-          sf-directory
-          sf-directory?))
\ No newline at end of file
+          sf-directory))
\ No newline at end of file