aboutsummaryrefslogtreecommitdiff
path: root/src/tools/zc0.c
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 10:06:27 +0000
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 10:06:27 +0000
commitc2270cc944424579e4577e67ed17a66512d856b4 (patch)
tree04fc1ede53e0cbf2c2562f724fd539836c450306 /src/tools/zc0.c
parenttodo: tick the spec; list the bugs its appendix b found (diff)
parentsplit compiler.zc into files by phase (diff)
Merge the compiler split into phase files
also: ca_owners in the language server keeps the owner order in a fixed array instead of a heap list the analyzer rejected.
Diffstat (limited to 'src/tools/zc0.c')
-rw-r--r--src/tools/zc0.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/zc0.c b/src/tools/zc0.c
index 9faf883..040a4ea 100644
--- a/src/tools/zc0.c
+++ b/src/tools/zc0.c
@@ -1,9 +1,9 @@
/* zc0: stage 0 of the bootstrap. a small c compiler for the subset of zc that
- compiler.zc is written in. it reads zc source on stdin and writes a genome
+ the compiler (src/compiler/) is written in. it reads zc source on stdin and writes a genome
image (vm words placed at GORG, as little-endian 64-bit words) on stdout, in
the same image layout the resident compiler's image mode produces. the cores
embed that file with #embed (src/core/genome.h). no lifetime analysis, no quote, no
- parse words, no block expressions: those only exist in compiler.zc. tags
+ parse words, no block expressions: those only exist in the compiler. tags
(.m and .d on parameters, .u on a return) are parsed and recorded in
signatures but not checked. u, m and d are ordinary names, as in the
resident compiler: a recast is the letter with the star touching it, u*x,
@@ -360,7 +360,7 @@ static int64_t cexpr(void)
/* ---- types ----
zc0 has no types: a type is read and thrown away. all it has to know is the
shape, so that T[n] still reserves n words and the rest reserve one. the
- grammar is the compiler's own (see ptype in compiler.zc):
+ grammar is the compiler's own (see ptype in src/compiler/types.zc):
ptype a type, then any number of (params): int(int, int) is a function type
ptype0 a type with its stars: int*, vec<T>*, point**
ptype1 a base: T[n], T[?], fixed T[?], fn, a name, or a generic instance