Replace UIntPtr with nuint on managed JIT/EE interface#120648
Merged
jkotas merged 4 commits intodotnet:mainfrom Oct 13, 2025
Merged
Replace UIntPtr with nuint on managed JIT/EE interface#120648jkotas merged 4 commits intodotnet:mainfrom
jkotas merged 4 commits intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR replaces UIntPtr with nuint throughout the managed JIT/EE interface in the CoreCLR tooling, modernizing the codebase to use the native integer type alias that was introduced in .NET 5.
Key Changes:
- Updated type mappings in the ThunkGenerator input configuration
- Replaced
UIntPtrparameters and return types withnuintin generated and manual interface code - Simplified initialization expressions by removing explicit
UIntPtrconstructors
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt | Updated type mapping configuration to use nuint instead of UIntPtr |
| src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs | Changed struct fields from UIntPtr to nuint |
| src/coreclr/tools/Common/JitInterface/CorInfoImpl_generated.cs | Updated generated method signatures and delegate types to use nuint |
| src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs | Updated manual method implementations and simplified initialization expressions |
Member
Author
|
cc @dotnet/jit-contrib |
This was referenced Oct 12, 2025
Member
|
Is there a motivation behind this change? Also, why not changing IntPtr to nint then? |
Member
Author
|
My primary motivation was to fix the managed type mapping for There are always more places where you can replace IntPtr more appropriate type... |
EgorBo
approved these changes
Oct 12, 2025
kg
reviewed
Oct 13, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.