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

Low level API support for Objective-C interop. #52146

Merged

Conversation

AaronRobinsonMSFT
Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT commented Apr 30, 2021

Implements approved API in #44659 (comment).
Add support for HNDTYPE_REFCOUNTED GC handle type under specific FEATURE_ defines.

Fixes #44659

/cc @VSadov @Maoni0 @jkotas @jkoritzinsky @elinor-fung @rolfbjarne @lambdageek @davidwrighton @janvorli

jkoritzinsky and others added 30 commits January 25, 2021 12:11
* Add ComWrappers CMake feature flag
Split interoplibinterface for comwrappers and objc
Create pattern for QCalls

* Feedback and SAL.
Merge in latest .NET 6 development branch
Remove System.Runtime.InteropServices.ObjectiveC.Wrappers and associated classes
Remove System.Runtime.InteropServices.ObjectiveC.Wrappers and associated classes
…ibute.

Discover attribute during type load and set bit.
Update EagerFinalizer callout to query bit.
…pServices/ObjectiveC/Bridge.cs

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Expose the refcounted GCHandle from the Objective-C interop layer
the stack prior to control leaving the runtime.
The new callbacks now fire when before the GC scans handles and is
non-concurrent.
@AaronRobinsonMSFT
Copy link
Member Author

/azp run runtime

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@Maoni0 Maoni0 left a comment

Choose a reason for hiding this comment

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

the rest LGTM!

rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this pull request May 12, 2021
We need additional API in CoreCLR to support toggle refs properly, and this is
in progress [1]. In the meantime, stub out parts of it, so that the process
doesn't abort. This way we'll have failing tests instead (and work in other
areas can progress, since the process doesn't abort).

[1]: dotnet/runtime#52146
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this pull request May 12, 2021
We need additional API in CoreCLR to support pending exception properly, and
this is in progress [1]. In the meantime, stub out parts of it, so that the
process doesn't abort. This way we'll have failing tests instead (and work in
other areas can progress, since the process doesn't abort).

[1]: dotnet/runtime#52146
Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

The exception handling stuff looks good modulo the comment.

Copy link
Member

@VSadov VSadov left a comment

Choose a reason for hiding this comment

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

PInvoke overriders and GC callbacks LGTM.

rolfbjarne added a commit to dotnet/macios that referenced this pull request May 12, 2021
We need additional API in CoreCLR to support toggle refs properly, and this is
in progress [1]. In the meantime, stub out parts of it, so that the process
doesn't abort. This way we'll have failing tests instead (and work in other
areas can progress, since the process doesn't abort).

[1]: dotnet/runtime#52146
rolfbjarne added a commit to dotnet/macios that referenced this pull request May 13, 2021
…11521)

We need additional API in CoreCLR to support pending exception properly, and
this is in progress [1]. In the meantime, stub out parts of it, so that the
process doesn't abort. This way we'll have failing tests instead (and work in
other areas can progress, since the process doesn't abort).

[1]: dotnet/runtime#52146
@AaronRobinsonMSFT AaronRobinsonMSFT merged commit c1e7ca8 into dotnet:main May 13, 2021
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the feature/objc-interop-prototype branch May 13, 2021 19:04
@filipnavara
Copy link
Member

Thanks! Happy to see this done! 🎉

@ghost ghost locked as resolved and limited conversation to collaborators Jun 12, 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.

Low level API support for Objective-C scenarios
10 participants