<feed xmlns='http://www.w3.org/2005/Atom'>
<title>moon/zygotec/src/lsp/server.zc, branch work/defer</title>
<subtitle> work-in-progress programming language.
</subtitle>
<id>https://git.downsta.ir/moon/zygotec/atom?h=work%2Fdefer</id>
<link rel='self' href='https://git.downsta.ir/moon/zygotec/atom?h=work%2Fdefer'/>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/'/>
<updated>2026-10-14T12:38:34+00:00</updated>
<entry>
<title>bounds checking: constant loop bound proof works, plain-op fixed-array check, docs (readme, spec 4.15 and friends, server, vscode), conformance and test.sh fixes, todo</title>
<updated>2026-10-14T12:38:34+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T12:38:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=76a4db8ef506e4fb2c3eb530a3d95904a42ca0cb'/>
<id>urn:sha1:76a4db8ef506e4fb2c3eb530a3d95904a42ca0cb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bounds checking: port agent/bounds-checking onto main 0879d0a; unbounded main in o3call, o3 tests expect no check, boundsrules, bounds_fixed, bounds_heap and zc0unbounded tests</title>
<updated>2026-10-14T12:28:58+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T12:28:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=d55b5fdf92a674a6495878f97a09e95bafdcba3f'/>
<id>urn:sha1:d55b5fdf92a674a6495878f97a09e95bafdcba3f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>line tables and backtraces: port agent/line-tables onto main, op 56 on the x86-64 jit, docs, measurements, tests; default genome reservation 0x68000</title>
<updated>2026-10-14T12:22:01+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T12:22:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=7c54e48bca711a6596be4bb17fcaa4330b9928e3'/>
<id>urn:sha1:7c54e48bca711a6596be4bb17fcaa4330b9928e3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge the defer statement; todo: tick it, add its follow-ups</title>
<updated>2026-10-14T10:47:30+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T10:47:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=4a22cf28742bf33577678de494aa09ab60a3c820'/>
<id>urn:sha1:4a22cf28742bf33577678de494aa09ab60a3c820</id>
<content type='text'>
</content>
</entry>
<entry>
<title>zc: add the defer statement</title>
<updated>2026-10-14T10:39:47+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T10:39:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=54b8a8918bb63c98a8f58e823033232243647562'/>
<id>urn:sha1:54b8a8918bb63c98a8f58e823033232243647562</id>
<content type='text'>
defer expr; and defer { ... } register code that runs when the enclosing
block ends: at the end of the block, and at return, break and continue
that leave it. the tokens are kept at the defer and compiled again at each
exit (block_close, body, kw_return, kw_break, kw_continue), newest first,
before the block's variables are released, so the analyzer sees a deferred
rt.free(p) as the transfer of p where it runs. names mean what they meant
at the defer; values are read when it runs. return, break and continue
inside a deferred statement are errors, reported once. works in unchecked
code and closures (own base per function context).
</content>
</entry>
<entry>
<title>fix std hover, full capture terminator, bare static calls, void main in run-only images</title>
<updated>2026-10-14T10:38:17+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T10:38:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=93340f97dce404a008f489729df144ace53528ab'/>
<id>urn:sha1:93340f97dce404a008f489729df144ace53528ab</id>
<content type='text'>
- hover: a symbol from an embedded library source (tinyvm:std.zc, tinyvm:icon.zc) was
  looked up only in the document; look it up by its qualified name in the library source
  (hover_embedded_sym), and render a method found that way by its line (bs_hover).
- std.capture: allocate one word more than the 256 it holds, so end() terminates inside the buffer.
- a bare call to a static function of the enclosing struct resolves like a bare struct constant
  (mstruct is set for every non-generic struct's methods); the struct's own wins over a global.
- run.zc declares main untyped (fn main();), so a run-only image accepts int, void or untyped main
  with both compilers.
</content>
</entry>
<entry>
<title>Merge the compiler split into phase files</title>
<updated>2026-10-14T10:06:27+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T10:06:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=c2270cc944424579e4577e67ed17a66512d856b4'/>
<id>urn:sha1:c2270cc944424579e4577e67ed17a66512d856b4</id>
<content type='text'>
also: ca_owners in the language server keeps the owner order in a fixed
array instead of a heap list the analyzer rejected.
</content>
</entry>
<entry>
<title>split compiler.zc into files by phase</title>
<updated>2026-10-14T10:05:40+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T10:05:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=ce920b6ff47f32bc06dd27124e1b882f82f3d6ae'/>
<id>urn:sha1:ce920b6ff47f32bc06dd27124e1b882f82f3d6ae</id>
<content type='text'>
src/compiler/compiler.zc is now twelve files under src/compiler/, listed in
order in src/compiler/parts. cat of the parts in order is byte-identical to
the old file, so every compiler and image except the language server's is
unchanged. no function was edited.

consumers read the list: the makefile, bootstrap-check, genmap (which still
writes one compiler.zc into a generated map directory), tinyvm.bat,
test.sh, test_win.ps1 and the lsp drivers. the language server embeds each
part and serves them joined as the one document tinyvm:/compiler.zc.
</content>
</entry>
<entry>
<title>add c-style typedef and a built-in string alias</title>
<updated>2026-10-14T09:39:22+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T09:39:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=6bb3d79cbd853601623095b497a1807489c3ef6e'/>
<id>urn:sha1:6bb3d79cbd853601623095b497a1807489c3ef6e</id>
<content type='text'>
typedef T name; binds name to the type record of T, at the top level or
in a function (scoped to its block). string is a built-in alias for char*.
A type name straight before , or ) in a parameter list is the parameter's
name, so fn f(string) still works. The language server shows typedef T
name; on hover and highlights typedef as a keyword.
</content>
</entry>
<entry>
<title>todo: one sorted list of open work; library suggestions without naming libraries</title>
<updated>2026-10-14T09:07:12+00:00</updated>
<author>
<name>zinc</name>
<email>zinc@downsta.ir</email>
</author>
<published>2026-10-14T09:07:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.downsta.ir/moon/zygotec/commit/?id=fd622c51be670bba2acf4b50c548acedbc8bb263'/>
<id>urn:sha1:fd622c51be670bba2acf4b50c548acedbc8bb263</id>
<content type='text'>
TODO.md ticks the items verified done (namespaces, actor and icon libraries
and their coverage, the genome embed, the bootstrap ownership limits, the
docs and fixtures sweep) and lists everything still open, including the
newly requested language features, sorted easiest first.

the compiler no longer names actor: file libraries for suggestions come from
src/lib/modules.txt, and lib.name before its include reports the missing
include. icon gains fixtures for reading globals while stepping and for
begin_function on a non-function, and the suite checks that nothing the
compiler reads by default mentions actors. bf.zc, the web sample and std's
capture example use qualified runtime names; LEARN.md uses build/bin paths.
</content>
</entry>
</feed>
