diff options
| author | 2026-10-14 09:48:11 +0000 | |
|---|---|---|
| committer | 2026-10-14 09:48:11 +0000 | |
| commit | 98f9e13829204d32c7dea8a58f8f11efc2a38550 (patch) | |
| tree | b96940376e0f2f306ded70736018afa92f6c0c89 /README.md | |
| parent | Merge branch 'worktree-agent-a96a10dc1489688ea' into ccr-0054c02e-dfdvnd (diff) | |
zc0: byte string types, u/m/d as names, enhancements in asm
bstr locals, globals, parameters and returns are byte strings for + , the
comparisons, indexing, slicing, len and put_s; b"..." globals; embed inside
a function. u, m and d are ordinary names: a recast is the letter with the
star touching it (u*x), tags .u .m .d are accepted on types and bare. an
enhancement named inside asm { } emits its opcode. zc0's image of the
genome and language server sources is unchanged.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -513,7 +513,7 @@ tables: `run.add_binop("**", 11, "ipow c")` adds or replaces a binary operator w ## the bootstrap -`src/tools/zc0.c` compiles the subset of zc used by `src/compiler/compiler.zc` (without the analyzer, types, quote, parse words, or block expressions, but with `enhance` and top-level `embed` declarations) into the first genome, `build/s0/genome.bin`. a core built around that image compiles `src/compiler/compiler.zc` again in the VM using the full compiler, analyzer, and native division code, and `mkgenome` accepts the result only if it is an image (a compiler that rejects its own source prints diagnostics instead, which `mkgenome` shows). a core built around the second image compiles the source a third time; the two self-compiled images must be identical, and the first becomes `build/core/genome.bin`. the test suite checks this fixpoint on the interpreter, microcore, jit and llvm backends when available. in the zc0 subset `u`, `m` and `d` are recast tags, not names. an image build (`build_image(org, dst)`) compiles with only the image's names, keywords, and built-in types visible, writes code for the requested address, and appends a symbol table containing its names and enhancements. an image build (`build_image(org, dst)`) compiles with only the image's names, keywords, and built-in types visible, writes code for the requested address, and appends a symbol table containing its names and enhancements. +`src/tools/zc0.c` compiles the subset of zc used by `src/compiler/compiler.zc` (without the analyzer, types, quote, parse words, or block expressions, but with `enhance` and top-level `embed` declarations) into the first genome, `build/s0/genome.bin`. a core built around that image compiles `src/compiler/compiler.zc` again in the VM using the full compiler, analyzer, and native division code, and `mkgenome` accepts the result only if it is an image (a compiler that rejects its own source prints diagnostics instead, which `mkgenome` shows). a core built around the second image compiles the source a third time; the two self-compiled images must be identical, and the first becomes `build/core/genome.bin`. the test suite checks this fixpoint on the interpreter, microcore, jit and llvm backends when available. zc0 reads `u`, `m` and `d` as ordinary names too: `u*x` with the star touching the letter is a recast (no code), `u * x` is a product, and `.u`, `.m` and `.d` tags are read and ignored. it packs `b"..."` byte strings like the compiler and tracks `bstr` locals, globals, parameters and returns, and `embed` declarations (arrays only at the top level). an image build (`build_image(org, dst)`) compiles with only the image's names, keywords, and built-in types visible, writes code for the requested address, and appends a symbol table containing its names and enhancements. an image build (`build_image(org, dst)`) compiles with only the image's names, keywords, and built-in types visible, writes code for the requested address, and appends a symbol table containing its names and enhancements. ## the instruction set |
