From db89626d1be6f0c700d11134cac07e57d09315ba Mon Sep 17 00:00:00 2001 From: Moon Flower Date: Wed, 14 Oct 2026 09:02:46 +0330 Subject: docs: record the two ownership gaps that block the bootstrap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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. --- TODO.md | 1 + 1 file changed, 1 insertion(+) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index d0634fc..51e3cca 100644 --- a/TODO.md +++ b/TODO.md @@ -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. -- cgit v1.2.3