-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[NativeAOT] Objective-C: SetMessageSendPendingException and SetMessageSendCallback #77956
[NativeAOT] Objective-C: SetMessageSendPendingException and SetMessageSendCallback #77956
Conversation
This also has the effect of making the src/tests/Interop/ObjectiveC/AutoReleaseTest/ test pass.
...eclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/InteropHelpers.cs
Outdated
Show resolved
Hide resolved
...eclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/InteropHelpers.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The compiler side looks good to me otherwise, thanks!
I'd need to read up more about this APIs to sign off on Corelib so I hope someone more qualified reviews that.
...eclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/InteropHelpers.cs
Outdated
Show resolved
Hide resolved
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/PInvokeMethodFixupNode.cs
Outdated
Show resolved
Hide resolved
* Deduplicate constants by moving them to RuntimeConstants.cs * Move the macOS specific parts of InteropHelpers to a separate file * Move knowledge of Objective-C out of type system files
...eclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/InteropHelpers.cs
Show resolved
Hide resolved
src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj
Outdated
Show resolved
Hide resolved
...eclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/InteropHelpers.cs
Outdated
Show resolved
Hide resolved
…ime/CompilerHelpers/InteropHelpers.cs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you!
This implements
SetMessageSendPendingException
andSetMessageSendCallback
together, as the tests use both features together.When using a NativeAOT-compatible remote executor (see dotnet/arcade#11460 ), the tests in src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests.
Also, by settings the
FEATURE_OBJCMARSHAL
define and theFeatureObjCMarshal
property, thesrc/tests/Interop/ObjectiveC/AutoReleaseTest/
test now passes.Related issue: #77472