Files
ww/selfhost/cmd
Hojun-Cho 006df414aa selfhost+test: route convenience-wrapper N_DOT probes via fnretlookupmod (#17)
Structural close of the #4-trio convenience-wrapper audit. Session-6's
#4-trio + #11/#16 graduated individual lookup helpers (fnret/fnparams/
enum/struct/def) to same-module-first via *mod variants. The close
didn't enumerate every cgcall-context callsite — convenience wrappers
that take a *node callee and probe its return shape via bare-leaf
fnretlookup stripped the N_DOT module hint, same wedge shape as #16
(callee_variadic_param, d9b0c90) through a different family of
consumers.

Eight LATENT sites in selfhost/cmd/wcc fixed (each mirrors #34's
nodeisslice two-arm route — N_IDENT uses cmod=c.curmod, N_DOT uses
cmod=callee.lhs.str, terminal call routes through fnretlookupmod):

- cgenstmt.ww  cgreturn forwardtagged probe
- cgenstmt.ww  cgmlet tuple-return shape probe
- cgenexpr.ww  cgdot fn-rvalue probe (mod.fn LEAQ)
- cgenexpr.ww  cgtryprop succisstr probe
- cgenexpr.ww  cgtryunw  succisstr probe
- cgenutil.ww  callsretsize (sret arg-prep)
- cgenutil.ww  inferletcalltype (let x = f()? tnode)
- cgenutil.ww  rhstaggedabicall N_CALL branch

cstage carries no sister bug: cmd/w6c/cgen.c reads every callee
return shape from the typed n->lhs->type per TY_FN sig. Mirror of
#4d/#28/#31/#34/#16 cstage no-sister notes.

753_convwrap_audit: table-driven sentinel exercising cgmlet's tuple-
shape probe. alpha exports foo() (i64, str); beta exports foo()
(i64, i64); main calls beta.foo() — source order puts alpha LAST so
alpha.foo prepends to head of c.fnrets, pre-fix bare walk picks
alpha's str-branch dispatch for beta's call. Post-fix routes to
beta.foo via fnretlookupmod. Asserts MOVQ\\tCX, absent in main.run
TEXT (no str.len store; would fire pre-fix). Remaining 7 sites
covered structurally by shape-mirror — single wedge shape, single
exercise.

make test 127/127; ww2==ww3==ww4 byte-id holds via 995_self_rebuild.
2026-05-19 10:44:16 +09:00
..