[mono] Check if type is compatible right before emitting box#101509
[mono] Check if type is compatible right before emitting box#101509fanyang-mono merged 1 commit intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @lambdageek, @steveisok |
|
@fanyang-mono Let's include these changes in the PR that is adding the tests. I will include them. |
I suggest holding on doing that until CI qualification is clear here. |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
@fanyang-mono I thought these changes were going to be included with the tests? |
Do you mean the ByRefLike tests that you created in your PR, which uncovered this issue? |
|
@fanyang-mono Yes. That was the point of the following comment - #101509 (comment). It is also why I included them in the PR. Having all this together is helpful when trying to understand PRs and fixes. |
Yeah that's a good point. Will do next time. |
Currently, mono checks if type is compatible right after entering the world of handling
box. However, there are many scenarios when the box could be optimized away. This PR moves the type compatible check to right before emittingbox, whenboxis indeed needed.This issue was uncovered by #101458