WebAssembly / WebAssembly/binaryen
Combining data segments
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 69
Description
AssemblyScript tends to produce a lot of (data ...) entries which are adjacent to each other, and seem like they could be combined. Here's an example.
I can see that memory-packing splits blocks up, but I don't see a way to combine them. Am I missing something, and could this be added?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the example in tests/compiler/memory.debug.wat and inspect the existing memory-packing behavior that splits data blocks. Trace where adjacent (data ...) entries are handled, then determine the expected combined output while preserving their contents and layout. Done should include coverage for adjacent segments and confirm the optimizer produces the intended combined representation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100