[clr-interp] Fix more issues implicit conversions#121319
Merged
davidwrighton merged 4 commits intodotnet:mainfrom Nov 5, 2025
Merged
[clr-interp] Fix more issues implicit conversions#121319davidwrighton merged 4 commits intodotnet:mainfrom
davidwrighton merged 4 commits intodotnet:mainfrom
Conversation
Member
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.
Contributor
There was a problem hiding this comment.
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
janvorli
approved these changes
Nov 3, 2025
Member
janvorli
left a comment
There was a problem hiding this comment.
LGTM modulo the copilot comment that sounds valid.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
|
Tagging subscribers to this area: @BrzVlad, @janvorli, @kg |
This was referenced Nov 4, 2025
Open
BrzVlad
reviewed
Nov 4, 2025
…avidwrighton/runtime into more_implicit_conversion_stuff
Member
Author
|
/ba-g infra issues and failures unrelated to the change |
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.