From 52972fe525abde6e107d7240be91a8985abf0683 Mon Sep 17 00:00:00 2001 From: zinc Date: Wed, 14 Oct 2026 09:43:55 +0000 Subject: parity: compare what zc0 and the self-hosted compiler print src/tools/parity.sh compiles each program of tests/programs, examples and examples/learn with zc0 (runtime, program, mkgenome, a microcore with the image embedded, kept under build/parity/) and runs it beside build/bin/zy < prog.zc, then compares stdout. what zc0 rejects is skipped and counted. tests/parity.known lists the differences that are by design (zc0 has no ownership analysis or memdebug checks). make parity runs it. tests/programs/parity_ops.zc pins operator precedence and associativity across every binary operator, unary operators, assignment and short-circuit order; its output matches a c compiler's. --- ONBOARD.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ONBOARD.md') diff --git a/ONBOARD.md b/ONBOARD.md index 7b0c045..3bf8b0b 100644 --- a/ONBOARD.md +++ b/ONBOARD.md @@ -163,6 +163,10 @@ make check make test JOBS=4 ``` +`make parity` compiles the programs in `tests/programs/` and `examples/` with zc0 and +with the self-hosted compiler and diffs their output; `tests/programs/parity_ops.zc` +pins operator precedence. it uses `build/`, and skips what zc0 rejects. + the suite builds its own map, bootstrap and cores in a scratch directory, so it does not depend on what is in `build/`. on a host without the arm64 jit the language server is interpreted and slow; `ZC_TEST_TIMEOUT_SCALE` stretches the -- cgit v1.2.3