-
Couldn't load subscription status.
- Fork 5.2k
Replace UIntPtr with nuint on managed JIT/EE interface #120648
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
Conversation
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 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 |
|
cc @dotnet/jit-contrib |
|
Is there a motivation behind this change? Also, why not changing IntPtr to nint then? |
|
My primary motivation was to fix the managed type mapping for There are always more places where you can replace IntPtr more appropriate type... |
No description provided.