Skip to content

Move shared WASM logic to base writer - #131778

Draft
jtschuster wants to merge 1 commit into
wasm-webcil-object-writerfrom
wasm-writer-shared-implementation
Draft

Move shared WASM logic to base writer#131778
jtschuster wants to merge 1 commit into
wasm-webcil-object-writerfrom
wasm-writer-shared-implementation

Conversation

@jtschuster

@jtschuster jtschuster commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

This is the fourth PR in the WASM object-writer stack and builds on #131772.

  • Move shared WebAssembly section mapping, ordering, and construction into WasmObjectWriter.
  • Move shared symbol/index-space, signature/funclet, typed-section row, stub, and symbol-table orchestration into the base writer.
  • Add a virtual data-section factory so WebCilObjectWriter can continue creating embedded WebcilSection instances.
  • Keep WebCIL headers, alignment, data layout, memory sizing, imports/exports/globals policy, payload emission, and relocation handling in WebCilObjectWriter.
  • Include defined Table and Memory sections in standard WebAssembly emission order for future derived writers.

This preserves current WebCIL behavior while leaving the generic writer implementation ready to be shared with a second WebAssembly object writer.

Stack

  1. Extract WASM section model #131770 — Extract WASM section model
  2. Add typed self-counting WASM sections #131771 — Add typed self-counting WASM sections
  3. Introduce WebCIL object writer type #131772 — Introduce WebCIL object writer type
  4. Move shared WASM logic to base writer #131778 — Move shared WASM logic to base writer (this PR)

Validation

  • ./build.sh clr+libs+libs.pretest+host completed with 0 warnings and 0 errors.
  • ILCompiler.ReadyToRun.Tests built with 0 warnings and 0 errors.
  • The focused WasmWebcilModule test ran exactly once and passed.
  • git diff --check passed.

Note

This PR description was generated with GitHub Copilot.


Stack created with GitHub Stacks CLIGive Feedback 💬

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant