Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v18]

2023-03-21 Thread Adam Sotona
> jdk.jlink internal plugins are heavily using ASM > > This patch converts ASM calls to Classfile API. > > Please review. > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: improved exception message as suggested -

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v14]

2023-03-21 Thread Adam Sotona
On Tue, 21 Mar 2023 11:54:38 GMT, Adam Sotona wrote: >> Yes, I think so. If `java -XX:+UnlockDiagnosticVMOptions >> -XX:+BytecodeVerificationLocal -version` doesn't fail and you've run all the >> tests then it should be okay to drop it. > > I can confirm `java -XX:+UnlockDiagnosticVMOptions >

Re: RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally

2023-03-21 Thread Jaikiran Pai
On Tue, 21 Mar 2023 15:08:33 GMT, Viktor Klang wrote: >> If there isn't any value running this test with a debug build then you could >> have it skip (`@requires vm.debug == false`) to save resources. >> (fixed typo in original message) > > @AlanBateman Wouldn't that be `@requires vm.debug == fa

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v17]

2023-03-21 Thread Adam Sotona
> jdk.jlink internal plugins are heavily using ASM > > This patch converts ASM calls to Classfile API. > > Please review. > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: Apply suggestions from code review Co-aut

Integrated: 8304502: Classfile API class hierarchy makes assumptions when class is not resolved

2023-03-21 Thread Adam Sotona
On Mon, 20 Mar 2023 11:15:52 GMT, Adam Sotona wrote: > Classfile API class hierarchy makes assumptions when class is not resolved > and that may lead to silent generation of invalid stack maps. Only > debug-level log information of case is actually provided. > > Proposed patch throws IllegalAr

Re: RFR: 8304031: Classfile API cannot encode Primitive Class as Condy

2023-03-21 Thread Chen Liang
On Mon, 13 Mar 2023 08:13:44 GMT, Chen Liang wrote: > Without this patch, the Classfile API tries to encode PrimitiveClassDesc as > CONSTANT_Class_info and error in `toInternalName`. Seems this bug exists in `ConstantPoolBuilder::constantValueEntry` as well. - PR Comment: https://

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v12]

2023-03-21 Thread ExE Boss
On Fri, 17 Mar 2023 17:01:43 GMT, Adam Sotona wrote: >> jdk.jlink internal plugins are heavily using ASM >> >> This patch converts ASM calls to Classfile API. >> >> Please review. >> Thanks, >> Adam > > Adam Sotona has updated the pull request with a new target base due to a > merge or a rebas

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v12]

2023-03-21 Thread ExE Boss
On Fri, 17 Mar 2023 17:30:41 GMT, Mandy Chung wrote: >> Adam Sotona has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 220 commits: >> >> - Merge branch 'master' into JDK-8294972-jlink-plugins >> - SystemModulesPlugin::genClassByte

Re: RFR: 8302818: Optimize wrapper sets and immutable sets of Enums [v5]

2023-03-21 Thread Tingjun Yuan
On Tue, 21 Feb 2023 03:39:46 GMT, Tingjun Yuan wrote: >> Currently, the two subclasses of `java.util.EnumSet` optimize bulk >> operations when the argument is also a `EnumSet`, but there is no such >> optimization for wrapper sets (returned by `Collections.unmodifiableSet`, >> `Collections.syn

Re: RFR: 8302818: Optimize wrapper sets and immutable sets of Enums [v7]

2023-03-21 Thread Tingjun Yuan
> Currently, the two subclasses of `java.util.EnumSet` optimize bulk operations > when the argument is also a `EnumSet`, but there is no such optimization for > wrapper sets (returned by `Collections.unmodifiableSet`, > `Collections.synchronizedSet`, etc.) and immutable sets (returned by `Set.of

Re: RFR: 8302818: Optimize wrapper sets and immutable sets of Enums [v6]

2023-03-21 Thread Tingjun Yuan
> Currently, the two subclasses of `java.util.EnumSet` optimize bulk operations > when the argument is also a `EnumSet`, but there is no such optimization for > wrapper sets (returned by `Collections.unmodifiableSet`, > `Collections.synchronizedSet`, etc.) and immutable sets (returned by `Set.of

Re: RFR: 8302818: Optimize wrapper sets and immutable sets of Enums [v5]

2023-03-21 Thread Claes Redestad
On Tue, 21 Feb 2023 03:39:46 GMT, Tingjun Yuan wrote: >> Currently, the two subclasses of `java.util.EnumSet` optimize bulk >> operations when the argument is also a `EnumSet`, but there is no such >> optimization for wrapper sets (returned by `Collections.unmodifiableSet`, >> `Collections.syn

Re: RFR: 8302818: Optimize wrapper sets and immutable sets of Enums [v5]

2023-03-21 Thread Chen Liang
On Tue, 21 Feb 2023 03:39:46 GMT, Tingjun Yuan wrote: >> Currently, the two subclasses of `java.util.EnumSet` optimize bulk >> operations when the argument is also a `EnumSet`, but there is no such >> optimization for wrapper sets (returned by `Collections.unmodifiableSet`, >> `Collections.syn

Re: RFR: 8302818: Optimize wrapper sets and immutable sets of Enums [v5]

2023-03-21 Thread Chen Liang
On Tue, 21 Feb 2023 03:39:46 GMT, Tingjun Yuan wrote: >> Currently, the two subclasses of `java.util.EnumSet` optimize bulk >> operations when the argument is also a `EnumSet`, but there is no such >> optimization for wrapper sets (returned by `Collections.unmodifiableSet`, >> `Collections.syn

Re: RFR: 8302818: Optimize wrapper sets and immutable sets of Enums [v5]

2023-03-21 Thread Tingjun Yuan
On Tue, 21 Feb 2023 03:39:46 GMT, Tingjun Yuan wrote: >> Currently, the two subclasses of `java.util.EnumSet` optimize bulk >> operations when the argument is also a `EnumSet`, but there is no such >> optimization for wrapper sets (returned by `Collections.unmodifiableSet`, >> `Collections.syn

Re: RFR: 8294977: Convert test/jdk/java tests from ASM library to Classfile API [v7]

2023-03-21 Thread Chen Liang
> Summaries: > 1. A few recommendations about updating the constant API is made at > https://mail.openjdk.org/pipermail/classfile-api-dev/2023-March/000233.html > and I may update this patch shall the API changes be integrated before > 2. One ASM library-specific test, `LambdaAsm` is removed. Oth

Re: RFR: 8304691: Remove jlink --post-process-path option

2023-03-21 Thread Mandy Chung
On Tue, 21 Mar 2023 20:39:38 GMT, Ian Graves wrote: > Removing the hidden `jlink --post-process-path` option. The localized resource bundles for other languages are updated together in bulk toward the end of the release. `plugins_xx.properties` can be kept unchanged and let them updated by t

Re: RFR: 8304691: Remove jlink --post-process-path option

2023-03-21 Thread Mandy Chung
On Tue, 21 Mar 2023 20:39:38 GMT, Ian Graves wrote: > Removing the hidden `jlink --post-process-path` option. I expect `JlinkTask::postProcessImage` and `Jlink::postProcess` to be removed. - PR Review: https://git.openjdk.org/jdk/pull/13126#pullrequestreview-1351401366

RFR: 8304691: Remove jlink --post-process-path option

2023-03-21 Thread Ian Graves
Removing the hidden `jlink --post-process-path` option. - Commit messages: - Removing Post Processing functionality Changes: https://git.openjdk.org/jdk/pull/13126/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13126&range=00 Issue: https://bugs.openjdk.org/browse/JDK-830

Re: RFR: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream

2023-03-21 Thread Sergey Tsypanov
On Tue, 21 Mar 2023 15:41:13 GMT, Per Minborg wrote: > This PR proposed to lazily initialize the scratch arrays only if/when needed. Nice idea. Just wonder could we do the same for `BufferedInputStream`? - PR Comment: https://git.openjdk.org/jdk/pull/13121#issuecomment-1478546070

Re: RFR: 8303930: Fix ConstantUtils.skipOverFieldSignature void case return value [v3]

2023-03-21 Thread Chen Liang
> This typo doesn't allow creation of malformed ClassDesc or MethodTypeDesc, > but it produces an erroneous exception on certain inputs. Running > `java.lang.constant.MethodTypeDesc.ofDescriptor("(I[[[V)I")` in Jshell > 19.0.2 throws StringIndexOutOfBoundsException, and throws > IllegalArgu

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v10]

2023-03-21 Thread Mandy Chung
On Tue, 21 Mar 2023 18:38:06 GMT, Mandy Chung wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Alan's suggestions - don't parse arch out of osname-arch for determining >> endianness and reduce the number of support

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v10]

2023-03-21 Thread Mandy Chung
On Mon, 20 Mar 2023 14:21:55 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which proposes to fix the issue >> reported in https://bugs.openjdk.org/browse/JDK-8206890? >> >> The `jlink` command allows a `--endian` option to specify the byte order in >> the generated imag

Re: RFR: 8303923: ZipOutStream::putEntry should include an apiNote to indicate that the STORED compression method should be used when writing directory entries [v3]

2023-03-21 Thread Eirik Bjorsnos
On Tue, 21 Mar 2023 18:21:31 GMT, Lance Andersen wrote: > Thank you for making the changes. I think this looks better. > > I go back and forth as to whether to include the sentence regarding > performance but I think it is OK. Let's see if anyone else has thoughts prior > to finalizing the CSR

Re: RFR: 8303923: ZipOutStream::putEntry should include an apiNote to indicate that the STORED compression method should be used when writing directory entries [v3]

2023-03-21 Thread Lance Andersen
On Sun, 19 Mar 2023 14:50:41 GMT, Eirik Bjorsnos wrote: >> ZipOutputStream currently writes directory entries using the DEFLATED >> compression method. This does not strictly comply with the APPNOTE.TXT >> specification and is also about 10x slower than using the STORED compression >> method.

Re: RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v2]

2023-03-21 Thread Quan Anh Mai
On Tue, 21 Mar 2023 16:29:44 GMT, Paul Sandoz wrote: >> I have moved most of the methods to `AbstractVector` and `AbstractShuffle`, >> I have to resort to raw types, though, since there seems to be no way to do >> the same with wild cards, and the generics mechanism is not powerful enough >> f

Re: RFR: 8297605: DelayQueue javadoc is confusing [v2]

2023-03-21 Thread Martin Buchholz
> Inviting @DougLea and @viktorklang-ora to review. > > As usual, I couldn't resist more fiddling. > - Added missing tests for take, remove(), remove(Object). > - Improved DelayQueueTest's testing infrastructure > - added more test assertions > - linkified new javadoc definitions Martin Buchhol

Re: RFR: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream

2023-03-21 Thread Eirik Bjorsnos
On Tue, 21 Mar 2023 15:41:13 GMT, Per Minborg wrote: > This PR proposed to lazily initialize the scratch arrays only if/when needed. Looks like `DataInputStream.readUTF` could benefit from using `JavaLangAccess.countPositives` and return early for the common case that all bytes are ASCII. Food

Re: RFR: 8302818: Optimize wrapper sets and immutable sets of Enums [v5]

2023-03-21 Thread Pavel Rappo
On Tue, 21 Mar 2023 15:23:53 GMT, Claes Redestad wrote: > An alternative design which would avoid adding more classes could be to add > package-private accessors to the existing `Unmodifiable/Synchronized` wrapper > classes so that `EnumSet/-Map` can retrieve the underlying set of an > unmodif

Re: RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v2]

2023-03-21 Thread Paul Sandoz
On Tue, 21 Mar 2023 16:11:50 GMT, Quan Anh Mai wrote: > Apart from the mask implementation, shuffle implementation definitely has to > take into consideration the element type. Yes, the way you have implemented shuffle is tightly connected, that looks ok. I am wondering if we can make the mask

Re: RFR: 8288730: Add type parameter to Lookup::accessClass and Lookup::ensureInitialized [v2]

2023-03-21 Thread Mandy Chung
On Tue, 21 Mar 2023 12:28:22 GMT, Chen Liang wrote: >> Parameterizes `Lookup::accessClass` and `Lookup::ensureInitialized`. Updated >> an applicable use-site within JDK to benefit from this patch. > > Chen Liang has updated the pull request incrementally with one additional > commit since the l

Re: RFR: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream

2023-03-21 Thread Brian Burkhalter
On Tue, 21 Mar 2023 15:41:13 GMT, Per Minborg wrote: > This PR proposed to lazily initialize the scratch arrays only if/when needed. src/java.base/share/classes/java/io/DataInputStream.java line 64: > 62: * working arrays initialized on demand by readUTF > 63: */ > 64: private byt

Re: RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v2]

2023-03-21 Thread Paul Sandoz
On Tue, 21 Mar 2023 16:11:50 GMT, Quan Anh Mai wrote: > I have moved most of the methods to `AbstractVector` and `AbstractShuffle`, I > have to resort to raw types, though, since there seems to be no way to do the > same with wild cards, and the generics mechanism is not powerful enough for >

Re: RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v2]

2023-03-21 Thread Paul Sandoz
On Tue, 21 Mar 2023 10:18:19 GMT, Quan Anh Mai wrote: > Note that generics are erased, so from the VM point of view, a > `VectorMask` and a `VectorMask` is indifferent. Yes, that's the easy bit :-) The mask implementation is specialized by the species of vectors it operates on, but does it hav

Integrated: 8304139: Add and method constants to ConstantDescs

2023-03-21 Thread Chen Liang
On Tue, 14 Mar 2023 14:30:32 GMT, Chen Liang wrote: > Add String constants INIT_NAME, CLASS_INIT_NAME, MTD_void for the names and > method type of instance and class initializers, as they are frequently used > in the Classfile API. In addition, they appear frequently in the JDK itself > as wel

Re: RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v2]

2023-03-21 Thread Quan Anh Mai
On Sun, 19 Mar 2023 19:38:04 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch reimplements `VectorShuffle` implementations to be a vector of >> the bit type. Currently, VectorShuffle is stored as a byte array, and would >> be expanded upon usage. This poses several drawbacks: >> >> 1. Ineffic

Re: RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v2]

2023-03-21 Thread Paul Sandoz
On Sun, 19 Mar 2023 19:38:04 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch reimplements `VectorShuffle` implementations to be a vector of >> the bit type. Currently, VectorShuffle is stored as a byte array, and would >> be expanded upon usage. This poses several drawbacks: >> >> 1. Ineffic

Re: RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v3]

2023-03-21 Thread Quan Anh Mai
> Hi, > > This patch reimplements `VectorShuffle` implementations to be a vector of the > bit type. Currently, VectorShuffle is stored as a byte array, and would be > expanded upon usage. This poses several drawbacks: > > 1. Inefficient conversions between a shuffle and its corresponding vector

Re: RFR: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream

2023-03-21 Thread Eirik Bjorsnos
On Tue, 21 Mar 2023 15:41:13 GMT, Per Minborg wrote: > This PR proposed to lazily initialize the scratch arrays only if/when needed. Looks good. Many DataInputStreams probably never read UTF. (Not a reviewer) src/java.base/share/classes/java/io/DataInputStream.java line 576: > 574: cha

RFR: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream

2023-03-21 Thread Per Minborg
This PR proposed to lazily initialize the scratch arrays only if/when needed. - Commit messages: - Remove redundant initilizers - Lazily initialize (byte, char)arr in java.io.DataInputStream Changes: https://git.openjdk.org/jdk/pull/13121/files Webrev: https://webrevs.openjdk.org/

Re: RFR: 8302818: Optimize wrapper sets and immutable sets of Enums [v5]

2023-03-21 Thread Claes Redestad
On Tue, 21 Feb 2023 03:39:46 GMT, Tingjun Yuan wrote: >> Currently, the two subclasses of `java.util.EnumSet` optimize bulk >> operations when the argument is also a `EnumSet`, but there is no such >> optimization for wrapper sets (returned by `Collections.unmodifiableSet`, >> `Collections.syn

Re: RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally

2023-03-21 Thread Viktor Klang
On Tue, 21 Mar 2023 11:56:57 GMT, Alan Bateman wrote: >> test/jdk/java/util/concurrent/CompletableFuture/CompletableFutureOrTimeoutExceptionallyTest.java >> line 28: >> >>> 26: * @bug 8303742 >>> 27: * @summary CompletableFuture.orTimeout can leak memory if completed >>> exceptionally >>> 28

Integrated: 8304180: Constant Descriptors for MethodHandles::classData and classDataAt

2023-03-21 Thread Chen Liang
On Wed, 15 Mar 2023 02:18:37 GMT, Chen Liang wrote: > Add Constant Descriptors for DirectMethodHandleDesc of > MethodHandles::classData and classDataAt in ConstantDescs. This facilitates > easier access of class data via condy in Classfile API-generated bytecode. > Most other constant bootstra

Re: RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally

2023-03-21 Thread Viktor Klang
On Tue, 21 Mar 2023 11:02:00 GMT, Jaikiran Pai wrote: >> Improves the stability of the memory leak test for CompletableFuture timeout >> cancellation by both reducing the count by 50% (which should still be above >> threshold to trigger given the ample margin set initially) as well as >> exten

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v46]

2023-03-21 Thread Maurizio Cimadamore
On Tue, 21 Mar 2023 13:31:37 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Tidy javadoc >> - Rename StringTemplate classes > > src/java.base/share/classes/java/lang/StringTemplate.java

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v46]

2023-03-21 Thread Maurizio Cimadamore
On Mon, 20 Mar 2023 20:31:46 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalu

Re: RFR: 8302818: Optimize wrapper sets and immutable sets of Enums [v5]

2023-03-21 Thread -
Hello Stuart Marks, would you be able to take a look at this patch, improving performance of enum-only immutable collections, as you are the primary engineer in this area? On Mon, Feb 20, 2023 at 9:40 PM Tingjun Yuan wrote: > > > Currently, the two subclasses of `java.util.EnumSet` optimize bulk

Re: RFR: 8301552: Use AtomicReferenceArray for caching instead of CHM in ZoneOffset [v8]

2023-03-21 Thread Chen Liang
On Tue, 21 Mar 2023 07:25:38 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/time/ZoneOffset.java line 430: >> >>> 428: public static ZoneOffset ofTotalSeconds(int totalSeconds) { >>> 429: final class Holder { >>> 430: private static final IntFunction >>> ZON

Re: RFR: 8301552: Use AtomicReferenceArray for caching instead of CHM in ZoneOffset [v8]

2023-03-21 Thread Chen Liang
On Tue, 21 Mar 2023 07:29:49 GMT, Per Minborg wrote: >> It can. I think either works fine. Maybe a bit nicer with a method reference >> as you propose. > > Perhaps you mean the method could be *replaced* with `Integer::valueOf"? Good > suggestion. Yes, `Integer::valueOf` is a better replacemen

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Per Minborg
On Tue, 21 Mar 2023 09:02:29 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8266571: Sequenced Collections

2023-03-21 Thread Chen Liang
On Tue, 8 Feb 2022 17:23:38 GMT, Stuart Marks wrote: > PR for Sequenced Collections implementation. I am interested in the optimization potential of `arraylist.reversed().addAll()` and similar batch operations. Though reverse list/deque views are a good start, I still wish to see customized i

Re: RFR: 8288730: Add type parameter to Lookup::accessClass and Lookup::ensureInitialized

2023-03-21 Thread Chen Liang
On Sat, 11 Mar 2023 03:28:16 GMT, Chen Liang wrote: > Parameterizes `Lookup::accessClass` and `Lookup::ensureInitialized`. Updated > an applicable use-site within JDK to benefit from this patch. Based on the feedback in the CSR, updated the return spec for `accessClass` to indicate the input `

Re: RFR: 8288730: Add type parameter to Lookup::accessClass and Lookup::ensureInitialized [v2]

2023-03-21 Thread Chen Liang
> Parameterizes `Lookup::accessClass` and `Lookup::ensureInitialized`. Updated > an applicable use-site within JDK to benefit from this patch. Chen Liang has updated the pull request incrementally with one additional commit since the last revision: Update return spec to indicate the same targ

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Maurizio Cimadamore
On Tue, 21 Mar 2023 00:54:10 GMT, Paul Sandoz wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add example for Option::captureStateLayout > > src/java.base/share/classes/java/lang/foreign/Linker.java line 621: > >>

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Maurizio Cimadamore
On Tue, 21 Mar 2023 11:58:28 GMT, Per Minborg wrote: >> I'm not sure about this. Honestly, the example probably doesn't help much if >> somebody didn't get the idea of what the layout might be. I think it might >> be better to say something like, `on Windows/x64 the returned layout might >> be

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Per Minborg
On Tue, 21 Mar 2023 09:54:16 GMT, Maurizio Cimadamore wrote: >> I've added an example of how to print the platform-dependent structure. >> Should we document anyhow? > > I'm not sure about this. Honestly, the example probably doesn't help much if > somebody didn't get the idea of what the layo

Re: RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally

2023-03-21 Thread Alan Bateman
On Tue, 21 Mar 2023 11:02:00 GMT, Jaikiran Pai wrote: >> Improves the stability of the memory leak test for CompletableFuture timeout >> cancellation by both reducing the count by 50% (which should still be above >> threshold to trigger given the ample margin set initially) as well as >> exten

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v14]

2023-03-21 Thread Adam Sotona
On Tue, 21 Mar 2023 11:31:54 GMT, Alan Bateman wrote: >> It seems to be redundant as the following code does not expect it on stack >> and loads it again as needed. > > Yes, I think so. If `java -XX:+UnlockDiagnosticVMOptions > -XX:+BytecodeVerificationLocal -version` doesn't fail and you've ru

Re: RFR: JDK-8304028: Port fdlibm IEEEremainder to Java

2023-03-21 Thread Andrey Turbanov
On Tue, 21 Mar 2023 06:11:57 GMT, Joe Darcy wrote: > Last but not least, a port of fdlibm IEEEremainder from C to Java. I plan to > write some more implementation-specific tests around decision points in the > FDLIBM algorithm, but I wanted to get the bulk of the changes out for review > first

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v14]

2023-03-21 Thread Alan Bateman
On Tue, 21 Mar 2023 09:10:05 GMT, Adam Sotona wrote: >> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java >> line 1021: >> >>> 1019: MethodTypeDesc.of(CD_void, >>> CD_String)) >>> 1020:.astore(BUILDER_VAR

Re: RFR: JDK-8304028: Port fdlibm IEEEremainder to Java

2023-03-21 Thread Andrey Turbanov
On Tue, 21 Mar 2023 06:11:57 GMT, Joe Darcy wrote: > Last but not least, a port of fdlibm IEEEremainder from C to Java. I plan to > write some more implementation-specific tests around decision points in the > FDLIBM algorithm, but I wanted to get the bulk of the changes out for review > first

Re: RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally

2023-03-21 Thread Jaikiran Pai
On Tue, 21 Mar 2023 10:42:55 GMT, Viktor Klang wrote: > Improves the stability of the memory leak test for CompletableFuture timeout > cancellation by both reducing the count by 50% (which should still be above > threshold to trigger given the ample margin set initially) as well as > extending

RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally

2023-03-21 Thread Viktor Klang
Improves the stability of the memory leak test for CompletableFuture timeout cancellation by both reducing the count by 50% (which should still be above threshold to trigger given the ample margin set initially) as well as extending the default timeout of the test run. - Commit mes

Re: RFR: 8304502: Classfile API class hierarchy makes assumptions when class is not resolved [v2]

2023-03-21 Thread Adam Sotona
On Tue, 21 Mar 2023 09:45:56 GMT, Jaikiran Pai wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update >> src/java.base/share/classes/jdk/internal/classfile/impl/ClassHierarchyImpl.java >> >> Co-authored-by: li

Re: RFR: 8304502: Classfile API class hierarchy makes assumptions when class is not resolved [v3]

2023-03-21 Thread Jaikiran Pai
On Tue, 21 Mar 2023 10:40:35 GMT, Adam Sotona wrote: >> Classfile API class hierarchy makes assumptions when class is not resolved >> and that may lead to silent generation of invalid stack maps. Only >> debug-level log information of case is actually provided. >> >> Proposed patch throws Ille

Re: RFR: 8304502: Classfile API class hierarchy makes assumptions when class is not resolved [v3]

2023-03-21 Thread Adam Sotona
> Classfile API class hierarchy makes assumptions when class is not resolved > and that may lead to silent generation of invalid stack maps. Only > debug-level log information of case is actually provided. > > Proposed patch throws IllegalArgumentException when the class is not resolved > inste

Re: RFR: JDK-8295859 Update Manual Test Groups [v2]

2023-03-21 Thread Mahendra Chhipa
On Mon, 20 Mar 2023 23:29:25 GMT, Bill Huang wrote: >> The purpose of this task is to add the difference between -manual jdk_core >> and jdk_core_manual to the jdk_core_manual test goal. Furthermore, in order >> to streamline the manual test execution process, a new test group called >> jdk_co

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v16]

2023-03-21 Thread Adam Sotona
> jdk.jlink internal plugins are heavily using ASM > > This patch converts ASM calls to Classfile API. > > Please review. > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: removed obsolete instruction from SystemModule

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Maurizio Cimadamore
On Tue, 21 Mar 2023 09:02:29 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Maurizio Cimadamore
On Tue, 21 Mar 2023 08:57:42 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/lang/foreign/Linker.java line 621: >> >>> 619: * to a downcall handle linked with {@link >>> #captureCallState(String...)}} >>> 620: * >>> 621: * @see #captureCallState(S

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Maurizio Cimadamore
On Tue, 21 Mar 2023 00:35:40 GMT, Paul Sandoz wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add example for Option::captureStateLayout > > src/java.base/share/classes/java/lang/foreign/Linker.java line 479: > >>

Re: RFR: 8304502: Classfile API class hierarchy makes assumptions when class is not resolved [v2]

2023-03-21 Thread Jaikiran Pai
On Mon, 20 Mar 2023 14:06:43 GMT, Adam Sotona wrote: >> Classfile API class hierarchy makes assumptions when class is not resolved >> and that may lead to silent generation of invalid stack maps. Only >> debug-level log information of case is actually provided. >> >> Proposed patch throws Ille

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v14]

2023-03-21 Thread Adam Sotona
On Mon, 20 Mar 2023 19:53:29 GMT, Alan Bateman wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed SystemModulesClassGenerator.moduleInfos comment > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/S

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v15]

2023-03-21 Thread Adam Sotona
> jdk.jlink internal plugins are heavily using ASM > > This patch converts ASM calls to Classfile API. > > Please review. > Thanks, > Adam Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 223 commits: - Merge branch 'mas

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Per Minborg
On Tue, 21 Mar 2023 00:54:10 GMT, Paul Sandoz wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add example for Option::captureStateLayout > > src/java.base/share/classes/java/lang/foreign/Linker.java line 621: > >>

Integrated: 8303648: Add String.indexOf(String str, int beginIndex, int endIndex)

2023-03-21 Thread Raffaello Giulietti
On Tue, 7 Mar 2023 14:44:32 GMT, Raffaello Giulietti wrote: > As a followup of [JDK-8302590](https://bugs.openjdk.org/browse/JDK-8302590), > this issue covers the analogous case for a search of a string rather than a > character. This pull request has now been integrated. Changeset: 4bf1fbb0

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v4]

2023-03-21 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v4]

2023-03-21 Thread Per Minborg
On Tue, 21 Mar 2023 00:52:01 GMT, Paul Sandoz wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improve Linker javadocs > > src/java.base/share/classes/java/lang/foreign/Linker.java line 609: > >> 607: * @se

Re: RFR: 8205129: Remove java.lang.Compiler

2023-03-21 Thread Eirik Bjorsnos
On Sun, 19 Mar 2023 09:01:26 GMT, Eirik Bjorsnos wrote: > Please help review this PR which suggests we remove the class > `java.lang.Compiler`. The class seems non-functional for a decade, and was > terminally deprecated in Java 9. Time has come to let it go. The CSR for the removal of `java.l

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v3]

2023-03-21 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v2]

2023-03-21 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8301552: Use AtomicReferenceArray for caching instead of CHM in ZoneOffset [v8]

2023-03-21 Thread Per Minborg
On Mon, 20 Mar 2023 18:12:01 GMT, Chen Liang wrote: >> Per Minborg has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - Remove unused setup method >> - Rename method in test >> - Add copyright header > > src/java.base/share/classes/java

Re: RFR: 8301552: Use AtomicReferenceArray for caching instead of CHM in ZoneOffset [v8]

2023-03-21 Thread Per Minborg
On Tue, 21 Mar 2023 07:27:59 GMT, Per Minborg wrote: >> test/jdk/jdk/internal/util/LazyReferenceArray/BasicLazyReferenceArrayTest.java >> line 107: >> >>> 105: >>> 106: private static IntFunction intIdentity() { >>> 107: return i -> i; >> >> Can't this be `Integer::valueOf`? > > I