Re: RFR: 8301119: Support for GB18030-2022 [v3]

2023-02-23 Thread Alan Bateman
On Thu, 23 Feb 2023 19:34:44 GMT, Naoto Sato wrote: >> Upgrading the GB18030 charset in the JDK to the latest 2022 standard. Since >> this is not a compatible upgrade to the existing mapping, a new system >> property `jdk.charset.GB18030` is introduced. If it is set to "2000", the >> mapping f

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v3]

2023-02-23 Thread Robbin Ehn
On Fri, 24 Feb 2023 07:17:30 GMT, Jorn Vernee wrote: > ~I don't think we've done that much testing with UseSystemMemoryBarrier since > it was added~. I'm a bit nervous about turning it on by default since it's > currently also used for JNI. Let's see what Robbin thinks. For reliability: On eve

Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v14]

2023-02-23 Thread Eirik Bjorsnos
On Wed, 22 Feb 2023 20:01:52 GMT, Eirik Bjorsnos wrote: >> This PR suggests we can speed up `StringLatin1.regionMatchesCI` by applying >> 'the oldest ASCII trick in the book'. >> >> The new static method `CharacterDataLatin1.equalsIgnoreCase` compares two >> latin1 bytes for equality ignoring

Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v12]

2023-02-23 Thread Alan Bateman
On Wed, 22 Feb 2023 18:44:57 GMT, Eirik Bjorsnos wrote: > I'll let this linger a bit before integrating in case Alan has comments after > the latest updates. I plan to look at it, been busy with other things. - PR: https://git.openjdk.org/jdk/pull/12632

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v3]

2023-02-23 Thread Jorn Vernee
On Fri, 24 Feb 2023 04:03:53 GMT, Martin Doerr wrote: > * Uploaded my simple reproducer to > [JDK-8303017](https://bugs.openjdk.org/browse/JDK-8303017) Thanks! > * Using oversized load / stores is problematic. Don't forget that OpenJDK > still supports Big Endian platforms (AIX, s390x

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v3]

2023-02-23 Thread Robbin Ehn
On Fri, 24 Feb 2023 04:03:53 GMT, Martin Doerr wrote: > * Since the membar on the return path was mentioned: I think it would be good > to enable UseSystemMemoryBarrier by default on operating systems which > support it. Maybe we should discuss this with @robehn. Changing the default is fine b

Re: RFR: 8302806: (fs) Remove com.sun.nio.file.SensitivityWatchEventModifier [v5]

2023-02-23 Thread Alan Bateman
On Thu, 23 Feb 2023 21:16:41 GMT, Brian Burkhalter wrote: >> This enum is not used in the JDK and did not appear in external source code >> searches. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8302806: Remove modi

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-23 Thread Mandy Chung
On Thu, 9 Feb 2023 18:11:18 GMT, Volker Simonis wrote: >> Prior to >> [JDK-8239384](https://bugs.openjdk.org/browse/JDK-8239384)/[JDK-8238358](https://bugs.openjdk.org/browse/JDK-8238358) >> LambdaMetaFactory has created VM-anonymous classes which could easily be >> unloaded once they were not

Re: RFR: 8302791: Add specific ClassLoader object to Proxy IllegalArgumentException message

2023-02-23 Thread Mandy Chung
On Wed, 22 Feb 2023 07:24:48 GMT, Alan Bateman wrote: >> Added specific class loader object to proxy IllegalArgumentException from >> which the class was not visible >> >> The bug report for the same: https://bugs.openjdk.org/browse/JDK-8302791 > > src/java.base/share/classes/java/lang/reflect/

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v3]

2023-02-23 Thread Martin Doerr
On Thu, 23 Feb 2023 06:18:49 GMT, Martin Doerr wrote: >> Implementation of "Foreign Function & Memory API" for linux on Power (Little >> Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". >> >> This PR does not include code for VaList support because it's supposed to >>

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v14]

2023-02-23 Thread Mandy Chung
On Fri, 24 Feb 2023 01:26:41 GMT, Ian Graves wrote: >> This is an approach to adding a flag to jlink that will allow --compress to >> take the same types of arguments as jmod, thus bringing the two into >> alignment. This likely requires a CSR and a discussion on whether we should >> deprecate

Re: RFR: JDK-8302040: Port fdlibm sqrt to Java

2023-02-23 Thread Joe Darcy
On Thu, 23 Feb 2023 23:28:11 GMT, Joe Darcy wrote: > The wheel of FDLIBM porting turns a notch and sqrt comes into play. > > While the sqrt operation usually has a hardware implementation that is > intrinsified, for completeness a software implementation should be available > as well. src/jav

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v4]

2023-02-23 Thread Brent Christian
On Tue, 21 Feb 2023 20:27:44 GMT, Martin Buchholz wrote: >> jtreg will look after this. The default timeout is 120s but it can be >> adjusted with a timeout factor (make time uses a timeout factor of 4). So it >> would be possible to put a limit on this in the test but it can be >> problematic

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v14]

2023-02-23 Thread Ian Graves
> This is an approach to adding a flag to jlink that will allow --compress to > take the same types of arguments as jmod, thus bringing the two into > alignment. This likely requires a CSR and a discussion on whether we should > deprecate or simply remove the original numeric compression argumen

Re: RFR: 8292914: Drop the counter from lambda class names [v8]

2023-02-23 Thread Mandy Chung
On Fri, 17 Feb 2023 19:37:59 GMT, David M. Lloyd wrote: >> The class generated for lambda proxies is now defined as a hidden class. >> This means that the counter, which was used to ensure a unique class name >> and avoid clashes, is now redundant. In addition to performing redundant >> work,

Re: RFR: 8292914: Drop the counter from lambda class names [v8]

2023-02-23 Thread Mandy Chung
On Fri, 17 Feb 2023 19:37:59 GMT, David M. Lloyd wrote: >> The class generated for lambda proxies is now defined as a hidden class. >> This means that the counter, which was used to ensure a unique class name >> and avoid clashes, is now redundant. In addition to performing redundant >> work,

Re: RFR: JDK-8302040: Port fdlibm sqrt to Java

2023-02-23 Thread Joe Darcy
On Thu, 23 Feb 2023 23:28:11 GMT, Joe Darcy wrote: > The wheel of FDLIBM porting turns a notch and sqrt comes into play. > > While the sqrt operation usually has a hardware implementation that is > intrinsified, for completeness a software implementation should be available > as well. src/jav

Re: RFR: JDK-8302040: Port fdlibm sqrt to Java

2023-02-23 Thread Joe Darcy
On Thu, 23 Feb 2023 23:28:11 GMT, Joe Darcy wrote: > The wheel of FDLIBM porting turns a notch and sqrt comes into play. > > While the sqrt operation usually has a hardware implementation that is > intrinsified, for completeness a software implementation should be available > as well. In loca

Re: RFR: JDK-8302040: Port fdlibm sqrt to Java

2023-02-23 Thread Joe Darcy
On Thu, 23 Feb 2023 23:28:11 GMT, Joe Darcy wrote: > The wheel of FDLIBM porting turns a notch and sqrt comes into play. > > While the sqrt operation usually has a hardware implementation that is > intrinsified, for completeness a software implementation should be available > as well. src/jav

RFR: JDK-8302040: Port fdlibm sqrt to Java

2023-02-23 Thread Joe Darcy
The wheel of FDLIBM porting turns a notch and sqrt comes into play. While the sqrt operation usually has a hardware implementation that is intrinsified, for completeness a software implementation should be available as well. - Commit messages: - JDK-8302040: Port fdlibm sqrt to Ja

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v13]

2023-02-23 Thread Mandy Chung
On Thu, 23 Feb 2023 19:15:49 GMT, Ian Graves wrote: >> This is an approach to adding a flag to jlink that will allow --compress to >> take the same types of arguments as jmod, thus bringing the two into >> alignment. This likely requires a CSR and a discussion on whether we should >> deprecate

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v12]

2023-02-23 Thread Mandy Chung
On Thu, 23 Feb 2023 19:04:33 GMT, Ian Graves wrote: >> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/DefaultCompressPlugin.java >> line 96: >> >>> 94: switch (level) { >>> 95: case LEVEL_0: >>> 96: System.err.println(getMessage("war

Re: RFR: 8302267: [jittester] Improve separation of test generation and execution [v2]

2023-02-23 Thread Leonid Mesnik
On Wed, 22 Feb 2023 17:43:23 GMT, Evgeny Nikitin wrote: >> Please review a set of improvements that should improve working with other >> fuzzing generators and usage of JitTesterDriver with tests generated not by >> the JITTester: >> >> - Provide better separation of individual test generation

Re: RFR: JDK-8303072: Memory leak in exeNullCallerTest.cpp

2023-02-23 Thread David Holmes
On Wed, 22 Feb 2023 14:02:28 GMT, Justin King wrote: > Fix trivial memory leak that occurs during tests. Seems fine. Thanks. - Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.org/jdk/pull/12715

Re: RFR: JDK-8297605 DelayQueue javadoc is confusing

2023-02-23 Thread Martin Buchholz
On Thu, 23 Feb 2023 15:36:48 GMT, Viktor Klang wrote: > Clarifies the distinction between expiration of the head of DelayQueue and > how it relates to `poll`, `take`, and `peek`. See discussion on > https://bugs.openjdk.org/browse/JDK-8297605 > > @DougLea If possible, please weigh in on whethe

Re: RFR: 8302806: (fs) Remove com.sun.nio.file.SensitivityWatchEventModifier [v5]

2023-02-23 Thread Brian Burkhalter
> This enum is not used in the JDK and did not appear in external source code > searches. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8302806: Remove modifier loops - Changes: - all: https://git.openjdk.org/jd

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

2023-02-23 Thread Jim Laskey
> 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 evaluating that expression, possibly after further validation a

Re: RFR: 8282319: java.util.Locale method to stream available Locales

2023-02-23 Thread Naoto Sato
On Fri, 27 Jan 2023 21:48:26 GMT, Justin Lu wrote: > This PR adds a new method to java.util.Locale which returns Stream > > The contents of the Stream are composed of the same underlying elements as > Locale.getAvailableLocales(). > > This method allows streaming of the Locale array without cr

Re: RFR: 8301119: Support for GB18030-2022 [v3]

2023-02-23 Thread Naoto Sato
On Thu, 23 Feb 2023 10:07:22 GMT, Alan Bateman wrote: >> would use of jdk.internal.util.SystemProps be an option here (if having to >> retrieve that value when we're at VM init level <1 ? > >> would use of jdk.internal.util.SystemProps be an option here (if having to >> retrieve that value when

Re: RFR: 8301119: Support for GB18030-2022 [v3]

2023-02-23 Thread Naoto Sato
> Upgrading the GB18030 charset in the JDK to the latest 2022 standard. Since > this is not a compatible upgrade to the existing mapping, a new system > property `jdk.charset.GB18030` is introduced. If it is set to "2000", the > mapping falls back to the existing mapping based on the 2000 standa

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v13]

2023-02-23 Thread Ian Graves
> This is an approach to adding a flag to jlink that will allow --compress to > take the same types of arguments as jmod, thus bringing the two into > alignment. This likely requires a CSR and a discussion on whether we should > deprecate or simply remove the original numeric compression argumen

Integrated: 8302512: Update IANA Language Subtag Registry to Version 2023-02-14

2023-02-23 Thread Justin Lu
On Tue, 21 Feb 2023 19:26:46 GMT, Justin Lu wrote: > Incorporate the latest IANA language subtag registry definition (2023-02-14). This pull request has now been integrated. Changeset: f612dcfe Author:Justin Lu Committer: Naoto Sato URL: https://git.openjdk.org/jdk/commit/f612dcfeb

Re: RFR: JDK-8297605 DelayQueue javadoc is confusing

2023-02-23 Thread Martin Buchholz
On Thu, 23 Feb 2023 15:36:48 GMT, Viktor Klang wrote: > Clarifies the distinction between expiration of the head of DelayQueue and > how it relates to `poll`, `take`, and `peek`. See discussion on > https://bugs.openjdk.org/browse/JDK-8297605 > > @DougLea If possible, please weigh in on whethe

Re: RFR: JDK-8297605 DelayQueue javadoc is confusing

2023-02-23 Thread Viktor Klang
On Thu, 23 Feb 2023 18:53:35 GMT, Martin Buchholz wrote: >> Clarifies the distinction between expiration of the head of DelayQueue and >> how it relates to `poll`, `take`, and `peek`. See discussion on >> https://bugs.openjdk.org/browse/JDK-8297605 >> >> @DougLea If possible, please weigh in o

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v12]

2023-02-23 Thread Ian Graves
On Thu, 23 Feb 2023 18:27:53 GMT, Mandy Chung wrote: >> Ian Graves has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Tweaking properties > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/DefaultCompressPlugin.java > line 96

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)

2023-02-23 Thread Roger Riggs
On Thu, 16 Feb 2023 17:16:35 GMT, Raffaello Giulietti wrote: > Add an `indexOf()` variant allowing to specify both a lower and an upper > bound on the search. There should be no or little impact from the extra level of calls but its worth confirming. src/java.base/share/classes/java/lang/Str

Re: RFR: JDK-8297605 DelayQueue javadoc is confusing

2023-02-23 Thread Martin Buchholz
On Thu, 23 Feb 2023 15:36:48 GMT, Viktor Klang wrote: > Clarifies the distinction between expiration of the head of DelayQueue and > how it relates to `poll`, `take`, and `peek`. See discussion on > https://bugs.openjdk.org/browse/JDK-8297605 > > @DougLea If possible, please weigh in on whethe

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v12]

2023-02-23 Thread Mandy Chung
On Thu, 23 Feb 2023 17:31:02 GMT, Ian Graves wrote: >> This is an approach to adding a flag to jlink that will allow --compress to >> take the same types of arguments as jmod, thus bringing the two into >> alignment. This likely requires a CSR and a discussion on whether we should >> deprecate

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer [v2]

2023-02-23 Thread Raffaello Giulietti
On Thu, 23 Feb 2023 17:39:10 GMT, Jim Laskey wrote: >> Add the ability to repeatedly append char and CharSequence data to >> StringBuilder/StringBuffer. > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > PR Cleanup src/java.ba

Re: RFR: 8302806: (fs) Remove com.sun.nio.file.SensitivityWatchEventModifier [v4]

2023-02-23 Thread Brian Burkhalter
> This enum is not used in the JDK and did not appear in external source code > searches. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8302806: Remove ExtendedOptions.SENSITIViTY_xxx and things depending on it -

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v4]

2023-02-23 Thread Martin Buchholz
On Thu, 23 Feb 2023 08:31:36 GMT, Alan Bateman wrote: >> Executors.newSingleThreadExecutor returns a delegating ExecutorService that >> has finalizer to shutdown the underlying TPE when the wrapper is >> finalizable. It goes back to JDK 6 and JDK-6399443. This is the last >> non-empty finalize

Withdrawn: 8302976: C2 intrinsification of Float.floatToFloat16 and Float.float16ToFloat yields different result than the interpreter

2023-02-23 Thread Sandhya Viswanathan
On Wed, 22 Feb 2023 02:08:27 GMT, Sandhya Viswanathan wrote: > Change the java/lang/float.java and the corresponding shared runtime constant > expression evaluation to generate QNaN. > The HW instructions generate QNaNs and not SNaNs for floating point > instructions. This happens across doubl

Re: RFR: 8302976: C2 intrinsification of Float.floatToFloat16 and Float.float16ToFloat yields different result than the interpreter

2023-02-23 Thread Sandhya Viswanathan
On Wed, 22 Feb 2023 02:08:27 GMT, Sandhya Viswanathan wrote: > Change the java/lang/float.java and the corresponding shared runtime constant > expression evaluation to generate QNaN. > The HW instructions generate QNaNs and not SNaNs for floating point > instructions. This happens across doubl

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer [v2]

2023-02-23 Thread Jim Laskey
> Add the ability to repeatedly append char and CharSequence data to > StringBuilder/StringBuffer. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: PR Cleanup - Changes: - all: https://git.openjdk.org/jdk/pull/12728/file

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v12]

2023-02-23 Thread Ian Graves
> This is an approach to adding a flag to jlink that will allow --compress to > take the same types of arguments as jmod, thus bringing the two into > alignment. This likely requires a CSR and a discussion on whether we should > deprecate or simply remove the original numeric compression argumen

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer

2023-02-23 Thread Jim Laskey
On Thu, 23 Feb 2023 16:54:10 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1918: >> >>> 1916: } >>> 1917: int valueLength = length << UTF16; >>> 1918: if ((Integer.MAX_VALUE - this.count) / count < valueLength) { >> >> I

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v2]

2023-02-23 Thread Jorn Vernee
On Thu, 23 Feb 2023 16:48:30 GMT, Maurizio Cimadamore wrote: > I meant generating extsw when emitting the stub (since when we emit the stub > we can see the bindings). But I suppose the problem there is that the VM only > sees low level bindings such as moves, it doesn't see bindings such as c

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer

2023-02-23 Thread Jim Laskey
On Thu, 23 Feb 2023 16:40:32 GMT, Roger Riggs wrote: >> Add the ability to repeatedly append char and CharSequence data to >> StringBuilder/StringBuffer. > > src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1918: > >> 1916: } >> 1917: int valueLength = lengt

Re: RFR: 8292914: Drop the counter from lambda class names [v8]

2023-02-23 Thread David M . Lloyd
On Fri, 17 Feb 2023 19:37:59 GMT, David M. Lloyd wrote: >> The class generated for lambda proxies is now defined as a hidden class. >> This means that the counter, which was used to ensure a unique class name >> and avoid clashes, is now redundant. In addition to performing redundant >> work,

Re: RFR: 8292914: Drop the counter from lambda class names [v8]

2023-02-23 Thread Brian Goetz
On Fri, 17 Feb 2023 19:37:59 GMT, David M. Lloyd wrote: >> The class generated for lambda proxies is now defined as a hidden class. >> This means that the counter, which was used to ensure a unique class name >> and avoid clashes, is now redundant. In addition to performing redundant >> work,

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v2]

2023-02-23 Thread Maurizio Cimadamore
On Thu, 23 Feb 2023 15:02:48 GMT, Jorn Vernee wrote: > > > Correct, `extsw` performs a `I2L` conversion. I had thought about this > > > already, but I think my current implementation is more efficient as it > > > combines register moves with the 64 bit extend. Your proposal would > > > generat

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)

2023-02-23 Thread Raffaello Giulietti
On Thu, 23 Feb 2023 16:21:53 GMT, Roger Riggs wrote: >> Add an `indexOf()` variant allowing to specify both a lower and an upper >> bound on the search. > > Is there any performance impact? Are there relevant JHM tests? Or should be > added. > Also to verify that the intrinsics are still valid

Re: RFR: 8292914: Drop the counter from lambda class names [v8]

2023-02-23 Thread Mandy Chung
On Wed, 22 Feb 2023 16:40:07 GMT, David M. Lloyd wrote: >> David M. Lloyd has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Many tests have patterns for lambda class names; update them >> - Update comments and javadoc showin the old pat

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer

2023-02-23 Thread Roger Riggs
On Thu, 23 Feb 2023 13:13:43 GMT, Jim Laskey wrote: > Add the ability to repeatedly append char and CharSequence data to > StringBuilder/StringBuffer. src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1918: > 1916: } > 1917: int valueLength = length << UTF16

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v4]

2023-02-23 Thread Martin Buchholz
On Thu, 23 Feb 2023 08:31:36 GMT, Alan Bateman wrote: >> Executors.newSingleThreadExecutor returns a delegating ExecutorService that >> has finalizer to shutdown the underlying TPE when the wrapper is >> finalizable. It goes back to JDK 6 and JDK-6399443. This is the last >> non-empty finalize

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer

2023-02-23 Thread Roger Riggs
On Thu, 23 Feb 2023 13:13:43 GMT, Jim Laskey wrote: > Add the ability to repeatedly append char and CharSequence data to > StringBuilder/StringBuffer. src/java.base/share/classes/java/lang/String.java line 4461: > 4459: > 4460: /** > 4461: * Used to perform copying after the initial

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer

2023-02-23 Thread Jim Laskey
On Thu, 23 Feb 2023 15:56:37 GMT, Roger Riggs wrote: >> Add the ability to repeatedly append char and CharSequence data to >> StringBuilder/StringBuffer. > > src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1876: > >> 1874: int length = this.count - offset; >> 1875:

Re: RFD: Invalid CRC in ZipFile, ZipFileSystem

2023-02-23 Thread Lance Andersen
HI Eirik On Feb 23, 2023, at 7:43 AM, Eirik Bjørsnøs mailto:eir...@gmail.com>> wrote: Hi, While writing various ZIP related tests, I noticed a discrepancy in the treatment of invalid CRC values: While ZipInputStream rejects invalid CRC values when consuming streams, ZipFile and ZipFileSystem

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer

2023-02-23 Thread Roger Riggs
On Thu, 23 Feb 2023 16:20:59 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1867: >> >>> 1865: >>> 1866: private AbstractStringBuilder repeatNull(int count) { >>> 1867: if (count < 0) { >> >> This could be implemented as `repeat("nul

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)

2023-02-23 Thread Roger Riggs
On Thu, 16 Feb 2023 17:16:35 GMT, Raffaello Giulietti wrote: > Add an `indexOf()` variant allowing to specify both a lower and an upper > bound on the search. Is there any performance impact? Are there relevant JHM tests? Or should be added. Also to verify that the intrinsics are still valid

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer

2023-02-23 Thread Jim Laskey
On Thu, 23 Feb 2023 15:52:15 GMT, Roger Riggs wrote: >> Add the ability to repeatedly append char and CharSequence data to >> StringBuilder/StringBuffer. > > src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1839: > >> 1837: * @throws StringIndexOutOfBoundsException if

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer

2023-02-23 Thread Roger Riggs
On Thu, 23 Feb 2023 13:13:43 GMT, Jim Laskey wrote: > Add the ability to repeatedly append char and CharSequence data to > StringBuilder/StringBuffer. src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1839: > 1837: * @throws StringIndexOutOfBoundsException if the resu

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v4]

2023-02-23 Thread Martin Buchholz
On Thu, 23 Feb 2023 08:31:36 GMT, Alan Bateman wrote: >> Executors.newSingleThreadExecutor returns a delegating ExecutorService that >> has finalizer to shutdown the underlying TPE when the wrapper is >> finalizable. It goes back to JDK 6 and JDK-6399443. This is the last >> non-empty finalize

Re: RFR: JDK-8297605 DelayQueue javadoc is confusing

2023-02-23 Thread Doug Lea
On Thu, 23 Feb 2023 15:36:48 GMT, Viktor Klang wrote: > Clarifies the distinction between expiration of the head of DelayQueue and > how it relates to `poll`, `take`, and `peek`. See discussion on > https://bugs.openjdk.org/browse/JDK-8297605 > > @DougLea If possible, please weigh in on whethe

Re: RFR: JDK-8297605 DelayQueue javadoc is confusing

2023-02-23 Thread Viktor Klang
On Thu, 23 Feb 2023 15:36:48 GMT, Viktor Klang wrote: > Clarifies the distinction between expiration of the head of DelayQueue and > how it relates to `poll`, `take`, and `peek`. See discussion on > https://bugs.openjdk.org/browse/JDK-8297605 > > @DougLea If possible, please weigh in on whethe

RFR: JDK-8297605 DelayQueue javadoc is confusing

2023-02-23 Thread Viktor Klang
Clarifies the distinction between expiration of the head of DelayQueue and how it relates to `poll`, `take`, and `peek`. See discussion on https://bugs.openjdk.org/browse/JDK-8297605 @DougLea If possible, please weigh in on whether this is in line with your thoughts on the matter.

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer

2023-02-23 Thread Raffaello Giulietti
On Thu, 23 Feb 2023 15:32:36 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1851: >> >>> 1849: while (count-- != 0) { >>> 1850: value[index++] = (byte) c; >>> 1851: } >> >> One could reduce to just one runn

Re: RFR: JDK-8297605 DelayQueue javadoc is confusing

2023-02-23 Thread Viktor Klang
On Thu, 23 Feb 2023 09:05:49 GMT, Viktor Klang wrote: > Clarifies the distinction between expiration of the head of DelayQueue and > how it relates to `poll`, `take`, and `peek`. See discussion on > https://bugs.openjdk.org/browse/JDK-8297605 > > @DougLea If possible, please weigh in on whethe

Withdrawn: JDK-8297605 DelayQueue javadoc is confusing

2023-02-23 Thread Viktor Klang
On Thu, 23 Feb 2023 09:05:49 GMT, Viktor Klang wrote: > Clarifies the distinction between expiration of the head of DelayQueue and > how it relates to `poll`, `take`, and `peek`. See discussion on > https://bugs.openjdk.org/browse/JDK-8297605 > > @DougLea If possible, please weigh in on whethe

Re: RFR: 8282319: java.util.Locale method to stream available Locales

2023-02-23 Thread Sergey Tsypanov
On Fri, 27 Jan 2023 21:48:26 GMT, Justin Lu wrote: > This PR adds a new method to java.util.Locale which returns Stream > > The contents of the Stream are composed of the same underlying elements as > Locale.getAvailableLocales(). > > This method allows streaming of the Locale array without cr

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer

2023-02-23 Thread Jim Laskey
On Thu, 23 Feb 2023 15:17:26 GMT, Raffaello Giulietti wrote: >> Add the ability to repeatedly append char and CharSequence data to >> StringBuilder/StringBuffer. > > src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1851: > >> 1849: while (count-- != 0) { >> 185

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer

2023-02-23 Thread Raffaello Giulietti
On Thu, 23 Feb 2023 13:13:43 GMT, Jim Laskey wrote: > Add the ability to repeatedly append char and CharSequence data to > StringBuilder/StringBuffer. src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1851: > 1849: while (count-- != 0) { > 1850:

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v2]

2023-02-23 Thread Jorn Vernee
On Thu, 23 Feb 2023 10:20:31 GMT, Maurizio Cimadamore wrote: > > Correct, `extsw` performs a `I2L` conversion. I had thought about this > > already, but I think my current implementation is more efficient as it > > combines register moves with the 64 bit extend. Your proposal would > > genera

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v3]

2023-02-23 Thread Jorn Vernee
On Thu, 23 Feb 2023 06:21:05 GMT, Martin Doerr wrote: > I have removed the size restriction for structs. Passing a struct consisting > of 1 char works (on Little Endian). However, passing a struct consisting of 3 > chars doesn't (getting IndexOutOfBoundsException: Out of bound access on > segm

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview)

2023-02-23 Thread Jorn Vernee
On Thu, 23 Feb 2023 04:53:34 GMT, Martin Doerr wrote: > > I will do a more thorough review soon. > > Thanks a lot! > > > > The ABI has some tricky corner cases related to HFA (Homogeneous Float > > > Aggregate). The same argument may need to get passed in both, a FP reg > > > and a GP reg or

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v4]

2023-02-23 Thread Daniel Fuchs
On Thu, 23 Feb 2023 08:31:36 GMT, Alan Bateman wrote: >> Executors.newSingleThreadExecutor returns a delegating ExecutorService that >> has finalizer to shutdown the underlying TPE when the wrapper is >> finalizable. It goes back to JDK 6 and JDK-6399443. This is the last >> non-empty finalize

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v2]

2023-02-23 Thread Jorn Vernee
On Thu, 23 Feb 2023 04:44:18 GMT, Martin Doerr wrote: > > > (I'd be happy to implement the needed changes in shared code if you want, > > > since it touches `BindingSpecializer` which is pretty dense) > > > > > > FYI: > > [master...JornVernee:jdk:I2L](https://github.com/openjdk/jdk/compare/ma

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v2]

2023-02-23 Thread Viktor Klang
On Fri, 17 Feb 2023 16:48:27 GMT, Paul Sandoz wrote: >> Viktor Klang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Write the initial value of the next reference without using the VarHandle > > That's a nice find, looks good. (Update th

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v4]

2023-02-23 Thread Roger Riggs
On Thu, 23 Feb 2023 08:31:36 GMT, Alan Bateman wrote: >> Executors.newSingleThreadExecutor returns a delegating ExecutorService that >> has finalizer to shutdown the underlying TPE when the wrapper is >> finalizable. It goes back to JDK 6 and JDK-6399443. This is the last >> non-empty finalize

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)

2023-02-23 Thread Raffaello Giulietti
On Thu, 16 Feb 2023 17:16:35 GMT, Raffaello Giulietti wrote: > Add an `indexOf()` variant allowing to specify both a lower and an upper > bound on the search. May I ask for comments or for a review? - PR: https://git.openjdk.org/jdk/pull/12600

RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer

2023-02-23 Thread Jim Laskey
Add the ability to repeatedly append char and CharSequence data to StringBuilder/StringBuffer. - Commit messages: - Clean up fro CSR - Add synchronized to StringBuffer repeats - AbstractStringBuilder repeat Changes: https://git.openjdk.org/jdk/pull/12728/files Webrev: https://we

RFD: Invalid CRC in ZipFile, ZipFileSystem

2023-02-23 Thread Eirik Bjørsnøs
Hi, While writing various ZIP related tests, I noticed a discrepancy in the treatment of invalid CRC values: While ZipInputStream rejects invalid CRC values when consuming streams, ZipFile and ZipFileSystem do not. While this is inconsistent, it is perhaps not a bug we want to fix? In any case,

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v4]

2023-02-23 Thread Daniel Fuchs
On Thu, 23 Feb 2023 08:31:36 GMT, Alan Bateman wrote: >> Executors.newSingleThreadExecutor returns a delegating ExecutorService that >> has finalizer to shutdown the underlying TPE when the wrapper is >> finalizable. It goes back to JDK 6 and JDK-6399443. This is the last >> non-empty finalize

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v2]

2023-02-23 Thread Maurizio Cimadamore
On Thu, 23 Feb 2023 04:44:18 GMT, Martin Doerr wrote: > > Correct, `extsw` performs a `I2L` conversion. I had thought about this > already, but I think my current implementation is more efficient as it > combines register moves with the 64 bit extend. Your proposal would generate > separate e

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v3]

2023-02-23 Thread Maurizio Cimadamore
On Thu, 23 Feb 2023 07:19:24 GMT, Martin Doerr wrote: > > Can I add them to the existing libraries? If so, what is the correct naming > scheme and what is needed to get them executed (adding the EXPORT alone is > not sufficient). Or should I create a separate test for these cases? Advice > wi

Re: RFR: 8301119: Support for GB18030-2022 [v2]

2023-02-23 Thread Alan Bateman
On Thu, 23 Feb 2023 09:48:39 GMT, Sean Coffey wrote: > would use of jdk.internal.util.SystemProps be an option here (if having to > retrieve that value when we're at VM init level <1 ? The early startup scenario is early in the system property initialization, specifically SystemProps.Raw. whic

Re: RFR: 8301119: Support for GB18030-2022 [v2]

2023-02-23 Thread Sean Coffey
On Thu, 23 Feb 2023 09:03:49 GMT, Alan Bateman wrote: >> Scratch that: as it seems to be important that we don't switch after startup >> then what this code is really reaching for is `static final` field >> semantics. Since `StandardCharsets` might be loaded very early a holder >> class patter

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-23 Thread Kasper Nielsen
On Wed, 22 Feb 2023 21:29:12 GMT, Rémi Forax wrote: >> In all the places I've seen LambdaMetaFactory used, it is because of >> performance over reflection/non-static method handles. See, for example, >> https://www.optaplanner.org/blog/2018/01/09/JavaReflectionButMuchFaster.html. >> I believe

RFR: JDK-8297605 DelayQueue javadoc is confusing

2023-02-23 Thread Viktor Klang
Clarifies the distinction between expiration of the head of DelayQueue and how it relates to `poll`, `take`, and `peek`. See discussion on https://bugs.openjdk.org/browse/JDK-8297605 @DougLea If possible, please weigh in on whether this is in line with your thoughts on the matter.

Re: RFR: 8301119: Support for GB18030-2022 [v2]

2023-02-23 Thread Alan Bateman
On Thu, 23 Feb 2023 08:55:08 GMT, Claes Redestad wrote: >> `@Stable` semantics are still fuzzy to me but the rule I've adhered to is >> that back to back stores to the field - if unavoidable - needs to be >> idempotent since the JIT (or AOT) may record any non-null value as a compile >> time c

Re: RFR: 8301119: Support for GB18030-2022 [v2]

2023-02-23 Thread Claes Redestad
On Thu, 23 Feb 2023 08:32:29 GMT, Claes Redestad wrote: >> `Charset` class is initialized *before* system properties are set up, in >> order to check the JNU encoding (used for file path name) is a supported >> charset or not. In some OS environments, GB18030 is the native encoding so >> we ne

Re: RFR: 8282319: java.util.Locale method to stream available Locales

2023-02-23 Thread Justin Lu
On Mon, 30 Jan 2023 07:11:57 GMT, Sergey Tsypanov wrote: >> This PR proposes introducing a new method to Locale which returns >> Stream >> >> It involves adding an additional method to _LocaleServiceProviderPool_ that >> returns Stream, which _Locale_ can call. >> >> `LocaleServiceProviderPoo

Re: RFR: 8282319: java.util.Locale method to stream available Locales

2023-02-23 Thread Sergey Tsypanov
On Fri, 27 Jan 2023 21:48:26 GMT, Justin Lu wrote: > This PR proposes introducing a new method to Locale which returns > Stream > > It involves adding an additional method to _LocaleServiceProviderPool_ that > returns Stream, which _Locale_ can call. > > `LocaleServiceProviderPool.streamAllAv

RFR: 8282319: java.util.Locale method to stream available Locales

2023-02-23 Thread Justin Lu
This PR proposes introducing a new method to Locale which returns Stream It involves adding an additional method to _LocaleServiceProviderPool_ that returns Stream, which _Locale_ can call. `LocaleServiceProviderPool.streamAllAvaliableLocales()` does not need a defensive copy of `AllAvailableLo

Re: RFR: 8301119: Support for GB18030-2022 [v2]

2023-02-23 Thread Claes Redestad
On Wed, 22 Feb 2023 17:52:01 GMT, Naoto Sato wrote: >>> curious - what scenario triggers this call at initLevel < 1 ? >> >> It's not supported, but it is possible that someone might run with >> -Dfile.encoding=GB18030, in which case the default charset is used before >> the system properties a

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v4]

2023-02-23 Thread Alan Bateman
> Executors.newSingleThreadExecutor returns a delegating ExecutorService that > has finalizer to shutdown the underlying TPE when the wrapper is finalizable. > It goes back to JDK 6 and JDK-6399443. This is the last non-empty finalizer > in java.base. Removing it will likely lead to bug reports/

Re: RFR: 8302976: C2 intrinsification of Float.floatToFloat16 and Float.float16ToFloat yields different result than the interpreter

2023-02-23 Thread David Holmes
On Wed, 22 Feb 2023 02:08:27 GMT, Sandhya Viswanathan wrote: > Change the java/lang/float.java and the corresponding shared runtime constant > expression evaluation to generate QNaN. > The HW instructions generate QNaNs and not SNaNs for floating point > instructions. This happens across doubl