-
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
Use function pointers in more places #39752
Conversation
I know that these will need minor updates once we get Roslyn with the final syntax. Given how effective using the function pointers in our own libraries was in shaking corner case bugs, I think it is worth it. |
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 as long as we are okay updating this when we take a Roslyn compiler update. Seems like it would be less annoying to wait, but I love seeing the deleted code.
src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreCLR.cs
Show resolved
Hide resolved
Okay. What is the process for consuming Roslyn updates? I would hate for some CI to be blocked on this and people not knowing why for too long. Can one of us be proactive in shepherding that change? |
It shows up as Arcade SDK update by default. It is also possible to pick up a new Roslyn explicitly, without waiting for the Arcade SDK update, for example: https://github.com/dotnet/runtime/pull/36104/files#diff-8b8f08ffbf7b863fb3700c1718eeb4cbR22 |
One more place to use function pointers is in the tail call dispatcher. It's currently an IL stub because it needed calli support. It should be convertable to C# pretty easily now. |
That one is fixed already :-) |
@jkoritzinsky I was looking for tail call change too: #38938 |
out excepInfo, | ||
out argErr); | ||
var pfnIDispatchInvoke = (delegate* stdcall<IntPtr, int, Guid*, int, ushort, ComTypes.DISPPARAMS*, Variant*, ExcepInfo*, uint*, int>) | ||
(*(*(void***)dispatchPointer + 6 /* IDispatch.Invoke slot */)); |
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.
This might be one of the most terrifying lines of code I've ever seen.
No description provided.