-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Reflection Invoke share more coreclr/mono #60270
Reflection Invoke share more coreclr/mono #60270
Conversation
Tagging subscribers to this area: @buyaa-n Issue DetailsWork to reuse error handling between coreclr/mono for Reflection.Invoke scenarios.
|
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
Outdated
Show resolved
Hide resolved
/cc @lambdageek @vargaz |
src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs
Outdated
Show resolved
Hide resolved
src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.cs
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs
Show resolved
Hide resolved
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.
Mono LGTM
…hare # Conflicts: # src/mono/mono/metadata/icall.c # src/mono/mono/metadata/object.c
@steveharter and @buyaa-n Any further thoughts on this change? |
src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.cs
Outdated
Show resolved
Hide resolved
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
if (has_byref_nullables) { | ||
/* | ||
* The runtime invoke wrapper already converted byref nullables back, | ||
* and stored them in pa, we just need to copy them back to the | ||
* managed array. | ||
*/ | ||
for (i = 0; i < mono_array_length_internal (params); i++) { | ||
MonoType *t = sig->params [i]; | ||
|
||
if (m_type_is_byref (t) && t->type == MONO_TYPE_GENERICINST && mono_class_is_nullable (mono_class_from_mono_type_internal (t))) | ||
mono_array_setref_internal (params, i, pa [i]); | ||
} |
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.
@AaronRobinsonMSFT oops, I think this caused #67269
Work to reuse error handling between coreclr/mono for Reflection.Invoke scenarios.
Fixes mono/mono#14962
Fixes mono/mono#14993
Fixes mono/mono#14998
/cc @jkoritzinsky @elinor-fung