Skip to content
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

Merged
merged 2 commits into from
Jul 22, 2020

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Jul 22, 2020

No description provided.

@jkotas
Copy link
Member Author

jkotas commented Jul 22, 2020

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.

Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT left a 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.

@AaronRobinsonMSFT
Copy link
Member

AaronRobinsonMSFT commented Jul 22, 2020

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.

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?

@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 5.0.0 milestone Jul 22, 2020
@jkotas
Copy link
Member Author

jkotas commented Jul 22, 2020

What is the process for consuming Roslyn updates?

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

@AaronRobinsonMSFT
Copy link
Member

@jkotas Sounds good. I would suggest then either you or I proactively handle moving to the latest Roslyn when it gets checked in.

@333fred if you could let @jkotas or myself know when the the updates are in Roslyn main that would be helpful.

@jkoritzinsky
Copy link
Member

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.

@jkotas
Copy link
Member Author

jkotas commented Jul 22, 2020

One more place to use function pointers is in the tail call dispatcher

That one is fixed already :-)

@AaronRobinsonMSFT
Copy link
Member

@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 */));
Copy link
Member

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.

@jkotas jkotas merged commit 1d0eb4b into dotnet:master Jul 22, 2020
@jkotas jkotas deleted the more-function-pointers branch July 22, 2020 14:27
Jacksondr5 pushed a commit to Jacksondr5/runtime that referenced this pull request Aug 10, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
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.

5 participants