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

Make the ZLib P/Invokes all blittable #53968

Merged

Conversation

AaronRobinsonMSFT
Copy link
Member

While prototyping a DllImport source generator it was observed the ZLib P/Invokes can all be converted to be blittable and thus inlinable during JIT.

/cc @elinor-fung

@ghost
Copy link

ghost commented Jun 10, 2021

Tagging subscribers to this area: @carlossanlop
See info in area-owners.md if you want to be subscribed.

Issue Details

While prototyping a DllImport source generator it was observed the ZLib P/Invokes can all be converted to be blittable and thus inlinable during JIT.

/cc @elinor-fung

Author: AaronRobinsonMSFT
Assignees: -
Labels:

area-System.IO.Compression

Milestone: 6.0.0

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

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

Thanks.

@omariom
Copy link
Contributor

omariom commented Jun 10, 2021

What makes them blittable?
The usage of pointers instead of refs so that pinning can be avoided?

@stephentoub
Copy link
Member

What makes them blittable? The usage of pointers instead of refs

Yes, a pointer is blittable, a managed reference is not.

@AaronRobinsonMSFT AaronRobinsonMSFT merged commit c40ddeb into dotnet:main Jun 10, 2021
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the make_pinvokes_blittable branch June 10, 2021 21:58
@ghost ghost locked as resolved and limited conversation to collaborators Jul 10, 2021
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