alexcrichton opened PR #11126 from alexcrichton:shrink-addrmap to bytecodealliance:main:
This commit is a minor tweak to the construction of the addrmap section which Wasmtime uses to map binary offsets in compiled code to binary offsets in the original wasm module. The representation of the addrmap section means that if Cranelift reports two adjacent instructions that have the same source location we don't actually have to record the second one, only the first. This commit implements this optimization by skipping encoding duplicate addrmap entries to shrink the size of this section in binaries slightly.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested pchickey for a review on PR #11126.
alexcrichton requested wasmtime-core-reviewers for a review on PR #11126.
alexcrichton commented on PR #11126:
As an example this reduces the size of
.wasmtime.addrmapforspidermonkey.wasmfrom 7886708 bytes to 7082452 bytes, a 10% reduction.
pchickey submitted PR review:
Nice!
alexcrichton merged PR #11126.
Last updated: Dec 06 2025 at 06:05 UTC