aboutsummaryrefslogtreecommitdiff
path: root/TODO.md
diff options
context:
space:
mode:
Diffstat (limited to 'TODO.md')
-rw-r--r--TODO.md14
1 files changed, 10 insertions, 4 deletions
diff --git a/TODO.md b/TODO.md
index 321fa20..fc61c05 100644
--- a/TODO.md
+++ b/TODO.md
@@ -137,7 +137,7 @@
- [x] implement `include actor;` as a library that injects actor syntax into the compiler through the generic include-time extension interface: `actor` declarations in place of `struct`, implicit `this`, and generic `Actor<I,O>` input/output types. Provide asynchronous parallel execution with independent state and multiple instances; keep actor-specific code out of `compiler.zc` and every file it includes or reads by default, and cover syntax activation, execution, messaging and type safety with tests.
- [x] implement and integrate `src/lib/icon.zc` with structured runtime syntax transformations, template matching, execution inspection and stepping, with explicit contracts and comprehensive tests.
- [x] 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.
-- [x] 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.
+- [x] 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/history/BOOTSTRAP-OWNERSHIP.md`, which also records a verified partial fix that removes five of the eight current errors.
- [x] bring documentation, examples, learn entries, history notes and test fixtures in line with the include and namespace format and the other language changes made alongside it: qualify runtime built-ins as `rt.put_s`, `rt.put_n`, `rt.put_c`, `rt.eof` and `rt.get_c`, require the explicit `include` each module needs, and remove the remaining bare builtin names so every shipped sample, every documented snippet and every expected-output fixture compiles and runs against the current compiler. the learn guide and `README.md` snippets are checked by the suite, so they are the gate, but the prose and the non-exercised samples are not.
- [x] add accept, reject and regression coverage for the actor and icon libraries once each is finished: for actors, syntax activation through the include-time extension, spawn/recv/send across input and output types, multiple instances of one actor, parallel execution, implicit `this`, and confirmation that no actor code is reachable from the compiler or anything it reads by default; for icon, find/replace over real syntax, undeclaring names, changing types, adding and rewriting blocks, evaluating parts of an expression, and stepping execution while reading locals and globals, including the failure cases for each.
@@ -147,11 +147,17 @@ every item still to do, including the ones added after the list above. sorted
by how hard each is to implement, so the large language features come last.
the final full suite stays at the very end whatever its size.
-- [ ] remove temporary markdown files: decide on `TASKLIST.md` (a record of an earlier session's requests), `docs/BOOTSTRAP-OWNERSHIP.md` (its problem is resolved) and `docs/design/handoff.md`, keeping anything still referenced from `README.md` or `ONBOARD.md`.
-- [ ] verify every command in `ONBOARD.md` from a clean checkout and fix the ones that drifted.
+- [x] remove temporary markdown files: decide on `TASKLIST.md` (a record of an earlier session's requests), `docs/BOOTSTRAP-OWNERSHIP.md` (its problem is resolved) and `docs/design/handoff.md`, keeping anything still referenced from `README.md` or `ONBOARD.md`.
+- [x] verify every command in `ONBOARD.md` from a clean checkout and fix the ones that drifted. (`make check` is left to the final suite run below.)
- [ ] add `string` as a built-in alias of `char*`, in types, hovers and completions.
-- [ ] untyped constants inside structs: `struct Text { const MAX = 24; }`, reached as `std.Text.MAX`, with the same rules as a local or top-level `const k = 5;`.
+- [x] untyped constants inside structs: `struct Text { const MAX = 24; }`, reached as `std.Text.MAX`, with the same rules as a local or top-level `const k = 5;`.
- [ ] typo suggestions for field and method names: `p.lenght` and `std.Text.itao` suggest the closest member, with the language server's change-to quick fix.
+- [ ] hover on standard-library members (`std.Text.itoa`, `std.array_contains`, a group name) returns nothing in the language server, though completion shows the same documentation; a struct static function in the document itself does show its hover. find where `do_hover` resolves qualified library members and fix it, with a hover check.
+- [ ] `std.capture.end` writes its terminator at `rt.outbuf[rt.outn]`; when more than 256 characters were captured, `outn` equals the capacity and the 0 lands one word past the buffer. check and fix, with a regression program.
+- [ ] a bare call to a sibling static function inside a struct's method (`lim()` for a static `lim`) reports `lim is used but never defined`; resolve it like the bare struct constants now are.
+- [ ] packed byte strings and `u`/`m`/`d` in zc0: match the self-hosted compiler's `bstr` support, and treat `u`, `m`, `d` as ordinary names (a recast is the letter directly followed by `*`; tags are accepted and ignored), keeping zc0's genome image byte-identical.
+- [ ] write `docs/SPEC.md`, the language specification, from the self-hosted compiler as the reference, with the zc0 subset marked and every disagreement between prose and code listed.
+- [ ] verify both compilers against `docs/SPEC.md` with a fresh agent: one test program per rule, run on both, every deviation reported and triaged.
- [ ] a `make parity` runner that compiles the zc0-compatible programs (and the genome sources) with zc0 and with the self-hosted compiler, runs both images and compares output, so the two front ends can't disagree silently again (the `&&`/`||` precedence bug).
- [ ] c typedefs: `typedef T name;` declares a type alias, including pointer, array and function types, usable everywhere a type is, shown in hovers.
- [ ] continue removing `unchecked` from the remaining runtime boundaries by teaching the analyzer the missing ownership and drop contracts; document any irreducible low-level escapes. the compiler, standard library and lsp no longer disable checking for their functions. status, from a trial that was reverted: with `unchecked` removed, `copy_w` and `fill_w` pass the analyzer once their gate stores go through `syscall(SYS_COPY, ...)`, `dgrow` once `w[-2] = it` becomes `own(w, it)`, `dpush` once `own(x, h[2])` comes before the store, and `dnew` as is. but the checked versions changed run-time behavior: 7 of the 87 program checks in `tests/test.sh` failed (closure cells, the proved-loop bounds check) and `tests/programs/share.zc` hung with a checked `cons`. so checked code in these functions inserts cleanup the runtime can't afford, and each one needs its contract taught to the analyzer, not just a rewrite that compiles. `free`, `recycle`, `recycle_leaf` and `gc` are the allocator and collector that the analyzer's own cleanup calls, so they stay unchecked and need to be documented as the irreducible escapes. `src/lib/actor.zc` has about 20 more.