Re: RFR: 8313875: Use literals instead of static fields in java.util.Math: twoToTheDoubleScaleUp, twoToTheDoubleScaleDown [v2]

2023-08-08 Thread Andrey Turbanov
On Mon, 7 Aug 2023 19:44:48 GMT, Andrey Turbanov wrote: >> Couple of static fields in Math are used only once and can be replaced with >> literals `0x1p512`/`0x1p-512 ` > > Andrey Turbanov has updated the pull request incrementally with one > additional commit si

Re: RFR: 8313875: Use literals instead of static fields in java.util.Math: twoToTheDoubleScaleUp, twoToTheDoubleScaleDown [v2]

2023-08-08 Thread Andrey Turbanov
On Tue, 8 Aug 2023 08:42:05 GMT, Raffaello Giulietti wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8313875: Make fields final in java.util.Math: twoToTheDoubleScaleUp, &g

Re: RFR: 8313875: Use literals instead of static fields final in java.util.Math: twoToTheDoubleScaleUp, twoToTheDoubleScaleDown [v2]

2023-08-07 Thread Andrey Turbanov
> Couple of static fields in Math are used only once and can be replaced with > literals `0x1p512`/`0x1p-512 ` Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8313875: Make fields final in java.util.Math: twoToTheDoubleS

Re: RFR: 8313875: Make fields final in java.util.Math: twoToTheDoubleScaleUp, twoToTheDoubleScaleDown

2023-08-07 Thread Andrey Turbanov
On Mon, 7 Aug 2023 16:43:49 GMT, Raffaello Giulietti wrote: >> Couple of static fields in Math could be declared `final`. > > src/java.base/share/classes/java/lang/Math.java line 3425: > >> 3423: // Constants used in scalb >> 3424: private static final double twoToTheDoubleScaleUp =

RFR: 8313875: Make fields final in java.util.Math: twoToTheDoubleScaleUp, twoToTheDoubleScaleDown

2023-08-07 Thread Andrey Turbanov
Couple of static fields in Math could be declared `final`. - Commit messages: - [PATCH] Make fields final in java.util.Math: twoToTheDoubleScaleUp, twoToTheDoubleScaleDown Changes: https://git.openjdk.org/jdk/pull/14875/files Webrev: https://webrevs.openjdk.org/?repo=jdk=14875=00

Re: RFR: 8311630: [s390] Implementation of Foreign Function & Memory API (Preview) [v10]

2023-08-06 Thread Andrey Turbanov
On Tue, 1 Aug 2023 06:29:28 GMT, sid8606 wrote: >> Implementation of "Foreign Function & Memory API" for s390x (Big Endian). > > sid8606 has updated the pull request incrementally with one additional commit > since the last revision: > > Fix typo > > Signed-off-by: Sidraya

Integrated: 8312414: Make java.util.ServiceLoader.LANG_ACCESS final

2023-07-21 Thread Andrey Turbanov
On Tue, 18 Jul 2023 20:06:56 GMT, Andrey Turbanov wrote: > Found opportunity to make static `ServiceLoader.LANG_ACCESS` field `final`. This pull request has now been integrated. Changeset: f4ba7b21 Author: Andrey Turbanov URL: https://git.openjdk.org/jdk/com

RFR: 8312414: Make java.util.ServiceLoader.LANG_ACCESS final

2023-07-19 Thread Andrey Turbanov
Found opportunity to make static `ServiceLoader.LANG_ACCESS` field `final`. - Commit messages: - 8312414: Make java.util.ServiceLoader.LANG_ACCESS final - [PATCH] Make java.util.ServiceLoader.LANG_ACCESS final Changes: https://git.openjdk.org/jdk/pull/14926/files Webrev:

Re: RFR: 8301341: LinkedTransferQueue does not respect timeout for poll() [v6]

2023-07-17 Thread Andrey Turbanov
On Thu, 13 Jul 2023 19:21:01 GMT, Doug Lea wrote: >> This now uses Thread.isVirtual to distinguish spin vs immediate block cases, >> enabling re-introduction of spin control from the previous version, removing >> anomalies like this one. > > Doug Lea has updated the pull request with a new

Re: RFR: 8311663: Additional refactoring of Locale tests to JUnit

2023-07-17 Thread Andrey Turbanov
On Thu, 13 Jul 2023 23:23:42 GMT, Justin Lu wrote: > Please review this PR which refactors more java.util.Locale tests to JUnit > with some minor cleanup as well. > > Although some of the files could benefit from being renamed bugNNN to > something more descriptive, this makes reviewing

Re: RFR: 8288899: java/util/concurrent/ExecutorService/CloseTest.java failed with "InterruptedException: sleep interrupted"

2023-06-27 Thread Andrey Turbanov
On Sat, 3 Jun 2023 14:08:02 GMT, Doug Lea wrote: > Addresses Jdk 8288899 : java/util/concurrent/ExecutorService/CloseTest.java > failed with "InterruptedException: sleep interrupted" and related issues. > > This is a major ForkJoin update (and hard to review -- sorry) that finally > addresses

Re: RFR: 8310849: Pattern matching for instanceof and arrayType cleanup in j.l.invoke and j.l.reflect [v3]

2023-06-26 Thread Andrey Turbanov
On Mon, 26 Jun 2023 13:51:25 GMT, Chen Liang wrote: >> This patch touches java.lang.reflect and java.lang.invoke packages. It >> replaces instanceof + cast with pattern matching and updates >> Array.newInstance().getClass() patterns with arrayType() for obtaining array >> types of a class. >

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v24]

2023-06-26 Thread Andrey Turbanov
On Sun, 25 Jun 2023 20:38:28 GMT, 温绍锦 wrote: >> By optimizing the implementation of java.lang.Long#fastUUID, the performance >> of the java.util.UUID#toString method can be significantly improved. >> >> The following are the test results of JMH: >> >> Benchmark Mode Cnt

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v23]

2023-06-25 Thread Andrey Turbanov
On Sun, 25 Jun 2023 20:20:00 GMT, 温绍锦 wrote: >> By optimizing the implementation of java.lang.Long#fastUUID, the performance >> of the java.util.UUID#toString method can be significantly improved. >> >> The following are the test results of JMH: >> >> Benchmark Mode Cnt

Re: RFR: 8294982: Implementation of Classfile API [v58]

2023-06-23 Thread Andrey Turbanov
On Wed, 8 Mar 2023 08:50:24 GMT, Adam Sotona wrote: >> This is root pull request with Classfile API implementation, tests and >> benchmarks initial drop into JDK. >> >> Following pull requests consolidating JDK class files parsing, generating, >> and transforming >>

Re: RFR: 8301341: LinkedTransferQueue does not respect timeout for poll()

2023-06-13 Thread Andrey Turbanov
On Mon, 5 Jun 2023 18:52:00 GMT, Doug Lea wrote: > This now uses Thread.isVirtual to distinguish spin vs immediate block cases, > enabling re-introduction of spin control from the previous version, removing > anomalies like this one.

Re: RFR: 8281658: Add a security category to the java -XshowSettings option

2023-06-13 Thread Andrey Turbanov
On Fri, 9 Jun 2023 13:54:14 GMT, Sean Coffey wrote: > New functionality in the -XshowSettings menu to display relevant information > about JDK security configuration src/java.base/share/classes/sun/launcher/LauncherHelper.java line 330: > 328: if

Re: RFR: 8289220: Locale.forLanguageTag throws NPE due to soft ref used in locale cache being cleared [v6]

2023-06-07 Thread Andrey Turbanov
On Wed, 7 Jun 2023 03:37:26 GMT, SUN Guoyun wrote: >> command: make test CONF=fastdebug JTREG="VM_OPTIONS=-Xcomp" >> TEST=gc/TestAllocHumongousFragment.java >> error info: >> >> Caused by: java.lang.NullPointerException: Cannot invoke >> "sun.util.locale.BaseLocale.getVariant()" because

Re: RFR: 8301341: LinkedTransferQueue does not respect timeout for poll()

2023-06-06 Thread Andrey Turbanov
On Mon, 5 Jun 2023 18:52:00 GMT, Doug Lea wrote: > This now uses Thread.isVirtual to distinguish spin vs immediate block cases, > enabling re-introduction of spin control from the previous version, removing > anomalies like this one.

Re: RFR: 8306647: Implementation of Structured Concurrency (Preview)

2023-05-24 Thread Andrey Turbanov
On Thu, 11 May 2023 13:08:55 GMT, Alan Bateman wrote: > This is the implementation of: > > - JEP 453: Structured Concurrency (Preview) > - JEP 446: Scoped Values (Preview) > > For the most part, this is just moving code and tests. StructuredTaskScope > moves to j.u.concurrent as a preview

EnumSet doesn't implement SequencedSet

2023-05-23 Thread Andrey Turbanov
Hello. I've noticed that EnumSet unfortunately doesn't implement the newly introduced interface SequencedSet. >From the first look it fits into it. Is there a reason for that? Sorry if it was already discussed. Andrey Turbanov

Re: RFR: 8305538: Avoid redundant HashMap.containsKey call in ModuleDescriptor.Builder [v2]

2023-05-22 Thread Andrey Turbanov
On Tue, 4 Apr 2023 20:50:00 GMT, Andrey Turbanov wrote: >> `Map.containsKey` call is sometimes unnecessary, when it's known that `Map` >> doesn't contain `null` values. >> Instead of pair containsKey+put we can use putIfAbsent and compare result >> with null. &

Re: RFR: 8305785: Avoid redundant HashMap.containsKey call in java.util.regex

2023-05-22 Thread Andrey Turbanov
On Mon, 3 Apr 2023 16:58:15 GMT, Andrey Turbanov wrote: > `Pattern.namedGroups` and `Matcher.namedGroups` contains only non-null > values. It means instead of separate `containsKey`+`get` calls, we can use > single `HashMap.get` call and then compare result with null. > Result c

Integrated: 8305785: Avoid redundant HashMap.containsKey call in java.util.regex

2023-05-22 Thread Andrey Turbanov
On Mon, 3 Apr 2023 16:58:15 GMT, Andrey Turbanov wrote: > `Pattern.namedGroups` and `Matcher.namedGroups` contains only non-null > values. It means instead of separate `containsKey`+`get` calls, we can use > single `HashMap.get` call and then compare result with null. > Result c

Re: RFR: 8308108: Support Unicode extension for collation settings

2023-05-18 Thread Andrey Turbanov
On Wed, 17 May 2023 19:40:04 GMT, Naoto Sato wrote: > This change intends to interpret the BCP47 U extension wrt collation settings > in the given `Locale`, then applies them to the created instances in the > 1-arg factory method in `Collator`. A corresponding CSR has also been drafted.

Re: RFR: 8306842: Classfile API performance improvements [v5]

2023-05-16 Thread Andrey Turbanov
On Mon, 15 May 2023 14:48:58 GMT, Adam Sotona wrote: >> Following improvements implemented: >> - Switch over `String` replaced with switch single char >> - Binary search for frames in `StackMapGenerator` >> - `StackMapGenerator.rawHandlers` with pre-calculated offsets >> - `ClassEntry` is

Re: RFR: 8305785: Avoid redundant HashMap.containsKey call in java.util.regex

2023-05-15 Thread Andrey Turbanov
On Mon, 3 Apr 2023 16:58:15 GMT, Andrey Turbanov wrote: > `Pattern.namedGroups` and `Matcher.namedGroups` contains only non-null > values. It means instead of separate `containsKey`+`get` calls, we can use > single `HashMap.get` call and then compare result with null. > Result c

Re: RFR: 8304914: Use OperatingSystem, Architecture, and Version in jpackage

2023-05-05 Thread Andrey Turbanov
On Fri, 21 Apr 2023 17:28:54 GMT, Roger Riggs wrote: > Refactor the Platform class in jdk.jpackage to use the internal > OperatingSystem, Architecture, and Version classes. > The OperatingSystem.isXXX() and Architecture.isYYY() methods replace > comparisons in the Platform class. > The checks

Re: RFR: 8304914: Use OperatingSystem, Architecture, and Version in jpackage

2023-05-05 Thread Andrey Turbanov
On Fri, 21 Apr 2023 17:28:54 GMT, Roger Riggs wrote: > Refactor the Platform class in jdk.jpackage to use the internal > OperatingSystem, Architecture, and Version classes. > The OperatingSystem.isXXX() and Architecture.isYYY() methods replace > comparisons in the Platform class. > The checks

Re: RFR: 8299748: java/util/zip/Deinflate.java failing on s390x [v10]

2023-04-28 Thread Andrey Turbanov
On Fri, 28 Apr 2023 11:18:56 GMT, Amit Kumar wrote: >> DeInflate.java test fails on s390x platform because size for out1 array >> which is responsible for storing the compressed data is insufficient. And >> being unable to write whole compressed data on array, on s390 whole data >> can't be

Re: RFR: 8299748: java/util/zip/Deinflate.java failing on s390x [v9]

2023-04-28 Thread Andrey Turbanov
On Fri, 28 Apr 2023 10:42:32 GMT, Amit Kumar wrote: >> DeInflate.java test fails on s390x platform because size for out1 array >> which is responsible for storing the compressed data is insufficient. And >> being unable to write whole compressed data on array, on s390 whole data >> can't be

Re: RFR: 8299748: java/util/zip/Deinflate.java failing on s390x [v5]

2023-04-27 Thread Andrey Turbanov
On Thu, 27 Apr 2023 07:24:24 GMT, Amit Kumar wrote: >> DeInflate.java test fails on s390x platform because size for out1 array >> which is responsible for storing the compressed data is insufficient. And >> being unable to write whole compressed data on array, on s390 whole data >> can't be

Re: RFR: 8305093: Linker cache should not take layout names into account [v2]

2023-04-27 Thread Andrey Turbanov
On Fri, 21 Apr 2023 01:03:57 GMT, Jorn Vernee wrote: >> Strip names from the function descriptors used in linkage requests. The >> names are not important for classification, and this will allow the cached >> MethodHandle/UpcallStubFactory to be shared across linkage request with the >> same

Re: RFR: 8305201: Improve error message for GroupLayouts that are too large on SysV [v2]

2023-04-27 Thread Andrey Turbanov
On Thu, 27 Apr 2023 09:28:23 GMT, Jorn Vernee wrote: >> Using for instance a struct layout that contains an unbounded array will >> produce the exception from the JBS issue. >> >> This patch checks for the case where a GroupLayout is too large more >> explicitly, and reports the issue using a

Re: RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions

2023-04-19 Thread Andrey Turbanov
On Wed, 19 Apr 2023 16:47:33 GMT, Volker Simonis wrote: > This issue was reported by: Yakov Shafranovich > ([yako...@amazon.com](mailto:yako...@amazon.com)) > > Currently, `ObjectInputStream::readObject()` doesn't explicitly checks for a > negative array length in the deserialization stream.

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

2023-04-19 Thread Andrey Turbanov
On Thu, 13 Apr 2023 06:36:51 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> ### Specdiff >> https://cr.openjdk.org/~pminborg/panama/21/v2/specdiff/overview-summary.html >> >> ### Javadoc >>

Re: RFR: 8304896: Update to use jtreg 7.2

2023-04-18 Thread Andrey Turbanov
On Mon, 17 Apr 2023 14:56:16 GMT, Christian Stein wrote: > Please review the change to update to using jtreg 7.2. > > The primary change is to the `jib-profiles.js` file, which specifies the > version of jtreg to use, for those systems that rely on this file. In > addition, the

Re: RFR: 8304896: Update to use jtreg 7.2

2023-04-18 Thread Andrey Turbanov
On Mon, 17 Apr 2023 14:56:16 GMT, Christian Stein wrote: > Please review the change to update to using jtreg 7.2. > > The primary change is to the `jib-profiles.js` file, which specifies the > version of jtreg to use, for those systems that rely on this file. In > addition, the

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

2023-04-13 Thread Andrey Turbanov
On Wed, 12 Apr 2023 19:02:22 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: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v57]

2023-04-13 Thread Andrey Turbanov
On Wed, 12 Apr 2023 19:02:22 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: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v57]

2023-04-12 Thread Andrey Turbanov
On Wed, 12 Apr 2023 19:02:22 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: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v57]

2023-04-12 Thread Andrey Turbanov
On Wed, 12 Apr 2023 19:02:22 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

RFR: 8305785: Avoid redundant HashMap.containsKey call in java.util.regex

2023-04-09 Thread Andrey Turbanov
`Pattern.namedGroups` and `Matcher.namedGroups` contains only non-null values. It means instead of separate `containsKey`+`get` calls, we can use single `HashMap.get` call and then compare result with null. Result code is a bit simpler and faster. - Commit messages: - 8305785:

Integrated: 8305696: (zipfs) Avoid redundant LinkedHashMap.containsKey call ZipFileSystem.makeParentDirs

2023-04-09 Thread Andrey Turbanov
On Mon, 3 Apr 2023 17:16:26 GMT, Andrey Turbanov wrote: > `LinkedHashMap` `ZipFileSystem.inodes` contains only > non-null values. It means instead of separate `containsKey`+`get` calls, we > can use single `LinkedHashMap.get` call and then compare result with `null`. > Result c

Re: RFR: 8305696: (zipfs) Avoid redundant LinkedHashMap.containsKey call ZipFileSystem.makeParentDirs

2023-04-09 Thread Andrey Turbanov
On Mon, 3 Apr 2023 17:16:26 GMT, Andrey Turbanov wrote: > `LinkedHashMap` `ZipFileSystem.inodes` contains only > non-null values. It means instead of separate `containsKey`+`get` calls, we > can use single `LinkedHashMap.get` call and then compare result with `null`. > Result c

Re: RFR: 8304911: Use OperatingSystem enum in some modules [v3]

2023-04-07 Thread Andrey Turbanov
On Wed, 5 Apr 2023 15:48:02 GMT, Roger Riggs wrote: >> With the addition of `jdk.internal.util.OperatingSystem` references to the >> system property `os.name` can be replaced. >> This PR exports jdk.internal.util to: >> - java.prefs, >> - java.security.jgss, >> - java.smartcardio, >> -

RFR: 8305696: Avoid redundant LinkedHashMap.containsKey call ZipFileSystem.makeParentDirs

2023-04-06 Thread Andrey Turbanov
`LinkedHashMap` `ZipFileSystem.inodes` contains only non-null values. It means instead of separate `containsKey`+`get` calls, we can use single `LinkedHashMap.get` call and then compare result with `null`. Result code is a bit simpler and faster. Testing: Linux x64 `java/nio`, `jdk/nio`

Re: RFR: JDK-8170945: Collectors$Partition should override more Map methods

2023-04-05 Thread Andrey Turbanov
On Wed, 5 Apr 2023 09:19:57 GMT, Viktor Klang wrote: > Adds overrides for common Map operations to avoid having to allocate the > entrySet for Collectors$Partition maps. src/java.base/share/classes/java/util/stream/Collectors.java line 1988: > 1986: public T get(Object key) { > 1987:

Re: RFR: 8305538: Avoid redundant HashMap.containsKey call in ModuleDescriptor.Builder

2023-04-04 Thread Andrey Turbanov
On Tue, 4 Apr 2023 13:57:26 GMT, Alan Bateman wrote: > If you are changing uses(String) then it should obey `strict`, meaning put > this at the beginning of the method > > ``` > if (strict) { > requireServiceTypeName(service); > } > ``` But now `requireServiceTypeName` is called

Re: RFR: 8305538: Avoid redundant HashMap.containsKey call in ModuleDescriptor.Builder [v2]

2023-04-04 Thread Andrey Turbanov
> `Map.containsKey` call is sometimes unnecessary, when it's known that `Map` > doesn't contain `null` values. > Instead of pair containsKey+put we can use putIfAbsent and compare result > with null. > Result code is shorter and a bit faster. Andrey Turbanov has updated t

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

2023-04-04 Thread Andrey Turbanov
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.

Re: RFR: 8305538: Avoid redundant HashMap.containsKey call in ModuleDescriptor.Builder

2023-04-04 Thread Andrey Turbanov
On Mon, 3 Apr 2023 08:08:45 GMT, Andrey Turbanov wrote: > `Map.containsKey` call is sometimes unnecessary, when it's known that `Map` > doesn't contain `null` values. > Instead of pair containsKey+put we can use putIfAbsent and compare result > with null. > Result code is sh

RFR: 8305538: Avoid redundant HashMap.containsKey call in ModuleDescriptor.Builder

2023-04-04 Thread Andrey Turbanov
`Map.containsKey` call is sometimes unnecessary, when it's known that `Map` doesn't contain `null` values. Instead of pair containsKey+put we can use putIfAbsent and compare result with null. Result code is shorter and a bit faster. - Commit messages: - [PATCH] Avoid redundant

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

2023-03-29 Thread Andrey Turbanov
On Wed, 29 Mar 2023 02:10:10 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

Re: RFR: 8304919: Implementation of Virtual Threads [v3]

2023-03-29 Thread Andrey Turbanov
On Wed, 29 Mar 2023 07:31:40 GMT, Alan Bateman wrote: >> JEP 444 proposes to make virtual threads a permanent feature in Java 21. The >> APIs that were preview APIs in Java 19/20 are changed to permanent and their >> `@since`/equivalent are changed to 21 (as per the guidance in JEP 12). The

Re: RFR: 8304498: JShell does not switch to raw mode when there is no /bin/test [v2]

2023-03-28 Thread Andrey Turbanov
On Wed, 22 Mar 2023 18:38:08 GMT, Jan Lahoda wrote: >> If JShell is run on a system that does not have `/bin/test` (which is, >> apparently, possible for some systems, which only have `/usr/bin/test`), it >> won't switch the terminal into the raw mode, and the input will not work >> properly.

Re: RFR: 8303485: Replacing os.name for operating system customization [v8]

2023-03-27 Thread Andrey Turbanov
On Mon, 27 Mar 2023 16:00:00 GMT, Roger Riggs wrote: >> Improvements to support OS specific customization for JDK internal use: >> - To select values and code; allowing elimination of unused code and values >> - Optionally evaluated by build processes, compilation, or archiving (i.e. >> CDS)

Re: RFR: 8303485: Replacing os.name for operating system customization [v7]

2023-03-27 Thread Andrey Turbanov
On Mon, 27 Mar 2023 14:19:04 GMT, Daniel Fuchs wrote: >> As I can see it uses deprecated `SecurityManager`, but it's not deprecated >> itself. >> Do I miss something? Or javac generates warning even in such cases? > >

Re: RFR: 8303485: Replacing os.name for operating system customization [v7]

2023-03-27 Thread Andrey Turbanov
On Mon, 27 Mar 2023 13:26:22 GMT, Daniel Fuchs wrote: >> src/java.base/unix/classes/java/lang/ProcessImpl.java line 97: >> >>> 95: * @throw Error if the requested launch mechanism is not found or >>> valid >>> 96: */ >>> 97: @SuppressWarnings("removal") >> >> What is deprecated

Re: RFR: 8303485: Replacing os.name for operating system customization [v7]

2023-03-27 Thread Andrey Turbanov
On Mon, 27 Mar 2023 14:15:59 GMT, Andrey Turbanov wrote: >> `GetPropertyAction::privilegedGetProperty` has been marked deprecated for >> removal because it uses the SecurityManager > > As I can see it uses deprecated `SecurityManager`, but it's not deprecated > itself.

Re: RFR: 8303485: Replacing os.name for operating system customization [v7]

2023-03-27 Thread Andrey Turbanov
On Fri, 24 Mar 2023 17:06:45 GMT, Roger Riggs wrote: >> Improvements to support OS specific customization for JDK internal use: >> - To select values and code; allowing elimination of unused code and values >> - Optionally evaluated by build processes, compilation, or archiving (i.e. >> CDS)

Re: RFR: JDK-8304557: java/util/concurrent/CompletableFuture/CompletableFutureOrTimeoutExceptionallyTest.java times out [v2]

2023-03-23 Thread Andrey Turbanov
On Thu, 23 Mar 2023 11:43:33 GMT, Viktor Klang wrote: >> Improves the stability of the memory leak test for CompletableFuture timeout >> cancellation by both reducing the count by 50% (which should still be above >> threshold to trigger given the ample margin set initially) as well as >>

Re: RFR: 8303214: Typo in java.util.Collections#synchronizedNavigableMap javadoc

2023-03-23 Thread Andrey Turbanov
On Wed, 14 Dec 2022 17:43:08 GMT, nbauma109 wrote: > I think this is a typo Marked as reviewed by aturbanov (Committer). - PR Review: https://git.openjdk.org/jdk/pull/11679#pullrequestreview-1353917356

Re: RFR: 8303214: Typo in java.util.Collections#synchronizedNavigableMap javadoc

2023-03-22 Thread Andrey Turbanov
On Wed, 14 Dec 2022 17:43:08 GMT, nbauma109 wrote: > I think this is a typo Filled https://bugs.openjdk.org/browse/JDK-8303214 Please change PR title to `8303214: Typo in java.util.Collections#synchronizedNavigableMap javadoc` - PR Comment:

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

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

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

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

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

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

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

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

Re: RFR: 8304425: ClassHierarchyResolver from Reflection [v2]

2023-03-20 Thread Andrey Turbanov
On Mon, 20 Mar 2023 16:18:27 GMT, Chen Liang wrote: >> Add API to explore Class Hierarchy with a `ClassLoader` or a `Lookup` with >> proper privileges, with tests. >> >> This addition is useful in case classes at runtime are not loaded from the >> system class loader, such as Proxy. This is

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v6]

2023-03-17 Thread Andrey Turbanov
On Tue, 14 Mar 2023 16:06:06 GMT, Doug Simon wrote: >> This PR extends JVMCI with new API (`jdk.vm.ci.meta.Annotated`) for >> accessing annotations. The main differences from >> `java.lang.reflect.AnnotatedElement` are: >> * All methods in the `Annotated` interface explicitly specify requested

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

2023-03-17 Thread Andrey Turbanov
On Fri, 17 Mar 2023 08:59:37 GMT, Viktor Klang wrote: >> Addresses the situation where exceptional completion of `orTimeout`:ed >> CompletableFutures wouldn't cancel the timeout task which could lead to >> memory leaks if done frequently enough with long enough timeout durations. >> >> Fix

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

2023-03-17 Thread Andrey Turbanov
On Thu, 16 Mar 2023 15:34:58 GMT, Chen Liang wrote: >> Summaries: >> 1. A few recommendations about updating the constant API is made at >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-March/000233.html >> and I may update this patch shall the API changes be integrated before >>

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

2023-03-16 Thread Andrey Turbanov
On Thu, 16 Mar 2023 13:37:10 GMT, Viktor Klang wrote: > Addresses the situation where exceptional completion of `orTimeout`:ed > CompletableFutures wouldn't cancel the timeout task which could lead to > memory leaks if done frequently enough with long enough timeout durations. > > Fix

Re: RFR: 8303684: Lift upcall sharing mechanism to AbstractLinker (mainline)

2023-03-11 Thread Andrey Turbanov
On Mon, 6 Mar 2023 18:40:47 GMT, Jorn Vernee wrote: > Port of: https://github.com/openjdk/panama-foreign/pull/791 which lifts the > sharing mechanism for upcall stubs to AbstractLinker. > > This also speeds up upcall stub linking:

Set thread names for threads created sun.nio.ch.AsynchronousChannelGroupImpl#startInternalThread

2023-03-10 Thread Andrey Turbanov
hread.java:829) Andrey Turbanov

Integrated: 8303266: Prefer ArrayList to LinkedList in JImageTask

2023-03-06 Thread Andrey Turbanov
On Mon, 27 Feb 2023 11:33:38 GMT, Andrey Turbanov wrote: > `LinkedList` is used as a field > `jdk.tools.jimage.JImageTask.OptionsValues#jimages` > It's created, filled (with `add`) and then iterated. No removes from the head > or something like this. `ArrayList` should be prefe

Re: RFR: JDK-8302027: Port fdlibm trig functions (sin, cos, tan) to Java [v6]

2023-03-05 Thread Andrey Turbanov
The message from this sender included one or more files which could not be scanned for virus detection; do not open these files unless you are certain of the sender's intent. -- On Wed, 1 Mar 2023 14:26:44 GMT, Andrey Turbanov

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

2023-03-02 Thread Andrey Turbanov
On Wed, 1 Mar 2023 12:54:44 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 two additional > commits since the last revision: > > - Move @since in

Re: RFR: 8303266: Prefer ArrayList to LinkedList in JImageTask

2023-03-01 Thread Andrey Turbanov
On Wed, 1 Mar 2023 01:32:39 GMT, Roger Riggs wrote: >In choosing how you spend your time, make your efforts and the efforts of the >reviewers count for something. It's one of the reasons, why I don't create PRs with massive replacements. I carefully choose places in the code, where I think

Re: RFR: JDK-8302027: Port fdlibm trig functions (sin, cos, tan) to Java

2023-03-01 Thread Andrey Turbanov
On Wed, 1 Mar 2023 05:28:34 GMT, Joe Darcy wrote: > Last and certainly not least in the port of FDLIBM to Java, the > transcendental methods for sin, cos, and tan. > > Some more tests are to be written in the StrictMath directory to verify that > the StrictMath algorihtm for sin/cos/tan is

Re: RFR: JDK-8302027: Port fdlibm trig functions (sin, cos, tan) to Java

2023-03-01 Thread Andrey Turbanov
On Wed, 1 Mar 2023 05:28:34 GMT, Joe Darcy wrote: > Last and certainly not least in the port of FDLIBM to Java, the > transcendental methods for sin, cos, and tan. > > Some more tests are to be written in the StrictMath directory to verify that > the StrictMath algorihtm for sin/cos/tan is

Re: RFR: JDK-8302040: Port fdlibm sqrt to Java [v5]

2023-02-28 Thread Andrey Turbanov
On Mon, 27 Feb 2023 18:26:51 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. >

Re: RFR: 8303266: Prefer ArrayList to LinkedList in JImageTask

2023-02-28 Thread Andrey Turbanov
On Mon, 27 Feb 2023 22:59:42 GMT, Roger Riggs wrote: >> `LinkedList` is used as a field >> `jdk.tools.jimage.JImageTask.OptionsValues#jimages` >> It's created, filled (with `add`) and then iterated. No removes from the >> head or something like this. `ArrayList` should be preferred as more >>

RFR: 8303266: Prefer ArrayList to LinkedList in JImageTask

2023-02-27 Thread Andrey Turbanov
`LinkedList` is used as a field `jdk.tools.jimage.JImageTask.OptionsValues#jimages` It's created, filled (with `add`) and then iterated. No removes from the head or something like this. `ArrayList` should be preferred as more efficient and widely used (more chances for JIT) collection.

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

2023-02-25 Thread Andrey Turbanov
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

Re: RFR: 8302983: ZoneRulesProvider.registerProvider() twice will remove provider [v3]

2023-02-25 Thread Andrey Turbanov
On Sat, 25 Feb 2023 00:07:45 GMT, Madjosz wrote: >> Fixes JDK-8302983 (and duplicate JDK-8302898) > > Madjosz has refreshed the contents of this pull request, and previous commits > have been removed. The incremental views will show differences compared to > the previous content of the PR. The

Re: RFR: JDK-8302040: Port fdlibm sqrt to Java [v3]

2023-02-25 Thread Andrey Turbanov
On Fri, 24 Feb 2023 18:40:38 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. >

java.util.Date.parse(String) doesn't declare thrown IllegalArgumentException

2023-02-06 Thread Andrey Turbanov
is deprecated, but it still is used within JDK code itself. Is it intentional that exception is not documented in this method? Andrey Turbanov

Re: RFR: JDK-8301444: Port fdlibm hyperbolic transcendental functions to Java

2023-02-06 Thread Andrey Turbanov
On Sun, 5 Feb 2023 03:05:55 GMT, Joe Darcy wrote: > Initial pass of porting FDLIBM sinh/cosh/tanh to Java. I do intend to > refactor the regression tests a bit to reduce duplication, but the actual > ports should be ready for review. > > Diff'ing the ports as before, original vs

Re: RFR: JDK-8301396: Port fdlibm expm1 to Java

2023-02-02 Thread Andrey Turbanov
On Thu, 2 Feb 2023 22:18:32 GMT, Joe Darcy wrote: > Next on the FDLIBM C -> Java port, expm1. > Coming soon, hyperbolic transcendentals (sinh, cosh, tanh)! > > For expm1, the C vs transliteration port show the usual kind of differences, > beside formatting of the constants, the use of the __HI

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

2023-02-01 Thread Andrey Turbanov
On Tue, 31 Jan 2023 15:57:43 GMT, Per Minborg wrote: > `ZoneOffset` instances are cached by the `ZoneOffset` class itself for values > in the range [-18h, 18h] for each second that is on an even quarter of an > hour (i.e. at most 2*18*4+1 = 145 values). > > Instead of using a

Re: RFR: JDK-8301392: Port fdlibm log1p to Java

2023-01-30 Thread Andrey Turbanov
On Tue, 31 Jan 2023 02:52:45 GMT, Joe Darcy wrote: > Another day, another PR to port FDLBIM to Java, this time for the log1p > method. > > Other than using the two-argument form of the __HI method in Java > transliteration version rather than C macro, there are no appreciable > differences

ConcurrentModificationException has links to Vector, Hashtable, LinkedList

2023-01-27 Thread Andrey Turbanov
f it makes sense to replace/update this linkes to ArrayList,HashMap instead? I think it's better to "advertise" more modern collections. Andrey Turbanov

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

2023-01-21 Thread Andrey Turbanov
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: 8299865: Unnecessary NullPointerException catch in java.util.TimeZone#setDefaultZone

2023-01-13 Thread Andrey Turbanov
On Wed, 11 Jan 2023 17:12:39 GMT, Justin Lu wrote: > In [JDK-4368016](https://bugs.openjdk.org/browse/JDK-4368016) > **TimeZone.setDefaultZone()** was updated so that > > _TimeZone.java [will] not cause an NPE. If getSystemTimeZoneID() > can't determine the time zone from java.home and

Integrated: 8299835: (jrtfs) Unnecessary null check in JrtPath.getAttributes

2023-01-11 Thread Andrey Turbanov
On Mon, 9 Jan 2023 20:55:14 GMT, Andrey Turbanov wrote: > `jdk.internal.jrtfs.JrtFileSystem#getFileAttributes` never return `null` > > https://github.com/openjdk/jdk/blob/679e485838881c1364845072af305fb60d95e60a/src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystem.java#L206-

Re: RFR: 8299513: Clean up java.io [v8]

2023-01-11 Thread Andrey Turbanov
On Wed, 11 Jan 2023 09:22:24 GMT, Per Minborg wrote: >> Code in java.io contains many legacy constructs and semantics not >> recommended including: >> >> * C-style array declaration >> * Unnecessary visibility >> * Redundant keywords in interfaces (e.g. public, static) >> * Non-standard

Re: RFR: 8299513: Clean up java.io [v7]

2023-01-11 Thread Andrey Turbanov
since the last revision: > > - Update src/java.base/share/classes/java/io/ObjectStreamConstants.java > >Co-authored-by: Andrey Turbanov > - Clean up ObjectStreamConstants Let's revert changes in public API - Changes requested by aturbanov (Committer). PR: https://git.openjdk.org/jdk/pull/11848

Re: RFR: 8299513: Clean up java.io [v7]

2023-01-11 Thread Andrey Turbanov
since the last revision: > > - Update src/java.base/share/classes/java/io/ObjectStreamConstants.java > >Co-authored-by: Andrey Turbanov > - Clean up ObjectStreamConstants src/java.base/share/classes/java/io/ObjectStreamConstants.java line 108: > 106: * number of bytes in thi

Re: RFR: 8299513: Clean up java.io [v6]

2023-01-10 Thread Andrey Turbanov
On Tue, 10 Jan 2023 16:06:15 GMT, Per Minborg wrote: >> Code in java.io contains many legacy constructs and semantics not >> recommended including: >> >> * C-style array declaration >> * Unnecessary visibility >> * Redundant keywords in interfaces (e.g. public, static) >> * Non-standard

<    1   2   3   >