From ff4cf7a1130be27a24468ff08f30b5a0d37ae123 Mon Sep 17 00:00:00 2001 From: Aaron R Robinson Date: Tue, 21 Oct 2025 19:59:40 -0700 Subject: [PATCH 1/3] Add documentation for Java interop types. --- .../Java/ComponentCrossReference.cs | 3 +++ .../Java/MarkCrossReferencesArgs.cs | 19 +++++++++++++++++++ .../Java/StronglyConnectedComponent.cs | 4 ++++ 3 files changed, 26 insertions(+) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/ComponentCrossReference.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/ComponentCrossReference.cs index d6fe9cf9bd3cf0..41e4d8b12d1c85 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/ComponentCrossReference.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/ComponentCrossReference.cs @@ -5,6 +5,9 @@ namespace System.Runtime.InteropServices.Java { + /// + /// Represents a cross-reference between two tracked component groups. + /// [CLSCompliant(false)] [SupportedOSPlatform("android")] [StructLayout(LayoutKind.Sequential)] diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/MarkCrossReferencesArgs.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/MarkCrossReferencesArgs.cs index 50c2ff414ada8f..a49f70aacc83dd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/MarkCrossReferencesArgs.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/MarkCrossReferencesArgs.cs @@ -5,14 +5,33 @@ namespace System.Runtime.InteropServices.Java { + /// + /// Data for the callback supplied to + /// for marking managed objects referenced from Java during cross-reference processing. + /// [CLSCompliant(false)] [SupportedOSPlatform("android")] [StructLayout(LayoutKind.Sequential)] public unsafe struct MarkCrossReferencesArgs { + /// + /// The number of strongly connected components being reported. + /// public nuint ComponentCount; + + /// + /// A pointer to the array of strongly connected components. + /// public StronglyConnectedComponent* Components; + + /// + /// The number of cross-references being reported. + /// public nuint CrossReferenceCount; + + /// + /// A pointer to the array of cross-references. + /// public ComponentCrossReference* CrossReferences; } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/StronglyConnectedComponent.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/StronglyConnectedComponent.cs index e1553ebf4824e3..2a711511c4108c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/StronglyConnectedComponent.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/StronglyConnectedComponent.cs @@ -5,6 +5,10 @@ namespace System.Runtime.InteropServices.Java { + /// + /// Represents a strongly connected component of managed objects + /// referenced for cross-reference processing. + /// [CLSCompliant(false)] [SupportedOSPlatform("android")] [StructLayout(LayoutKind.Sequential)] From e29d4256fd852694d09c86827b82c8c5866ce40f Mon Sep 17 00:00:00 2001 From: Aaron R Robinson Date: Wed, 22 Oct 2025 19:47:50 -0700 Subject: [PATCH 2/3] Remove see comment since function pointers aren;t supported. --- .../Runtime/InteropServices/Java/MarkCrossReferencesArgs.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/MarkCrossReferencesArgs.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/MarkCrossReferencesArgs.cs index a49f70aacc83dd..f873f6d1756548 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/MarkCrossReferencesArgs.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/MarkCrossReferencesArgs.cs @@ -6,7 +6,7 @@ namespace System.Runtime.InteropServices.Java { /// - /// Data for the callback supplied to + /// Data for the callback supplied to JavaMarshal.Initialize(delegate* unmanaged<MarkCrossReferencesArgs*, void>)) /// for marking managed objects referenced from Java during cross-reference processing. /// [CLSCompliant(false)] From d60249145503c42a41abf9d763cb1eab5120b1aa Mon Sep 17 00:00:00 2001 From: Aaron R Robinson Date: Thu, 23 Oct 2025 10:34:05 -0700 Subject: [PATCH 3/3] Fix reference --- .../Runtime/InteropServices/Java/MarkCrossReferencesArgs.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/MarkCrossReferencesArgs.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/MarkCrossReferencesArgs.cs index f873f6d1756548..f8878a2842fe37 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/MarkCrossReferencesArgs.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Java/MarkCrossReferencesArgs.cs @@ -6,7 +6,7 @@ namespace System.Runtime.InteropServices.Java { /// - /// Data for the callback supplied to JavaMarshal.Initialize(delegate* unmanaged<MarkCrossReferencesArgs*, void>)) + /// Data for the callback supplied to /// for marking managed objects referenced from Java during cross-reference processing. /// [CLSCompliant(false)]