Combining data segments

Open
#8,198 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
wasm
Domain
compilers

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.

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?

Dominant language
WebAssembly
Stars
8.6k
Forks
885
Avg merge
1d 20h
Merged PRs (30d)
64

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from WebAssembly/binaryen

All issues in WebAssembly/binaryen

Similar issues

More Compilers issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.