-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add InlineArrayX types #113403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add InlineArrayX types #113403
Conversation
Closes #111973. Implements the API as proposed.
|
Note regarding the |
|
Note regarding the |
There was a problem hiding this 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 introduces a set of InlineArrayX types (from InlineArray2 to InlineArray15) as proposed to support optimized inline array storage.
- Added new InlineArrayX structs in both implementation and reference assemblies
- Added tests verifying element assignment and access across the new inline array types
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/CompilerServices/InlineArrayTests.cs | Added tests covering basic indexing operations for each InlineArray type |
| src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/InlineArray.cs | Implemented InlineArrayX structs with the InlineArray attribute |
| src/libraries/System.Runtime/ref/System.Runtime.cs | Updated reference definitions to include the new InlineArrayX types |
Comments suppressed due to low confidence (1)
src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/CompilerServices/InlineArrayTests.cs:12
- Consider adding tests for out-of-range index access to ensure that the InlineArray types throw appropriate exceptions or handle invalid indices as expected.
public void InlineArray2Test()
src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/InlineArray.cs
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/InlineArray.cs
Show resolved
Hide resolved
...ystem.Runtime/tests/System.Runtime.Tests/System/Runtime/CompilerServices/InlineArrayTests.cs
Outdated
Show resolved
Hide resolved
|
Thanks |
src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/InlineArray.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
|
/ba-g net timeouts |
Description
Closes #111973. Implements the API as proposed.