SingleAccretion opened PR #9700 from SingleAccretion:DI-Synth to bytecodealliance:main:
The DWARF transform needs to add some "synthetic" types to the output, manly to represent the VMContext structure.
So far, these types were being added to each CU, which is unnecessary overhead since they're exactly the same in each CU in a given module.
This change moves them to a single per-module CU that is references via DWARF's
DW_FORM_ref_addrmechanism.This is an optimization in both time (the debugger needs fewer types to keep track of) and space (the
.debug_infosection ~5% smaller on some DWARF input I have).
SingleAccretion submitted PR review.
SingleAccretion created PR review comment:
Below code was simply moved from utils.rs without functional changes.
SingleAccretion edited PR review comment.
SingleAccretion submitted PR review.
SingleAccretion created PR review comment:
Since all of the remaining
wasm_typesare module-invariant, there is no longer a need for them to be per-module.
Last updated: Dec 13 2025 at 19:03 UTC