diff options
| author | 2026-10-14 09:02:46 +0330 | |
|---|---|---|
| committer | 2026-10-14 09:02:46 +0330 | |
| commit | db89626d1be6f0c700d11134cac07e57d09315ba (patch) | |
| tree | 860c51f8468f165087db6c9aa1e15de512096660 /TODO.md | |
| parent | build: generate everything into build/, keep src/ free of generated files (diff) | |
docs: record the two ownership gaps that block the bootstrap
`make genome` cannot complete: the second bootstrap stage runs the lifetime
checker over the compiler's own source, which reports 8 errors, and mkgenome
then reads the diagnostics as an image.
the two limits are that an owned value held in a local has no move into another
local — every accepted move originates at a call, so the free-then-replace rule
only applies when the replacement comes from a call result — and that a local
cannot be lent to a global, so redirecting the output stream at a scratch buffer
needs a module-level variable.
neither limit accepts an unsafe program; both refuse correct ones, so this is a
completeness gap rather than a soundness failure. document the affected code, the
diagnostics, what was tried and how each attempt failed, and a proposal.
add src/tools/bootstrap-check.sh, which rebuilds both bootstrap stages and prints
the compiler's diagnostics on its own source instead of the word dump.
Diffstat (limited to 'TODO.md')
| -rw-r--r-- | TODO.md | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -142,3 +142,4 @@ - [ ] revise diagnostics, comments and learning/reference prose using professional compiler documentation guidance, preserving lowercase and adding message regressions. - [ ] implement and integrate `src/lib/icon.zc` with structured runtime syntax transformations, template matching, execution inspection and stepping, with explicit contracts and comprehensive tests. - [ ] change the producer of the genome header (`build/core/genome.h`) to emit a c translation unit that embeds the compiler, core and runtime zc sources with a `#embed` directive instead of concatenating them into a 1.5 mb generated header; keep the `.zc` sources as the single source of truth and extend the fixpoint check in `make genome` so it still verifies the emitted genome without materializing a header at all. +- [ ] close the two ownership completeness limits that stop the compiler compiling itself, so `make genome` completes from a clean checkout: allow an owned value held in a local to move into another local when the destination's previous owner is released in the same statement list, and allow a global to hold a bounded borrow of a local so an output stream can be redirected at a scratch buffer without a module-level variable. also give `rt.code_blocks = m*block;` a supported spelling and fix the `only a named owned object can be recast` diagnostic, which does not describe the real constraint. written up in `docs/BOOTSTRAP-OWNERSHIP.md`, which also records a verified partial fix that removes five of the eight current errors. |
