You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cli): reachable-graph closure follows call_indirect into table functions (#275) (#276)
--all-exports compiled the closure of the exports over direct `call` (#235),
but a function reached only through `call_indirect` (a table entry) was
invisible to that closure and omitted from the ELF — so a module dispatching
through a function table is not self-contained (gale's falcon: 280 functions →
24 symbols).
- Decoder: parse the Element section (`elem_func_indices` on DecodedModule) —
the function indices that populate the table = the possible call_indirect
targets. Empty for modules with no element section (byte-identical output).
- Closure: reachable_from_exports unions in every table function once a
reachable function performs a call_indirect (sound over-approximation), then
follows their direct calls transitively. Verified on a minimal indirect-call
module: the via-table-only target is now compiled in (was absent).
Behavior-frozen: control_step 0x00210A55 / flight_seam 0x07FDF307 / div_const
338/338 all result-identical (no element section → closure unchanged).
SCOPE: this is the reachability half. call_indirect DISPATCH in the
select_with_stack path is still incomplete — the indirect call is dropped in
selection, and the encoder's table-base uses R11 (collides with R11=mem-base).
So a module using indirect dispatch gets its table functions present but the
indirect call is not yet wired end-to-end. Direct-call modules are fully
self-contained. Tracked as a follow-up. v0.11.33.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments