-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[clr-interp] Fix more issues implicit conversions #121319
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
[clr-interp] Fix more issues implicit conversions #121319
Conversation
davidwrighton
commented
Nov 3, 2025
- 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.
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 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
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.
LGTM modulo the copilot comment that sounds valid.
Co-authored-by: Copilot <[email protected]>
|
Tagging subscribers to this area: @BrzVlad, @janvorli, @kg |
…avidwrighton/runtime into more_implicit_conversion_stuff
|
/ba-g infra issues and failures unrelated to the change |