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

Remove helperframe marshal #96860

Merged
merged 7 commits into from
Jan 12, 2024

Conversation

AaronRobinsonMSFT
Copy link
Member

Convert Marshal API FCalls with HelperMethodFrames into QCalls.

Convert Marshal.GetHRForException and Marshal.GetExceptionForHRInternal to QCalls.
Copy link
Member

@davidwrighton davidwrighton left a comment

Choose a reason for hiding this comment

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

OffsetOfInternal shouldn't take a field object, it should just be implemented as taking a FieldDesc* as input. Then it won't need anything to do with wonking around with the GC state at all, and can operate entirely in preemptive mode

@ghost ghost added the needs-author-action An issue or pull request that requires more info or actions from the author. label Jan 11, 2024
@ghost ghost removed the needs-author-action An issue or pull request that requires more info or actions from the author. label Jan 11, 2024
@AaronRobinsonMSFT
Copy link
Member Author

OffsetOfInternal shouldn't take a field object, it should just be implemented as taking a FieldDesc* as input. Then it won't need anything to do with wonking around with the GC state at all, and can operate entirely in preemptive mode

@davidwrighton Done.

Copy link
Member

@davidwrighton davidwrighton left a comment

Choose a reason for hiding this comment

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

Just one more nit... around unnecessary GCX_PREEMP();

src/coreclr/vm/marshalnative.cpp Outdated Show resolved Hide resolved
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.

LGTM. Thanks!

tmds pushed a commit to tmds/runtime that referenced this pull request Jan 23, 2024
* Remove HelperMethodFrames from Marshal APIs

Convert Marshal.GetHRForException and Marshal.GetExceptionForHRInternal to QCalls.

* Convert OffsetOfHelper to QCall

* Feedback

* Remove GC transition.

* Update src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.CoreCLR.cs

* Update src/coreclr/vm/marshalnative.cpp

---------

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Feb 11, 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