Re: RFR: 8304982: Emit warning for removal of `COMPAT` provider [v2]

2023-04-03 Thread Alan Bateman
On Mon, 3 Apr 2023 20:15:49 GMT, Naoto Sato wrote: > Locale providers provided by users can all be loaded in the name of `SPI`, as > they are the real implementation of `LocaleServiceProvider` class, so the > order of the preference can be specified against JDK's `CLDR` provider. Does > this a

Re: RFR: 8305341: Alignment outside of HotSpot should be enforced by alignas instead of compiler specific attributes

2023-04-03 Thread Chris Plummer
On Fri, 31 Mar 2023 06:07:39 GMT, Julian Waters wrote: > C11 has been stable for a long time on all platforms, so native code can use > the standard alignas operator for alignment requirements I'm not sure what you mean by hotspot requiring a special review, but serviceability code does requir

Re: RFR: 8305341: Alignment outside of HotSpot should be enforced by alignas instead of compiler specific attributes

2023-04-03 Thread Julian Waters
On Fri, 31 Mar 2023 06:07:39 GMT, Julian Waters wrote: > C11 has been stable for a long time on all platforms, so native code can use > the standard alignas operator for alignment requirements globalDefinitions_visCPP.hpp (and the corresponding globalDefinitions file for gcc based compilers) a

Withdrawn: JDK-8301621: libzip should use pread instead of lseek+read

2023-04-03 Thread duke
On Fri, 3 Feb 2023 19:49:44 GMT, Justin King wrote: > Avoid using `lseek` + `read` in favor of `pread`. For Windows, we can do the > same thing by using `OVERLAPPED`, as we are in synchronous mode we can use > `Offset` and `OffsetHigh` to achieve the same thing. > > Additionally I updated open

Re: RFR: 8303762: [vectorapi] Intrinsification of Vector.slice [v4]

2023-04-03 Thread Xiaohong Gong
On Sat, 1 Apr 2023 07:44:25 GMT, Quan Anh Mai wrote: >> `Vector::slice` is a method at the top-level class of the Vector API that >> concatenates the 2 inputs into an intermediate composite and extracts a >> window equal to the size of the inputs into the result. It is used in vector >> conver

Re: RFR: 8305107: Emoji related binary properties in RegEx

2023-04-03 Thread Iris Clark
On Mon, 3 Apr 2023 22:58:30 GMT, Naoto Sato wrote: > Introducing new regex constructs that match those 6 new Unicode Emoji > properties implemented in the `Character` class > (https://bugs.openjdk.org/browse/JDK-8303018). A corresponding CSR has been > drafted. Associated CSR also Reviewed.

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

2023-04-03 Thread Paul Sandoz
On Tue, 4 Apr 2023 00:56:09 GMT, Quan Anh Mai wrote: > Thanks, may I integrate the changes now? You might need another HotSpot reviewer? @vnkozlov is that correct? - PR Comment: https://git.openjdk.org/jdk/pull/13093#issuecomment-1495198225

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

2023-04-03 Thread Quan Anh Mai
On Fri, 31 Mar 2023 12:25:16 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

Integrated: JDK-8305206: Add @spec tags in java.base/java.* (part 1)

2023-04-03 Thread Jonathan Gibbons
On Thu, 30 Mar 2023 17:24:11 GMT, Jonathan Gibbons wrote: > Please review a change to add `@spec` tags (and remove some equivalent `@see` > tags) to the main "core-libs" packages in `java.base` module. > > This is similar to, and a subset of, PR #11073. That PR was withdrawn, and > based on

Integrated: JDK-8303798: REDO - Remove fdlibm C sources

2023-04-03 Thread Joe Darcy
On Sat, 1 Apr 2023 18:08:44 GMT, Joe Darcy wrote: > This PR is a redo of JDK-8302801: Remove fdlibm C sources. The problem with > JDK-8302801 was that it neglected (mea culpa) to include a Java > implementation of IEEEremainder before the FDLIBM C implementation was > deleted. Such an implemen

Re: RFR: 8305113: (tz) Update Timezone Data to 2023c [v3]

2023-04-03 Thread Yoshiki Sato
> Pleases review this PR. > The PR includes the following changes. > - tzdata 2023c > - Hack code to deal with Cairo's DST end, which is same as done in > 2014g([JDK-8049343](https://bugs.openjdk.org/browse/JDK-8049343)). To work > around the the limitation of JSR 310 compiler, where the time 2

Re: RFR: 8305113: (tz) Update Timezone Data to 2023c [v2]

2023-04-03 Thread Yoshiki Sato
> Pleases review this PR. > The PR includes the following changes. > - tzdata 2023c > - Hack code to deal with Cairo's DST end, which is same as done in > 2014g([JDK-8049343](https://bugs.openjdk.org/browse/JDK-8049343)). To work > around the the limitation of JSR 310 compiler, where the time 2

Re: RFR: 8305113: (tz) Update Timezone Data to 2023c

2023-04-03 Thread Yoshiki Sato
On Fri, 31 Mar 2023 22:06:34 GMT, Sergey Bylokhov wrote: >> Pleases review this PR. >> The PR includes the following changes. >> - tzdata 2023c >> - Hack code to deal with Cairo's DST end, which is same as done in >> 2014g([JDK-8049343](https://bugs.openjdk.org/browse/JDK-8049343)). To work >

Re: RFR: 8305113: (tz) Update Timezone Data to 2023c

2023-04-03 Thread Yoshiki Sato
On Fri, 31 Mar 2023 22:05:01 GMT, Sergey Bylokhov wrote: >> Pleases review this PR. >> The PR includes the following changes. >> - tzdata 2023c >> - Hack code to deal with Cairo's DST end, which is same as done in >> 2014g([JDK-8049343](https://bugs.openjdk.org/browse/JDK-8049343)). To work >

Re: RFR: 8305113: (tz) Update Timezone Data to 2023c

2023-04-03 Thread Yoshiki Sato
On Fri, 31 Mar 2023 16:44:52 GMT, Naoto Sato wrote: >> Pleases review this PR. >> The PR includes the following changes. >> - tzdata 2023c >> - Hack code to deal with Cairo's DST end, which is same as done in >> 2014g([JDK-8049343](https://bugs.openjdk.org/browse/JDK-8049343)). To work >> aro

RFR: 8305107: Emoji related binary properties in RegEx

2023-04-03 Thread Naoto Sato
Introducing new regex constructs that match those 6 new Unicode Emoji properties implemented in the `Character` class (https://bugs.openjdk.org/browse/JDK-8303018). A corresponding CSR has been drafted. - Commit messages: - 8305107: Emoji related binary properties in RegEx Change

Re: RFR: 8305425: Thread.isAlive0 doesn't need to call into the VM [v2]

2023-04-03 Thread David Holmes
On Mon, 3 Apr 2023 09:36:39 GMT, David Holmes wrote: >> We have the strange situation where calling `t.isAlive()` on a >> `java.lang.Thread` `t`, will call into the VM (via `alive()` then >> `isAlive0()`) where the VM then examines the `eetop` field of `t` to extract >> its `JavaThread` pointe

Re: RFR: 8305425: Thread.isAlive0 doesn't need to call into the VM [v3]

2023-04-03 Thread David Holmes
> We have the strange situation where calling `t.isAlive()` on a > `java.lang.Thread` `t`, will call into the VM (via `alive()` then > `isAlive0()`) where the VM then examines the `eetop` field of `t` to extract > its `JavaThread` pointer and compare it to null. We can simply read `eetop` > dir

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v8]

2023-04-03 Thread Mandy Chung
> This implements a shared utility to dump generated classes defined as > normal/hidden classes via `Lookup` API. This replaces the implementation in > `LambdaMetaFactory` and method handle implementation that dumps the hidden > class bytes on disk for debugging. > > For classes defined vi

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v7]

2023-04-03 Thread Mandy Chung
> This implements a shared utility to dump generated classes defined as > normal/hidden classes via `Lookup` API. This replaces the implementation in > `LambdaMetaFactory` and method handle implementation that dumps the hidden > class bytes on disk for debugging. > > For classes defined vi

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v6]

2023-04-03 Thread Mandy Chung
On Mon, 3 Apr 2023 21:05:07 GMT, Rémi Forax wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> comments from Jorn Vernee > > src/java.base/share/classes/jdk/internal/util/ClassFileDumper.java line 199: > >> 197:

Re: RFR: JDK-8303798: REDO - Remove fdlibm C sources

2023-04-03 Thread David Holmes
On Sat, 1 Apr 2023 18:08:44 GMT, Joe Darcy wrote: > This PR is a redo of JDK-8302801: Remove fdlibm C sources. The problem with > JDK-8302801 was that it neglected (mea culpa) to include a Java > implementation of IEEEremainder before the FDLIBM C implementation was > deleted. Such an implemen

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v6]

2023-04-03 Thread Rémi Forax
On Mon, 3 Apr 2023 20:24:56 GMT, Mandy Chung wrote: >> This implements a shared utility to dump generated classes defined as >> normal/hidden classes via `Lookup` API. This replaces the implementation >> in `LambdaMetaFactory` and method handle implementation that dumps the >> hidden class b

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v6]

2023-04-03 Thread Jorn Vernee
On Mon, 3 Apr 2023 20:24:56 GMT, Mandy Chung wrote: >> This implements a shared utility to dump generated classes defined as >> normal/hidden classes via `Lookup` API. This replaces the implementation >> in `LambdaMetaFactory` and method handle implementation that dumps the >> hidden class b

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v5]

2023-04-03 Thread Mandy Chung
On Mon, 3 Apr 2023 19:41:28 GMT, Jorn Vernee wrote: >> I see your point. If it were a static counter for all dumpers, >> multiple`.failed-xxx` dumped by a single dumper may not be in sequence if >> other dumpers have `.failed-xxx` class files. > > If the counter has to be per dumper, maybe i

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v6]

2023-04-03 Thread Mandy Chung
> This implements a shared utility to dump generated classes defined as > normal/hidden classes via `Lookup` API. This replaces the implementation in > `LambdaMetaFactory` and method handle implementation that dumps the hidden > class bytes on disk for debugging. > > For classes defined vi

Re: RFR: 8304982: Emit warning for removal of `COMPAT` provider [v2]

2023-04-03 Thread Naoto Sato
On Mon, 3 Apr 2023 19:56:03 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Replaced "Java Runtime Environment" with "JDK Reference Implementation" > > src/java.base/share/classes/java/util/spi/Loca

Re: RFR: 8304982: Emit warning for removal of `COMPAT` provider [v2]

2023-04-03 Thread Alan Bateman
On Mon, 3 Apr 2023 18:11:03 GMT, Naoto Sato wrote: >> This is a precursor to the future removal of the `COMPAT` locale data >> provider. Before the actual removal of the provider, warn the users who >> explicitly specify `COMPAT` at the command line in order for their smooth >> migration to CL

Withdrawn: JDK-8297605 DelayQueue javadoc is confusing

2023-04-03 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

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

2023-04-03 Thread Viktor Klang
On Fri, 24 Feb 2023 16:08:57 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 w

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v5]

2023-04-03 Thread Jorn Vernee
On Mon, 3 Apr 2023 19:26:13 GMT, Mandy Chung wrote: >> src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 2536: >> >>> 2534: } >>> 2535: } else { >>> 2536: name += ".failed-" + >>> dumper.increment

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v5]

2023-04-03 Thread Jorn Vernee
On Mon, 3 Apr 2023 19:21:00 GMT, Mandy Chung wrote: >> src/java.base/share/classes/jdk/internal/util/ClassFileDumper.java line 115: >> >>> 113: if (dumper.isEnabled() && !path.equals(dumper.dumpPath())) { >>> 114: throw new IllegalArgumentException("mismatched dump path >>>

Re: RFR: 8305341: Alignment outside of HotSpot should be enforced by alignas instead of compiler specific attributes

2023-04-03 Thread Chris Plummer
On Fri, 31 Mar 2023 06:07:39 GMT, Julian Waters wrote: > C11 has been stable for a long time on all platforms, so native code can use > the standard alignas operator for alignment requirements > I don't think I can touch the freetype code since I think it's an external > library that was impor

Re: RFR: JDK-8303798: REDO - Remove fdlibm C sources

2023-04-03 Thread Vladimir Kozlov
On Sat, 1 Apr 2023 18:08:44 GMT, Joe Darcy wrote: > This PR is a redo of JDK-8302801: Remove fdlibm C sources. The problem with > JDK-8302801 was that it neglected (mea culpa) to include a Java > implementation of IEEEremainder before the FDLIBM C implementation was > deleted. Such an implemen

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v5]

2023-04-03 Thread Mandy Chung
On Mon, 3 Apr 2023 18:13:54 GMT, Jorn Vernee wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> set -D or -D=true will enable dumping > > src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 2536: > >>

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v5]

2023-04-03 Thread Mandy Chung
On Mon, 3 Apr 2023 18:07:52 GMT, Jorn Vernee wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> set -D or -D=true will enable dumping > > src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java >

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v5]

2023-04-03 Thread Jorn Vernee
On Thu, 30 Mar 2023 18:46:25 GMT, Mandy Chung wrote: >> This implements a shared utility to dump generated classes defined as >> normal/hidden classes via `Lookup` API. This replaces the implementation >> in `LambdaMetaFactory` and method handle implementation that dumps the >> hidden class

RFR: 8305461: [vectorapi] Add VectorMask::xor

2023-04-03 Thread Quan Anh Mai
Hi, This patch adds `VectorMask.xor` to the public interface of `VectorMask`. This method has already been existed in each concrete mask classes. Also, this patch renames `VectorMask.eq` to `VectorMask::xorNot`, which is more consistent with other logical operations in the same interface. Plea

Re: RFR: 8304982: Emit warning for removal of `COMPAT` provider [v2]

2023-04-03 Thread Naoto Sato
On Mon, 3 Apr 2023 17:25:57 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Replaced "Java Runtime Environment" with "JDK Reference Implementation" > > src/java.base/share/classes/java/util/spi/Loca

Re: RFR: 8304982: Emit warning for removal of `COMPAT` provider [v2]

2023-04-03 Thread Naoto Sato
> This is a precursor to the future removal of the `COMPAT` locale data > provider. Before the actual removal of the provider, warn the users who > explicitly specify `COMPAT` at the command line in order for their smooth > migration to CLDR. A CSR has also been drafted. Naoto Sato has updated

Re: RFR: 8305486: Add split() variants that keep the delimiters to String and j.u.r.Pattern

2023-04-03 Thread Raffaello Giulietti
On Mon, 3 Apr 2023 17:43:55 GMT, Raffaello Giulietti wrote: > Add `split()` overloads to `String` and `java.util.regex.Pattern` that, in > addition to the substrings returned by current `split()` variants, also > return the delimiters matching the regular expression. Also see [here](https://

RFR: 8305486: Add split() variants that keep the delimiters to String and j.u.r.Pattern

2023-04-03 Thread Raffaello Giulietti
Add `split()` overloads to `String` and `java.util.regex.Pattern` that, in addition to the substrings returned by current `split()` variants, also return the delimiters matching the regular expression. - Commit messages: - 8305486: Add split() variants that keep the delimiters to S

Re: RFR: 8304982: Emit warning for removal of `COMPAT` provider

2023-04-03 Thread Alan Bateman
On Mon, 3 Apr 2023 16:47:40 GMT, Naoto Sato wrote: > This is a precursor to the future removal of the `COMPAT` locale data > provider. Before the actual removal of the provider, warn the users who > explicitly specify `COMPAT` at the command line in order for their smooth > migration to CLDR.

Integrated: JDK-8304945: StringBuilder and StringBuffer should implement Appendable explicitly

2023-04-03 Thread Joe Darcy
On Sat, 1 Apr 2023 17:34:37 GMT, Joe Darcy wrote: > The StringBuilder and StringBuffer classes are Appendable by virtue of from > subclasses their non-public superclass AbstractStringBuilder. > > It is slightly clearer to declare StringBuilder and StringBuffer to directly > implement Appendabl

Re: RFR: JDK-8304945: StringBuilder and StringBuffer should implement Appendable explicitly

2023-04-03 Thread Joe Darcy
On Sun, 2 Apr 2023 07:45:23 GMT, Sergey Tsypanov wrote: >> The StringBuilder and StringBuffer classes are Appendable by virtue of from >> subclasses their non-public superclass AbstractStringBuilder. >> >> It is slightly clearer to declare StringBuilder and StringBuffer to directly >> implemen

Re: RFR: JDK-8304945: StringBuilder and StringBuffer should implement Appendable explicitly

2023-04-03 Thread Roger Riggs
On Sat, 1 Apr 2023 17:34:37 GMT, Joe Darcy wrote: > The StringBuilder and StringBuffer classes are Appendable by virtue of from > subclasses their non-public superclass AbstractStringBuilder. > > It is slightly clearer to declare StringBuilder and StringBuffer to directly > implement Appendabl

RFR: 8304982: Emit warning for removal of `COMPAT` provider

2023-04-03 Thread Naoto Sato
This is a precursor to the future removal of the `COMPAT` locale data provider. Before the actual removal of the provider, warn the users who explicitly specify `COMPAT` at the command line in order for their smooth migration to CLDR. A CSR has also been drafted. - Commit messages:

Re: RFR: 8298619: java/io/File/GetXSpace.java is failing [v4]

2023-04-03 Thread Roger Riggs
On Wed, 29 Mar 2023 18:05:46 GMT, Brian Burkhalter wrote: >> Modify the `Space` instances used for size comparison to be created with >> total number of bytes derived from the Windows `diskFree` utility instead of >> Cygwin’s `df`. > > Brian Burkhalter has updated the pull request incrementally

Re: RFR: 8303762: [vectorapi] Intrinsification of Vector.slice [v4]

2023-04-03 Thread Paul Sandoz
On Sat, 1 Apr 2023 07:44:25 GMT, Quan Anh Mai wrote: >> `Vector::slice` is a method at the top-level class of the Vector API that >> concatenates the 2 inputs into an intermediate composite and extracts a >> window equal to the size of the inputs into the result. It is used in vector >> conver

Integrated: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit

2023-04-03 Thread Eirik Bjorsnos
On Tue, 14 Feb 2023 17:46:21 GMT, Eirik Bjorsnos wrote: > CorruptedZipFiles could benefit from some spring cleaning and a conversion to > junit: > > - The actual tests are moved into their own `@Test` methods, given more > meaningful names and a Javadoc comment explaining the constraint being

Re: RFR: 8298619: java/io/File/GetXSpace.java is failing [v3]

2023-04-03 Thread Brian Burkhalter
On Wed, 29 Mar 2023 16:10:34 GMT, Roger Riggs wrote: >> Brian Burkhalter has updated the pull request with a new target base due to >> a merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains five additional >> comm

Re: RFR: 8298619: java/io/File/GetXSpace.java is failing [v4]

2023-04-03 Thread Brian Burkhalter
On Tue, 28 Feb 2023 21:26:55 GMT, Brian Burkhalter wrote: >> Spawning `df` and `diskFree` processes have been replaced with native calls. >> For a reason as yet undetermined, the Windows function >> `GetDiskSpaceInformationW` fails to load on Windows Server 2016 so it is >> loaded dynamically

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

2023-04-03 Thread Jim Laskey
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. This pull request has now been integrated. Changeset: 9b9b5a7a Author:Jim Laskey URL: https://git.openjdk.org/jdk/commit/9b9b5a7a5c

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

2023-04-03 Thread Paul Sandoz
On Fri, 31 Mar 2023 12:25:16 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 [v6]

2023-04-03 Thread Paul Sandoz
On Fri, 31 Mar 2023 12:25:16 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: 8297605: improve DelayQueue removal method javadoc [v2]

2023-04-03 Thread Viktor Klang
On Tue, 21 Mar 2023 17:51:26 GMT, Martin Buchholz wrote: >> 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

Re: RFR: 8305425: Thread.isAlive0 doesn't need to call into the VM [v2]

2023-04-03 Thread Aleksey Shipilev
On Mon, 3 Apr 2023 12:32:35 GMT, David Holmes wrote: > > This looks interesting. I think it is time to rename eetop to > > javaThreadAddr ... > > Feel free to file a RFE but not as part of this PR. :) Well, when this thing is considered in isolation, it changes the clear `isAlive0()` call to

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit [v6]

2023-04-03 Thread Eirik Bjorsnos
On Fri, 31 Mar 2023 19:59:10 GMT, Eirik Bjorsnos wrote: >> CorruptedZipFiles could benefit from some spring cleaning and a conversion >> to junit: >> >> - The actual tests are moved into their own `@Test` methods, given more >> meaningful names and a Javadoc comment explaining the constraint b

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit [v7]

2023-04-03 Thread Eirik Bjorsnos
> CorruptedZipFiles could benefit from some spring cleaning and a conversion to > junit: > > - The actual tests are moved into their own `@Test` methods, given more > meaningful names and a Javadoc comment explaining the constraint being > verified > - The setup code is moved to a `@Before` met

Re: RFR: JDK-8303798: REDO - Remove fdlibm C sources

2023-04-03 Thread Erik Joelsson
On Sat, 1 Apr 2023 18:08:44 GMT, Joe Darcy wrote: > This PR is a redo of JDK-8302801: Remove fdlibm C sources. The problem with > JDK-8302801 was that it neglected (mea culpa) to include a Java > implementation of IEEEremainder before the FDLIBM C implementation was > deleted. Such an implemen

Re: RFR: 8305425: Thread.isAlive0 doesn't need to call into the VM [v2]

2023-04-03 Thread David Holmes
On 3/04/2023 9:27 pm, Simon Roberts wrote: Agreed, I believe there should be an hb relationship with this, if the target is not alive. You are both right - I did not recall the hb relationship between the last action of a thread and a call to isAlive that returns false. The existing code does

Re: RFR: 8305425: Thread.isAlive0 doesn't need to call into the VM [v2]

2023-04-03 Thread Coleen Phillimore
On Mon, 3 Apr 2023 09:36:39 GMT, David Holmes wrote: >> We have the strange situation where calling `t.isAlive()` on a >> `java.lang.Thread` `t`, will call into the VM (via `alive()` then >> `isAlive0()`) where the VM then examines the `eetop` field of `t` to extract >> its `JavaThread` pointe

Re: RFR: 8305425: Thread.isAlive0 doesn't need to call into the VM [v2]

2023-04-03 Thread David Holmes
On Mon, 3 Apr 2023 11:39:43 GMT, Aleksey Shipilev wrote: > This looks interesting. I think it is time to rename eetop to javaThreadAddr > ... Feel free to file a RFE but not as part of this PR. :) - PR Comment: https://git.openjdk.org/jdk/pull/13287#issuecomment-1494240185

Re: RFR: 8305425: Thread.isAlive0 doesn't need to call into the VM [v2]

2023-04-03 Thread David Holmes
On Mon, 3 Apr 2023 10:47:55 GMT, Quan Anh Mai wrote: > May I ask if we need some form of memory order here? Maybe an aquiring load > is necessary? What is it that you think needs ordering? - PR Comment: https://git.openjdk.org/jdk/pull/13287#issuecomment-1494238641

Re: RFR: 8305425: Thread.isAlive0 doesn't need to call into the VM [v2]

2023-04-03 Thread Aleksey Shipilev
On Mon, 3 Apr 2023 09:36:39 GMT, David Holmes wrote: >> We have the strange situation where calling `t.isAlive()` on a >> `java.lang.Thread` `t`, will call into the VM (via `alive()` then >> `isAlive0()`) where the VM then examines the `eetop` field of `t` to extract >> its `JavaThread` pointe

Re: RFR: 8305425: Thread.isAlive0 doesn't need to call into the VM [v2]

2023-04-03 Thread Simon Roberts
Agreed, I believe there should be an hb relationship with this, if the target is not alive. On Mon, Apr 3, 2023, 04:50 Quan Anh Mai wrote: > On Mon, 3 Apr 2023 09:36:39 GMT, David Holmes wrote: > > >> We have the strange situation where calling `t.isAlive()` on a > `java.lang.Thread` `t`, will

Re: RFR: JDK-8304945: StringBuilder and StringBuffer should implement Appendable explicitly

2023-04-03 Thread Alan Bateman
On Mon, 3 Apr 2023 10:58:35 GMT, Tingjun Yuan wrote: > So we don't have to change these classes. They are just examples where the superclass is not-public. > But in this issue, all public supertypes of `String{Builder,Buffer}` > (`Serializable`, `Comparable`, `CharSequence` and `Object`) do n

Re: RFR: JDK-8304945: StringBuilder and StringBuffer should implement Appendable explicitly

2023-04-03 Thread Tingjun Yuan
On Mon, 3 Apr 2023 10:23:03 GMT, Alan Bateman wrote: > > Are there more places where we "accidentally" expose interfaces via > > non-public (or even public) super classes? > > Appendable was added as part of the scanning/formatting update in Java 5. > It's intentional that SB implements Append

Re: RFR: 8305425: Thread.isAlive0 doesn't need to call into the VM [v2]

2023-04-03 Thread Quan Anh Mai
On Mon, 3 Apr 2023 09:36:39 GMT, David Holmes wrote: >> We have the strange situation where calling `t.isAlive()` on a >> `java.lang.Thread` `t`, will call into the VM (via `alive()` then >> `isAlive0()`) where the VM then examines the `eetop` field of `t` to extract >> its `JavaThread` pointe

Re: RFR: JDK-8304945: StringBuilder and StringBuffer should implement Appendable explicitly

2023-04-03 Thread Alan Bateman
On Mon, 3 Apr 2023 07:57:56 GMT, Per Minborg wrote: > Are there more places where we "accidentally" expose interfaces via > non-public (or even public) super classes? Appendable was added as part of the scanning/formatting update in Java 5. It's intentional that SB implements Appendable but th

Re: RFR: 8305425: Thread.isAlive0 doesn't need to call into the VM [v2]

2023-04-03 Thread David Holmes
> We have the strange situation where calling `t.isAlive()` on a > `java.lang.Thread` `t`, will call into the VM (via `alive()` then > `isAlive0()`) where the VM then examines the `eetop` field of `t` to extract > its `JavaThread` pointer and compare it to null. We can simply read `eetop` > dir

Re: RFR: 8305425: Thread.isAlive0 doesn't need to call into the VM [v2]

2023-04-03 Thread David Holmes
On Mon, 3 Apr 2023 07:53:00 GMT, Alan Bateman wrote: >> David Holmes has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Comment from AlanB > > src/java.base/share/classes/java/lang/Thread.java line 231: > >> 229: /* Reserved for exclus

Re: RFR: JDK-8304945: StringBuilder and StringBuffer should implement Appendable explicitly

2023-04-03 Thread Per Minborg
On Sat, 1 Apr 2023 17:34:37 GMT, Joe Darcy wrote: > The StringBuilder and StringBuffer classes are Appendable by virtue of from > subclasses their non-public superclass AbstractStringBuilder. > > It is slightly clearer to declare StringBuilder and StringBuffer to directly > implement Appendabl

Re: RFR: 8305425: Thread.isAlive0 doesn't need to call into the VM

2023-04-03 Thread Alan Bateman
On Mon, 3 Apr 2023 07:17:59 GMT, David Holmes wrote: > We have the strange situation where calling `t.isAlive()` on a > `java.lang.Thread` `t`, will call into the VM (via `alive()` then > `isAlive0()`) where the VM then examines the `eetop` field of `t` to extract > its `JavaThread` pointer an

RFR: 8305425: Thread.isAlive0 doesn't need to call into the VM

2023-04-03 Thread David Holmes
We have the strange situation where calling `t.isAlive()` on a `java.lang.Thread` `t`, will call into the VM (via `alive()` then `isAlive0()`) where the VM then examines the `eetop` field of `t` to extract its `JavaThread` pointer and compare it to null. We can simply read `eetop` directly in `

Re: RFR: JDK-8304945: StringBuilder and StringBuffer should implement Appendable explicitly

2023-04-03 Thread Alan Bateman
On Sat, 1 Apr 2023 17:34:37 GMT, Joe Darcy wrote: > The StringBuilder and StringBuffer classes are Appendable by virtue of from > subclasses their non-public superclass AbstractStringBuilder. > > It is slightly clearer to declare StringBuilder and StringBuffer to directly > implement Appendabl

Re: RFR: 8305341: Alignment outside of HotSpot should be enforced by alignas instead of compiler specific attributes

2023-04-03 Thread Julian Waters
On Fri, 31 Mar 2023 06:07:39 GMT, Julian Waters wrote: > C11 has been stable for a long time on all platforms, so native code can use > the standard alignas operator for alignment requirements Just checked, the pragmas in the freetype code now seems to be pointless since there is no alignment

Re: RFR: JDK-8304945: StringBuilder and StringBuffer should implement Appendable explicitly

2023-04-03 Thread Sergey Tsypanov
On Sat, 1 Apr 2023 17:34:37 GMT, Joe Darcy wrote: > The StringBuilder and StringBuffer classes are Appendable by virtue of from > subclasses their non-public superclass AbstractStringBuilder. > > It is slightly clearer to declare StringBuilder and StringBuffer to directly > implement Appendabl

RFR: JDK-8304945: StringBuilder and StringBuffer should implement Appendable explicitly

2023-04-03 Thread Joe Darcy
The StringBuilder and StringBuffer classes are Appendable by virtue of from subclasses their non-public superclass AbstractStringBuilder. It is slightly clearer to declare StringBuilder and StringBuffer to directly implement Appendable, as they already directly implement the CharSequence interf

Re: RFR: 8305341: Alignment outside of HotSpot should be enforced by alignas instead of compiler specific attributes

2023-04-03 Thread Julian Waters
On Fri, 31 Mar 2023 06:07:39 GMT, Julian Waters wrote: > C11 has been stable for a long time on all platforms, so native code can use > the standard alignas operator for alignment requirements I don't think I can touch the freetype code since I think it's an external library that was imported.

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

2023-04-03 Thread ExE Boss
On Thu, 30 Mar 2023 11:28:25 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