From: Chris Hanson Date: Mon, 15 Oct 2018 04:53:52 +0000 (-0700) Subject: Guarantee that SF is loaded by compiler.sf. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~216 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=3edf9d94841d2b4e0ae224d5592c56cb92517a16;p=mit-scheme.git Guarantee that SF is loaded by compiler.sf. --- diff --git a/src/Makefile.in b/src/Makefile.in index 8de186837..5e6e9c13d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -104,6 +104,9 @@ HOST_COMPILER_SETTINGS = \ HOST_COMPILER = '$(MIT_SCHEME_EXE)' --batch-mode $(HOST_COMPILER_HEAP) \ --eval '(begin $(HOST_COMPILER_SETTINGS))' --load runtime/host-adapter.scm +HOST_RUNTIME_ONLY = '$(MIT_SCHEME_EXE)' --batch-mode $(HOST_COMPILER_HEAP) \ + --band runtime.com --load runtime/host-adapter.scm + .PHONY: microcode/scheme @IF_LIARC@microcode/scheme: all-runtime @IF_SVM@microcode/scheme: microcode/svm1-defns.h @@ -149,8 +152,8 @@ lib/all.com: all-sf lib/all.com: lib/runtime.com lib/all.com: microcode/scheme (echo '(begin' && \ - echo ' (load-option (quote COMPILER))' && \ - echo ' (load-option (quote SF))' && \ + echo ' (load-option (quote compiler))' && \ + echo ' (load-option (quote sf))' && \ echo ' (disk-save "$@"))') \ | ./microcode/scheme --batch-mode --library lib --band runtime.com @@ -260,7 +263,7 @@ all-compiler: compile-compiler syntax-compiler: syntax-sf (echo '(with-working-directory-pathname "compiler"' && \ echo ' (lambda () (load "compiler.sf")))') \ - | $(HOST_COMPILER) + | $(HOST_RUNTIME_ONLY) .PHONY: compile-compiler compile-compiler: syntax-compiler diff --git a/src/compiler/machines/C/compiler.sf b/src/compiler/machines/C/compiler.sf index 467d52b14..223f9b258 100644 --- a/src/compiler/machines/C/compiler.sf +++ b/src/compiler/machines/C/compiler.sf @@ -26,10 +26,11 @@ USA. ;;;; Script to incrementally syntax the compiler -(load-option 'CREF) +(load-option 'cref) +(load-option 'sf) ;; Guarantee that the compiler's package structure exists. -(if (not (name->package '(COMPILER))) +(if (not (name->package '(compiler))) (let ((package-set (package-set-pathname "compiler"))) (if (not (file-exists? package-set)) (cref/generate-trivial-constructor "compiler")) @@ -37,7 +38,7 @@ USA. ;; Guarantee that the necessary syntactic transforms and optimizers ;; are loaded. -(if (lexical-unreferenceable? (->environment '(COMPILER)) 'SYNTAX-FILES!) +(if (lexical-unreferenceable? (->environment '(compiler)) 'syntax-files!) (let ((sf-and-load (lambda (files package) (fluid-let ((sf/default-syntax-table (->environment package))) @@ -45,27 +46,27 @@ USA. (for-each (lambda (file) (load (string-append file ".bin") package)) files)))) - (load-option 'HASH-TABLE) + (load-option 'hash-table) (fresh-line) (newline) (write-string "---- Loading compile-time files ----") (newline) - (sf-and-load '("base/switch") '(COMPILER)) - (sf-and-load '("base/macros") '(COMPILER MACROS)) - (sf-and-load '("machines/C/decls") '(COMPILER DECLARATIONS)) - (let ((environment (->environment '(COMPILER DECLARATIONS)))) + (sf-and-load '("base/switch") '(compiler)) + (sf-and-load '("base/macros") '(compiler macros)) + (sf-and-load '("machines/c/decls") '(compiler declarations)) + (let ((environment (->environment '(compiler declarations)))) (set! (access source-file-expression environment) "*.scm") ((access initialize-package! environment))) - (sf-and-load '("base/pmlook") '(COMPILER PATTERN-MATCHER/LOOKUP)) - (sf-and-load '("base/pmpars") '(COMPILER PATTERN-MATCHER/PARSER)) - (sf-and-load '("machines/C/machin") '(COMPILER)) - (sf-and-load '("back/syntax") '(COMPILER LAP-SYNTAXER)) - (sf-and-load '("base/scode") '(COMPILER)) - (sf-and-load '("base/pmerly") '(COMPILER PATTERN-MATCHER/EARLY)) - (sf-and-load '("back/syerly") '(COMPILER LAP-SYNTAXER)))) + (sf-and-load '("base/pmlook") '(compiler pattern-matcher/lookup)) + (sf-and-load '("base/pmpars") '(compiler pattern-matcher/parser)) + (sf-and-load '("machines/c/machin") '(compiler)) + (sf-and-load '("back/syntax") '(compiler lap-syntaxer)) + (sf-and-load '("base/scode") '(compiler)) + (sf-and-load '("base/pmerly") '(compiler pattern-matcher/early)) + (sf-and-load '("back/syerly") '(compiler lap-syntaxer)))) ;; Resyntax any files that need it. -((access syntax-files! (->environment '(COMPILER)))) +((access syntax-files! (->environment '(compiler)))) ;; Rebuild the package constructors and cref. -(cref/generate-constructors "compiler" 'ALL) \ No newline at end of file +(cref/generate-constructors "compiler" 'all) \ No newline at end of file diff --git a/src/compiler/machines/i386/compiler.sf b/src/compiler/machines/i386/compiler.sf index bd74607ac..cf046b4e5 100644 --- a/src/compiler/machines/i386/compiler.sf +++ b/src/compiler/machines/i386/compiler.sf @@ -26,10 +26,11 @@ USA. ;;;; Script to incrementally syntax the compiler -(load-option 'CREF) +(load-option 'cref) +(load-option 'sf) ;; Guarantee that the compiler's package structure exists. -(if (not (name->package '(COMPILER))) +(if (not (name->package '(compiler))) (let ((package-set (package-set-pathname "compiler"))) (if (not (file-exists? package-set)) (cref/generate-trivial-constructor "compiler")) @@ -37,7 +38,7 @@ USA. ;; Guarantee that the necessary syntactic transforms and optimizers ;; are loaded. -(if (lexical-unreferenceable? (->environment '(COMPILER)) 'SYNTAX-FILES!) +(if (lexical-unreferenceable? (->environment '(compiler)) 'syntax-files!) (let ((sf-and-load (lambda (files package) (fluid-let ((sf/default-syntax-table (->environment package))) @@ -45,36 +46,36 @@ USA. (for-each (lambda (file) (load (string-append file ".bin") package)) files)))) - (load-option 'HASH-TABLE) + (load-option 'hash-table) (fresh-line) (newline) - (write-string "---- Loading compile-time files ----") + (write-string "---- loading compile-time files ----") (newline) - (sf-and-load '("base/switch") '(COMPILER)) - (sf-and-load '("base/macros") '(COMPILER MACROS)) - (sf-and-load '("machines/i386/decls") '(COMPILER DECLARATIONS)) - (let ((environment (->environment '(COMPILER DECLARATIONS)))) + (sf-and-load '("base/switch") '(compiler)) + (sf-and-load '("base/macros") '(compiler macros)) + (sf-and-load '("machines/i386/decls") '(compiler declarations)) + (let ((environment (->environment '(compiler declarations)))) (set! (access source-file-expression environment) "*.scm") ((access initialize-package! environment))) - (sf-and-load '("base/pmlook") '(COMPILER PATTERN-MATCHER/LOOKUP)) - (sf-and-load '("base/pmpars") '(COMPILER PATTERN-MATCHER/PARSER)) - (sf-and-load '("machines/i386/machin") '(COMPILER)) + (sf-and-load '("base/pmlook") '(compiler pattern-matcher/lookup)) + (sf-and-load '("base/pmpars") '(compiler pattern-matcher/parser)) + (sf-and-load '("machines/i386/machin") '(compiler)) (fluid-let ((sf/default-declarations '((integrate-external "insseq") (integrate-external "machin") (usual-definition (set expt))))) - (sf-and-load '("machines/i386/assmd") '(COMPILER ASSEMBLER))) - (sf-and-load '("back/syntax") '(COMPILER LAP-SYNTAXER)) + (sf-and-load '("machines/i386/assmd") '(compiler assembler))) + (sf-and-load '("back/syntax") '(compiler lap-syntaxer)) (sf-and-load '("machines/i386/coerce" "back/asmmac" "machines/i386/insmac") - '(COMPILER LAP-SYNTAXER)) - (sf-and-load '("base/scode") '(COMPILER)) - (sf-and-load '("base/pmerly") '(COMPILER PATTERN-MATCHER/EARLY)) - (sf-and-load '("back/syerly") '(COMPILER LAP-SYNTAXER)))) + '(compiler lap-syntaxer)) + (sf-and-load '("base/scode") '(compiler)) + (sf-and-load '("base/pmerly") '(compiler pattern-matcher/early)) + (sf-and-load '("back/syerly") '(compiler lap-syntaxer)))) ;; Resyntax any files that need it. -((access syntax-files! (->environment '(COMPILER)))) +((access syntax-files! (->environment '(compiler)))) ;; Rebuild the package constructors and cref. -(cref/generate-constructors "compiler" 'ALL) \ No newline at end of file +(cref/generate-constructors "compiler" 'all) \ No newline at end of file diff --git a/src/compiler/machines/svm/compiler.sf b/src/compiler/machines/svm/compiler.sf index 27f0e8455..140643463 100644 --- a/src/compiler/machines/svm/compiler.sf +++ b/src/compiler/machines/svm/compiler.sf @@ -26,11 +26,11 @@ USA. ;;;; Script to incrementally syntax the compiler -(load-option 'CREF) -(load-option 'SF) +(load-option 'cref) +(load-option 'sf) ;; Guarantee that the compiler's package structure exists. -(if (not (name->package '(COMPILER))) +(if (not (name->package '(compiler))) (let ((package-set (package-set-pathname "compiler"))) (if (not (file-exists? package-set)) (cref/generate-trivial-constructor "compiler")) @@ -38,7 +38,7 @@ USA. ;; Guarantee that the necessary syntactic transforms and optimizers ;; are loaded. -(if (lexical-unreferenceable? (->environment '(COMPILER)) 'SYNTAX-FILES!) +(if (lexical-unreferenceable? (->environment '(compiler)) 'syntax-files!) ;; Assume there are no os-type-specific files or packages. (let* ((xref (->environment '(cross-reference))) (pmodel ((access read-package-model xref) "compiler" 'unix)) @@ -71,7 +71,7 @@ USA. (sf-and-load "base/switch") (sf-and-load "base/macros") (sf-and-load "machines/svm/decls") - (let ((environment (->environment '(COMPILER DECLARATIONS)))) + (let ((environment (->environment '(compiler declarations)))) ((access initialize-package! environment))) (sf-and-load "base/pmlook") (sf-and-load "base/pmpars") @@ -82,8 +82,8 @@ USA. (sf-and-load "back/syerly"))) ;; Resyntax any files that need it. -((access syntax-files! (->environment '(COMPILER)))) +((access syntax-files! (->environment '(compiler)))) (sf-conditionally "machine/make") ;; Rebuild the package constructors and cref. -(cref/generate-constructors "compiler" 'ALL) \ No newline at end of file +(cref/generate-constructors "compiler" 'all) \ No newline at end of file diff --git a/src/compiler/machines/x86-64/compiler.sf b/src/compiler/machines/x86-64/compiler.sf index 6ca3ba608..f718dbd6d 100644 --- a/src/compiler/machines/x86-64/compiler.sf +++ b/src/compiler/machines/x86-64/compiler.sf @@ -26,10 +26,11 @@ USA. ;;;; Script to incrementally syntax the compiler -(load-option 'CREF) +(load-option 'cref) +(load-option 'sf) ;; Guarantee that the compiler's package structure exists. -(if (not (name->package '(COMPILER))) +(if (not (name->package '(compiler))) (let ((package-set (package-set-pathname "compiler"))) (if (not (file-exists? package-set)) (cref/generate-trivial-constructor "compiler")) @@ -37,7 +38,7 @@ USA. ;; Guarantee that the necessary syntactic transforms and optimizers ;; are loaded. -(if (lexical-unreferenceable? (->environment '(COMPILER)) 'SYNTAX-FILES!) +(if (lexical-unreferenceable? (->environment '(compiler)) 'syntax-files!) (let ((sf-and-load (lambda (files package) (fluid-let ((sf/default-syntax-table (->environment package))) @@ -45,36 +46,36 @@ USA. (for-each (lambda (file) (load (string-append file ".bin") package)) files)))) - (load-option 'HASH-TABLE) + (load-option 'hash-table) (fresh-line) (newline) (write-string "---- Loading compile-time files ----") (newline) - (sf-and-load '("base/switch") '(COMPILER)) - (sf-and-load '("base/macros") '(COMPILER MACROS)) - (sf-and-load '("machines/x86-64/decls") '(COMPILER DECLARATIONS)) - (let ((environment (->environment '(COMPILER DECLARATIONS)))) + (sf-and-load '("base/switch") '(compiler)) + (sf-and-load '("base/macros") '(compiler macros)) + (sf-and-load '("machines/x86-64/decls") '(compiler declarations)) + (let ((environment (->environment '(compiler declarations)))) (set! (access source-file-expression environment) "*.scm") ((access initialize-package! environment))) - (sf-and-load '("base/pmlook") '(COMPILER PATTERN-MATCHER/LOOKUP)) - (sf-and-load '("base/pmpars") '(COMPILER PATTERN-MATCHER/PARSER)) - (sf-and-load '("machines/x86-64/machin") '(COMPILER)) + (sf-and-load '("base/pmlook") '(compiler pattern-matcher/lookup)) + (sf-and-load '("base/pmpars") '(compiler pattern-matcher/parser)) + (sf-and-load '("machines/x86-64/machin") '(compiler)) (fluid-let ((sf/default-declarations '((integrate-external "insseq") (integrate-external "machin") (usual-definition (set expt))))) - (sf-and-load '("machines/x86-64/assmd") '(COMPILER ASSEMBLER))) - (sf-and-load '("back/syntax") '(COMPILER LAP-SYNTAXER)) + (sf-and-load '("machines/x86-64/assmd") '(compiler assembler))) + (sf-and-load '("back/syntax") '(compiler lap-syntaxer)) (sf-and-load '("machines/x86-64/coerce" "back/asmmac" "machines/x86-64/insmac") - '(COMPILER LAP-SYNTAXER)) - (sf-and-load '("base/scode") '(COMPILER)) - (sf-and-load '("base/pmerly") '(COMPILER PATTERN-MATCHER/EARLY)) - (sf-and-load '("back/syerly") '(COMPILER LAP-SYNTAXER)))) + '(compiler lap-syntaxer)) + (sf-and-load '("base/scode") '(compiler)) + (sf-and-load '("base/pmerly") '(compiler pattern-matcher/early)) + (sf-and-load '("back/syerly") '(compiler lap-syntaxer)))) ;; Resyntax any files that need it. -((access syntax-files! (->environment '(COMPILER)))) +((access syntax-files! (->environment '(compiler)))) ;; Rebuild the package constructors and cref. -(cref/generate-constructors "compiler" 'ALL) \ No newline at end of file +(cref/generate-constructors "compiler" 'all) \ No newline at end of file