Uh oh!
There was an error while loading. Please reload this page.
[Mono] UnsafeAccessor: Support ambiguous method match - #89217
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…nd address the review feedback
Uh oh!
There was an error while loading. Please reload this page.
lambdageek
left a comment
There was a problem hiding this comment.
LGTM.
My one suggestion is to move all the unsafe accessor stuff to unsafe-accessor.c because now it doesn't depend on the loader's lookup methods.
(It would be nice to make them share, but I think this lookup stuff is kind of fragile, and if we're going to be clarifying how UnsafeAccessor method lookup is supposed to work in .net 9, we'll have to tweak it probably, anyway. So separate file is better, I think)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
fanyang-mono
commented
Jul 25, 2023
Test failures are unrelated and have been reported. |
Fixes#89098
This PR adjusted Mono's method lookup behavior for UnsafeAccessor to match with CoreCLR. It conducted two rounds of lookup.
AmbiguousMatchException.Special notes for function pointer calling convention:
If there is a single calling convention defined (i.e., Cdecl or Stdcall) then these values are not defined as custom modifiers, but instead encoded in the ECMA bits for the function pointer. They become custom modifiers, when there are more than one calling conventions defined. For example,
The corresponding IL code for methods N and M is