Withdrawn: 8233725: ProcessTools.startProcess() has output issues when using an OutputAnalyzer at the same time

2023-04-20 Thread Leonid Mesnik
On Thu, 20 Apr 2023 16:09:29 GMT, Leonid Mesnik wrote: > ProcessTools.startProcess() creates process and read it's output error > streams. So the any other using of corresponding Process.getInputStream() and > Process.getErrorStream() doesn't get process streams. > > This fix preserve process

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

2023-04-20 Thread Jorn Vernee
On Mon, 17 Apr 2023 16:42:38 GMT, olivergillespie wrote: >> Improve the speed of Enum.hashCode by caching the identity hashcode on first >> use. I've seen an application where Enum.hashCode is a hot path, and this is >> fairly simple speedup. The memory overhead is low; in enums with no extra

Re: RFR: 8304836: Make MALLOC_MIN4 macro more robust

2023-04-20 Thread Brent Christian
On Thu, 20 Apr 2023 18:39:29 GMT, Naoto Sato wrote: > The current macro assumes the argument is `jint` because all locations pass > `jint`. However, this would not work if a wider type such as `jlong` is > passed. Removing the `unsigned` cast and make the condition explicit would > make the

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

2023-04-20 Thread Jorn Vernee
> 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 structure, but with layouts that have different names. > >

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

2023-04-20 Thread ExE Boss
On Thu, 20 Apr 2023 17:23:08 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

RFR: 8305093: Linker cache should not take layout names into account

2023-04-20 Thread Jorn Vernee
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 structure, but with layouts that have different names. I also have

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

2023-04-20 Thread Jorn Vernee
On Thu, 20 Apr 2023 19:29:40 GMT, ExE Boss 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: 8306431: File.listRoots method description should be re-examined [v3]

2023-04-20 Thread Nagata-Haruhito
On Thu, 20 Apr 2023 04:16:13 GMT, Nagata-Haruhito wrote: >> I fixed File.listRoots description. >> * remove "the insertion or ejection of removable media" >> * change "available" to "existing" >> >> Please review this change. > > Nagata-Haruhito has refreshed the contents of this pull request,

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

2023-04-20 Thread Jorn Vernee
On Thu, 20 Apr 2023 09:27:40 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - restrictions -> characteristics >> - polish pt. 2 >> - polish wording >> - review comments > > Looks

Re: RFR: 8266571: Sequenced Collections [v9]

2023-04-20 Thread Stuart Marks
> PR for Sequenced Collections implementation. Stuart Marks has updated the pull request incrementally with one additional commit since the last revision: Delegate more methods in the views of ReverseOrderSortedMapView. - Changes: - all:

Re: RFR: 8233725: ProcessTools.startProcess() has output issues when using an OutputAnalyzer at the same time [v2]

2023-04-20 Thread Leonid Mesnik
On Thu, 20 Apr 2023 22:54:49 GMT, David Holmes wrote: >> test/lib/jdk/test/lib/process/ProcessTools.java line 750: >> >>> 748: public InputStream getInputStream() { >>> 749: try { >>> 750: waitFor(); >> >> With this added `waitFor()` the assumption now is

Re: RFR: 8233725: ProcessTools.startProcess() has output issues when using an OutputAnalyzer at the same time [v2]

2023-04-20 Thread Leonid Mesnik
On Thu, 20 Apr 2023 22:22:06 GMT, Chris Plummer wrote: >> Leonid Mesnik has updated the pull request incrementally with one additional >> commit since the last revision: >> >> JStackStressTest.java updated. > > test/jdk/sun/tools/jhsdb/JStackStressTest.java line 86: > >> 84: }

Re: RFR: 8233725: ProcessTools.startProcess() has output issues when using an OutputAnalyzer at the same time [v2]

2023-04-20 Thread David Holmes
On Thu, 20 Apr 2023 22:31:55 GMT, Chris Plummer wrote: >> Leonid Mesnik has updated the pull request incrementally with one additional >> commit since the last revision: >> >> JStackStressTest.java updated. > > test/lib/jdk/test/lib/process/ProcessTools.java line 750: > >> 748:

Re: RFR: 8233725: ProcessTools.startProcess() has output issues when using an OutputAnalyzer at the same time [v2]

2023-04-20 Thread Chris Plummer
On Thu, 20 Apr 2023 18:40:52 GMT, Leonid Mesnik wrote: >> ProcessTools.startProcess() creates process and read it's output error >> streams. So the any other using of corresponding Process.getInputStream() >> and Process.getErrorStream() doesn't get process streams. >> >> This fix preserve

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v2]

2023-04-20 Thread Laurent Bourgès
> * Optimized mixed insertion sort > * Optimized insertion sort > * Optimized Radix sort > * Updated microbenchmark > > I am going on previous PR by Vladimir Yaroslavskyi: > https://github.com/openjdk/jdk/pull/3938 Laurent Bourgès has updated the pull request incrementally with one

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort)

2023-04-20 Thread Laurent Bourgès
On Thu, 20 Apr 2023 21:05:55 GMT, Laurent Bourgès wrote: > * Optimized mixed insertion sort > * Optimized insertion sort > * Optimized Radix sort > * Updated microbenchmark > > I am going on previous PR by Vladimir Yaroslavskyi: > https://github.com/openjdk/jdk/pull/3938 Here are

Integrated: 8305207: Calendar.aggregateStamp(int, int) return value can be simplified

2023-04-20 Thread Justin Lu
On Thu, 20 Apr 2023 06:32:41 GMT, Justin Lu wrote: > Small cleanup / tweak spotted in Calendar to improve readability. This pull request has now been integrated. Changeset: ffb2494d Author:Justin Lu Committer: Naoto Sato URL:

RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort)

2023-04-20 Thread Laurent Bourgès
* Optimized mixed insertion sort * Optimized insertion sort * Optimized Radix sort * Updated microbenchmark I am going on previous PR by Vladimir Yaroslavskyi: https://github.com/openjdk/jdk/pull/3938 - Commit messages: - JDK-8266431: Dual-Pivot Quicksort improvements

Integrated: 4737887: (cal) API: Calendar methods taking field should document exceptions

2023-04-20 Thread Justin Lu
On Wed, 29 Mar 2023 22:04:08 GMT, Justin Lu wrote: > Many Calendar methods that take in a field parameter should document that > they throw an ArrayIndexOutOfBoundsException if field is not between 0 and > `Calendar.FIELD_COUNT`. > > This PR adds a clause to the class description to make the

Re: RFR: 8306031: Update IANA Language Subtag Registry to Version 2023-04-13 [v6]

2023-04-20 Thread Justin Lu
> Update the registry and accompanying tests with the **IANA 4/13/2022** update. > > This update introduces the case where an IANA entry can have a preferred > value, but that preferred value has a preferred value as well. > > This causes unexpected failures in JDK tests because of how locale

Re: RFR: 8306031: Update IANA Language Subtag Registry to Version 2023-04-13 [v4]

2023-04-20 Thread Justin Lu
On Thu, 20 Apr 2023 17:06:26 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Hash map should be initialized with numMappings > >

Re: RFR: 8306031: Update IANA Language Subtag Registry to Version 2023-04-13 [v5]

2023-04-20 Thread Justin Lu
> Update the registry and accompanying tests with the **IANA 4/13/2022** update. > > This update introduces the case where an IANA entry can have a preferred > value, but that preferred value has a preferred value as well. > > This causes unexpected failures in JDK tests because of how locale

Re: RFR: 8305207: Calendar.aggregateStamp(int, int) return value can be simplified

2023-04-20 Thread Iris Clark
On Thu, 20 Apr 2023 06:32:41 GMT, Justin Lu wrote: > Small cleanup / tweak spotted in Calendar to improve readability. Marked as reviewed by iris (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/13554#pullrequestreview-1394591566

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

2023-04-20 Thread Roger Riggs
On Thu, 20 Apr 2023 10:57:07 GMT, Aleksey Shipilev 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

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

2023-04-20 Thread Roger Riggs
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.

RFR: 8304836: Make MALLOC_MIN4 macro more robust

2023-04-20 Thread Naoto Sato
The current macro assumes the argument is `jint` because all locations pass `jint`. However, this would not work if a wider type such as `jlong` is passed. Removing the `unsigned` cast and make the condition explicit would make the macro more robust. - Commit messages: - 8304836:

Re: RFR: 8233725: ProcessTools.startProcess() has output issues when using an OutputAnalyzer at the same time [v2]

2023-04-20 Thread Leonid Mesnik
> ProcessTools.startProcess() creates process and read it's output error > streams. So the any other using of corresponding Process.getInputStream() and > Process.getErrorStream() doesn't get process streams. > > This fix preserve process streams content and allow to read it after process >

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

2023-04-20 Thread Vicente Romero
On Thu, 20 Apr 2023 16:54:20 GMT, Jan Lahoda wrote: >> could you explain a bit more the relation between `lazyDoEnumSwitch` and >> `doEnumSwitch` because my understanding is that `lazyDoEnumSwitch` is >> invoking `doEnumSwitch` so to me whenever `lazyDoEnumSwitch` is invoked >> there will be

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

2023-04-20 Thread Vicente Romero
On Thu, 20 Apr 2023 17:08:10 GMT, Jan Lahoda wrote: >> That's in my upcoming update. > > The startIndex checks are part of this change: > https://github.com/openjdk/jdk/pull/13074/commits/bb59254e409821c9b14287c73a35ebe2dd2cbda9 > > Thanks for the comment! Oh I see, thanks! - PR

Re: RFR: 8305207: Calendar.aggregateStamp(int, int) return value can be simplified

2023-04-20 Thread Roger Riggs
On Thu, 20 Apr 2023 06:32:41 GMT, Justin Lu wrote: > Small cleanup / tweak spotted in Calendar to improve readability. Marked as reviewed by rriggs (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/13554#pullrequestreview-1394537788

Re: RFR: 8305207: Calendar.aggregateStamp(int, int) return value can be simplified

2023-04-20 Thread Naoto Sato
On Thu, 20 Apr 2023 06:32:41 GMT, Justin Lu wrote: > Small cleanup / tweak spotted in Calendar to improve readability. Marked as reviewed by naoto (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/13554#pullrequestreview-1394532604

Re: RFR: 8305990: Stripping debug info of ASM 9.5 fails [v7]

2023-04-20 Thread Adam Sotona
> 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 50 and below. Alternative fallback > implementation is

Re: RFR: 8306031: Update IANA Language Subtag Registry to Version 2023-04-13 [v4]

2023-04-20 Thread Naoto Sato
On Thu, 20 Apr 2023 06:36:47 GMT, Justin Lu wrote: >> Update the registry and accompanying tests with the **IANA 4/13/2022** >> update. >> >> This update introduces the case where an IANA entry can have a preferred >> value, but that preferred value has a preferred value as well. >> >> This

Re: RFR: 8305990: Stripping debug info of ASM 9.5 fails [v2]

2023-04-20 Thread Adam Sotona
On Wed, 19 Apr 2023 13:30:44 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> DiscontinuedInstruction implementation + test > >

Re: RFR: JDK-8077371: Binary files in JAXP test should be removed [v3]

2023-04-20 Thread Lance Andersen
On Thu, 20 Apr 2023 16:20:18 GMT, Daniel Fuchs wrote: > > The original version of this test was validating serialization > > compatibility with previous releases. > > The current changes seems to have removed that validation in the re-write > > of the test > > One option is to convert the

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

2023-04-20 Thread Jan Lahoda
On Tue, 18 Apr 2023 13:43:45 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-20 Thread Jan Lahoda
On Tue, 18 Apr 2023 14:31:46 GMT, Maurizio Cimadamore wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java line 1021: >> >>> 1019: *on patterns in the chosen column, as described above >>> 1020: */ >>> 1021: var

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

2023-04-20 Thread Jan Lahoda
On Tue, 18 Apr 2023 14:17:02 GMT, Maurizio Cimadamore wrote: >> I've also found an infinite loop with this: >> >> >> class Test { >> sealed interface I0 permits I1, I2 { } >> sealed interface I00 permits I1, I2 { } >> >> sealed interface I1 extends I0, I00 permits B, C { } >>

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

2023-04-20 Thread Jan Lahoda
On Thu, 20 Apr 2023 16:40:31 GMT, Jan Lahoda wrote: >> and regarding checking that `startIndex` should be `>= 0`? shouldn't we >> check for that? > > That's in my upcoming update. The startIndex checks are part of this change:

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

2023-04-20 Thread Jan Lahoda
On Tue, 18 Apr 2023 20:24:33 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: 8305990: Stripping debug info of ASM 9.5 fails [v6]

2023-04-20 Thread Adam Sotona
> 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 50 and below. Alternative fallback > implementation is

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

2023-04-20 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 [v6]

2023-04-20 Thread Jorn Vernee
On Mon, 17 Apr 2023 16:42:38 GMT, olivergillespie wrote: >> Improve the speed of Enum.hashCode by caching the identity hashcode on first >> use. I've seen an application where Enum.hashCode is a hot path, and this is >> fairly simple speedup. The memory overhead is low; in enums with no extra

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

2023-04-20 Thread Vladimir Kozlov
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: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-20 Thread Jan Lahoda
On Thu, 20 Apr 2023 16:31:33 GMT, Vicente Romero wrote: >> yep I found a similar test case triggering this code > > could you explain a bit more the relation between `lazyDoEnumSwitch` and > `doEnumSwitch` because my understanding is that `lazyDoEnumSwitch` is > invoking `doEnumSwitch` so to

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

2023-04-20 Thread Jan Lahoda
On Thu, 20 Apr 2023 16:32:33 GMT, Vicente Romero wrote: >> I see, thanks > > and regarding checking that `startIndex` should be `>= 0`? shouldn't we check > for that? That's in my upcoming update. - PR Review Comment: https://git.openjdk.org/jdk/pull/13074#discussion_r1172848770

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

2023-04-20 Thread Vicente Romero
On Thu, 20 Apr 2023 14:07:01 GMT, Vicente Romero wrote: >> The intent here is to avoid eager initialization of enums - so, until the >> enum is initialized, `lazyDoEnumSwitch` will be used (which, by itself, >> won't compute any results, except the result for `null`), which is then >>

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

2023-04-20 Thread olivergillespie
On Mon, 17 Apr 2023 16:42:38 GMT, olivergillespie wrote: >> Improve the speed of Enum.hashCode by caching the identity hashcode on first >> use. I've seen an application where Enum.hashCode is a hot path, and this is >> fairly simple speedup. The memory overhead is low; in enums with no extra

Re: RFR: JDK-8077371: Binary files in JAXP test should be removed [v3]

2023-04-20 Thread Daniel Fuchs
On Thu, 20 Apr 2023 16:06:36 GMT, Lance Andersen wrote: > The original version of this test was validating serialization compatibility > with previous releases. > > The current changes seems to have removed that validation in the re-write of > the test > > One option is to convert the

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-20 Thread Stuart Marks
On Thu, 20 Apr 2023 09:03:03 GMT, Pavel Rappo wrote: >> @pavelrappo Aggh. >> >>> I guess, this PR has converged enough for us to discuss some trivial stuff; >>> so here it goes. >> >> All this "trivial" stuff is generating a lot of work! :-) Well, no big deal, >> Joe D still has more CSR

RFR: 8233725: ProcessTools.startProcess() has output issues when using an OutputAnalyzer at the same time

2023-04-20 Thread Leonid Mesnik
ProcessTools.startProcess() creates process and read it's output error streams. So the any other using of corresponding Process.getInputStream() and Process.getErrorStream() doesn't get process streams. This fix preserve process streams content and allow to read it after process completion.

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

2023-04-20 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. This pull request has now been integrated. Changeset: 20b1d19d Author:Peter Hofer

Re: RFR: JDK-8077371: Binary files in JAXP test should be removed [v3]

2023-04-20 Thread Lance Andersen
On Thu, 20 Apr 2023 10:06:33 GMT, Mahendra Chhipa wrote: >> Test is updated to create the binary files during test execution. > > Mahendra Chhipa has updated the pull request incrementally with one > additional commit since the last revision: > > Implemented the review comment. The original

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

2023-04-20 Thread Roger Riggs
On Thu, 20 Apr 2023 15:05:18 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: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions

2023-04-20 Thread Joe Darcy
On Wed, 19 Apr 2023 17:04:07 GMT, Joe Darcy 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: 8300818: Reduce complexity of padding with DateTimeFormatter [v6]

2023-04-20 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) >

Integrated: 8305945: (zipfs) Opening a directory to get input stream produces incorrect exception message

2023-04-20 Thread Lance Andersen
On Fri, 14 Apr 2023 20:24:00 GMT, Lance Andersen wrote: > Please review this trivial change when ZipFS returns the wrong > java.nio.file.FileSystemException message due the the parameters being > reversed. > > I also included a simple junit test as part of the fix. > > Mach5 tiers1-3 are

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

2023-04-20 Thread Vicente Romero
On Thu, 20 Apr 2023 13:41:05 GMT, Jan Lahoda wrote: >> src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java line 279: >> >>> 277: } >>> 278: >>> 279: private static int lazyDoEnumSwitch(Enum target, int >>> startIndex, Object[] labels, MethodHandles.Lookup lookup, Class

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

2023-04-20 Thread Jan Lahoda
On Wed, 19 Apr 2023 16:45:06 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-20 Thread Vicente Romero
On Thu, 20 Apr 2023 13:33:17 GMT, Jan Lahoda wrote: >> src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java line 170: >> >>> 168: } else if (label instanceof EnumDesc enumDesc) { >>> 169: if (target.getClass().isEnum() && >>> 170:

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

2023-04-20 Thread Jan Lahoda
On Wed, 19 Apr 2023 15:36:08 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-20 Thread Jan Lahoda
On Wed, 19 Apr 2023 04:06:00 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: 8266571: Sequenced Collections [v8]

2023-04-20 Thread Nir Lisker
On Thu, 20 Apr 2023 04:19:55 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with four additional > commits since the last revision: > > - Add missing @throws and @since tags. > - Convert code samples to

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

2023-04-20 Thread Aleksey Shipilev
On Thu, 20 Apr 2023 12:28:56 GMT, David Holmes wrote: >> Hm, "later" where? Because I see the call to `pthread_condwait_timed` right >> after we produced abstime using `nanos_to_nanos_bounded`, and this looks >> like the last opportunity to handle the `MAX_SECS` limit: >>

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

2023-04-20 Thread David Holmes
On Thu, 20 Apr 2023 12:09:18 GMT, Aleksey Shipilev wrote: >> src/hotspot/os/posix/os_posix.cpp line 1342: >> >>> 1340: } >>> 1341: >>> 1342: static jlong nanos_to_nanos_bounded(jlong nanos) { >> >> I don't think we actually need this for nanos. There is no overflow >> potential and the

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

2023-04-20 Thread Aleksey Shipilev
On Thu, 20 Apr 2023 12:04:38 GMT, David Holmes wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Handle overflows > > src/hotspot/os/posix/os_posix.cpp line 1342: > >> 1340: } >> 1341: >> 1342: static jlong

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

2023-04-20 Thread David Holmes
On Thu, 20 Apr 2023 09:29:43 GMT, Aleksey Shipilev wrote: >> 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 >>

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

2023-04-20 Thread Aleksey Shipilev
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: 8266571: Sequenced Collections [v7]

2023-04-20 Thread Nir Lisker
On Wed, 19 Apr 2023 18:22:28 GMT, Stuart Marks wrote: >> src/java.base/share/classes/java/util/SequencedMap.java line 110: >> >>> 108: * {@code Entry} thus obtained will update a mapping in the underlying >>> map, or whether >>> 109: * it will throw an exception, or whether changes to the

Re: RFR: JDK-8077371: Binary files in JAXP test should be removed [v3]

2023-04-20 Thread Mahendra Chhipa
> Test is updated to create the binary files during test execution. Mahendra Chhipa has updated the pull request incrementally with one additional commit since the last revision: Implemented the review comment. - Changes: - all: https://git.openjdk.org/jdk/pull/13537/files -

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

2023-04-20 Thread Maurizio Cimadamore
On Thu, 20 Apr 2023 01:12:44 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: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v9]

2023-04-20 Thread Aleksey Shipilev
On Thu, 20 Apr 2023 09:29:43 GMT, Aleksey Shipilev wrote: >> 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 >>

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

2023-04-20 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: 8303431: [JVMCI] libgraal annotation API [v9]

2023-04-20 Thread Doug Simon
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 [v7]

2023-04-20 Thread Pavel Rappo
On Thu, 20 Apr 2023 04:13:57 GMT, Stuart Marks wrote: > I didn't know about the need to specify `@throws` in order to generate the > throws-clauses in the docs. You need to explicitly inherit `@throws` only for exceptions that aren't mentioned in the `throws` clause. > As an aside, I note

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-20 Thread Nir Lisker
On Wed, 19 Apr 2023 14:41:59 GMT, Nir Lisker wrote: >> 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

Re: RFR: 8305990: Stripping debug info of ASM 9.5 fails [v5]

2023-04-20 Thread Adam Sotona
> 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 50 and below. Alternative fallback > implementation is

Re: RFR: 8305990: Stripping debug info of ASM 9.5 fails [v4]

2023-04-20 Thread Adam Sotona
> 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 50 and below. Alternative fallback > implementation is

Re: RFR: 8305990: Stripping debug info of ASM 9.5 fails [v3]

2023-04-20 Thread Adam Sotona
On Wed, 19 Apr 2023 17:08:53 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed ClassPrinterImpl > > src/java.base/share/classes/jdk/internal/classfile/impl/BufWriterImpl.java > line 86: > >>

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

2023-04-20 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: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v7]

2023-04-20 Thread Aleksey Shipilev
On Thu, 20 Apr 2023 02:14:53 GMT, David Holmes wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Adjust test times > > src/hotspot/os/windows/os_windows.cpp line 5263: > >> 5261: if (nanos_left > 0) { >>

RFR: 8305207: Calendar.aggregateStamp(int, int) return value can be simplified

2023-04-20 Thread Justin Lu
Small cleanup / tweak spotted in Calendar to improve readability. - Commit messages: - Replace ternary with max() Changes: https://git.openjdk.org/jdk/pull/13554/files Webrev: https://webrevs.openjdk.org/?repo=jdk=13554=00 Issue: https://bugs.openjdk.org/browse/JDK-8305207

Re: RFR: 8306031: Update IANA Language Subtag Registry to Version 2023-04-13 [v4]

2023-04-20 Thread Justin Lu
> Update the registry and accompanying tests with the **IANA 4/13/2022** update. > > This update introduces the case where an IANA entry can have a preferred > value, but that preferred value has a preferred value as well. > > This causes unexpected failures in JDK tests because of how locale

Re: RFR: 8306031: Update IANA Language Subtag Registry to Version 2023-04-13 [v2]

2023-04-20 Thread Justin Lu
On Wed, 19 Apr 2023 22:51:58 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Copyright > > make/jdk/src/classes/build/tools/generatelsrequivmaps/EquivMapsGenerator.java > line 2: > >> 1: /* >> 2: *

Re: RFR: 8306031: Update IANA Language Subtag Registry to Version 2023-04-13 [v2]

2023-04-20 Thread Justin Lu
On Wed, 19 Apr 2023 22:46:44 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Copyright > > make/jdk/src/classes/build/tools/generatelsrequivmaps/EquivMapsGenerator.java > line 144: > >> 142:

Re: RFR: 8306031: Update IANA Language Subtag Registry to Version 2023-04-13 [v3]

2023-04-20 Thread Justin Lu
> Update the registry and accompanying tests with the **IANA 4/13/2022** update. > > This update introduces the case where an IANA entry can have a preferred > value, but that preferred value has a preferred value as well. > > This causes unexpected failures in JDK tests because of how locale