Skip to content

Conversation

@davidwrighton
Copy link
Member

  • When boxing to a floating point value, ensure that the stack value has the correct type
  • When boxing to a native int or uint, if the stack value is I4 and we're on a 64bit platform, sign-extend the I4 before boxing
  • When stack's merge convert to the target stack type instead of blindly copying.

- When boxing to a floating point value, ensure that the stack value has the correct type
- When boxing to a native int or uint, if the stack value is I4 and we're on a 64bit platform, sign-extend the I4 before boxing
- When stack's merge convert to the target stack type instead of blindly copying.
Copilot AI review requested due to automatic review settings November 3, 2025 20:17
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 3, 2025
Copy link
Contributor

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 adds implicit type conversions for floating-point and integer types in the CoreCLR interpreter to handle mismatches between stack types and expected types. The changes ensure proper conversion when values need to be converted between float/double types or between int32/nint on 64-bit platforms.

Key changes:

  • Enhanced basic block edge variable move logic to handle type conversions
  • Added implicit conversions before boxing operations to match expected types
  • Includes support for float/double conversions and int32/nint conversions on 64-bit platforms

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo the copilot comment that sounds valid.

@jkotas jkotas added area-CodeGen-Interpreter-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Nov 3, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @BrzVlad, @janvorli, @kg
See info in area-owners.md if you want to be subscribed.

@davidwrighton
Copy link
Member Author

/ba-g infra issues and failures unrelated to the change

@davidwrighton davidwrighton merged commit b1cb4c5 into dotnet:main Nov 5, 2025
80 of 92 checks passed
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.

4 participants