Skip to content

Conversation

davidwrighton
Copy link
Member

  • Add a new helper for the re-abstraction case when the JIT detects an issue
  • In the late bound case, instead of producing an error directly, produce an IL stub and have it make the virtual stub dispatch call itself, this will fall back to the JIT implementation for re-abstraction
  • Tweak the late bound case to also actively detect the AmbiguousMatchException case as well and use the same helper there as well.

Fixes #71414

@MichalStrehovsky
Copy link
Member

The issue to block the test on for NativeAOT is #72589. It didn't make sense to implement if CoreCLR proper doesn't implement it.

case DynamicMethodDesc::StubWrapperDelegate: return "IL_STUB_WrapperDelegate_Invoke";
case DynamicMethodDesc::StubTailCallStoreArgs: return "IL_STUB_StoreTailCallArgs";
case DynamicMethodDesc::StubTailCallCallTarget: return "IL_STUB_CallTailCallTarget";
case DynamicMethodDesc::StubVirtualStaticMethodDispatch: return "IL_STUB_bVirtualStaticMethodDispatch";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit - is the lowercase 'b' after IL_STUB_ intentional or just a typo?

Copy link
Member

@trylek trylek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me, thanks David!

@davidwrighton
Copy link
Member Author

Only failing issue not flagged by BuildAnalysis as known is #88870 which simply isn't being detected correctly by the BuildAnalysis stuff.

@davidwrighton davidwrighton merged commit 52a3995 into dotnet:main Jul 14, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Static virtual reabstraction doesn't seem to work
3 participants