Uh oh!
There was an error while loading. Please reload this page.
[mono][interp] Add unbox when calling valuetype method through delegate - #79445
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.
ghost
commented
Dec 9, 2022
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
|
BrzVlad
commented
Dec 9, 2022
@vargaz The new test case fails on fullaot with :
Changing to use |
vargaz
commented
Dec 9, 2022
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.
The first check was not needed ?
There was a problem hiding this comment.
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.
curia-damiano
commented
Jan 9, 2023
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