Skip to content

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Oct 12, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings October 12, 2025 18:03
Copy link
Contributor

@Copilot 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 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 UIntPtr parameters and return types with nuint in generated and manual interface code
  • Simplified initialization expressions by removing explicit UIntPtr constructors

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

@jkotas
Copy link
Member Author

jkotas commented Oct 12, 2025

cc @dotnet/jit-contrib

@EgorBo
Copy link
Member

EgorBo commented Oct 12, 2025

Is there a motivation behind this change? Also, why not changing IntPtr to nint then?

@jkotas
Copy link
Member Author

jkotas commented Oct 12, 2025

My primary motivation was to fix the managed type mapping for size_t that I have noticed when reviewing earlier PR.

There are always more places where you can replace IntPtr more appropriate type...

@jkotas jkotas merged commit f9dc66b into dotnet:main Oct 13, 2025
110 of 112 checks passed
@jkotas jkotas deleted the uintptr branch October 13, 2025 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants