Re: RFR: 8300237: Minor improvements in MethodHandles [v4]

2023-01-17 Thread Sergey Tsypanov
On Tue, 17 Jan 2023 22:28:50 GMT, Claes Redestad wrote: >> Sergey Tsypanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Merge map() calls > > src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 6752: > >> 6750:

Re: RFR: 8292635: Improve CDSHeapVerifier testing [v2]

2023-01-17 Thread David Holmes
On Tue, 17 Jan 2023 17:40:33 GMT, Calvin Cheung wrote: >> Moving the `ArchivedEnumTest.java` from `runtime/cds/appcds/cacheObject` to >> `jdk/internal/misc/CDS` so that the test will be run in jdk-tier1. This is >> to avoid inadvertently breakage of the test like in JDK-8292499. >> >>

Re: RFR: 8203035: Implement equals() and hashCode() for Throwable

2023-01-17 Thread Stuart Marks
On Sat, 10 Dec 2022 18:11:30 GMT, Victor Toni wrote: > Being able to compare instances of Throwable allows simple detection of > exceptions raised by the same circumstances. Comparison allows for reduction > of excessive logging e.g. in hotspots without requiring custom code to > compare

Re: RFR: 8300169: Build failure with clang-15

2023-01-17 Thread Jie Fu
On Tue, 17 Jan 2023 18:12:44 GMT, Phil Race wrote: > client changes are OK by me. Thanks @prrace . - PR: https://git.openjdk.org/jdk/pull/12005

Re: RFR: 8300356: Refactor code examples to use @snippet in java.text.CollationElementIterator

2023-01-17 Thread Naoto Sato
On Tue, 17 Jan 2023 23:14:53 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for > [java.text.CollationElementIterator](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationElementIterator.html). > > Code examples using

Re: RFR: 8300356: Refactor code examples to use @snippet in java.text.CollationElementIterator

2023-01-17 Thread Naoto Sato
On Tue, 17 Jan 2023 23:15:26 GMT, Justin Lu wrote: >> This PR implements _JEP 413: Code Snippets in Java API Documentation_ for >> [java.text.CollationElementIterator](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationElementIterator.html). >> >> Code examples

Re: RFR: 8300169: Build failure with clang-15

2023-01-17 Thread Jie Fu
v. 2023 ? 17:55, Alan Bateman a ?crit : > > -- next part -- An HTML attachment was scrubbed... > URL: > <https://mail.openjdk.org/pipermail/build-dev/attachments/20230117/4dc50b9b/attachment.htm> - PR: https://git.openjdk.org/jdk/pull/12005

Re: RFR: 8300356: Refactor code examples to use @snippet in java.text.CollationElementIterator

2023-01-17 Thread Justin Lu
On Tue, 17 Jan 2023 23:14:53 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for > [java.text.CollationElementIterator](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationElementIterator.html). > > Code examples using

RFR: 8300356: Refactor code examples to use @snippet in java.text.CollationElementIterator

2023-01-17 Thread Justin Lu
This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.CollationElementIterator](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/CollationElementIterator.html). Code examples using ... blocks are replaced with the @ snippet syntax where

Re: RFR: 8300307: Refactor code examples to use @snippet in java.text.DateFormat

2023-01-17 Thread Naoto Sato
On Tue, 17 Jan 2023 22:35:54 GMT, Justin Lu wrote: > This PR implements JEP 413: Code Snippets in Java API Documentation for > [java.text.DateFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/DateFormat.html). > > Code examples using ... blocks are replaced with

Re: RFR: 8300308: java.text.MessageFormat has incorrect doc comment

2023-01-17 Thread Lance Andersen
On Tue, 17 Jan 2023 22:44:29 GMT, Justin Lu wrote: > A code example for text.MessageFormat under the **Usage Information** section > has a comment with the wrong variable name. > > > * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); > * // result now equals {new String("z")} > >

Re: RFR: 8300307: Refactor code examples to use @snippet in java.text.DateFormat

2023-01-17 Thread Iris Clark
On Tue, 17 Jan 2023 22:35:54 GMT, Justin Lu wrote: > This PR implements JEP 413: Code Snippets in Java API Documentation for > [java.text.DateFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/DateFormat.html). > > Code examples using ... blocks are replaced with

Re: RFR: 8300208: Optimize Adler32 stub for AVX-512 targets.

2023-01-17 Thread Vladimir Kozlov
On Tue, 17 Jan 2023 17:24:20 GMT, Jatin Bhateja wrote: > Patch optimizes Adler32 stub for AVX512 target. > > Main computation loop now uses zero extended lane widening load vector > operation. > > New sequence also honors AVX3Thresholds so that implementation uses existing > AVX2 instruction

Re: RFR: 8300308: java.text.MessageFormat has incorrect doc comment

2023-01-17 Thread Naoto Sato
On Tue, 17 Jan 2023 22:44:29 GMT, Justin Lu wrote: > A code example for text.MessageFormat under the **Usage Information** section > has a comment with the wrong variable name. > > > * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); > * // result now equals {new String("z")} > >

RFR: 8300308: java.text.MessageFormat has incorrect doc comment

2023-01-17 Thread Justin Lu
A code example for text.MessageFormat under the **Usage Information** section has a comment with the wrong variable name. * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); * // result now equals {new String("z")} The name of the intended variable should be `objs`, not `result`

RFR: 8300307: Refactor code examples to use @snippet in java.text.DateFormat

2023-01-17 Thread Justin Lu
This PR implements JEP 413: Code Snippets in Java API Documentation for [java.text.DateFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/DateFormat.html). Code examples using ... blocks are replaced with the @ snippet syntax where applicable. Additionally,

Re: RFR: 8300307: Refactor code examples to use @snippet in java.text.DateFormat

2023-01-17 Thread Lance Andersen
On Tue, 17 Jan 2023 22:35:54 GMT, Justin Lu wrote: > This PR implements JEP 413: Code Snippets in Java API Documentation for > [java.text.DateFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/DateFormat.html). > > Code examples using ... blocks are replaced with

Re: RFR: 8300308: java.text.MessageFormat has incorrect doc comment [v2]

2023-01-17 Thread Justin Lu
On Tue, 17 Jan 2023 22:00:29 GMT, Justin Lu wrote: >> A code example for text.MessageFormat under the **Usage Information** >> section has a comment with the wrong variable name. >> >> >> * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); >> * // result now equals {new String("z")}

Re: RFR: 8300237: Minor improvements in MethodHandles [v4]

2023-01-17 Thread Claes Redestad
On Tue, 17 Jan 2023 21:24:34 GMT, Sergey Tsypanov wrote: >> - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()` >> when we don't need a copy >> - comparison of two lists can be done without `Stream.reduce()` > > Sergey Tsypanov has updated the pull request incrementally

Integrated: JDK-8300321: Use link tags in javax.sql.rowset package-info

2023-01-17 Thread Joe Darcy
On Tue, 17 Jan 2023 21:29:15 GMT, Joe Darcy wrote: > In the course of some other work (JDK-8300133), I noticed some cases where > the javadoc in the package-info file for javax.sql.rowset used HTML links > where a more readable javadoc link tag would suffice. This pull request has now been

Re: RFR: JDK-8300321: Use link tags in javax.sql.rowset package-info

2023-01-17 Thread Iris Clark
On Tue, 17 Jan 2023 21:29:15 GMT, Joe Darcy wrote: > In the course of some other work (JDK-8300133), I noticed some cases where > the javadoc in the package-info file for javax.sql.rowset used HTML links > where a more readable javadoc link tag would suffice. Marked as reviewed by iris

Re: RFR: JDK-8300321: Use link tags in javax.sql.rowset package-info

2023-01-17 Thread Lance Andersen
On Tue, 17 Jan 2023 21:29:15 GMT, Joe Darcy wrote: > In the course of some other work (JDK-8300133), I noticed some cases where > the javadoc in the package-info file for javax.sql.rowset used HTML links > where a more readable javadoc link tag would suffice. Marked as reviewed by lancea

Re: RFR: 8300237: Minor improvements in MethodHandles [v4]

2023-01-17 Thread Sergey Tsypanov
> - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()` > when we don't need a copy > - comparison of two lists can be done without `Stream.reduce()` Sergey Tsypanov has updated the pull request incrementally with one additional commit since the last revision: Merge

Re: RFR: 8300237: Minor improvements in MethodHandles [v3]

2023-01-17 Thread Sergey Tsypanov
On Tue, 17 Jan 2023 20:51:06 GMT, Rémi Forax wrote: >> Sergey Tsypanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Polishing > > src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 59: > >> 57: import

Re: RFR: 8300308: java.text.MessageFormat has incorrect doc comment [v2]

2023-01-17 Thread Justin Lu
> A code example for text.MessageFormat under the **Usage Information** section > has a comment with the wrong variable name. > > > * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); > * // result now equals {new String("z")} > > > The name of the intended variable should be

Withdrawn: 8300308: java.text.MessageFormat has incorrect doc comment

2023-01-17 Thread Justin Lu
On Tue, 17 Jan 2023 21:28:23 GMT, Justin Lu wrote: > A code example for text.MessageFormat under the **Usage Information** section > has a comment with the wrong variable name. > > > * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); > * // result now equals {new String("z")} > >

Re: RFR: 8300308: java.text.MessageFormat has incorrect doc comment

2023-01-17 Thread Naoto Sato
On Tue, 17 Jan 2023 21:28:23 GMT, Justin Lu wrote: > A code example for text.MessageFormat under the **Usage Information** section > has a comment with the wrong variable name. > > > * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); > * // result now equals {new String("z")} > >

[jdk20] RFR: 8300275: SegmentScope.isAccessibleBy returning incorrect values

2023-01-17 Thread Maurizio Cimadamore
The implementation of MemorySessionImpl::isAccessibleBy is incorrect, and ends up always returning `false` for scopes associated with shared arenas. This patch rectifies that, and adds some tests. - Commit messages: - Fix bug in MemorySessionImpl::isAccessibleBy Changes:

RFR: 8300308: java.text.MessageFormat has incorrect doc comment

2023-01-17 Thread Justin Lu
A code example for text.MessageFormat under the **Usage Information** section has a comment with the wrong variable name. * Object[] objs = mf.parse(forParsing, new ParsePosition(0)); * // result now equals {new String("z")} The name of the intended variable should be `objs`, not `result`

RFR: JDK-8300321: Use link tags in javax.sql.rowset package-info

2023-01-17 Thread Joe Darcy
In the course of some other work (JDK-8300133), I noticed some cases where the javadoc in the package-info file for javax.sql.rowset used HTML links where a more readable javadoc link tag would suffice. - Commit messages: - JDK-8300321: Use link tags in javax.sql.rowset

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v21]

2023-01-17 Thread Claes Redestad
On Tue, 17 Jan 2023 20:55:08 GMT, Claes Redestad wrote: >> Continuing the work initiated by @luhenry to unroll and then intrinsify >> polynomial hash loops. >> >> I've rewired the library changes to route via a single `@IntrinsicCandidate` >> method. To make this work I've harmonized how they

Integrated: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops

2023-01-17 Thread Claes Redestad
On Tue, 25 Oct 2022 10:37:40 GMT, Claes Redestad wrote: > Continuing the work initiated by @luhenry to unroll and then intrinsify > polynomial hash loops. > > I've rewired the library changes to route via a single `@IntrinsicCandidate` > method. To make this work I've harmonized how they are

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v22]

2023-01-17 Thread Claes Redestad
> Continuing the work initiated by @luhenry to unroll and then intrinsify > polynomial hash loops. > > I've rewired the library changes to route via a single `@IntrinsicCandidate` > method. To make this work I've harmonized how they are invoked so that > there's less special handling and

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v20]

2023-01-17 Thread Claes Redestad
On Tue, 17 Jan 2023 18:46:00 GMT, Vladimir Ivanov wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> trailing ws > > src/hotspot/share/opto/machnode.cpp line 211: > >> 209: opcnt++; //

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v21]

2023-01-17 Thread Claes Redestad
> Continuing the work initiated by @luhenry to unroll and then intrinsify > polynomial hash loops. > > I've rewired the library changes to route via a single `@IntrinsicCandidate` > method. To make this work I've harmonized how they are invoked so that > there's less special handling and

Re: RFR: 8300237: Minor improvements in MethodHandles [v3]

2023-01-17 Thread Rémi Forax
On Tue, 17 Jan 2023 18:07:37 GMT, Sergey Tsypanov wrote: >> - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()` >> when we don't need a copy >> - comparison of two lists can be done without `Stream.reduce()` > > Sergey Tsypanov has updated the pull request incrementally

Integrated: 8300093: Refactor code examples to use @snippet in java.text.MessageFormat

2023-01-17 Thread Justin Lu
On Fri, 13 Jan 2023 21:47:40 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for > [java.text.MessageFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/class-use/MessageFormat.html). > > Code examples using ... blocks

Re: RFR: 8300093: Refactor code examples to use @snippet in java.text.MessageFormat

2023-01-17 Thread Naoto Sato
On Tue, 17 Jan 2023 19:24:09 GMT, Naoto Sato wrote: >> This PR implements _JEP 413: Code Snippets in Java API Documentation_ for >> [java.text.MessageFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/class-use/MessageFormat.html). >> >> Code examples using ...

Re: RFR: 8300093: Refactor code examples to use @snippet in java.text.MessageFormat

2023-01-17 Thread Naoto Sato
On Fri, 13 Jan 2023 21:47:40 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for > [java.text.MessageFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/class-use/MessageFormat.html). > > Code examples using ... blocks

Re: RFR: 8300093: Refactor code examples to use @snippet in java.text.MessageFormat

2023-01-17 Thread Naoto Sato
On Fri, 13 Jan 2023 21:47:40 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for > [java.text.MessageFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/class-use/MessageFormat.html). > > Code examples using ... blocks

Re: RFR: 8206890: jlink --endian XXX generates unusable image if endian-ness does not match architecture

2023-01-17 Thread Mandy Chung
On Wed, 11 Jan 2023 13:19:32 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 image.

Re: RFR: 8292635: Improve CDSHeapVerifier testing [v2]

2023-01-17 Thread Ioi Lam
On Tue, 17 Jan 2023 17:40:33 GMT, Calvin Cheung wrote: >> Moving the `ArchivedEnumTest.java` from `runtime/cds/appcds/cacheObject` to >> `jdk/internal/misc/CDS` so that the test will be run in jdk-tier1. This is >> to avoid inadvertently breakage of the test like in JDK-8292499. >> >>

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v20]

2023-01-17 Thread Vladimir Ivanov
On Mon, 16 Jan 2023 23:28:37 GMT, Claes Redestad wrote: >> Continuing the work initiated by @luhenry to unroll and then intrinsify >> polynomial hash loops. >> >> I've rewired the library changes to route via a single `@IntrinsicCandidate` >> method. To make this work I've harmonized how they

Re: RFR: 8300259: Add test coverage for processing of pending block files in signed JARs [v2]

2023-01-17 Thread Eirik Bjorsnos
On Tue, 17 Jan 2023 18:15:21 GMT, Alan Bateman wrote: >> Eirik Bjorsnos has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Make it more clear in the @summary tag that it is the block file that is >> pending, not the signature file >> -

Re: RFR: 8300259: Add test coverage for processing of pending block files in signed JARs [v2]

2023-01-17 Thread Eirik Bjorsnos
> This PR adds test coverage for pending block files in signed JAR files > > A signed JAR has pending block files if the block file [RSA, DSA, EC] comes > before the corresponding signature file [SF] in the JAR. > > JarVerifier.processEntry supports processing of such pending block files, but

Integrated: 8300011: Refactor code examples to use @snippet in java.util.TimeZone

2023-01-17 Thread Justin Lu
On Wed, 11 Jan 2023 23:41:46 GMT, Justin Lu wrote: > This PR implements JEP 413: Code Snippets in Java API Documentation for > _[java.util.TimeZone](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/TimeZone.html)_. > > Code examples using ... blocks are replaced with

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v18]

2023-01-17 Thread iaroslavski
On Wed, 9 Nov 2022 21:06:50 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run is a single >> element >> - minor

Re: RFR: 8300259: Add test coverage for processing of pending block files in signed JARs

2023-01-17 Thread Alan Bateman
On Mon, 16 Jan 2023 11:44:36 GMT, Eirik Bjorsnos wrote: > This PR adds test coverage for pending block files in signed JAR files > > A signed JAR has pending block files if the block file [RSA, DSA, EC] comes > before the corresponding signature file [SF] in the JAR. > >

Re: RFR: 8300169: Build failure with clang-15

2023-01-17 Thread Phil Race
On Sat, 14 Jan 2023 14:28:32 GMT, Jie Fu wrote: > Hi all, > > Please review the fix for the build failure with clang-15. > > 1. -Wbitwise-instead-of-logical > >1) src/hotspot/share/oops/generateOopMap.cpp <--- fixed the > warning >2)

Re: RFR: 8300237: Minor improvements in MethodHandles [v3]

2023-01-17 Thread Sergey Tsypanov
On Tue, 17 Jan 2023 15:30:12 GMT, Rémi Forax wrote: >> Precious little method handle use in lambda bootstrap since JDK 11. Though I >> agree with the sentiment - having fixed a number of bootstrap issues in the >> past - `MethodHandles` is a small step up the abstraction ladder and the >>

Re: RFR: 8300259: Add test coverage for processing of pending block files in signed JARs

2023-01-17 Thread Weijun Wang
On Mon, 16 Jan 2023 11:44:36 GMT, Eirik Bjorsnos wrote: > This PR adds test coverage for pending block files in signed JAR files > > A signed JAR has pending block files if the block file [RSA, DSA, EC] comes > before the corresponding signature file [SF] in the JAR. > >

Re: RFR: 8300259: Add test coverage for processing of pending block files in signed JARs

2023-01-17 Thread Eirik Bjorsnos
On Tue, 17 Jan 2023 14:07:01 GMT, Weijun Wang wrote: >> This PR adds test coverage for pending block files in signed JAR files >> >> A signed JAR has pending block files if the block file [RSA, DSA, EC] comes >> before the corresponding signature file [SF] in the JAR. >> >>

RFR: 8300259: Add test coverage for processing of pending block files in signed JARs

2023-01-17 Thread Eirik Bjorsnos
This PR adds test coverage for pending block files in signed JAR files A signed JAR has pending block files if the block file [RSA, DSA, EC] comes before the corresponding signature file [SF] in the JAR. JarVerifier.processEntry supports processing of such pending block files, but this code

Re: RFR: 8300237: Minor improvements in MethodHandles [v3]

2023-01-17 Thread Sergey Tsypanov
> - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()` > when we don't need a copy > - comparison of two lists can be done without `Stream.reduce()` Sergey Tsypanov has updated the pull request incrementally with one additional commit since the last revision: Polishing

Re: RFR: 8300169: Build failure with clang-15

2023-01-17 Thread Phil Race
On Tue, 17 Jan 2023 13:35:25 GMT, Kevin Rushforth wrote: >>> Normally, such changes in third-party libraries need to be done upstream, >>> and not locally. @prrace can confirm. >> >> Thanks @kevinrushforth for your review. >> >> Yes, it had been fixed in the upstream and I just follow it. >>

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

2023-01-17 Thread Jim Laskey
On Wed, 11 Jan 2023 14:07:53 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

Re: RFR: 8206890: jlink --endian XXX generates unusable image if endian-ness does not match architecture

2023-01-17 Thread Jim Laskey
On Wed, 11 Jan 2023 13:19:32 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 image.

Re: RFR: 8206890: jlink --endian XXX generates unusable image if endian-ness does not match architecture

2023-01-17 Thread Jim Laskey
On Wed, 11 Jan 2023 13:19:32 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 image.

Re: RFR: 8292635: Improve CDSHeapVerifier testing [v2]

2023-01-17 Thread Calvin Cheung
> Moving the `ArchivedEnumTest.java` from `runtime/cds/appcds/cacheObject` to > `jdk/internal/misc/CDS` so that the test will be run in jdk-tier1. This is to > avoid inadvertently breakage of the test like in JDK-8292499. > > Testing: jdk-tier1, tier3, tier4. Calvin Cheung has updated the pull

RFR: 8300208: Optimize Adler32 stub for AVX-512 targets.

2023-01-17 Thread Jatin Bhateja
Patch optimizes Adler32 stub for AVX512 target. Main computation loop now uses zero extended lane widening load vector operation. New sequence also honors AVX3Thresholds so that implementation uses existing AVX2 instruction sequence on relevant targets if input size is smaller than threshold

Integrated: 8300010: UnsatisfiedLinkError on calling System.console().readPassword() on Windows

2023-01-17 Thread Naoto Sato
On Thu, 12 Jan 2023 17:08:29 GMT, Naoto Sato wrote: > Fixing a regression caused by the fix to > [JDK-8298971](https://bugs.openjdk.org/browse/JDK-8298971). The previous fix > lacked the native part change on Windows. This pull request has now been integrated. Changeset: e7e37121 Author:

Re: RFR: 8300169: Build failure with clang-15

2023-01-17 Thread Alan Bateman
On Tue, 17 Jan 2023 13:33:06 GMT, Kevin Rushforth wrote: >> Hi all, >> >> Please review the fix for the build failure with clang-15. >> >> 1. -Wbitwise-instead-of-logical >> >>1) src/hotspot/share/oops/generateOopMap.cpp <--- fixed the >> warning >>2)

Re: RFR: 8300140: ZipFile.isSignatureRelated returns true for files in META-INF subdirectories [v6]

2023-01-17 Thread Weijun Wang
On Sat, 14 Jan 2023 12:02:11 GMT, Eirik Bjorsnos wrote: >> src/java.base/share/classes/java/util/zip/ZipFile.java line 1748: >> >>> 1746: .isBlockOrSF(new String(name, off, len, >>> UTF_8.INSTANCE) >>> 1747: .toUpperCase(Locale.ENGLISH))); >>> 1748: >> >>

Integrated: 8300228: ModuleReader.find on exploded module throws if resource name maps to invalid file path

2023-01-17 Thread Alan Bateman
On Tue, 17 Jan 2023 11:34:52 GMT, Alan Bateman wrote: > The ModuleReader implementation for exploded modules maps resource names to > file paths. A small oversight is that it doesn't handle InvalidPathException > which is thrown when the resource name maps to something that can't be parsed >

Re: RFR: 8300140: ZipFile.isSignatureRelated returns true for files in META-INF subdirectories [v6]

2023-01-17 Thread Weijun Wang
On Sat, 14 Jan 2023 12:14:54 GMT, Eirik Bjorsnos wrote: >> src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSigner.java line 980: >> >>> 978: * Returns true iff the entry resides directly in the META-INF/ >>> directory >>> 979: */ >>> 980: private boolean

Re: RFR: 8291966: SwitchBootstrap.typeSwitch could be faster [v2]

2023-01-17 Thread Jan Lahoda
> The pattern matching switches are using a bootstrap method > `SwitchBootstrap.typeSwitch` to implement the jumps in the switch. Basically, > for a switch like: > > switch (obj) { > case String s when s.isEmpty() -> {} > case String s -> {} > case CharSequence cs -> {} > ... >

Re: RFR: 8206890: jlink --endian XXX generates unusable image if endian-ness does not match architecture

2023-01-17 Thread Alan Bateman
On Wed, 11 Jan 2023 14:30:46 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

Re: RFR: 8299807: String.newStringUTF8NoRepl and getBytesUTF8NoRepl always copy arrays

2023-01-17 Thread Glavo
On Tue, 17 Jan 2023 14:53:41 GMT, Roger Riggs wrote: > `newStringUTF*NoRepl` is not described or expected to optimizing the array > allocation. Nor does it mandate that callers must guarantee that the array is > not re-used or modified. The access to this method through JavaLangAccess is >

Re: RFR: 8300237: Minor improvements in MethodHandles [v2]

2023-01-17 Thread Rémi Forax
On Tue, 17 Jan 2023 10:18:42 GMT, Claes Redestad wrote: >> Using lambdas inside MethodHandles is quite dangerous given that lambdas are >> initialized using method handles. It may work now because >> longuestParameterList() is not called when initializing a lambda but it may >> make any

Re: RFR: 8300207: Add a pre-check for the number of canonical equivalent permutations in j.u.r.Pattern

2023-01-17 Thread Raffaello Giulietti
On Tue, 17 Jan 2023 12:23:25 GMT, Alan Bateman wrote: >> The choice of a `` paragraph rather than `@apiNote` is for consistency >> with similar commentary paragraphs in the specs of `CASE_INSENSITIVE`, >> `UNICODE_CASE`, and `UNICODE_CHARACTER_CLASS`. >> >> I have no problems in using

Re: RFR: 8300237: Minor improvements in MethodHandles [v2]

2023-01-17 Thread Sergey Tsypanov
> - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()` > when we don't need a copy > - comparison of two lists can be done without `Stream.reduce()` Sergey Tsypanov has updated the pull request incrementally with one additional commit since the last revision: Simplify

Re: RFR: 8299807: String.newStringUTF8NoRepl and getBytesUTF8NoRepl always copy arrays

2023-01-17 Thread Roger Riggs
On Mon, 9 Jan 2023 03:34:55 GMT, Glavo wrote: > `JavaLangAccess::newStringUTF8NoRepl` and > `JavaLangAccess::getBytesUTF8NoRepl` are not implemented correctly. They > always copy arrays, rather than avoiding copying as much as possible as > javadoc says. > > I ran the tier1 test without any

Re: RFR: 8300228: ModuleReader.find on exploded module throws if resource name maps to invalid file path

2023-01-17 Thread Jaikiran Pai
On Tue, 17 Jan 2023 14:10:43 GMT, Alan Bateman wrote: > So yes, it could be added as a test case, just wouldn't add any more test > coverage to the existing tests. Thank you for the explanation, Alan. The current state of the test, in the PR, looks fine to me then. - PR:

Re: RFR: 8300228: ModuleReader.find on exploded module throws if resource name maps to invalid file path

2023-01-17 Thread Alan Bateman
On Tue, 17 Jan 2023 12:34:31 GMT, Jaikiran Pai wrote: > Should we also add a `C:/java` (one with a forward slash) to the new junk > resource names added in this test, to exercise the path where a forward slash > is present in a resource name which also has the Windows disallowed `:` >

Re: RFR: 8300228: ModuleReader.find on exploded module throws if resource name maps to invalid file path

2023-01-17 Thread Christian Stein
On Tue, 17 Jan 2023 11:34:52 GMT, Alan Bateman wrote: > The ModuleReader implementation for exploded modules maps resource names to > file paths. A small oversight is that it doesn't handle InvalidPathException > which is thrown when the resource name maps to something that can't be parsed >

Re: RFR: 8300169: Build failure with clang-15

2023-01-17 Thread Kevin Rushforth
On Sun, 15 Jan 2023 01:56:06 GMT, Jie Fu wrote: >> src/java.desktop/share/native/libharfbuzz/hb-meta.hh line 191: >> >>> 189: #define hb_int_max(T) hb_int_max::value >>> 190: >>> 191: #if defined(__GNUC__) && __GNUC__ < 5 && !defined(__clang__) >> >> Normally, such changes in third-party

Re: RFR: 8300169: Build failure with clang-15

2023-01-17 Thread Kevin Rushforth
On Sat, 14 Jan 2023 14:28:32 GMT, Jie Fu wrote: > Hi all, > > Please review the fix for the build failure with clang-15. > > 1. -Wbitwise-instead-of-logical > >1) src/hotspot/share/oops/generateOopMap.cpp <--- fixed the > warning >2)

Re: RFR: 8293841: RISC-V: Implementation of Foreign Function & Memory API (Preview) [v7]

2023-01-17 Thread Feilong Jiang
On Mon, 16 Jan 2023 11:48:21 GMT, Aleksey Shipilev wrote: >> Feilong Jiang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> more code style adjustment > > src/hotspot/cpu/riscv/codeBuffer_riscv.cpp line 3: > >> 1: /* >> 2: * Copyright

Re: RFR: 8300228: ModuleReader.find on exploded module throws if resource name maps to invalid file path

2023-01-17 Thread Chris Hegarty
On Tue, 17 Jan 2023 11:34:52 GMT, Alan Bateman wrote: > The ModuleReader implementation for exploded modules maps resource names to > file paths. A small oversight is that it doesn't handle InvalidPathException > which is thrown when the resource name maps to something that can't be parsed >

Re: RFR: 8300228: ModuleReader.find on exploded module throws if resource name maps to invalid file path

2023-01-17 Thread Jaikiran Pai
On Tue, 17 Jan 2023 11:34:52 GMT, Alan Bateman wrote: > The ModuleReader implementation for exploded modules maps resource names to > file paths. A small oversight is that it doesn't handle InvalidPathException > which is thrown when the resource name maps to something that can't be parsed >

Re: RFR: 8300207: Add a pre-check for the number of canonical equivalent permutations in j.u.r.Pattern

2023-01-17 Thread Alan Bateman
On Tue, 17 Jan 2023 10:20:43 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/java/util/regex/Pattern.java line 1099: >> >>> 1097: * flags. >>> 1098: * >>> 1099: * Setting {@link #CANON_EQ} among the flags may impose a >>> moderate risk >> >> This may be a

Re: RFR: 8298047: Remove all non-significant trailing whitespace from properties files [v2]

2023-01-17 Thread Magnus Ihse Bursie
On Tue, 17 Jan 2023 11:44:32 GMT, Vladimir Sitnikov wrote: >> @RogerRiggs Thanks! > > @magicus , have you considered adding `.editorconfig` file (see > https://editorconfig.org/ ) so it configures developers' editors to trim the > whitespace? > > Of course, `.editorconfig` does not enforce

RFR: 8300228: ModuleReader.find on exploded module throws if resource name maps to invalid file path

2023-01-17 Thread Alan Bateman
The ModuleReader implementation for exploded modules maps resource names to file paths. A small oversight is that it doesn't handle InvalidPathException which is thrown when the resource name maps to something that can't be parsed as a file path. This has a knock on impact to Class/ClassLoader

Re: RFR: 8298047: Remove all non-significant trailing whitespace from properties files [v2]

2023-01-17 Thread Vladimir Sitnikov
On Mon, 16 Jan 2023 18:52:24 GMT, Magnus Ihse Bursie wrote: >> The non-client parts look fine. > > @RogerRiggs Thanks! @magicus , have you considered adding `.editorconfig` file (see https://editorconfig.org/ ) so it configures developers' editors to trim the whitespace? Of course,

Re: RFR: 8300169: Build failure with clang-15

2023-01-17 Thread Jie Fu
On Sat, 14 Jan 2023 14:28:32 GMT, Jie Fu wrote: > Hi all, > > Please review the fix for the build failure with clang-15. > > 1. -Wbitwise-instead-of-logical > >1) src/hotspot/share/oops/generateOopMap.cpp <--- fixed the > warning >2)

Re: RFR: 8300207: Add a pre-check for the number of canonical equivalent permutations in j.u.r.Pattern

2023-01-17 Thread Raffaello Giulietti
On Tue, 17 Jan 2023 10:06:57 GMT, Alan Bateman wrote: >> - Strengthen a computation that could overflow. >> - Specify that use of CANON_EQ could exhaust memory in the compilation phase. > > src/java.base/share/classes/java/util/regex/Pattern.java line 1099: > >> 1097: * flags. >> 1098:

Re: RFR: 8300237: Minor improvements in MethodHandles

2023-01-17 Thread Claes Redestad
On Tue, 17 Jan 2023 10:11:49 GMT, Rémi Forax wrote: >> src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 6754: >> >>> 6752: filter(t -> t.parameterCount() > skipSize). >>> 6753: map(MethodType::ptypes). >>> 6754:

Re: RFR: 8300237: Minor improvements in MethodHandles

2023-01-17 Thread Rémi Forax
On Tue, 17 Jan 2023 09:51:31 GMT, Claes Redestad wrote: >> - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()` >> when we don't need a copy >> - comparison of two lists can be done without `Stream.reduce()` > >

Re: RFR: 8300207: Add a pre-check for the number of canonical equivalent permutations in j.u.r.Pattern

2023-01-17 Thread Alan Bateman
On Tue, 17 Jan 2023 09:44:17 GMT, Raffaello Giulietti wrote: > - Strengthen a computation that could overflow. > - Specify that use of CANON_EQ could exhaust memory in the compilation phase. src/java.base/share/classes/java/util/regex/Pattern.java line 1099: > 1097: * flags. > 1098:

Re: RFR: 8300237: Minor improvements in MethodHandles

2023-01-17 Thread Claes Redestad
On Tue, 17 Jan 2023 08:22:28 GMT, Sergey Tsypanov wrote: > - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()` > when we don't need a copy > - comparison of two lists can be done without `Stream.reduce()` Remove `EMPTY` (using my earlier suggestion or by simply inlining

Re: RFR: 8300237: Minor improvements in MethodHandles

2023-01-17 Thread Claes Redestad
On Tue, 17 Jan 2023 08:22:28 GMT, Sergey Tsypanov wrote: > - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()` > when we don't need a copy > - comparison of two lists can be done without `Stream.reduce()` src/java.base/share/classes/java/lang/invoke/MethodHandles.java

RFR: 8300207: Add a pre-check for the number of canonical equivalent permutations in j.u.r.Pattern

2023-01-17 Thread Raffaello Giulietti
- Strengthen a computation that could overflow. - Specify that use of CANON_EQ could exhaust memory in the compilation phase. - Commit messages: - 8300207: Add a pre-check for the number of canonical equivalent permutations in j.u.r.Pattern Changes:

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-17 Thread Rémi Forax
On Mon, 9 Jan 2023 09:22:25 GMT, Per Minborg wrote: >> Currently, `java.io.Bits` is using explicit logic to read/write various >> primitive types to/from byte arrays. Switching to the use of `VarHandle` >> access would provide better performance and less code. >> >> Also, using a standard

Re: RFR: 8293841: RISC-V: Implementation of Foreign Function & Memory API (Preview) [v7]

2023-01-17 Thread Aleksey Shipilev
On Mon, 16 Jan 2023 06:38:35 GMT, Feilong Jiang wrote: >> Add experimental Foreign Function & Memory API support for RISC-V. >> >> For details of the FFM API RISC-V port please refer to [JBS >> issue](https://bugs.openjdk.org/browse/JDK-8293841) >> >> Testing: >> >> - [x] jdk_foreign with

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v2]

2023-01-17 Thread Quan Anh Mai
On Tue, 17 Jan 2023 08:30:58 GMT, Sergey Tsypanov wrote: >>> > Do you see any concrete examples of classes in the JDK that could benefit >>> > from a "VarHandlization"? >>> >>> `ImageOutputStreamImpl` and `ImageInputStreamImpl` in >>> `javax.imageio.stream` have some very similar code that

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v2]

2023-01-17 Thread Sergey Tsypanov
On Tue, 17 Jan 2023 07:43:07 GMT, Per Minborg wrote: >>> >>> Do you see any concrete examples of classes in the JDK that could benefit >>> from a "VarHandlization"? >> >> `ImageOutputStreamImpl` and `ImageInputStreamImpl` in >> `javax.imageio.stream` have some very similar code that might

RFR: 8300237: Minor improvements in MethodHandles

2023-01-17 Thread Sergey Tsypanov
- `MethodType.ptypes()` can be used instead of `MethodType.parameterList()` when we don't need a copy - comparison of two lists can be done without `Stream.reduce()` - Commit messages: - Fix test - Improve MH Changes: https://git.openjdk.org/jdk/pull/12025/files Webrev: