selfhost: migrate tool sources to directory packages
Build w6a and w6l from package-main directories and expose the wcc backend through a narrow package API so w6c and wwdump no longer import implementation files. Retarget the remaining load-bearing fixtures and example sources to directory packages; retain the one intentional flat compiler collision as an explicitly composed raw unit.
This commit is contained in:
@@ -5,7 +5,7 @@ backend rather than the C bootstrap one.
|
||||
|
||||
## Layout
|
||||
|
||||
- `lispcore.ww` interpreter module: types, lexer, parser, env,
|
||||
- `lispcore/` interpreter directory package: types, lexer, parser, env,
|
||||
eval, apply, printer, REPL. Everything the entry
|
||||
point and the test driver consume is `export`-ed.
|
||||
- `lisp.ww` entry point; `use lispcore;` + `main()`.
|
||||
@@ -15,12 +15,9 @@ backend rather than the C bootstrap one.
|
||||
runs the binary itself.
|
||||
- `test_*.lisp` demo source files (`cat test_X.lisp | ./lisp`).
|
||||
|
||||
The lispcore.ww + lisp.ww split exists so the tests can `use` the
|
||||
interpreter functions. Both files combine under the same module name
|
||||
(the directory's basename, `lisp`), because `ww`'s module resolver
|
||||
takes the *containing-directory* basename when finding a sibling.
|
||||
Cross-module type prefixes like `lispcore.value` don't resolve in the
|
||||
test — use the bare names.
|
||||
The lispcore/ + lisp.ww split exists so the entry point and tests import
|
||||
one canonical interpreter directory package. Cross-module type prefixes
|
||||
like `lispcore.value` don't resolve in the test — use the bare names.
|
||||
|
||||
## wwstage cgen workarounds at play
|
||||
|
||||
|
||||
Reference in New Issue
Block a user