Fix escaping of names in IR (#8880)
The binary reader (but not the text parser) would previous escape names read from the names section and use those escaped names in the IR. But there is no reason to escape names in the IR; we can use the unmodified byte sequences instead. Remove this unnecessary escaping and always store names unescaped in the IR. The binary writer was partially unescaping names when writing them back to the names section, but this is no longer necessary. After removing this, we simply preserve whatever names were present in the input, modulo any changes we might have made to avoid duplicate names. Asyncify and wasm-split read function names as input from the command line and from manifest files and would previously escape these names on reading so they would match up with the escaped names in the IR. Now that the IR does not store escaped names, fix Asyncify and wasm-split to no longer escape these names. Remove wasm-split's --unescape option now that function names will always be printed unescaped. As a follow-on change we might consider _unescaping_ names taken on the command line or manifest files, which would allow users to more easily pass names containing unprintable characters.
T
Thomas Lively committed
b27f7e347edabb56d2954bc0a8f3183631f6769d
Parent: 8c3dfa2
Committed by GitHub <noreply@github.com>
on 7/1/2026, 6:46:11 PM