tooling improvements

This commit is contained in:
2026-02-17 13:37:17 -06:00
parent 2e78e7e0b8
commit c02fbbd9e0
10 changed files with 371 additions and 186 deletions

View File

@@ -65,6 +65,7 @@ pit build -b debug # build type: release (default), debug, minsiz
pit build --list-targets # list available targets
pit build --force # force rebuild
pit build --dry-run # show what would be built
pit build --verbose # print resolved flags, commands, cache status
```
### pit test
@@ -330,9 +331,14 @@ pit mcode <file.cm>
Apply the full optimization pipeline to a source file and output optimized mcode as JSON.
```bash
pit streamline <file.cm>
pit streamline <file.cm> # full optimized IR as JSON (default)
pit streamline --stats <file.cm> # summary stats per function
pit streamline --ir <file.cm> # human-readable IR
pit streamline --check <file.cm> # warnings only (e.g. high slot count)
```
Flags can be combined. `--stats` output includes function name, args, slots, instruction counts by category, and nops eliminated. `--check` warns when `nr_slots > 200` (approaching the 255 limit).
### pit qbe
Compile a source file to QBE intermediate language (for native code generation).
@@ -367,6 +373,17 @@ Ahead-of-time compile and execute a program natively.
pit run_aot <program.ce>
```
### pit seed
Regenerate the boot seed files in `boot/`. Seeds are pre-compiled mcode IR (JSON) that bootstrap the compilation pipeline on cold start. They only need regenerating when the pipeline source changes in a way the existing seeds can't compile, or before distribution.
```bash
pit seed # regenerate all boot seeds
pit seed --clean # also clear the build cache after
```
The engine recompiles pipeline modules automatically when source changes (via content-addressed cache). Seeds are a fallback for cold start when no cache exists.
### Analysis
### pit explain