diff options
Diffstat (limited to 'docs/history/maintenance-notes.md')
| -rw-r--r-- | docs/history/maintenance-notes.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/history/maintenance-notes.md b/docs/history/maintenance-notes.md index 2a2bed4..4a01cba 100644 --- a/docs/history/maintenance-notes.md +++ b/docs/history/maintenance-notes.md @@ -2,6 +2,20 @@ this material records earlier builds. current work and verification are tracked in TODO.md. +## current documentation checks (2026-10-14) + +the learning guide now has 33 runnable source examples, including receiver algorithms for arrays, recursive call inference, and const fixed arrays. `python3 tests/drivers/learn.py bin/zy` passed every runnable example on this host and confirmed that every fenced zc block matches its fixture; the x86-64-only raw-syscall example was skipped on this architecture. `node tests/drivers/include_test.js bin/zclsp`, `node tests/drivers/completion_test.js bin/zclsp`, the `magic`, `strings`, `arguments`, and `modules` groups in `toolchain_lsp_contract_test.js`, and `node tests/drivers/hover_features_test.js bin/zclsp` passed their focused checks. the full 39-case `array_methods_test.py` driver passed on both native and micro, including pop ownership transfer, cleanup of removed children after shrink, borrowed callbacks, packed strings, and coercion. no full suite was run for this documentation pass. + +the `inference` group in `toolchain_lsp_contract_test.js` passed nine focused cases: typed callee constraints, a reverse-declared twelve-function chain, recursion anchored by a typed callee, unresolved conflicts and reassignment, and owned raw-list results. `inference_growth_test.py bin/zclsp` passed its three large-inference and alias-annotation checks. the new learning example passed with output `41 7`. regenerated `tests/programs/annotate.expected` from the namespaced source with `bin/zclsp --annotate`; running the source and annotated result produced matching output. + +both qualifier orders and the read-only fixed-array behavior are documented in the new `33-const-fixed` learning example. all 15 qualifier compiler contracts passed on native and micro, the three qualifier hover cases passed on the language server, and the example passed on both vms. mutable fixed and growable arrays remain the verified inputs for standard-library algorithms; const-qualified inputs have not been verified. + +the cli help inventory was verified with `python3 tests/drivers/cli_help_test.py`: help exits with stdin open and invalid memory settings for the native and micro vms, language server, bootstrap and image tools, map generator, shell tools, and javascript utilities; unknown options are rejected, and the language server source options still work. `python3 tests/drivers/runtime_image_test.py` passed the enhancement, array-algorithm and owned-pop run-only image cases. the run-only runtime parses enhancement descriptors before heap initialization. `make run` and `zcc` still use the stage-0 source subset; `src/tools/build.zc` builds full-language run-only images. + +the `quickfix`, `modulehover`, `namespacecompletion` and `navigation` groups in `toolchain_lsp_contract_test.js` passed against `bin/zclsp`. they verify import fixes, module hovers and completions, source-library overview comments, `core.zc` navigation, and distinct `core.syscall`/`rt.syscall` references. `node tests/drivers/codeactions_client_test.js` passed edit conversion and version-epoch checks; `node tests/drivers/ext_cache_test.js` passed its 16 checks with the real editor provider and bundled wasm server. formatter output was checked for a nested switch: case labels indent one level within their switch by default, and `CaseIndent: 0` aligns them with the switch. + +the test counts and open ends below are preserved as a historical stage-48 snapshot. they describe that earlier build, not the current implementation. + ## test results the whole of `test.sh` is 614 checks on a machine with gcc, qemu-user, llvm, node and clang's wasm32 target (572 passed, 0 failed; the baremetal boards need cross compilers and are skipped without them). on the interpreter alone it starts with the fixpoint (236652 words), an up-to-date `genome.h`, and then every example and feature test, including a shift past bit 31 and equality of a value above 2^31. it also covers joins and fixup frees (with a leak count), `switch` and `?:`, the buddy allocator, aliases used while their owner is alive, quarantine (a freed block stays intact for a stale alias, a second free does nothing, and a collection keeps a block a word still points at), `do`/`while` with `enum` and a cast, `include` and the string helpers, syscalls, memdebug leaks, use-after-free (including through an interior pointer), double free, payload poison and interior pinning, several errors in one run, all three stack overflows, growable and fixed arrays, and `tests/o3.zc` (loops, recursion, calls inside loops, `switch`, `&& ||`, structs through pointers, arrays, division by constants, and a function with more variables than registers). it checks that every o3 region in that test lifts, that the o3 bounds check fires, and that all 26 programs in `tests/errors/` (including derived aliases used after their owner dies), all 10 in `tests/typeerrors/` and all 9 in `tests/langerrors/` get rejected with the expected message. the same script then runs that list on the microcore, checks that the microcore's self-compile matches the interpreter's image, and checks that `micro.c` and `port_stub.c` compile with `-ffreestanding`. that is 113 checks with the jit and llvm skipped. it then builds the 339968-word compiler and runs 22 programs on the small microcore and again on `core.c` at that size, builds the 32768-word run-only image for six programs, and checks that both reduced microcores compile freestanding. that is 165 checks with the jit, llvm and bare-metal boots skipped. when the cross gcc and `qemu-system-*` for a target exist, `test.sh` adds 7 boots on that target (run-only hello, fact, wide and gc, then the resident compiler fed hello, fact and wide). both virt boards were present here, which is 14 more. the jit needs `qemu-aarch64`, the linux-user emulator, which `qemu-system-aarch64` is not. the llvm backend needs `llvm-config`. those two were not executed in the environment that cut the word to 64 bits. they were executed later (stage 24), on this host, and the full script then passed 292 checks. stage 25 added three more (the default map matches the checked-in sources, and the flag form of `genmap` reproduces the small and run maps), 295 passed, 0 failed. stage 26 added eight more (echo until eof, the clock and RAM-file line, the exit text and the exit code, on each virt board), 303 passed, 0 failed. stage 27 added twelve more: the float line on the interpreter, the microcore, the arm64 jit and the llvm backend, the same line on the small microcore and on `core.c` at that size, the run-only image, both virt boards running the program and compiling it, and one llvm run with `ZYHOT=1` so every float block is compiled. 315 passed, 0 failed. stage 28 added twelve more, the same shape of check for byte loads and stores, including a one-byte patch of a live literal. 327 passed, 0 failed. stage 29 added twenty-three more for packed byte strings: the string line, the example, and the hosted byte-file check on the interpreter, the microcore, the arm64 jit and the llvm backend; the string line and the example on the small microcore and on `core.c` at that size; the run-only image of both; both virt boards running the program and compiling it; and one llvm run with `ZYHOT=1`. 350 passed, 0 failed. stage 30 added eighteen more for shared cells: the sharing line and the memdebug line on the interpreter, the microcore, the arm64 jit and the llvm backend; both of those on the small microcore and on `core.c` at that size; the run-only sharing line; both virt boards running it and compiling it; and one llvm run with `ZYHOT=1`. 368 passed, 0 failed. stage 31 added one more: a soft-float interpreter matches the float line. 369 passed, 0 failed. stage 32 added twenty-two more: negative zero is false, and a float stays a float through calls, globals and fields, on the interpreter, the microcore, the arm64 jit and the llvm backend; both of those on the small microcore and on `core.c` at that size; the run-only image of the negative-zero program; both virt boards running that program and compiling it and the float-type program; a soft-float check of negative zero; and llvm runs with `ZYHOT=1` for both. 391 passed, 0 failed. stage 33 added ten more for o3 floats: the lifted kernel matches the plain one, a constant expression folds, a NaN minus itself stays a NaN, and negative zero is false inside the region, on the interpreter, the microcore, the arm64 jit and the llvm backend; the same line on the small microcore and on `core.c` at that size; both virt boards compiling it; a soft-float interpreter; and one llvm run with `ZYHOT=1`. 401 passed, 0 failed. stage 34 added thirteen more for the float text: shortest, fixed and scientific forms, a 17-digit tie, and the full finite range, on the interpreter, the microcore, the arm64 jit and the llvm backend; the same line on the small microcore and on `core.c` at that size; the run-only image; both virt boards running it and compiling it; a soft-float interpreter; and one llvm run with `ZYHOT=1`. 414 passed, 0 failed. the jit binary is `aarch64-linux-gnu-gcc -O2 -w -DJTYPE=int -static core.c io_linux.c` (gcc 13.3.0, static, against the aarch64 sysroot) run by `qemu-aarch64` 8.2.2. the llvm binary is host gcc 13.3.0 with `-DZYLLVM` and LLVM 18.1.3 (`llvm-config --cflags --ldflags --libs`). both ran the same program list as the interpreter and self-compiled to the same image. `ZYTRACE=1` on `tests/o3.zc` printed 8 `bytes of arm64` lines and 8 `compiled by llvm` lines. `ZYHOT=1` on the llvm binary made `tests/types.zc` match the interpreter byte for byte. the first jit run failed one check: `tests/enhance.zc` printed `100 0 343 3,2` and then halted. opcode 21 calls a C function that returns a 32-bit `int`. a write to `w0` zeroes the high half of `x0`, so the failure code `-4` (the `noisy` enhancement, whose body does i/o and does not lift) was stored as a large positive cell. the compiler treated the install as a success, emitted the unwired opcode, and the jit halted. the translator now does `sxtw x0, w0` before storing that cell. the Darwin jit (`MAP_JIT` and the write-protect around each flush) was not run. this host is x86_64 Linux, and qemu-user is the arm64 cpu the jit actually executed on. the 64-bit image is not binary-compatible with a 32-bit genome. @@ -28,3 +42,5 @@ fixed in stage 13 (details in `history/13-gap-fixes`): branch and loop joins, fr --- + +`python3 tests/drivers/learn.py bin/zym` is not a full learning-guide pass: example 23 uses native C ABI `extern` calls, which require native FFI support and are unavailable in the microcore host. example 33 passes on both native and micro; the micro-only guide run must skip the C ABI example. |
