Re: RFR: 8356080: Address post-integration comments for Stable Values [v4]

2025-05-13 Thread Luca Kellermann
On Tue, 13 May 2025 07:57:15 GMT, Per Minborg wrote: >> This PR proposes to address comments in the initial PR for Stable Values, >> which were deferred until after integration. >> >> Most of the efforts in this PR are to retain "stability" as long as possible >> so that views of stable collec

Re: RFR: 8356080: Address post-integration comments for Stable Values [v3]

2025-05-12 Thread Luca Kellermann
On Mon, 12 May 2025 19:53:41 GMT, Luca Kellermann wrote: >> Per Minborg has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 386 commits: >> >> - Address comments >> - Merge branch 'master'

Re: RFR: 8356080: Address post-integration comments for Stable Values [v3]

2025-05-12 Thread Luca Kellermann
On Mon, 12 May 2025 07:42:16 GMT, Per Minborg wrote: >> This PR proposes to address comments in the initial PR for Stable Values, >> which were deferred until after integration. >> >> Most of the efforts in this PR are to retain "stability" as long as possible >> so that views of stable collec

Re: RFR: 8356080: Address post-integration comments for Stable Values [v2]

2025-05-12 Thread Luca Kellermann
On Fri, 9 May 2025 14:53:59 GMT, Chen Liang wrote: >> Per Minborg has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 384 commits: >> >> - Fix an issue with toString on nested constructs >> - Merge branch 'master' into jep502-follow

Re: RFR: 8356080: Address post-integration comments for Stable Values [v3]

2025-05-12 Thread Luca Kellermann
On Mon, 12 May 2025 07:42:16 GMT, Per Minborg wrote: >> This PR proposes to address comments in the initial PR for Stable Values, >> which were deferred until after integration. >> >> Most of the efforts in this PR are to retain "stability" as long as possible >> so that views of stable collec

Re: RFR: 8354323: Safeguard SwitchBootstraps.typeSwitch when used outside the compiler

2025-05-11 Thread Luca Kellermann
On Wed, 7 May 2025 11:57:02 GMT, Aggelos Biboudis wrote: > While the compiler does not allow invalid queries to flow into > `SwitchBootstraps:typeSwitch`, a library user could do that and `typeSwitch` > does not prevent such usage pattern errors resulting in erroneous evaluation. > > For exam

Re: RFR: 8356126: Revisit CaptureCallState

2025-05-04 Thread Luca Kellermann
On Sun, 4 May 2025 22:37:21 GMT, Chen Liang wrote: > Credit to @lukellmann that the duplication arg handling in #24742 avoided > throwing exceptions but produced a wrong option. This patch fixes that and > removed stream usages in CaptureCallState to speed up bootstrap. > > Also, the previous

Re: RFR: 8355536: Create version constants to model preview language and vm features [v2]

2025-05-04 Thread Luca Kellermann
On Sun, 4 May 2025 20:29:18 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java >> line 413: >> >>> 411: * ensure the program is compatible with future Java SE releases. >>> 412: * >>> 413: * This is a reflective preview API to all

Re: RFR: 8354996: Reduce dynamic code generation for a single downcall [v3]

2025-05-04 Thread Luca Kellermann
On Mon, 28 Apr 2025 14:36:33 GMT, Chen Liang wrote: >> Perf numbers for simple main: >> Linking of `Class::forName0` down from ~152 to ~83 >> >> For calling little color management system >> https://bugs.openjdk.org/browse/JDK-8313344: >> JNI: ~45 >> baseline panama: ~164 >> patch: ~103 >> >>

Re: RFR: 8355536: Create version constants to model preview language and vm features [v2]

2025-05-04 Thread Luca Kellermann
On Sat, 3 May 2025 01:08:17 GMT, Chen Liang wrote: >> Sometimes, for version-specific feature access APIs, we wish to access the >> preview features of the current Java SE release. To reduce the impact of >> adding one preview-specific version on every site, we can add a constant >> modeling t

Re: RFR: 8351230: Collections.synchronizedList returns a list that is not thread-safe

2025-05-04 Thread Luca Kellermann
On Thu, 1 May 2025 19:05:50 GMT, Stuart Marks wrote: > Collections.synchronizedList() returns a List implementation that doesn't do > proper locking. This PR does the following on the synchronized wrapper: > > - overrides and adds locking to SequencedCollection methods; > - performs instance ma

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v78]

2025-04-25 Thread Luca Kellermann
On Fri, 25 Apr 2025 09:11:43 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/lang/StableValue.java line 389: >> >>> 387: * Invocations of {@link #setOrThrow(Object)} form a total order of >>> zero or more >>> 388: * exceptional invocations followed by zero (if the contents were >

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v78]

2025-04-24 Thread Luca Kellermann
On Thu, 24 Apr 2025 10:37:59 GMT, Per Minborg wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > Per Minborg has updated the pull request incrementally with one additional > commit since the last revision: > > Make public constuctor private src/java.base/share/classes/j

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v56]

2025-04-24 Thread Luca Kellermann
On Tue, 22 Apr 2025 11:22:52 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/util/ImmutableCollections.java line 1592: >> >>> 1590: final K k = inner.getKey(); >>> 1591: return new NullableKeyValueHolder<>(k, >>> inner.getValue().orElseSet(new

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods

2025-04-07 Thread Luca Kellermann
On Fri, 4 Apr 2025 07:20:23 GMT, Jan Lahoda wrote: > This is a PR that implements JEP: Compact Source Files and Instance Main > Methods. Changes include: > - `java.io.IO` moved to `java.lang.IO`, and no longer uses `System.console()` > to implement the methods (thanks to @stuart-marks) > - `jav

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v57]

2025-04-06 Thread Luca Kellermann
On Wed, 31 Jan 2024 10:03:23 GMT, Aggelos Biboudis wrote: >> This is the proposed patch for Primitive types in patterns, instanceof, and >> switch (Preview). >> >> Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/ > > Aggelos Biboudis has updated the pull request with a ne

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v6]

2025-03-25 Thread Luca Kellermann
On Fri, 21 Mar 2025 16:19:17 GMT, Per Minborg wrote: > > Comments on visual noise and side effects in `toString`. > > `renderWrapped` is clever for a single stable value, but it makes for a > > very noisy display string, with confusing doubly-nested `[]`, for composite > > stable values. I'm ta

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v6]

2025-03-16 Thread Luca Kellermann
On Sun, 16 Mar 2025 00:34:45 GMT, John R Rose wrote: > I see that, probably due to prior `java.util` contracts, a stable list or map > cannot present a `toString` with unset component values. A stable list or > map uses a “canned” `toString` method that calls `get`, which must force all > com

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v6]

2025-03-16 Thread Luca Kellermann
On Thu, 13 Mar 2025 15:22:43 GMT, Per Minborg wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > Per Minborg has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains 246 commits: > > - Merge branch 'master' into imple

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-13 Thread Luca Kellermann
On Thu, 13 Mar 2025 09:45:22 GMT, Per Minborg wrote: >> src/java.base/share/classes/jdk/internal/lang/stable/StableValueImpl.java >> line 128: >> >>> 126: final T newValue = supplier.get(); >>> 127: // The mutex is reentrant so we need to check if the value >>> was actu

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-13 Thread Luca Kellermann
On Wed, 12 Mar 2025 08:16:50 GMT, Per Minborg wrote: >> The nulling out is only safe if the write to the value is visible when a >> nulled-out function is visible. I think SV can ensure this, but an >> implementation can easily go wrong trying to do this. (Also `orElseSet` does >> not NPE if t

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-13 Thread Luca Kellermann
On Mon, 10 Mar 2025 18:11:23 GMT, Per Minborg wrote: > Implement JEP 502. > > The PR passes tier1-tier3 tests. src/java.base/share/classes/java/lang/StableValue.java line 79: > 77: *logger.trySet(Logger.create(Component.class)); > 78: *} > 79: * return logger.orT

Re: RFR: 8339260: Move rarely used constants out of ClassFile [v9]

2024-12-03 Thread Luca Kellermann
On Sat, 30 Nov 2024 01:09:50 GMT, Chen Liang wrote: > Can you try raise this problem in this mailing list > https://mail.openjdk.org/mailman/listinfo/classfile-api-dev? Thanks for [mentioning it on the list](https://mail.openjdk.org/pipermail/classfile-api-dev/2024-December/000613.html) and i

Re: RFR: 8345319: Fix the tag type in PoolEntry and AnnotationValue [v2]

2024-12-03 Thread Luca Kellermann
On Tue, 3 Dec 2024 16:59:19 GMT, Chen Liang wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix AnnotationDefaultTest > > Thanks for the reviews! @liach thanks :) - PR Comment: https://git.openjdk.org/

Re: RFR: 8339260: Move rarely used constants out of ClassFile [v9]

2024-11-29 Thread Luca Kellermann
On Fri, 29 Nov 2024 18:59:41 GMT, Chen Liang wrote: >>> Yet I think we can consider promoting Constant Pool tag from byte or char, >>> short, or int to represent a u1 in case it goes over 127. >> >> Is there any chance a change like this could make it into JDK 24? I'd >> imagine it would be to

Re: RFR: 8339260: Move rarely used constants out of ClassFile [v9]

2024-11-29 Thread Luca Kellermann
On Mon, 7 Oct 2024 17:37:40 GMT, Luca Kellermann wrote: > Yet I think we can consider promoting Constant Pool tag from byte or char, > short, or int to represent a u1 in case it goes over 127. Is there any chance a change like this could make it into JDK 24? I'd imagine it would

Re: RFR: 8334714: Implement JEP 484: Class-File API [v9]

2024-11-29 Thread Luca Kellermann
On Fri, 15 Nov 2024 11:53:00 GMT, Adam Sotona wrote: >> Class-File API is leaving preview. >> This is a removal of all `@PreviewFeature` annotations from Class-File API. >> It also bumps all `@since` tags and removes >> `jdk.internal.javac.PreviewFeature.Feature.CLASSFILE_API`. >> >> Please rev

Re: RFR: 8314480: Memory ordering spec updates in java.lang.ref [v35]

2024-10-09 Thread Luca Kellermann
On Fri, 31 May 2024 18:33:39 GMT, Brent Christian wrote: >> Classes in the `java.lang.ref` package would benefit from an update to bring >> the spec in line with how the VM already behaves. The changes would focus on >> _happens-before_ edges at some key points during reference processing. >>

Re: RFR: 8339260: Move rarely used constants out of ClassFile [v9]

2024-10-07 Thread Luca Kellermann
On Mon, 7 Oct 2024 17:07:47 GMT, Chen Liang wrote: > Your example is an exact antipattern from our data-oriented model: we would > want users to check the object type with `instanceof` (should be `is` in > kotlin) instead of checking these constants. I'm aware, this was just the first example

Re: RFR: 8339260: Move rarely used constants out of ClassFile [v9]

2024-10-07 Thread Luca Kellermann
On Wed, 2 Oct 2024 20:24:41 GMT, Chen Liang wrote: > First, some bit of history. These API methods are added before those > constants, and this patch did not change the type of these methods or > constants. Sure, makes sense to separate this patch from a potential type change of the methods/c

Re: RFR: 8339260: Move rarely used constants out of ClassFile [v9]

2024-10-02 Thread Luca Kellermann
On Tue, 24 Sep 2024 17:23:41 GMT, Chen Liang wrote: >> Many constants are cluttered in `ClassFile`. However, only a few of them are >> ever used by regular users, most notably `ACC_` flags and `JAVA_X_VERSION` >> constants. All other constants are specific and should live in more local >> loca