Re: [External] : Sequenced Collections

2022-02-11 Thread Tagir Valeev
Wow, I missed that the Sequenced Collections JEP draft was posted! Of course, I strongly support this initiative and am happy that my proposal got some love and is moving forward. In general, I like the JEP in the way it is. I have only two slight concerns: 1. I'm not sure that having addition met

Re: RFR: JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null

2022-02-11 Thread Tim Prinzing
On Fri, 11 Feb 2022 20:36:26 GMT, Tim Prinzing wrote: > JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is > null Yes, I like the IllegalCallerException. - PR: https://git.openjdk.java.net/jdk/pull/7448

Re: RFR: 8176706: Additional Date-Time Formats [v4]

2022-02-11 Thread Naoto Sato
On Fri, 11 Feb 2022 22:26:03 GMT, Roger Riggs wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Addressing review comments > > src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java > line 5103: >

Re: RFR: 8176706: Additional Date-Time Formats [v5]

2022-02-11 Thread Naoto Sato
> Following the prior discussion [1], here is the PR for the subject > enhancement. CSR has also been updated according to the suggestion. > > [1] > https://mail.openjdk.java.net/pipermail/core-libs-dev/2022-January/085175.html Naoto Sato has updated the pull request incrementally with one addi

Re: RFR: JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null

2022-02-11 Thread Brent Christian
On Fri, 11 Feb 2022 22:37:57 GMT, Mandy Chung wrote: > Thanks for taking on these null caller issue. > > To give more context to this issue, the spec of > `ClassLoader::isRegisteredAsParallelCapable` returns true if this class > loader is registered as parallel capable, otherwise false. The cu

Re: RFR: JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null

2022-02-11 Thread Erik Joelsson
On Fri, 11 Feb 2022 20:36:26 GMT, Tim Prinzing wrote: > JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is > null Build change looks good. - Marked as reviewed by erikj (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7448

Integrated: JDK-8281462: Annotation toString output for enum not reusable for source input

2022-02-11 Thread Joe Darcy
On Thu, 10 Feb 2022 05:49:47 GMT, Joe Darcy wrote: > Two changes to the toString output for annotations to give better source > fidelity: > > 1) For enum constants, call their name method rather than their toString > method. An enum class can override the toString method to print something >

Re: RFR: JDK-8281462: Annotation toString output for enum not reusable for source input [v3]

2022-02-11 Thread Mandy Chung
On Fri, 11 Feb 2022 20:34:43 GMT, Joe Darcy wrote: >> Two changes to the toString output for annotations to give better source >> fidelity: >> >> 1) For enum constants, call their name method rather than their toString >> method. An enum class can override the toString method to print somethin

Re: RFR: 8176706: Additional Date-Time Formats [v4]

2022-02-11 Thread Roger Riggs
On Fri, 11 Feb 2022 00:03:50 GMT, Naoto Sato wrote: >> Following the prior discussion [1], here is the PR for the subject >> enhancement. CSR has also been updated according to the suggestion. >> >> [1] >> https://mail.openjdk.java.net/pipermail/core-libs-dev/2022-January/085175.html > > Naoto

Re: RFR: JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null

2022-02-11 Thread Mandy Chung
On Fri, 11 Feb 2022 20:36:26 GMT, Tim Prinzing wrote: > JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is > null Thanks for taking on these null caller issue. To give more context to this issue, the spec of `ClassLoader::isRegisteredAsParallelCapable` returns true if

Re: RFR: 8279995: jpackage --add-launcher option should allow overriding description [v2]

2022-02-11 Thread Alexey Semenyuk
On Fri, 11 Feb 2022 21:22:44 GMT, Alexander Matveev wrote: >> Added ability to override description for additional launchers via >> "description" property. > > Alexander Matveev has updated the pull request incrementally with one > additional commit since the last revision: > > 8279995: jpa

Re: [External] : Sequenced Collections

2022-02-11 Thread forax
- Original Message - > From: "Stuart Marks" > To: "Remi Forax" > Cc: "core-libs-dev" > Sent: Friday, February 11, 2022 8:25:19 PM > Subject: Re: [External] : Sequenced Collections > Hi Rémi, > > I see that you're trying to reduce the number of interfaces introduced by > unifying > thin

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v7]

2022-02-11 Thread Mandy Chung
On Fri, 11 Feb 2022 13:51:38 GMT, liach wrote: >> Upon review of [8261407](https://bugs.openjdk.java.net/browse/JDK-8261407), >> by design, duplicate initialization of ReflectionFactory should be safe as >> it performs side-effect-free property read actions, and the suggesting of >> making the

Re: RFR: JDK-8277520: Implement JDK-8 default methods for IdentityHashMap [v2]

2022-02-11 Thread liach
On Thu, 16 Dec 2021 20:48:39 GMT, liach wrote: >> Might need a CSR as now `computeIfAbsent` `computeIfPresent` `compute` >> `merge` would throw CME if the functions modified the map itself, and there >> are corresponding specification changes. > > liach has updated the pull request with a new t

Re: RFR: 8279995: jpackage --add-launcher option should allow overriding description

2022-02-11 Thread Alexander Matveev
On Wed, 9 Feb 2022 07:37:42 GMT, Alexander Matveev wrote: > Added ability to override description for additional launchers via > "description" property. Added automated tests for .exe files in Windows and .desktop files on Linux. - PR: https://git.openjdk.java.net/jdk/pull/7399

Re: RFR: 8279995: jpackage --add-launcher option should allow overriding description [v2]

2022-02-11 Thread Alexander Matveev
> Added ability to override description for additional launchers via > "description" property. Alexander Matveev has updated the pull request incrementally with one additional commit since the last revision: 8279995: jpackage --add-launcher option should allow overriding description [v2] --

Re: RFR: JDK-8281462: Annotation toString output for enum not reusable for source input [v3]

2022-02-11 Thread Joe Darcy
On Fri, 11 Feb 2022 15:30:58 GMT, Sam Brannen wrote: >> The getCanonicalName is not specified to behave that way, should be a RFE I >> suppose, but appears to in practice; changed as suggested in subsequent >> push. Thanks. > > Thanks, Joe. > > Regarding the RFE, do you plan to open an issue t

RFR: JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null

2022-02-11 Thread Tim Prinzing
JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null - Commit messages: - Merge branch 'master' into JDK-8281000 - JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null Changes: https://git.openjdk.java.net/jdk/pull/7448/files

Re: RFR: JDK-8281462: Annotation toString output for enum not reusable for source input [v3]

2022-02-11 Thread Joe Darcy
On Fri, 11 Feb 2022 20:34:43 GMT, Joe Darcy wrote: >> Two changes to the toString output for annotations to give better source >> fidelity: >> >> 1) For enum constants, call their name method rather than their toString >> method. An enum class can override the toString method to print somethin

Re: RFR: JDK-8281462: Annotation toString output for enum not reusable for source input [v2]

2022-02-11 Thread Joe Darcy
On Fri, 11 Feb 2022 15:24:45 GMT, Sam Brannen wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Respond to review feedback. > > src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java > line

RFR: JDK-8281003 - MethodHandles::lookup throws NPE if caller is null

2022-02-11 Thread Tim Prinzing
JDK-8281003 - MethodHandles::lookup throws NPE if caller is null - Commit messages: - Merge branch 'master' into JDK-8281003 - Merge branch 'master' into JDK-8281003 - removed commented out code - Moved null caller MethodHandles.lookup() test to a more reasonable location - JDK-8

Re: RFR: JDK-8281462: Annotation toString output for enum not reusable for source input [v3]

2022-02-11 Thread Joe Darcy
> Two changes to the toString output for annotations to give better source > fidelity: > > 1) For enum constants, call their name method rather than their toString > method. An enum class can override the toString method to print something > other than the name. > > 2) Switch from using binary

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste [v6]

2022-02-11 Thread XenoAmess
> 8281631: HashMap.putAll can cause redundant space waste XenoAmess has updated the pull request incrementally with one additional commit since the last revision: 9072610: HashMap.putAll can cause redundant space waste - Changes: - all: https://git.openjdk.java.net/jdk/pull/743

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste

2022-02-11 Thread XenoAmess
On Fri, 11 Feb 2022 18:40:53 GMT, Stuart Marks wrote: > Let's stick with the `Math.ceil` expression please. I'm afraid Math.ceil is much too time costing, but fine if you want. - PR: https://git.openjdk.java.net/jdk/pull/7431

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste [v3]

2022-02-11 Thread XenoAmess
On Fri, 11 Feb 2022 18:24:49 GMT, Andrew Haley wrote: > Just multiply by 0.75. > > On a modern design, floating-point multiply is 4 clocks latency, 4 ops/clock > throughput. FP max is 2 clocks latency, conversions int-float and vice versa > 3 clocks latency, 4 ops/clock throughput. Long divisi

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste [v5]

2022-02-11 Thread XenoAmess
On Fri, 11 Feb 2022 17:10:43 GMT, XenoAmess wrote: >> 8281631: HashMap.putAll can cause redundant space waste > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > 9072610: HashMap.putAll can cause redundant space waste > > FWIW, (

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste [v5]

2022-02-11 Thread XenoAmess
On Fri, 11 Feb 2022 18:42:11 GMT, Stuart Marks wrote: > (It's too late now, but I'd suggest avoiding force-pushing changes into a > branch that's opened in a PR. Doing so confuses the comment history, as the > comments refer to code that is no longer present.) got it. - PR: https

Re: [External] : Sequenced Collections

2022-02-11 Thread Stuart Marks
Hi Rémi, I see that you're trying to reduce the number of interfaces introduced by unifying things around an existing interface, List. Yes, it's true that List is an ordered collection. However, your analysis conveniently omits other facts about List that make it unsuitable as a general "order

Integrated: JDK-8277175 : Add a parallel multiply method to BigInteger

2022-02-11 Thread kabutz
On Tue, 16 Nov 2021 13:22:46 GMT, kabutz wrote: > BigInteger currently uses three different algorithms for multiply. The simple > quadratic algorithm, then the slightly better Karatsuba if we exceed a bit > count and then Toom Cook 3 once we go into the several thousands of bits. > Since Toom

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste [v5]

2022-02-11 Thread Stuart Marks
On Fri, 11 Feb 2022 17:10:43 GMT, XenoAmess wrote: >> 8281631: HashMap.putAll can cause redundant space waste > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > 9072610: HashMap.putAll can cause redundant space waste (It's too l

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste

2022-02-11 Thread Stuart Marks
On Fri, 11 Feb 2022 12:25:08 GMT, XenoAmess wrote: > FWIW, (int) Math.ceil(expected / 0.75) and (int) ((expected * 4L + 2L) / 3L) > would be equivalent. No, they are not equivalent. If `expected` exceeds a certain value around 1.6bn, then the intermediate result using the second expression wil

RFR: JDK-8266670: Better modeling of access flags in core reflection

2022-02-11 Thread Joe Darcy
This is an early review of changes to better model JVM access flags, that is "modifiers" like public, protected, etc. but explicitly at a VM level. Language level modifiers and JVM level access flags are closely related, but distinct. There are concepts that overlap in the two domains (public, p

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste [v3]

2022-02-11 Thread Andrew Haley
On Fri, 11 Feb 2022 18:13:36 GMT, Roger Riggs wrote: >> @RogerRiggs >> so you recommend `(int) Math.min(((m.size() * 4L + 2L) / 3L), >> Integer.MAX_VALUE)`? OK then, changed it. >> please review again, thanks! > > Works for me. Thanks Just multiply by 0.75. On a modern design, floating-point

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste [v3]

2022-02-11 Thread Roger Riggs
On Fri, 11 Feb 2022 17:04:14 GMT, XenoAmess wrote: >> Performance is a lesser issue. Given all of the other computation that >> occurs to populate the map, this computation is in the noise. It is also >> likely that with more instructions to fetch and execute and a possible >> branch, the int

Re: RFR: 8281335: Allow a library already loaded via System::loadLibrary to be loaded as a raw library [v2]

2022-02-11 Thread Mandy Chung
On Fri, 11 Feb 2022 10:11:50 GMT, Maurizio Cimadamore wrote: > there is still residual common logic in how clients are expected to load > libraries (e.g. either using a file name/absolute path, or using a library > name, without file separator chars). These assumption seem very heavily > infl

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v3]

2022-02-11 Thread Lance Andersen
On Fri, 11 Feb 2022 13:45:47 GMT, Alan Bateman wrote: >> Lance Andersen has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Return a null InputStream when the ZipEntry is not found in the Jar >> - Address formatting and message feedback >

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v7]

2022-02-11 Thread liach
On Fri, 11 Feb 2022 13:51:38 GMT, liach wrote: >> Upon review of [8261407](https://bugs.openjdk.java.net/browse/JDK-8261407), >> by design, duplicate initialization of ReflectionFactory should be safe as >> it performs side-effect-free property read actions, and the suggesting of >> making the

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste [v3]

2022-02-11 Thread XenoAmess
On Fri, 11 Feb 2022 16:32:29 GMT, Roger Riggs wrote: >> @RogerRiggs >> >> Hi. I added a overflow check. >> >> The check makes sure it cannot overflow now. >> >> I wrote a test to show this overflow check be correct. >> >> >> public class A { >> >> /** >> * use for calculate HashMap

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste [v5]

2022-02-11 Thread XenoAmess
> 8281631: HashMap.putAll can cause redundant space waste XenoAmess has updated the pull request incrementally with one additional commit since the last revision: 9072610: HashMap.putAll can cause redundant space waste - Changes: - all: https://git.openjdk.java.net/jdk/pull/743

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v6]

2022-02-11 Thread Peter Levart
On Fri, 11 Feb 2022 13:42:01 GMT, liach wrote: >> ...having suggested that rearrangement, perhaps the right way to do it is to >> enable some VM.isXXX queries themselves to be constant-foldable so that >> other callers too may benefit. Like this: >> https://github.com/plevart/jdk/commit/e918ccc

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v7]

2022-02-11 Thread Peter Levart
On Fri, 11 Feb 2022 13:51:38 GMT, liach wrote: >> Upon review of [8261407](https://bugs.openjdk.java.net/browse/JDK-8261407), >> by design, duplicate initialization of ReflectionFactory should be safe as >> it performs side-effect-free property read actions, and the suggesting of >> making the

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste [v3]

2022-02-11 Thread Roger Riggs
On Fri, 11 Feb 2022 15:48:44 GMT, XenoAmess wrote: >> src/java.base/share/classes/java/util/WeakHashMap.java line 247: >> >>> 245: */ >>> 246: private static int calculateHashMapCapacity(int size){ >>> 247: return size + (size + 2) / 3; >> >> Consider integer overflow; if size

Integrated: 8281259: MutableBigInteger subtraction could be simplified

2022-02-11 Thread Daniel Jeliński
On Fri, 4 Feb 2022 10:13:28 GMT, Daniel Jeliński wrote: > The proposed form of borrow bit handling is [already used in BigInteger > class](https://github.com/djelinski/jdk/blob/ce26a19be5e907c11164b46f1bcb370b534d5bf6/src/java.base/share/classes/java/math/BigInteger.java#L1558). > > JMH results

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste [v3]

2022-02-11 Thread XenoAmess
On Fri, 11 Feb 2022 15:04:03 GMT, Roger Riggs wrote: >> XenoAmess 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 pull request contains one >> new commit s

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste [v4]

2022-02-11 Thread XenoAmess
> 8281631: HashMap.putAll can cause redundant space waste XenoAmess has updated the pull request incrementally with one additional commit since the last revision: 9072610: HashMap.putAll can cause redundant space waste - Changes: - all: https://git.openjdk.java.net/jdk/pull/743

Re: RFR: 8281146: Replace StringCoding.hasNegatives with countPositives [v2]

2022-02-11 Thread Claes Redestad
On Fri, 11 Feb 2022 12:11:54 GMT, Claes Redestad wrote: >> I'm requesting comments and, hopefully, some help with this patch to replace >> `StringCoding.hasNegatives` with `countPositives`. The new method does a >> very similar pass, but alters the intrinsic to return the number of leading >>

Re: RFR: 8281146: Replace StringCoding.hasNegatives with countPositives [v2]

2022-02-11 Thread Martin Doerr
On Fri, 11 Feb 2022 12:11:54 GMT, Claes Redestad wrote: >> I'm requesting comments and, hopefully, some help with this patch to replace >> `StringCoding.hasNegatives` with `countPositives`. The new method does a >> very similar pass, but alters the intrinsic to return the number of leading >>

Re: RFR: JDK-8281462: Annotation toString output for enum not reusable for source input [v2]

2022-02-11 Thread Sam Brannen
On Thu, 10 Feb 2022 22:12:57 GMT, Joe Darcy wrote: >> Two changes to the toString output for annotations to give better source >> fidelity: >> >> 1) For enum constants, call their name method rather than their toString >> method. An enum class can override the toString method to print somethin

Re: RFR: JDK-8281462: Annotation toString output for enum not reusable for source input [v2]

2022-02-11 Thread Sam Brannen
On Thu, 10 Feb 2022 22:09:16 GMT, Joe Darcy wrote: >> src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java >> line 256: >> >>> 254: return Objects.toString(finalComponent.getCanonicalName(), >>> 255: "") + >>> 256:

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste [v3]

2022-02-11 Thread XenoAmess
On Fri, 11 Feb 2022 15:04:03 GMT, Roger Riggs wrote: > if size were Integer.MAX_VALUE / 2; the computation would overflow Actually will not, it must be slightly larger. it will only overflow when it be larger than Integer.MAX_VALUE * 0.75 But yes, it can overflow when there be a map as large a

Re: RFR: JDK-8281462: Annotation toString output for enum not reusable for source input [v2]

2022-02-11 Thread Sam Brannen
On Thu, 10 Feb 2022 22:12:57 GMT, Joe Darcy wrote: >> Two changes to the toString output for annotations to give better source >> fidelity: >> >> 1) For enum constants, call their name method rather than their toString >> method. An enum class can override the toString method to print somethin

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste [v3]

2022-02-11 Thread Roger Riggs
On Fri, 11 Feb 2022 13:04:38 GMT, XenoAmess wrote: >> 8281631: HashMap.putAll can cause redundant space waste > > XenoAmess 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 o

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v7]

2022-02-11 Thread liach
> Upon review of [8261407](https://bugs.openjdk.java.net/browse/JDK-8261407), > by design, duplicate initialization of ReflectionFactory should be safe as it > performs side-effect-free property read actions, and the suggesting of making > the `initted` field volatile cannot prevent concurrent i

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v3]

2022-02-11 Thread Alan Bateman
On Thu, 10 Feb 2022 21:35:56 GMT, Lance Andersen wrote: >> Hi all, >> >> Please review the attached patch to address >> >> - That JarFile::getInputStream did not check for a null ZipEntry passed as a >> parameter >> - Have Zip/JarFile::getInputStream throw a ZipException in the event that an

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v6]

2022-02-11 Thread liach
On Fri, 11 Feb 2022 08:25:16 GMT, Peter Levart wrote: >> src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java line >> 685: >> >>> 683: instance = c = load(); >>> 684: } >>> 685: return c; >> >> If you do that the "old" way, you loose t

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste [v3]

2022-02-11 Thread XenoAmess
> 8281631: HashMap.putAll can cause redundant space waste XenoAmess 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 pull request contains one new commit since the

Re: RFR: 8281585: Remove unused imports under test/lib and jtreg/gc [v2]

2022-02-11 Thread David Holmes
On Fri, 11 Feb 2022 08:54:51 GMT, Leo Korinth wrote: >> Remove unused imports under test/lib and jtreg/gc. They create lots of >> warnings if editing using an IDE. Tests in hotspot_gc passed. > > Leo Korinth has updated the pull request incrementally with one additional > commit since the last

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste [v2]

2022-02-11 Thread XenoAmess
> 8281631: HashMap.putAll can cause redundant space waste XenoAmess 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 pull request contains one new commit since the

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste

2022-02-11 Thread XenoAmess
On Fri, 11 Feb 2022 11:55:13 GMT, stefan-zobel wrote: > > I investigated most of the usages. They just give a size, and get a > > capacity, even not change the 0.75 So maybe we can use some int calculation > > to replace the 0.75, thus replace Math.ceil for such situations. > > FWIW, `(int) Ma

Re: RFR: 8281146: Replace StringCoding.hasNegatives with countPositives [v2]

2022-02-11 Thread Claes Redestad
> I'm requesting comments and, hopefully, some help with this patch to replace > `StringCoding.hasNegatives` with `countPositives`. The new method does a very > similar pass, but alters the intrinsic to return the number of leading bytes > in the `byte[]` range which only has positive bytes. Thi

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste

2022-02-11 Thread stefan-zobel
On Thu, 10 Feb 2022 18:09:19 GMT, XenoAmess wrote: > I investigated most of the usages. They just give a size, and get a capacity, > even not change the 0.75 So maybe we can use some int calculation to replace > the 0.75, thus replace Math.ceil for such situations. FWIW, `(int) Math.ceil(expec

Re: RFR: 8281146: Replace StringCoding.hasNegatives with countPositives

2022-02-11 Thread Claes Redestad
On Wed, 26 Jan 2022 12:51:31 GMT, Claes Redestad wrote: > I'm requesting comments and, hopefully, some help with this patch to replace > `StringCoding.hasNegatives` with `countPositives`. The new method does a very > similar pass, but alters the intrinsic to return the number of leading bytes

Re: RFR: 8281335: Allow a library already loaded via System::loadLibrary to be loaded as a raw library [v2]

2022-02-11 Thread Maurizio Cimadamore
On Fri, 11 Feb 2022 03:49:45 GMT, Mandy Chung wrote: >> This patch removes the restriction in the raw library loading mechanism that >> does not allow mix-n-match of loading a library as a JNI library and as a >> raw library. >> >> The raw library loading mechanism is designed for panama to lo

Re: RFR: 8281585: Remove unused imports under test/lib and jtreg/gc [v2]

2022-02-11 Thread Serguei Spitsyn
On Fri, 11 Feb 2022 08:54:51 GMT, Leo Korinth wrote: >> Remove unused imports under test/lib and jtreg/gc. They create lots of >> warnings if editing using an IDE. Tests in hotspot_gc passed. > > Leo Korinth has updated the pull request incrementally with one additional > commit since the last

RFR: 8281631: HashMap.putAll can cause redundant space waste

2022-02-11 Thread XenoAmess
8281631: HashMap.putAll can cause redundant space waste - Commit messages: - 9072610: HashMap.putAll can cause redundant space waste Changes: https://git.openjdk.java.net/jdk/pull/7431/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7431&range=00 Issue: https://bugs.o

Re: RFR: 8281585: Remove unused imports under test/lib and jtreg/gc [v2]

2022-02-11 Thread Leo Korinth
> Remove unused imports under test/lib and jtreg/gc. They create lots of > warnings if editing using an IDE. Tests in hotspot_gc passed. Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: updating copyright - Changes: - a

Re: RFR: 8281585: Remove unused imports under test/lib and jtreg/gc [v2]

2022-02-11 Thread Leo Korinth
On Fri, 11 Feb 2022 08:54:51 GMT, Leo Korinth wrote: >> Remove unused imports under test/lib and jtreg/gc. They create lots of >> warnings if editing using an IDE. Tests in hotspot_gc passed. > > Leo Korinth has updated the pull request incrementally with one additional > commit since the last

Re: RFR: 8281631: HashMap.putAll can cause redundant space waste

2022-02-11 Thread XenoAmess
On Thu, 10 Feb 2022 17:46:36 GMT, XenoAmess wrote: > 8281631: HashMap.putAll can cause redundant space waste According to the discussion at mailing list, we decide to try only change the calculation inside HashMap and WeakHashMap, and see what would happen. The next step is fixing all such **si

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v6]

2022-02-11 Thread Peter Levart
On Fri, 11 Feb 2022 08:05:30 GMT, Peter Levart wrote: >> liach has updated the pull request incrementally with one additional commit >> since the last revision: >> >> Make config a pojo, move loading code into config class > > src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v6]

2022-02-11 Thread Peter Levart
On Thu, 10 Feb 2022 22:53:56 GMT, liach wrote: >> Upon review of [8261407](https://bugs.openjdk.java.net/browse/JDK-8261407), >> by design, duplicate initialization of ReflectionFactory should be safe as >> it performs side-effect-free property read actions, and the suggesting of >> making the