make each compiler module one file, built once
A module was a body plus a (module ...) wrapper naming its exports, and the wrapper came in up to three copies: the root's, a test one that exported everything, and sextest's, each recompiling the same body. csc -module makes a file a module by itself, with export forms in its body, so the wrappers are gone. tests/ and tools/sextest/ link what the root built, finding it on the repository path; the tests see what a module exports, and the names only they need are exported as such.
This commit is contained in:
25
utils.scm
25
utils.scm
@@ -2,11 +2,36 @@
|
||||
scheme
|
||||
(scheme base) ; make-parameter
|
||||
(chicken base)
|
||||
(chicken module)
|
||||
(chicken pathname)
|
||||
(chicken process-context)
|
||||
srfi-1
|
||||
srfi-69)
|
||||
|
||||
(export
|
||||
get-env-var
|
||||
set-working-directory
|
||||
to-absolute-pathname
|
||||
comment-form?
|
||||
strip-header-comments
|
||||
list-split
|
||||
list-join
|
||||
recons
|
||||
current-source-file
|
||||
set-form-source!
|
||||
form-source
|
||||
form-file
|
||||
form-line
|
||||
form-end-line
|
||||
copy-form-source!
|
||||
stamp-form-source!
|
||||
form-location
|
||||
set-form-type!
|
||||
form-type
|
||||
sex-error
|
||||
sex-warning
|
||||
with-directory)
|
||||
|
||||
(define-syntax prog1
|
||||
(syntax-rules ()
|
||||
((prog1 form . forms)
|
||||
|
||||
Reference in New Issue
Block a user