-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[mono][interp] Add unbox when calling valuetype method through delegate #79445
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
Conversation
If we are calling an open instance delegate, where the target method is on a valuetype, we will need to unbox this pointer.
If we are calling a method of a valuetype, then we already know `this` pointer is an instantiation of a valuetype.
|
Tagging subscribers to this area: @BrzVlad Issue DetailsIf we are calling an open instance delegate, where the target method is on a valuetype, we will need to unbox Fixes #79354
|
|
@vargaz The new test case fails on fullaot with :
Changing to use |
|
It can be disabled, full aot can't handle some open delegate scenarios. |
|
|
||
| // replace the MonoDelegate* on the stack with 'this' pointer | ||
| if (m_class_is_valuetype (this_arg->vtable->klass) && m_class_is_valuetype (cmethod->method->klass)) { | ||
| if (m_class_is_valuetype (cmethod->method->klass)) { |
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.
The first check was not needed ?
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.
To me it seems redundant. I can't think why it would be needed. If you can think on why it would be wrong let me know. I don't plan to backport this part of the change though.
|
Hi all, |
If we are calling an open instance delegate, where the target method is on a valuetype, we will need to unbox
thispointer.Fixes #79354