Re: RFR: 8322292: Rearrange comparison of fields in Record.equals()

2023-12-18 Thread Hannes Greule
On Mon, 18 Dec 2023 13:42:35 GMT, Sergey Tsypanov wrote: > Currently if we create a record it's fields are compared in their declaration > order. This might be ineffective in cases when two objects have "heavy" > fields equals to each other, but different "lightweight" fields (heavy and >

Re: Omission in javadoc Stream.toArray(): Safe array contract stipulation

2023-12-18 Thread Stuart Marks
Hi Reinier, I see you asked this here as well as on Stack Overflow. I'll repeat my answer from Stack Overflow here and then continue with some additional discussion. Quick recap: Collection::toArray has a requirement that the returned array be "safe", whereas Stream::toArray has no such

Withdrawn: 8321637: Simplify if statement in ArraysSupport::hugeLength

2023-12-18 Thread John Jiang
On Sat, 9 Dec 2023 23:19:52 GMT, John Jiang wrote: > It looks the `else-if` and `else` clauses in method > `ArraysSupport::hugeLength` could be simplified by `Math::max`. This pull request has been closed without being integrated. - PR: https://git.openjdk.org/jdk/pull/17043

Re: RFR: 8321637: Simplify if statement in ArraysSupport::hugeLength

2023-12-18 Thread John Jiang
On Tue, 19 Dec 2023 03:44:26 GMT, Stuart Marks wrote: >> It looks the `else-if` and `else` clauses in method >> `ArraysSupport::hugeLength` could be simplified by `Math::max`. > > This change would make the code shorter, but in my opinion, it obscures > what's going on. This code tries to be

Re: RFR: 8321637: Simplify if statement in ArraysSupport::hugeLength

2023-12-18 Thread Stuart Marks
On Sat, 9 Dec 2023 23:19:52 GMT, John Jiang wrote: > It looks the `else-if` and `else` clauses in method > `ArraysSupport::hugeLength` could be simplified by `Math::max`. This change would make the code shorter, but in my opinion, it obscures what's going on. This code tries to be very

Re: RFR: 8321688: Build on linux with GCC 7.5.0 fails after 8319577 [v2]

2023-12-18 Thread Guoxiong Li
On Sun, 17 Dec 2023 13:25:00 GMT, Guoxiong Li wrote: >> Hi all, >> >> This patch fixes the building failure introduced by >> [JDK-8319577](https://bugs.openjdk.org/browse/JDK-8319577) in old GCC >> version (linux & GCC 7.5.0 locally). >> >> Thanks for the review. >> >> Best Regards, >> --

Re: RFR: 8321688: Build on linux with GCC 7.5.0 fails after 8319577 [v2]

2023-12-18 Thread Sandhya Viswanathan
On Sun, 17 Dec 2023 13:25:00 GMT, Guoxiong Li wrote: >> Hi all, >> >> This patch fixes the building failure introduced by >> [JDK-8319577](https://bugs.openjdk.org/browse/JDK-8319577) in old GCC >> version (linux & GCC 7.5.0 locally). >> >> Thanks for the review. >> >> Best Regards, >> --

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v2]

2023-12-18 Thread Adam Sotona
On Sat, 16 Dec 2023 15:54:57 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added missing comment > > src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java > line 548: >

Re: RFR: 8320919: Clarify Locale related system properties [v8]

2023-12-18 Thread Naoto Sato
> This is a doc change to clarify what the `Default Locale` is, and how it is > established during the system startup using the system properties. Those > locale-related system properties have existed since the early days of Java, > but have never been publicly documented before. It is also the

Re: RFR: 8259637: java.io.File.getCanonicalPath() returns different values for same path [v2]

2023-12-18 Thread Brian Burkhalter
> Modify the `collapse()` function to remove each instance of ".." when the > path is absolute and there is no preceding name. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8259637: Use Stream.of in test -

[jdk22] RFR: 8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled

2023-12-18 Thread Aleksei Voitylov
Hi all, This pull request contains a backport of commit [fde5b168](https://github.com/openjdk/jdk/commit/fde5b16817c3263236993f2e8c2d2469610d99bd) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Aleksei Voitylov on 14 Dec 2023 and

Withdrawn: 8310901: Convert String::newStringNoRepl with Latin-1 to String::newStringLatin1NoRepl

2023-12-18 Thread duke
On Mon, 26 Jun 2023 15:25:08 GMT, Glavo wrote: > Added a new method `newStringLatin1NoRepl` to the `JavaLangAccess`. > > Reasons: > > * Most use cases of `newStringNoRepl` use `ISO_8859_1` as the charset, > creating a new shortcut can make writing shorter; > * Since all possible values of

Re: RFR: 8320707: Virtual thread test updates

2023-12-18 Thread Chris Plummer
On Sat, 16 Dec 2023 17:25:20 GMT, Alan Bateman wrote: > A lot of test changes have accumulated in the loom repo, this includes both > new tests and updates to existing tests. Some of these updates can be brought > to the main line. This update brings over: > > - The existing tests for pinning

Re: RFR: 8259637: java.io.File.getCanonicalPath() returns different values for same path [v2]

2023-12-18 Thread Brian Burkhalter
On Sun, 17 Dec 2023 08:53:15 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8259637: Use Stream.of in test > > test/jdk/java/io/File/GetCanonicalPath.java line 98: > >> 96:

Re: RFR: 8321637: Simplify if statement in ArraysSupport::hugeLength

2023-12-18 Thread John Jiang
On Sat, 9 Dec 2023 23:19:52 GMT, John Jiang wrote: > It looks the `else-if` and `else` clauses in method > `ArraysSupport::hugeLength` could be simplified by `Math::max`. Could this simple PR be reviewed? - PR Comment:

Re: RFR: 8321688: Build on linux with GCC 7.5.0 fails after 8319577 [v2]

2023-12-18 Thread Kim Barrett
On Sun, 17 Dec 2023 13:25:00 GMT, Guoxiong Li wrote: >> Hi all, >> >> This patch fixes the building failure introduced by >> [JDK-8319577](https://bugs.openjdk.org/browse/JDK-8319577) in old GCC >> version (linux & GCC 7.5.0 locally). >> >> Thanks for the review. >> >> Best Regards, >> --

RFR: 8322292: Rearrange comparison of fields in Record.equals()

2023-12-18 Thread Sergey Tsypanov
Currently if we create a record it's fields are compared in their declaration order. This might be ineffective in cases when two objects have "heavy" fields equals to each other, but different "lightweight" fields (heavy and lightweight in terms of comparison) e.g. primitives, enums,

Re: RFR: 8275338: Add JFR events for notable serialization situations [v3]

2023-12-18 Thread Raffaello Giulietti
> Adds serialization misdeclaration events to JFR. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Event enabled on profile.jfc but disabled on default.jfc. - Changes: - all:

Re: RFR: 8275338: Add JFR events for notable serialization situations [v2]

2023-12-18 Thread Erik Gahlin
On Sat, 16 Dec 2023 01:27:17 GMT, Erik Gahlin wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Restrict accessibility of nested classes. > > It seems correct to have the event disabled in both

Re: RFR: 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable [v7]

2023-12-18 Thread Serguei Spitsyn
On Fri, 15 Dec 2023 10:49:56 GMT, Serguei Spitsyn wrote: >> This fix is for JDK 23 but the intention is to back port it to 22 in RDP-1 >> time frame. >> It is fixing a deadlock issue between `VirtualThread` class critical >> sections with the `interruptLock` (in methods: `unpark()`,

Re: RFR: 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable [v8]

2023-12-18 Thread Serguei Spitsyn
> This fix is for JDK 23 but the intention is to back port it to 22 in RDP-1 > time frame. > It is fixing a deadlock issue between `VirtualThread` class critical sections > with the `interruptLock` (in methods: `unpark()`, `interrupt()`, > `getAndClearInterrupt()`, `threadState()`,

Re: RFR: 8275338: Add JFR events for notable serialization situations [v2]

2023-12-18 Thread Raffaello Giulietti
On Sat, 16 Dec 2023 01:27:17 GMT, Erik Gahlin wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Restrict accessibility of nested classes. > > It seems correct to have the event disabled in both

Integrated: 8259637: java.io.File.getCanonicalPath() returns different values for same path

2023-12-18 Thread Brian Burkhalter
On Wed, 13 Dec 2023 19:37:15 GMT, Brian Burkhalter wrote: > Modify the `collapse()` function to remove each instance of ".." when the > path is absolute and there is no preceding name. This pull request has now been integrated. Changeset: b98d13fc Author:Brian Burkhalter URL:

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v4]

2023-12-18 Thread Adam Sotona
> java.base java.lang.invoke package heavily uses ASM to generate lambdas and > method handles. > > This patch converts ASM calls to Classfile API. > > This PR is continuation of https://github.com/openjdk/jdk/pull/12945 > > Any comments and suggestions are welcome. > > Please review. > >

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v2]

2023-12-18 Thread Adam Sotona
On Sat, 16 Dec 2023 16:53:26 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added missing comment > > src/java.base/share/classes/java/lang/invoke/MethodType.java line 1295: > >> 1293: public

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v2]

2023-12-18 Thread Adam Sotona
On Sat, 16 Dec 2023 16:49:26 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added missing comment > > src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 2290: > >> 2288:

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v2]

2023-12-18 Thread Adam Sotona
On Sat, 16 Dec 2023 16:42:09 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added missing comment > > src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java > line 1519: > >>

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v3]

2023-12-18 Thread Adam Sotona
On Sat, 16 Dec 2023 16:37:16 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Apply suggestions from code review >> >> Co-authored-by: liach <7806504+li...@users.noreply.github.com> > >

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v2]

2023-12-18 Thread Adam Sotona
On Sat, 16 Dec 2023 16:32:23 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added missing comment > > src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java > line 1145: > >>

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v2]

2023-12-18 Thread Adam Sotona
On Sat, 16 Dec 2023 16:12:05 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added missing comment > > src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java > line 1171: > >>

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v3]

2023-12-18 Thread Adam Sotona
> java.base java.lang.invoke package heavily uses ASM to generate lambdas and > method handles. > > This patch converts ASM calls to Classfile API. > > This PR is continuation of https://github.com/openjdk/jdk/pull/12945 > > Any comments and suggestions are welcome. > > Please review. > >