Skip to content

[Wasm RyuJit] fix local type encoding#124137

Merged
AndyAyersMS merged 1 commit intodotnet:mainfrom
AndyAyersMS:WasmFixTypeEncoding
Feb 8, 2026
Merged

[Wasm RyuJit] fix local type encoding#124137
AndyAyersMS merged 1 commit intodotnet:mainfrom
AndyAyersMS:WasmFixTypeEncoding

Conversation

@AndyAyersMS
Copy link
Member

Order needs to match the enum order in WasmValueType.

Copilot AI review requested due to automatic review settings February 8, 2026 02:37
@github-actions github-actions bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 8, 2026
@AndyAyersMS
Copy link
Member Author

@dotnet/jit-contrib PTAL

Copy link
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 fixes WASM local type encoding in the CoreCLR JIT emitter by aligning the WasmValueType → WASM binary type-code lookup table order with the WasmValueType enum order.

Changes:

  • Reordered typecode_mapping in GetWasmValueTypeCode to match WasmValueType enum values.
  • Updated inline comments to reflect the corrected enum-to-index mapping.

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

@adamperlin adamperlin left a comment

Choose a reason for hiding this comment

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

This looks good to me, thank you for fixing this!

@AndyAyersMS
Copy link
Member Author

AndyAyersMS commented Feb 8, 2026

Failure is unrelated, looks like a GC issue on arm32

  Starting:    System.Linq.Tests (parallel test collections = on [2 threads], stop on fail = off)
    System.Linq.Tests.SelectTests.Overflow [SKIP]
      Condition(s) not met: "IsStressModeEnabled"
ASSERT FAILED
	Expression: !CREATE_CHECK_STRING(pMT && pMT->Validate())
	Location:   /__w/1/s/src/coreclr/vm/object.cpp:548
	Function:   ValidateInner
	Process:    34

Opened #124153

@AndyAyersMS
Copy link
Member Author

/ba-g unrelated gc issue

@AndyAyersMS AndyAyersMS merged commit 245fbff into dotnet:main Feb 8, 2026
130 of 134 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants