diff options
| author | 2026-10-14 09:06:30 +0330 | |
|---|---|---|
| committer | 2026-10-14 09:06:30 +0330 | |
| commit | 6e5eb777ca5cdd878d8888278998d3fd4539a0b1 (patch) | |
| tree | 5c0211b527728e9b77166f5ce33381a166204b14 /examples/bf.zc | |
| parent | rename ASKLIST.md to TASKLIST.md (diff) | |
fix: emit rt.put_c from the brainfuck translator
the translator writes zc source that is compiled again by evals, so the
generated call has to carry the namespace the runtime now requires. a bare
put_c failed with "put_c is used but never defined"; rt.put_c runs and prints
hello world.
reconstructed after this edit was lost to a stash rewrite during the history
purge; verified against the reported failure and success, not by a rebuild,
since the bootstrap cannot currently produce an interpreter.
Diffstat (limited to 'examples/bf.zc')
| -rw-r--r-- | examples/bf.zc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/bf.zc b/examples/bf.zc index 71cf40d..3971cbc 100644 --- a/examples/bf.zc +++ b/examples/bf.zc @@ -27,7 +27,7 @@ fn translate(s) { i = i + k; continue; case '[': emit("while (t[p]) {\n"); depth++; case ']': emit("}\n"); depth--; - case '.': emit("put_c(t[p]);\n"); + case '.': emit("rt.put_c(t[p]);\n"); case ',': emit("t[p] = eof() ? 0 : get_c() & 255;\n"); } i++; |
