Skip to content

[Wasm R2R] Allow LDVIRTFTN call sigs to carry a type arg (MD array methods)#129064

Open
AndyAyersMS wants to merge 1 commit into
dotnet:mainfrom
AndyAyersMS:fix-wasm-r2r-ldvirtftn-typearg
Open

[Wasm R2R] Allow LDVIRTFTN call sigs to carry a type arg (MD array methods)#129064
AndyAyersMS wants to merge 1 commit into
dotnet:mainfrom
AndyAyersMS:fix-wasm-r2r-ldvirtftn-typearg

Conversation

@AndyAyersMS
Copy link
Copy Markdown
Member

No description provided.

…thods)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 6, 2026 01:44
@github-actions github-actions Bot added the area-crossgen2-coreclr only use for closed issues label Jun 6, 2026
@AndyAyersMS
Copy link
Copy Markdown
Member Author

@davidwrighton PTAL
fyi @dotnet/wasm-contrib

Fixes some more pri-0 test issues (case 3 here: #128234 (comment))

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts a debug-only invariant in the ReadyToRun JIT interface to account for WebAssembly’s virtual-call lowering behavior: Wasm forces virtual calls down the LDVIRTFTN path (since stub dispatch is unsupported), and those call signatures can legitimately include a hidden type parameter (e.g., for MD-array intrinsic handling).

Changes:

  • Relax Debug.Assert in the CORINFO_VIRTUALCALL_LDVIRTFTN handling to allow sig.hasTypeArg() on Wasm targets.
  • Add clarifying comments explaining why Wasm is allowed to carry a type arg and where instParamLookup is established.

@AndyAyersMS
Copy link
Copy Markdown
Member Author

We might be able to avoid this in the JIT, or scope the relaxed assert more tightly to MD array methods...

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

Labels

area-crossgen2-coreclr only use for closed issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants