Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-18 Thread Chen Liang
On Wed, 19 Apr 2023 03:37:05 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with three additional > commits since the last revision: > > - Remove unnecessary 'final' from a couple places. > - Clarify

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-18 Thread Vicente Romero
On Tue, 18 Apr 2023 09:13:01 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-18 Thread Chen Liang
On Wed, 19 Apr 2023 03:37:05 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with three additional > commits since the last revision: > > - Remove unnecessary 'final' from a couple places. > - Clarify

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-18 Thread Vicente Romero
On Tue, 18 Apr 2023 09:13:01 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-18 Thread Vicente Romero
On Tue, 18 Apr 2023 09:13:01 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-18 Thread Stuart Marks
> PR for Sequenced Collections implementation. Stuart Marks has updated the pull request incrementally with three additional commits since the last revision: - Remove unnecessary 'final' from a couple places. - Clarify ordering of Collection.addAll and Map.putAll; add links to encounter

Re: RFR: 8306008: Several Vector API tests fail for client VM after JDK-8304450

2023-04-18 Thread Dingli Zhang
On Tue, 18 Apr 2023 12:21:11 GMT, Quan Anh Mai wrote: > Hi, > > Please review this patch which fixes the errors on machines where > TypeMaxVector has a length of 64 bits. I take an extra cautious approach and > fall back to putting elements one by one if the length is an unexpected value. >

Re: RFR: 8266571: Sequenced Collections [v2]

2023-04-18 Thread Stuart Marks
On Sat, 25 Mar 2023 07:25:33 GMT, Rémi Forax wrote: >> Stuart Marks has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - More specification tweaks. >> - Add simple overrides to ArrayList. > >

Re: RFR: 8266571: Sequenced Collections [v4]

2023-04-18 Thread Stuart Marks
On Thu, 30 Mar 2023 09:23:04 GMT, Tagir F. Valeev wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Simplify handling of cached keySet, values, and entrySet views. > >

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

2023-04-18 Thread Joe Darcy
On Tue, 18 Apr 2023 07:27:47 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: 8266571: Sequenced Collections [v2]

2023-04-18 Thread Stuart Marks
On Sat, 25 Mar 2023 07:19:49 GMT, Rémi Forax wrote: >> Stuart Marks has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - More specification tweaks. >> - Add simple overrides to ArrayList. > >

Re: RFR: 8266571: Sequenced Collections [v6]

2023-04-18 Thread Stuart Marks
On Fri, 24 Mar 2023 21:57:40 GMT, Tagir F. Valeev wrote: >> Stuart Marks has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - Clarify LHM and LHS specs regarding semantics of reverse-ordered views. >> - Remove special-cases for reversed

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v3]

2023-04-18 Thread Chen Liang
On Tue, 18 Apr 2023 19:32:42 GMT, Aleksey Shipilev wrote: >> `invokespecial` is used to call instance methods in a non‑virtual manner. >> >> >> >> Using `super.hashCode()` in `java.lang.Enum` produces the 

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

2023-04-18 Thread Chen Liang
On Tue, 21 Mar 2023 21:39:48 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: 8306008: Several Vector API tests fail for client VM after JDK-8304450

2023-04-18 Thread Paul Sandoz
On Tue, 18 Apr 2023 12:21:11 GMT, Quan Anh Mai wrote: > Hi, > > Please review this patch which fixes the errors on machines where > TypeMaxVector has a length of 64 bits. I take an extra cautious approach and > fall back to putting elements one by one if the length is an unexpected value. >

Re: RFR: 8303002: Reject packed structs from linker [v5]

2023-04-18 Thread Maurizio Cimadamore
On Tue, 18 Apr 2023 13:45:57 GMT, Jorn Vernee wrote: >> This patch adds checks in AbstractLinker to reject packed structs and >> structs with excess padding (e.g. unnamed bitfields), since both of those >> are currently not supported, and the ABI/spec seems too vague to base >> support on. >

Re: RFR: 8303002: Reject packed structs from linker [v5]

2023-04-18 Thread Maurizio Cimadamore
On Tue, 18 Apr 2023 22:25:09 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee 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 seven additional

Re: RFR: 8303002: Reject packed structs from linker [v5]

2023-04-18 Thread Maurizio Cimadamore
On Tue, 18 Apr 2023 13:45:57 GMT, Jorn Vernee wrote: >> This patch adds checks in AbstractLinker to reject packed structs and >> structs with excess padding (e.g. unnamed bitfields), since both of those >> are currently not supported, and the ABI/spec seems too vague to base >> support on. >

Re: RFR: 8303002: Reject packed structs from linker [v5]

2023-04-18 Thread Maurizio Cimadamore
On Tue, 18 Apr 2023 13:45:57 GMT, Jorn Vernee wrote: >> This patch adds checks in AbstractLinker to reject packed structs and >> structs with excess padding (e.g. unnamed bitfields), since both of those >> are currently not supported, and the ABI/spec seems too vague to base >> support on. >

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-18 Thread Vicente Romero
On Tue, 18 Apr 2023 09:13:01 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8266571: Sequenced Collections [v6]

2023-04-18 Thread Stuart Marks
> PR for Sequenced Collections implementation. Stuart Marks has updated the pull request incrementally with four additional commits since the last revision: - Clarify LHM and LHS specs regarding semantics of reverse-ordered views. - Remove special-cases for reversed LHM and LHS putAll and

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v15]

2023-04-18 Thread Erik Joelsson
On Mon, 17 Apr 2023 20:59:06 GMT, Roger Riggs wrote: >> Define an internal jdk.internal.util.Architecture enumeration and static >> methods to replace uses of the system property `os.arch`. >> The enumeration values are defined to match those used in the build. >> The initial values are: `X64,

Re: RFR: 8305746: InitializeEncoding should cache Charset object instead of charset name [v2]

2023-04-18 Thread Naoto Sato
On Tue, 18 Apr 2023 11:34:45 GMT, Peter Hofer wrote: >> Store `Charset` object in `jnuEncoding` and use `String(byte[], Charset)` >> and `String.getBytes(Charset)` instead of passing the charset name. > > Peter Hofer has updated the pull request with a new target base due to a > merge or a

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v15]

2023-04-18 Thread Roger Riggs
On Mon, 17 Apr 2023 20:59:06 GMT, Roger Riggs wrote: >> Define an internal jdk.internal.util.Architecture enumeration and static >> methods to replace uses of the system property `os.arch`. >> The enumeration values are defined to match those used in the build. >> The initial values are: `X64,

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-18 Thread Vicente Romero
On Tue, 18 Apr 2023 09:13:01 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8306323: Update license files in CLDR v43

2023-04-18 Thread Steven Loomis
On Tue, 18 Apr 2023 18:40:03 GMT, Naoto Sato wrote: > The upgrade to CLDR v43 was missing the license-related file updates. Here > are the supplemental updates. Marked as reviewed by srl (Committer). [testing] Marked as reviewed by srl (Committer). - PR Review:

Re: RFR: 8306323: Update license files in CLDR v43

2023-04-18 Thread Steven Loomis
On Tue, 18 Apr 2023 20:15:32 GMT, Steven Loomis wrote: >> The upgrade to CLDR v43 was missing the license-related file updates. Here >> are the supplemental updates. > > Marked as reviewed by srl (Committer). - [Steven Loomis](https://openjdk.org/census#srl) (@srl295 - Committer) 

Re: RFR: 8306038: SystemModulesPlugin: Keep stack clean

2023-04-18 Thread Mandy Chung
On Wed, 12 Apr 2023 09:18:13 GMT, Oliver Kopp wrote: > This refs [https://bugs.openjdk.org/browse/JDK-8306038](8306038). > > (Before this referenced 8240567) > > Although this change is rather small, I think, it's good to have a "more > clean" SystemModulesPlugin available. I ran

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v3]

2023-04-18 Thread Aleksey Shipilev
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The > documentation for that method clearly says the precision and accuracy are > dependent on the underlying system behavior. However, it always rounds up > `nanos` to 1ms when doing the actual sleep. This means users

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v2]

2023-04-18 Thread Aleksey Shipilev
On Tue, 18 Apr 2023 19:23:59 GMT, Viktor Klang wrote: > In such a case, would it not be "better" to base the HC on > getClass().getName().hashCode() which is specced and stable mixed with the > ordinal to improve distribution over the 32-bit space? Maybe, even though it still raises lots of

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v3]

2023-04-18 Thread Aleksey Shipilev
On Tue, 18 Apr 2023 17:23:54 GMT, ExE Boss wrote: >> `super.hashCode()` is a virtual call. `System.identityHashCode` is the >> static call. I don't understand where `invokespecial` enters the picture >> here. > > `invokespecial` is used to call instance methods in a non‑virtual manner. > >

Re: RFR: 8306323: Update license files in CLDR v43

2023-04-18 Thread Iris Clark
On Tue, 18 Apr 2023 18:40:03 GMT, Naoto Sato wrote: > The upgrade to CLDR v43 was missing the license-related file updates. Here > are the supplemental updates. Marked as reviewed by iris (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/13517#pullrequestreview-1390801345

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v2]

2023-04-18 Thread Eirik Bjorsnos
On Tue, 18 Apr 2023 18:19:20 GMT, Lance Andersen wrote: > It would be useful to obtain the zip/jar in question to validate that your > proposed patch addresses the issue as well as verifying if ZipfFile can be > used to process the zip/jar as reading the long thread appears that >

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v2]

2023-04-18 Thread Viktor Klang
On Tue, 18 Apr 2023 09:02:34 GMT, Aleksey Shipilev wrote: >>> > > Why isn't `Enum::hashCode` simply doing `return ordinal;`? >>> > >>> > >>> > See https://bugs.openjdk.org/browse/JDK-8050217 >>> >>> Thanks! If there are apps where `Enum::hashCode` is performance sensitive >>> then run-to-run

Re: RFR: 8306323: Update license files in CLDR v43

2023-04-18 Thread Steven R . Loomis
On Tue, 18 Apr 2023 18:40:03 GMT, Naoto Sato wrote: > The upgrade to CLDR v43 was missing the license-related file updates. Here > are the supplemental updates. Marked as reviewed by srl...@github.com (no known OpenJDK username). - PR Review:

Re: RFR: 8306323: Update license files in CLDR v43

2023-04-18 Thread Lance Andersen
On Tue, 18 Apr 2023 18:40:03 GMT, Naoto Sato wrote: > The upgrade to CLDR v43 was missing the license-related file updates. Here > are the supplemental updates. Marked as reviewed by lancea (Reviewer). - PR Review:

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v4]

2023-04-18 Thread Sergey Tsypanov
On Sun, 16 Apr 2023 11:20:46 GMT, Sergey Tsypanov wrote: >> Currently it's O(n) - we do `n` shifts of bytes within `StringBuilder`. This >> can be reduced to O(1) improving the code like: >> >> DateTimeFormatter dtf = new DateTimeFormatterBuilder() >> .appendLiteral("Date:") >>

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v5]

2023-04-18 Thread Sergey Tsypanov
> Currently it's O(n) - we do `n` shifts of bytes within `StringBuilder`. This > can be reduced to O(1) improving the code like: > > DateTimeFormatter dtf = new DateTimeFormatterBuilder() > .appendLiteral("Date:") > .padNext(20, ' ') > .append(DateTimeFormatter.ISO_DATE) >

Re: RFR: 8306038: SystemModulesPlugin: Keep stack clean

2023-04-18 Thread Mandy Chung
On Wed, 12 Apr 2023 09:18:13 GMT, Oliver Kopp wrote: > This refs [https://bugs.openjdk.org/browse/JDK-8306038](8306038). > > (Before this referenced 8240567) > > Although this change is rather small, I think, it's good to have a "more > clean" SystemModulesPlugin available. or you can just

RFR: 8306323: Update license files in CLDR v43

2023-04-18 Thread Naoto Sato
The upgrade to CLDR v43 was missing the license-related file updates. Here are the supplemental updates. - Commit messages: - 8306323: Update license files in CLDR v43 Changes: https://git.openjdk.org/jdk/pull/13517/files Webrev: https://webrevs.openjdk.org/?repo=jdk=13517=00

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v2]

2023-04-18 Thread Lance Andersen
On Tue, 18 Apr 2023 18:24:01 GMT, Eirik Bjorsnos wrote: > > Do you know how the Zip in question is being created, is it via > > ApacheCommons and could there be an issue there? > > Currently investigating. The Tomcat build is using the Ant `jar` task to > create the `tomcat-embed-core.jar`,

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v2]

2023-04-18 Thread Eirik Bjorsnos
On Tue, 18 Apr 2023 18:19:20 GMT, Lance Andersen wrote: > Do you know how the Zip in question is being created, is it via ApacheCommons > and could there be an issue there? Currently investigating. The Tomcat build is using the Ant `jar` task to create the `tomcat-embed-core.jar`, but then

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v2]

2023-04-18 Thread Lance Andersen
On Wed, 29 Mar 2023 10:48:57 GMT, Eirik Bjorsnos wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP format mandates that the data

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v2]

2023-04-18 Thread Aleksey Shipilev
On Wed, 29 Mar 2023 19:57:46 GMT, Alan Bateman wrote: >> Yes, let me fix that. `TimeUnit.toNanos` handles it well itself, it seems. > >> Yes, let me fix that. `TimeUnit.toNanos` handles it well itself, it seems. > > This code is refactored in PR 13203 so we'll have to merge at some point.

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v2]

2023-04-18 Thread Aleksey Shipilev
On Thu, 30 Mar 2023 01:26:36 GMT, David Holmes wrote: >> Aleksey Shipilev has updated the pull request with a new target base due to >> a merge or a rebase. The pull request now contains ten commits: >> >> - Merge branch 'master' into JDK-83050920-thread-sleep-subms >> - Work >> - Draft

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v2]

2023-04-18 Thread Aleksey Shipilev
On Wed, 12 Apr 2023 07:44:38 GMT, Alan Bateman wrote: >> Aleksey Shipilev has updated the pull request with a new target base due to >> a merge or a rebase. The pull request now contains ten commits: >> >> - Merge branch 'master' into JDK-83050920-thread-sleep-subms >> - Work >> - Draft

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v2]

2023-04-18 Thread Aleksey Shipilev
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The > documentation for that method clearly says the precision and accuracy are > dependent on the underlying system behavior. However, it always rounds up > `nanos` to 1ms when doing the actual sleep. This means users

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v3]

2023-04-18 Thread ExE Boss
On Tue, 18 Apr 2023 08:34:41 GMT, Aleksey Shipilev wrote: >> Shouldn’t `invokespecial` produce a non‑virtual call as well? >> >> And `this`/`super` can never be `null`. > > `super.hashCode()` is a virtual call. `System.identityHashCode` is the static > call. I don't understand where

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v2]

2023-04-18 Thread Eirik Bjorsnos
On Wed, 29 Mar 2023 10:48:57 GMT, Eirik Bjorsnos wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP format mandates that the data

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 Jonathan Gibbons
On Tue, 18 Apr 2023 12:08:50 GMT, Andrey Turbanov wrote: > Interesting, why this JBS ticked is considered as a bug? There's no obvious best choice here (bug, enhancement, task) and as is, it was the same as for similar previous items. - PR Comment:

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-18 Thread Maurizio Cimadamore
On Tue, 18 Apr 2023 14:31:30 GMT, Maurizio Cimadamore wrote: >> Jan Lahoda has updated the pull request incrementally with six additional >> commits since the last revision: >> >> - Fixing infinite loop where a binding pattern is replaced with a binding >> pattern for the same type. >> -

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-18 Thread Maurizio Cimadamore
On Tue, 18 Apr 2023 09:13:01 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-18 Thread Maurizio Cimadamore
On Tue, 18 Apr 2023 09:13:01 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-18 Thread Maurizio Cimadamore
On Tue, 18 Apr 2023 13:54:52 GMT, Maurizio Cimadamore wrote: > I've also found an infinite loop with this: I believe this has to do with the fact that the list of pattern is not a set - so we can end up adding the same pattern descriptions over and over. - PR Review Comment:

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-18 Thread Maurizio Cimadamore
On Tue, 18 Apr 2023 13:43:17 GMT, Maurizio Cimadamore wrote: >> Jan Lahoda has updated the pull request incrementally with six additional >> commits since the last revision: >> >> - Fixing infinite loop where a binding pattern is replaced with a binding >> pattern for the same type. >> -

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-18 Thread Maurizio Cimadamore
On Tue, 18 Apr 2023 09:13:01 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8303002: Reject packed structs from linker [v5]

2023-04-18 Thread Jorn Vernee
> This patch adds checks in AbstractLinker to reject packed structs and structs > with excess padding (e.g. unnamed bitfields), since both of those are > currently not supported, and the ABI/spec seems too vague to base support on. Jorn Vernee has updated the pull request with a new target base

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

2023-04-18 Thread Jim Laskey
> Enhance the Java programming language with string templates, which are > similar to string literals but contain embedded expressions. A string > template is interpreted at run time by replacing each expression with the > result of evaluating that expression, possibly after further validation

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-18 Thread Maurizio Cimadamore
On Tue, 18 Apr 2023 09:13:01 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8306008: Several Vector API tests fail for client VM after JDK-8304450

2023-04-18 Thread Martin Doerr
On Tue, 18 Apr 2023 12:21:11 GMT, Quan Anh Mai wrote: > Hi, > > Please review this patch which fixes the errors on machines where > TypeMaxVector has a length of 64 bits. I take an extra cautious approach and > fall back to putting elements one by one if the length is an unexpected value. >

RFR: 8306008: Several Vector API tests fail for client VM after JDK-8304450

2023-04-18 Thread Quan Anh Mai
Hi, Please review this patch which fixes the errors on machines where TypeMaxVector has a length of 64 bits. I take an extra cautious approach and fall back to putting elements one by one if the length is an unexpected value. All jdk/incubator/vector tests passed with MaxVectorSize=8, which

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: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-18 Thread Jan Lahoda
On Mon, 17 Apr 2023 11:33:56 GMT, Maurizio Cimadamore wrote: >> Jan Lahoda has updated the pull request incrementally with six additional >> commits since the last revision: >> >> - Fixing infinite loop where a binding pattern is replaced with a binding >> pattern for the same type. >> -

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-18 Thread Jan Lahoda
On Fri, 14 Apr 2023 18:30:56 GMT, Vicente Romero wrote: >> Jan Lahoda has updated the pull request incrementally with six additional >> commits since the last revision: >> >> - Fixing infinite loop where a binding pattern is replaced with a binding >> pattern for the same type. >> -

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-18 Thread Jan Lahoda
On Fri, 14 Apr 2023 16:45:36 GMT, Roger Riggs wrote: >> Well, I'm aware of this, and https://github.com/openjdk/jdk/pull/9779 even >> optimizes the case where the `enumSwitch` only gets enum constants as >> parameters. >> >> And, overall, it is fairly easy to implement, I think I've had at

Re: RFR: 8305746: InitializeEncoding should cache Charset object instead of charset name [v2]

2023-04-18 Thread Peter Hofer
> Store `Charset` object in `jnuEncoding` and use `String(byte[], Charset)` and > `String.getBytes(Charset)` instead of passing the charset name. Peter Hofer has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit: 8305746:

Re: RFR: 8305746: InitializeEncoding should cache Charset object instead of charset name

2023-04-18 Thread Peter Hofer
On Mon, 17 Apr 2023 17:47:04 GMT, Peter Hofer wrote: > Store `Charset` object in `jnuEncoding` and use `String(byte[], Charset)` and > `String.getBytes(Charset)` instead of passing the charset name. @naotoj please find here my changes to `InitializeEncoding`. - PR Comment:

RFR: 8305746: InitializeEncoding should cache Charset object instead of charset name

2023-04-18 Thread Peter Hofer
Store `Charset` object in `jnuEncoding` and use `String(byte[], Charset)` and `String.getBytes(Charset)` instead of passing the charset name. - Commit messages: - 8305746: InitializeEncoding should cache Charset object instead of charset name Changes:

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

2023-04-18 Thread Martin Doerr
> Implementation of "Foreign Function & Memory API" for linux on Power (Little > Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". > > This PR does not include code for VaList support because it's supposed to get > removed by

Re: RFR: 8306038: SystemModulesPlugin: Keep stack clean

2023-04-18 Thread Oliver Kopp
On Mon, 17 Apr 2023 08:21:11 GMT, Alan Bateman wrote: > This looks right. I assume you've checked `java > -XX:+UnlockDiagnosticVMOptions -XX:+BytecodeVerificationLocal -version` as > this code is not normally verified koppor@DESKTOP-KAK953S

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-18 Thread Jan Lahoda
> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: > > - the pattern matching for switch and record patterns features are made > final, together with updates to tests. > - parenthesized patterns are removed. > - qualified enum constants are supported for case

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v2]

2023-04-18 Thread Aleksey Shipilev
On Mon, 17 Apr 2023 21:12:58 GMT, Jorn Vernee wrote: > (if anything, using the ordinal would be _more_ stable, since it is only > affected by the order of the constants, rather than by other code that runs > before the identity hash code is generated). Here lies the major original concern --

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v3]

2023-04-18 Thread Aleksey Shipilev
On Tue, 18 Apr 2023 04:49:46 GMT, ExE Boss wrote: >> Saves the virtual call, makes for a simpler intrinsic path (no need to >> handle NPE and fold away, for example), since we know the super-class is >> already `java.lang.Object`. Unless I miss something else here... > > Shouldn’t 

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v6]

2023-04-18 Thread Aleksey Shipilev
On Mon, 17 Apr 2023 23:38:31 GMT, John R Rose wrote: > I do have one comment: Since identity hash codes are typically reasonably > well-conditioned, it is perfectly reasonable to recondition an occasional 0 > by replacing it with 1, in order to store it in a stable variable for later > reuse.

Re: RFR: 8305990: Stripping debug info of ASM 9.5 fails

2023-04-18 Thread Adam Sotona
On Fri, 14 Apr 2023 14:02:46 GMT, Adam Sotona wrote: > Classfile API didn't handle transformations of class files version 50 and > below correctly. > > Proposed fix have two parts: > 1. Inflation of branch targets does not depend on StackMapTable attribute > presence for class file version

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

2023-04-18 Thread Doug Simon
On Tue, 18 Apr 2023 02:22:11 GMT, Joe Darcy wrote: > I think the code should reject it The `AnnotationData` constructor already has a check for unknown annotation element types so I think this concern is covered. > leaving some bread crumb comments to future maintainers of core reflection >

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

2023-04-18 Thread Doug Simon
> 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 > annotation type(s). That is, there is no equivalent of

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

2023-04-18 Thread Doug Simon
On Tue, 18 Apr 2023 01:06:31 GMT, Joe Darcy wrote: >> Just above (line 228) you can see a call to this method where the argument >> comes from `Map.values()` whose type is `Collection` so I'd prefer to leave >> it as is rather than have to convert the argument to a `List`. > > In that case, I