Skip to content

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();

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 <[email protected]>
@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