Re: RFR: 8330465: Stable Values and Collections (Internal) [v4]

2024-05-16 Thread Per Minborg
On Wed, 15 May 2024 15:49:22 GMT, Chen Liang wrote: >> Maybe there is a better home for this? > > I don't think we should publish this API; this will soon be phased out by > strict final fields (written only before super constructor calls) introduced > by Valhalla, as strict final fields are

Re: RFR: 8330465: Stable Values and Collections (Internal) [v4]

2024-05-15 Thread Chen Liang
On Wed, 15 May 2024 15:20:58 GMT, Per Minborg wrote: >> At some point in the future, 'jdk.unsupported' will be removed > > Maybe there is a better home for this? I don't think we should publish this API; this will soon be phased out by strict final fields (written only before super constructor

Re: RFR: 8330465: Stable Values and Collections (Internal) [v4]

2024-05-15 Thread Per Minborg
On Wed, 15 May 2024 08:53:32 GMT, ExE Boss wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revise docs for ofBackground() > > src/java.base/share/classes/jdk/internal/lang/StableValue.java line 1: > >> 1: /* > >

Re: RFR: 8330465: Stable Values and Collections (Internal) [v4]

2024-05-15 Thread Per Minborg
On Wed, 15 May 2024 12:26:34 GMT, Rémi Forax wrote: >> Given that `TrustedFieldType` is more generic than stable values, it could >> be moved to `jdk.internal.misc` or `jdk.internal.reflect`, then  >> `jdk.unsupported` could use it without exporting new packages to  >> `jdk.unsupported`. > > At

Re: RFR: 8330465: Stable Values and Collections (Internal) [v4]

2024-05-15 Thread Rémi Forax
On Wed, 15 May 2024 11:27:04 GMT, ExE Boss wrote: >>> Maybe export this interface to `jdk.unsupported`? >> >> I don't we should do that. In general, we need jdk.unsupported to go away in >> the long term. Also integrity of the platform depends on java.base being >> very stingy and not

Re: RFR: 8330465: Stable Values and Collections (Internal) [v4]

2024-05-15 Thread ExE Boss
On Wed, 15 May 2024 10:43:52 GMT, Alan Bateman wrote: >> src/java.base/share/classes/jdk/internal/lang/stable/TrustedFieldType.java >> line 14: >> >>> 12: * operations. >>> 13: */ >>> 14: public sealed interface TrustedFieldType >> >> Maybe export this interface to `jdk.unsupported`? > >>

Re: RFR: 8330465: Stable Values and Collections (Internal) [v4]

2024-05-15 Thread Alan Bateman
On Wed, 15 May 2024 08:49:46 GMT, ExE Boss wrote: > Maybe export this interface to `jdk.unsupported`? I don't we should do that. In general, we need jdk.unsupported to go away in the long term. Also integrity of the platform depends on java.base being very stingy and not exporting internal

Re: RFR: 8330465: Stable Values and Collections (Internal) [v4]

2024-05-15 Thread ExE Boss
On Wed, 15 May 2024 07:48:42 GMT, Per Minborg wrote: >> # Stable Values & Collections (Internal) >> >> ## Summary >> This PR proposes to introduce an internal _Stable Values & Collections_ API, >> which provides immutable value holders where elements are initialized _at >> most once_. Stable

Re: RFR: 8330465: Stable Values and Collections (Internal) [v4]

2024-05-15 Thread Per Minborg
> # Stable Values & Collections (Internal) > > ## Summary > This PR proposes to introduce an internal _Stable Values & Collections_ API, > which provides immutable value holders where elements are initialized _at > most once_. Stable Values & Collections offer the performance and safety >