From: Matt Birkholz Date: Thu, 23 Oct 2014 07:58:41 +0000 (-0700) Subject: For cref: move compile-directory. Punt sf- and compile-directory?. X-Git-Tag: mit-scheme-pucked-9.2.12~395^2~3 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=357b6c25a1019bb3c49ab1df9fa0add5feb768b8;p=mit-scheme.git For cref: move compile-directory. Punt sf- and compile-directory?. 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. --- diff --git a/src/compiler/base/toplev.scm b/src/compiler/base/toplev.scm index c1a94708c..9ef69f204 100644 --- a/src/compiler/base/toplev.scm +++ b/src/compiler/base/toplev.scm @@ -238,6 +238,14 @@ USA. ;;;; 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 diff --git a/src/compiler/machines/C/compiler.pkg b/src/compiler/machines/C/compiler.pkg index eba2d8327..afd750051 100644 --- a/src/compiler/machines/C/compiler.pkg +++ b/src/compiler/machines/C/compiler.pkg @@ -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)) (define-package (compiler debug) (files "base/debug") diff --git a/src/compiler/machines/alpha/compiler.pkg b/src/compiler/machines/alpha/compiler.pkg index f00d371a1..ff6f6fc00 100644 --- a/src/compiler/machines/alpha/compiler.pkg +++ b/src/compiler/machines/alpha/compiler.pkg @@ -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)) (define-package (compiler debug) (files "base/debug") diff --git a/src/compiler/machines/bobcat/compiler.pkg b/src/compiler/machines/bobcat/compiler.pkg index ca1ac8209..1a2132374 100644 --- a/src/compiler/machines/bobcat/compiler.pkg +++ b/src/compiler/machines/bobcat/compiler.pkg @@ -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)) (define-package (compiler debug) (files "base/debug") diff --git a/src/compiler/machines/i386/compiler.pkg b/src/compiler/machines/i386/compiler.pkg index 744c297f2..74e9a7ba4 100644 --- a/src/compiler/machines/i386/compiler.pkg +++ b/src/compiler/machines/i386/compiler.pkg @@ -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)) (define-package (compiler debug) (files "base/debug") diff --git a/src/compiler/machines/mips/compiler.pkg b/src/compiler/machines/mips/compiler.pkg index 167cfda65..022e8160c 100644 --- a/src/compiler/machines/mips/compiler.pkg +++ b/src/compiler/machines/mips/compiler.pkg @@ -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)) (define-package (compiler debug) (files "base/debug") diff --git a/src/compiler/machines/spectrum/compiler.pkg b/src/compiler/machines/spectrum/compiler.pkg index c286aa648..c1cb5a655 100644 --- a/src/compiler/machines/spectrum/compiler.pkg +++ b/src/compiler/machines/spectrum/compiler.pkg @@ -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)) (define-package (compiler debug) (files "base/debug") diff --git a/src/compiler/machines/svm/compiler.pkg b/src/compiler/machines/svm/compiler.pkg index 92f4d93f4..c014eccd4 100644 --- a/src/compiler/machines/svm/compiler.pkg +++ b/src/compiler/machines/svm/compiler.pkg @@ -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)) (define-package (compiler debug) (files "base/debug") diff --git a/src/compiler/machines/vax/compiler.pkg b/src/compiler/machines/vax/compiler.pkg index 4381ef48d..5c1948649 100644 --- a/src/compiler/machines/vax/compiler.pkg +++ b/src/compiler/machines/vax/compiler.pkg @@ -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)) (define-package (compiler debug) (files "base/debug") diff --git a/src/compiler/machines/x86-64/compiler.pkg b/src/compiler/machines/x86-64/compiler.pkg index ab88d19c6..0924fd783 100644 --- a/src/compiler/machines/x86-64/compiler.pkg +++ b/src/compiler/machines/x86-64/compiler.pkg @@ -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)) (define-package (compiler debug) (files "base/debug") diff --git a/src/sf/butils.scm b/src/sf/butils.scm index 0108064b1..195cf915a 100644 --- a/src/sf/butils.scm +++ b/src/sf/butils.scm @@ -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) diff --git a/src/sf/sf.pkg b/src/sf/sf.pkg index 9e591711b..84d1eef7b 100644 --- a/src/sf/sf.pkg +++ b/src/sf/sf.pkg @@ -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