Repository navigation
Preserve later array dimensions in managed ILAsm - #137439
Merged
jkoritzinsky merged 3 commits intoNov 14, 2026
Merged
jkoritzinsky merged 3 commits into
jkoritzinsky merged 3 commits into
Conversation
Zero-fill size and lower-bound gaps through the last specified dimension, matching native ILAsm array-shape metadata. Add exact signature regression coverage for mixed specified and unspecified dimensions. Co-authored-by: Copilot App <[email protected]>
|
Azure Pipelines: Successfully started running 4 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @dotnet/jit-contrib |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The array-shape encoding fix has no active review issues blocking approval.
No open issues 🎉
What changed in this PR
This PR fixes managed ILAsm array-shape encoding so unspecified dimensions no longer cause later sizes or lower bounds to be omitted, aligning the output with native ILAsm.
Changes:
- Encode sizes and lower bounds through their respective last specified dimension, zero-filling intervening gaps.
- Add 12 metadata regression cases covering leading, middle, and trailing gaps, explicit zero sizes, and negative lower bounds.
| File | Description |
|---|---|
src/tools/ilasm/tests/ILAssembler.Tests/TypeSignatureTests.cs |
Adds exact array-shape metadata assertions for 12 boundary cases. |
src/tools/ilasm/src/ILAssembler/Actions/GrammarActions.Signatures.Types.cs |
Preserves later array dimensions by computing each prefix through its last specified entry. |
Review effort: Balanced
jkotas
reviewed
Nov 12, 2026
Co-authored-by: Copilot App <[email protected]>
jkoritzinsky
enabled auto-merge (squash)
November 12, 2026 19:44
jkotas
approved these changes
Nov 12, 2026
3 tasks
Open
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
.\dotnet.cmd build src\tools\ilasm\src\ILAssembler\ILAssembler.csproj -p:NuGetAudit=false— passed for net10.0, net11.0, and net472..\dotnet.cmd test src\tools\ilasm\tests\ILAssembler.Tests\ILAssembler.Tests.csproj -p:NuGetAudit=false— passed 5,323 tests on each of net10.0 and net11.0; six new cases failed per framework before the fix..\dotnet.cmd vstest artifacts\bin\ILCompiler.TypeSystem.Tests\x64\Debug\ILCompiler.TypeSystem.Tests.dll— passed all 356 tests with the unchanged IL fixture reassembled by the patched managed compiler.Resolves #137435
Note
This pull request was generated with GitHub Copilot.