Skip to content

Fix runtime async on wasm - #9

Merged
AndyAyersMS merged 1 commit into
AndyAyersMS:wasm-asyncfrom
davidwrighton:wasm-async-fix-runtime-async
Jul 24, 2026
Merged

Fix runtime async on wasm#9
AndyAyersMS merged 1 commit into
AndyAyersMS:wasm-asyncfrom
davidwrighton:wasm-async-fix-runtime-async

Conversation

@davidwrighton

Copy link
Copy Markdown

This PR ports the changes from commit b72152f onto the wasm-async branch so they can be merged intentionally.

Fix runtime async on wasm

  • Instead of embedding a table index in the resume info, use a new R2R fixup to place the right PortableEntryPoint into the location.
  • Tweak InterpreterToR2RThunk generation:
    • Always use the standard MethodSignature for InterpreterToR2RThunks.
    • Build the ArgIterator based on having an async continuation.
    • Always pass 0 as the async continuation parameter. The only case where a non-zero value is passed is on resumptions, and those always pass through the R2R'd resumption stub, not the interpreter-to-R2R thunk.

The single commit was cherry-picked onto the current wasm-async tip; it applied cleanly with identical change stats (16 files, +247/-37).

Note

This pull request was generated with the assistance of GitHub Copilot.

- Instead of embedding a table index in the resume info, use a new R2R fixup to place the right PortableEntryPoint into the location
- Tweak InterpreterToR2RThunk generation
  - Always use the standard MehtodSignature for InterpreterToR2RThunks
  - Build the ArgIterator based on having an async continuation
  - Always pass 0 as the async continuation parameter. The only case where a non-zero value is passed is on resumptions, and those always pass through the R2R'd resumption stub, not the interpter to R2R thunk
@AndyAyersMS
AndyAyersMS merged commit 352eb0c into AndyAyersMS:wasm-async Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants