From fd622c51be670bba2acf4b50c548acedbc8bb263 Mon Sep 17 00:00:00 2001 From: zinc Date: Wed, 14 Oct 2026 09:07:12 +0000 Subject: todo: one sorted list of open work; library suggestions without naming libraries 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. --- tests/icon/accept/step_globals.zc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/icon/accept/step_globals.zc (limited to 'tests/icon/accept/step_globals.zc') diff --git a/tests/icon/accept/step_globals.zc b/tests/icon/accept/step_globals.zc new file mode 100644 index 0000000..c584772 --- /dev/null +++ b/tests/icon/accept/step_globals.zc @@ -0,0 +1,19 @@ +include rt; +include run; +include icon; +int total = 1; +fn main() { + // step a fragment that writes an isolated global and a bound one, reading both after each step + let q = run.tokens("int n = 5; scale = scale * n; total = total + scale; return total;"); + let frame = icon.begin(q); + icon.set_global(frame, "scale", 2); + icon.bind_global(frame, "total"); + icon.step(frame); rt.put_n(icon.local(frame, "n")); rt.put_c(' '); + icon.step(frame); rt.put_n(icon.global(frame, "scale")); rt.put_c(' '); + icon.step(frame); rt.put_n(icon.global(frame, "total")); rt.put_c(' '); rt.put_n(total); rt.put_c(' '); + icon.step(frame); rt.put_n(icon.result(frame)); rt.put_c(' '); + // a name the frame never bound reads as 0 with error status 2 + rt.put_n(icon.global(frame, "missing")); rt.put_c(' '); rt.put_n(icon.error()); rt.put_c(10); + icon.close(d*frame); + return 0; +} -- cgit v1.2.3