27 Commits

Author SHA1 Message Date
3eaa3e23bd A macro module keeps its own prelude, and --x86 gets the merged daemon
flan dev's merged build is the program and the compiler in one -rdynamic
executable, so it exports every flan.* body it has, and ELF gives it precedence
over anything dlopened afterwards. The compiler expands a macro by dlopening a
module into that same process, and the module is built by Emit.program whatever
backend the session uses -- so under --x86 the caller was LLVM's and the body it
landed in was the dev backend's, which is a crossed pair. It died with SIGSEGV
inside flan.[clamp] during the first expansion, before the program had run a
line, and Dev.start refused the combination rather than do that.

Build.macro_module now asks Emit.program for hidden visibility on the module's
own Flan definitions. There is nothing left for the host to interpose, and the
flan.macro.* thunks stay exported because dlsym is how the compiler reaches
them -- nm -D on the built module lists those three and nothing else of Flan's.
The -Wl,-Bsymbolic that had been binding everything locally since 65d14f4 goes
with it: the module links its own flan_rt.c, and binding that locally aimed its
calls at a runtime flan_rt_init never ran on, with a null flan_exit_hook, so a
trap raised inside an expansion would have exited the process instead of parking
it.

Nothing about the host moved, which is what keeps redefinition modules reaching
its cells, its globals and flan_dev_cell. hidden defaults to false, and the 540
IR files this compiler emits for the test corpus are byte-identical to the ones
before it.

test_dev.ml's assertion that the merged daemon refuses --x86 becomes the session
it was standing in for: dev-macro.flan calls a prelude macro at the top level,
so the daemon coming up at all is the old crash not happening, and one build
then carries C-x C-e, a C-c C-c whose body calls a macro again, the park and the
rerun.
2026-09-17 19:50:29 +07:00
45c5b43021 Merge branch 'worktree-agent-ae9bc74da338fa214' into dev-loop 2026-09-14 11:55:14 +07:00
238f65db59 A listing says which form it came from, and what each slot is
`flan emit --x86` printed a three-line header and then nothing but .byte
blobs. The information was all there and none of it was written down.

Each run of bytes is now headed by the Flan form that produced it, with the
position it was written at, indented by how deeply the form nests. The
headings are queued rather than written, so a form that emits nothing does
not leave its heading on the next form's bytes; atoms queue none at all,
because a literal operand would otherwise steal the heading standing above
the imul that consumes it.

Above each function is a frame map, which is the half no disassembly
recovers: every value in this backend lives in a frame temporary, so
-0x20(%rbp) is the whole vocabulary of the listing and nothing says what it
means. It is read out of what emit_fn already keeps, so it cannot drift.
Beside it, where the arguments arrived and whether there is a hidden sret.

And the bookkeeping is named where it appears -- the transfer guard, the
bounds triple, the arithmetic guards, rep movsb, the dev indirection cell --
with each explained once in a legend at the top rather than at every site.

Always on for `emit --x86`, which exists to be read, and never for a build,
whose .s is a temp file handed to clang. spike/x86/annot.sh is the check that
this costs no byte: emit both ways, assemble both, compare every section.
342 SAME / 0 DIFFER over the corpus in default, --dev and --debug. dump.sh
now shows the annotated listing beside objdump's disassembly -- why beside
what, which is the pairing that answers the mnemonics question.

survey.sh has not been run on this; see the handoff.
2026-09-14 11:54:36 +07:00
1615e3ed8b The section refresh is checked against the file it must not have touched 2026-09-14 11:29:13 +07:00
1961c7cc9d The plan for an annotated listing, and the two decisions it rests on 2026-09-14 11:28:30 +07:00
042ddd73d9 One buffer for four lowerings, and it remembers which one you were reading 2026-09-14 11:25:05 +07:00
5a2f627842 Four lowerings want a buffer, and the buffer wants to remember 2026-09-14 11:11:13 +07:00
e7bb643d9d Merge branch 'worktree-agent-aaf84e55296df121c' into dev-loop 2026-09-14 10:52:13 +07:00
d0e8bdf051 Why test_emacs got no x86 case 2026-09-14 10:51:29 +07:00
ef1c2e6fa5 The survey and the three forced test runs, with what the skip count moved for 2026-09-14 10:51:03 +07:00
391fc62cc8 The handoff, with both backends measured through a real daemon 2026-09-14 10:40:56 +07:00
ab5a381de8 A README section on what checks what, and the full account of the third rot
The third silent failure was waiting, and it was the September 12th one again:
web/index.html showed the value renderer spelling struct fields with colons, two
days after the sweep that made them dots everywhere else. The check that should
have said so was anchored in NEXT.md, which is a scratch document, so it had been
reporting 'whatever this quotes has moved' into a report nobody could read.

README gains a Checking it section: the four commands, what each one means, and
the plain statement that nothing runs @checks for you. The convention it proposes
is the one this repository already has -- a lane's handoff quotes its counts.
2026-09-14 10:39:20 +07:00
066322c47d The checks nobody runs, and a plan to find the rest of them 2026-09-14 10:12:05 +07:00
9ad886abe5 The plan for wiring the x86 backend to the dev loop, written before the work 2026-09-14 10:11:34 +07:00
a9b7eb1556 The survey landed, and neither census comment states a number any more 2026-09-14 08:49:43 +07:00
0661e6042e The one verification this session could not finish, said so 2026-09-14 08:44:08 +07:00
7ebf7ec9c4 The counts beside the census, and the language claim the walk used to carry 2026-09-14 08:40:32 +07:00
c355739f55 The handoff says what was built, and the index knows it is there 2026-09-14 08:37:59 +07:00
bb2a9b202b The plan for the pointer arm cimport already promised 2026-09-14 08:37:30 +07:00
c9bb12e591 The two-process daemon took the same signal, and has no test that says so 2026-09-14 08:17:43 +07:00
f543643d19 The flake handoff follows the others into docs/handoffs 2026-09-14 08:12:01 +07:00
5b54e1b7da Merge the tidy: the crossed-pair case is the marker's, and the citations follow the move 2026-09-14 07:30:14 +07:00
9735bcc2d8 The survey numbers, measured 2026-09-14 07:29:17 +07:00
0afa530295 An index for docs/, and a .gitignore that explains itself 2026-09-14 07:16:46 +07:00
9d5689ffa2 Every citation of a moved document now resolves from where it is written 2026-09-14 07:12:27 +07:00
eb641cf8eb Move the reports and the history into docs/ 2026-09-14 07:10:57 +07:00
c1c1f8ed76 A plan for tidying the root 2026-09-14 07:10:46 +07:00