Skip to content

Remove HELPER_METHOD_FRAMEs from built-in marshalers #97432

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

Merged
merged 19 commits into from
Feb 9, 2024

Conversation

jkoritzinsky
Copy link
Member

The built-in marshalers that were implemented in native code used FCalls. Change them to use QCalls or (in the case of some simple methods that don't marshal and the ICustomMarshaler marshaler), move the implementation to managed code.

@jkoritzinsky jkoritzinsky force-pushed the helper-method-frame-removal branch from 2fab541 to 5e59fc9 Compare January 24, 2024 01:29
…or marshalers that already have the state type defined in managed code.
@jkoritzinsky jkoritzinsky marked this pull request as ready for review February 8, 2024 00:26
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 when green.

Co-authored-by: Aaron Robinson <arobins@microsoft.com>

BASEARRAYREF arrayRef = (BASEARRAYREF) *pManagedHome;
BASEARRAYREF arrayRef = NULL;
GCPROTECT_BEGIN(arrayRef);
Copy link
Member

@jkotas jkotas Feb 8, 2024

Choose a reason for hiding this comment

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

Nit: You do not need to GCPROTECT the copy of arg in situations like this. It is cheaper to do pManagedHome.Get multiple times instead.

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thank you!

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
@jkoritzinsky
Copy link
Member Author

Failures are known. Merging this in.

@jkoritzinsky jkoritzinsky merged commit 50371d3 into dotnet:main Feb 9, 2024
@jkoritzinsky jkoritzinsky deleted the helper-method-frame-removal branch February 9, 2024 03:03
@github-actions github-actions bot locked and limited conversation to collaborators Mar 10, 2024
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.

4 participants