Re: RFR: 8266179: [macos] jpackage should specify architecture for produced pkg files [v2]

2021-04-30 Thread Alexander Matveev
> jpackage should specify architecture for produced PKG files via > hostArchitectures="x86_x64 or arm64". aarch64 installer will be installable > on x64 without specifying hostArchitectures which is not correct and if > install on arm Mac it will request Rosetta 2. With proposed fix by setting

Re: RFR: 8266179: [macos] jpackage should specify architecture for produced pkg files

2021-04-30 Thread Alexander Matveev
On Fri, 30 Apr 2021 04:22:37 GMT, Alexander Matveev wrote: > jpackage should specify architecture for produced PKG files via > hostArchitectures="x86_x64 or arm64". aarch64 installer will be installable > on x64 without specifying hostArchitectures which is not correct and if > install on

Re: New convenience methods on Stream

2021-04-30 Thread Tagir Valeev
Hello! 1. toCollection looks too specific to be added to JDK. Essentially, it's a shortcut for toCollection constructor and unlike toList, it cannot add many optimizations there. So we basically save several characters and nothing more. And toCollection collector is orders of magnitude less used

Re: RFR: 8265356: need code example for getting canonical constructor of a Record [v2]

2021-04-30 Thread Stuart Marks
On Sat, 24 Apr 2021 01:32:45 GMT, Tagir F. Valeev wrote: >> I decided to show a complete static method in the example, so it could be >> copied to user utility class as is. Not sure if it's reasonable to add >> `assert cls.isRecord();` there. Also I don't know whether there's a >> limitation

Re: Collection::getAny discussion

2021-04-30 Thread Donald Raab
To clarify, RichIterable is not a subclass of Collection. As we discovered in JDK 15, a problem exists when we add default methods to interfaces that might get “mixed” with other interfaces that already have those methods. There are a few potential issues with adding zero argument default

Re: RFR: 8265128: [REDO] Optimize Vector API slice and unslice operations [v3]

2021-04-30 Thread Sandhya Viswanathan
On Fri, 30 Apr 2021 23:34:15 GMT, Paul Sandoz wrote: > > > @PaulSandoz would it be possible for you to run this through your testing? > > > > > > Started, will report back when done. > > Tier 1 to 3 tests all pass on build profiles linux-x64 linux-aarch64 > macosx-x64 windows-x64

Re: RFR: 8265128: [REDO] Optimize Vector API slice and unslice operations [v3]

2021-04-30 Thread Paul Sandoz
On Fri, 30 Apr 2021 17:44:38 GMT, Paul Sandoz wrote: > > @PaulSandoz would it be possible for you to run this through your testing? > > Started, will report back when done. Tier 1 to 3 tests all pass on build profiles linux-x64 linux-aarch64 macosx-x64 windows-x64 - PR:

Re: ReversibleCollection proposal

2021-04-30 Thread Alan Snyder
It sounds like the items processing maintainer would be looking for OrderedCollection and might or might not find ReversibleCollection. :-) I suspect you would agree that OrderedCollection by itself is too weak to justify being a type. It’s basically Iterable with the extra bit that the

Re: ReversibleCollection proposal

2021-04-30 Thread Stuart Marks
You did not really answer to the real question, why should i use ReversibleCollection instead of a Collection as parameter. You said that it's a better type because you can not send a HashSet, but as i said, sending a HashSet of 0 or 1 element is perfectly valid. For me, we are not far

Re: RFR: 8265989: System property for the native character encoding name [v3]

2021-04-30 Thread Naoto Sato
> After some internal discussion, we thought it was good to expose the native > environment's default character encoding, which Charset.defaultCharset() is > currently based on. This way applications will have a better migration path > after the [JEP 400](https://openjdk.java.net/jeps/400) is

Re: RFR: 8265989: System property for the native character encoding name [v2]

2021-04-30 Thread Naoto Sato
On Fri, 30 Apr 2021 21:09:36 GMT, Roger Riggs wrote: > To support the statement that changing the property has no effect. > Please add it to the jdk.internal.util.StaticProperties cached values and an > internal access method. Thanks. Added. - PR:

Re: RFR: 8265989: System property for the native character encoding name [v2]

2021-04-30 Thread Naoto Sato
> After some internal discussion, we thought it was good to expose the native > environment's default character encoding, which Charset.defaultCharset() is > currently based on. This way applications will have a better migration path > after the [JEP 400](https://openjdk.java.net/jeps/400) is

Re: RFR: JDK-8266129: tools/jpackage/windows/WinInstallerIconTest.java hangs with fastdebug

2021-04-30 Thread Alexander Matveev
On Fri, 30 Apr 2021 20:19:25 GMT, Andy Herrick wrote: > JDK-8266129: tools/jpackage/windows/WinInstallerIconTest.java hangs with > fastdebug > > just disabling this test when vm.debug Marked as reviewed by almatvee (Committer). - PR: https://git.openjdk.java.net/jdk/pull/3827

Re: RFR: JDK-8266227: Fix help text for --mac-signing-keychain

2021-04-30 Thread Alexander Matveev
On Fri, 30 Apr 2021 15:25:13 GMT, Andy Herrick wrote: > JDK-8266227: Fix help text for --mac-signing-keychain Marked as reviewed by almatvee (Committer). - PR: https://git.openjdk.java.net/jdk/pull/3819

Re: Collection::getAny discussion

2021-04-30 Thread Stephen Colebourne
On Fri, 30 Apr 2021 at 19:50, Stuart Marks wrote: > You're asking for something that's somewhat different, which you called the > "find > the first element when there is only one" problem. Here, there's a > precondition that > the collection have a single element. (It's not clear to me what

Re: RFR: 8265989: System property for the native character encoding name

2021-04-30 Thread Roger Riggs
On Wed, 28 Apr 2021 22:24:31 GMT, Naoto Sato wrote: > After some internal discussion, we thought it was good to expose the native > environment's default character encoding, which Charset.defaultCharset() is > currently based on. This way applications will have a better migration path > after

Re: RFR: JDK-8266129: tools/jpackage/windows/WinInstallerIconTest.java hangs with fastdebug

2021-04-30 Thread Alexey Semenyuk
On Fri, 30 Apr 2021 20:19:25 GMT, Andy Herrick wrote: > JDK-8266129: tools/jpackage/windows/WinInstallerIconTest.java hangs with > fastdebug > > just disabling this test when vm.debug Marked as reviewed by asemenyuk (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/3827

Re: 8252827: Caching Integer.toString just like Integer.valueOf

2021-04-30 Thread Maurizio Cimadamore
Ciao Raffaello, another general consideration: caching sometimes makes certain optimizations harder to pull off. Few years ago I've seen this talk at Fosdem: https://archive.fosdem.org/2020/schedule/event/reducing_gc_times/ See minute 5:53 - where it shows that cached Integer values (as per

RFR: JDK-8266129: tools/jpackage/windows/WinInstallerIconTest.java hangs with fastdebug

2021-04-30 Thread Andy Herrick
JDK-8266129: tools/jpackage/windows/WinInstallerIconTest.java hangs with fastdebug just disabling this test when vm.debug - Commit messages: - JDK-8266129: tools/jpackage/windows/WinInstallerIconTest.java hangs with fastdebug Changes:

Re: Collection::getAny discussion

2021-04-30 Thread Brian Goetz
While I agree that we should be careful, let's not paint ourselves into an either/or strawman.  The choice is not "never add anything to Collection" vs "let's dump every silly idea that comes to anyone's mind into Collection"; it is, as always, going to involve tradeoffs between stability and

Re: Collection::getAny discussion

2021-04-30 Thread Donald Raab
There is a default method getAny defined on the RichIterable interface in Eclipse Collections. Adding a getAny with the same signature to Collection is bound to cause a break similar to CharSequence.isEmpty did with JDK 15 but possibly more extensive since RichIterable is the parent interface

Integrated: 8266155: Convert java.base to use Stream.toList()

2021-04-30 Thread Ian Graves
On Tue, 27 Apr 2021 21:34:02 GMT, Ian Graves wrote: > 8266155: Convert java.base to use Stream.toList() This pull request has now been integrated. Changeset: dd05158b Author:Ian Graves Committer: Pavel Rappo URL:

Integrated: 8260560: convert jdeps and jdeprscan tools to use Stream.toList()

2021-04-30 Thread Ian Graves
On Tue, 27 Apr 2021 00:20:49 GMT, Ian Graves wrote: > 8260560: convert jdeps and jdeprscan tools to use Stream.toList() This pull request has now been integrated. Changeset: c36c63a0 Author:Ian Graves Committer: Pavel Rappo URL:

Re: [External] : Re: ReversibleCollection proposal

2021-04-30 Thread Stuart Marks
OK, I think we can wrap up this portion of the thread. As the proposal stands, it has add{First,Last} returning void instead of some useful value. For SortedSet and for LinkedHashMap's views, these throw UOE. Can we do better? Collection has add(), Deque has add{First,Last} and

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v6]

2021-04-30 Thread Igor Veresov
On Fri, 30 Apr 2021 02:19:30 GMT, Yi Yang wrote: >> The JDK codebase re-created many variants of checkIndex(`grep -I -r >> 'cehckIndex' jdk/`). A notable variant is java.nio.Buffer.checkIndex, which >> annotated with @IntrinsicCandidate and it only has a corresponding C1 >> intrinsic version.

Collection::getAny discussion

2021-04-30 Thread Stuart Marks
Hi Henri, I've changed the subject of this thread because I think it's out of scope of the ReversibleCollection proposal. I don't mean to say that we can't talk about it, but I would like it to be decoupled from ReversibleCollection. I'm somewhat arbitrarily calling it "Collection::getAny"

Re: 8252827: Caching Integer.toString just like Integer.valueOf

2021-04-30 Thread Stuart Marks
(Catching up on old email threads.) I don't have much to add to the technical discussion here. Yes, caching the Integer instances seems obsolescent, and it seems unlikely that caching String conversions will be helpful. I've gone ahead and closed out the bug. [1] On triaging bugs... we do

Re: RFR: 8266179: [macos] jpackage should specify architecture for produced pkg files

2021-04-30 Thread Alexey Semenyuk
On Fri, 30 Apr 2021 04:22:37 GMT, Alexander Matveev wrote: > jpackage should specify architecture for produced PKG files via > hostArchitectures="x86_x64 or arm64". aarch64 installer will be installable > on x64 without specifying hostArchitectures which is not correct and if > install on

Re: RFR: 8265128: [REDO] Optimize Vector API slice and unslice operations [v3]

2021-04-30 Thread Paul Sandoz
On Fri, 30 Apr 2021 02:31:07 GMT, Paul Sandoz wrote: >> Sandhya Viswanathan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Review comments: blendmask etc > > Marked as reviewed by psandoz (Reviewer). > @PaulSandoz would it be possible

Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v5]

2021-04-30 Thread Vicente Romero
> Please review this PR that intents to make sealed classes a final feature in > Java. This PR contains compiler and VM changes. In line with similar PRs, > which has made preview features final, this one is mostly removing preview > related comments from APIs plus options in test cases. Please

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v6]

2021-04-30 Thread Paul Sandoz
On Fri, 30 Apr 2021 02:19:30 GMT, Yi Yang wrote: >> The JDK codebase re-created many variants of checkIndex(`grep -I -r >> 'cehckIndex' jdk/`). A notable variant is java.nio.Buffer.checkIndex, which >> annotated with @IntrinsicCandidate and it only has a corresponding C1 >> intrinsic version.

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v3]

2021-04-30 Thread Mandy Chung
On Fri, 30 Apr 2021 12:24:38 GMT, Maurizio Cimadamore wrote: > I've added `@CS` in the interface methods too. I've also added a stronger > test which creates method handles in one module (which doesn't have native > access) and then calls them from another module (which does NOT have native

Re: RFR: 8265128: [REDO] Optimize Vector API slice and unslice operations [v3]

2021-04-30 Thread Sandhya Viswanathan
On Fri, 30 Apr 2021 02:31:07 GMT, Paul Sandoz wrote: >> Sandhya Viswanathan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Review comments: blendmask etc > > Marked as reviewed by psandoz (Reviewer). @PaulSandoz would it be possible

Re: RFR: 8266013: Unexpected replacement character handling on stateful CharsetEncoder [v2]

2021-04-30 Thread Ichiroh Takiguchi
> When an invalid character is converted by getBytes() method, the character is > converted to replacement byte data. > Shift code (SO/SI) may not be added into right place by EBCDIC Mix charset. > EBCDIC Mix charset encoder is stateful encoder. > Shift code should be added by switching character

Re: RFR: 8266054: VectorAPI rotate operation optimization [v2]

2021-04-30 Thread Paul Sandoz
On Fri, 30 Apr 2021 12:59:34 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res =

RFR: JDK-8266227: Fix help text for --mac-signing-keychain

2021-04-30 Thread Andy Herrick
JDK-8266227: Fix help text for --mac-signing-keychain - Commit messages: - JDK-8266227: Fix help text for --mac-signing-keychain Changes: https://git.openjdk.java.net/jdk/pull/3819/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=3819=00 Issue:

Re: RFR: 8266179: [macos] jpackage should specify architecture for produced pkg files

2021-04-30 Thread Andy Herrick
On Fri, 30 Apr 2021 04:22:37 GMT, Alexander Matveev wrote: > jpackage should specify architecture for produced PKG files via > hostArchitectures="x86_x64 or arm64". aarch64 installer will be installable > on x64 without specifying hostArchitectures which is not correct and if > install on

Re: RFR: 8266179: [macos] jpackage should specify architecture for produced pkg files

2021-04-30 Thread Kevin Rushforth
On Fri, 30 Apr 2021 04:22:37 GMT, Alexander Matveev wrote: > jpackage should specify architecture for produced PKG files via > hostArchitectures="x86_x64 or arm64". aarch64 installer will be installable > on x64 without specifying hostArchitectures which is not correct and if > install on

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v3]

2021-04-30 Thread Maurizio Cimadamore
On Thu, 29 Apr 2021 18:18:00 GMT, Mandy Chung wrote: > I think the implementation does not support that. I will also need to look > into how this impacts JDK-8266010. As I suggest earlier, I'm fine to do this > as a follow up after integration. I've added `@CS` in the interface methods too.

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v6]

2021-04-30 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-412 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.java.net/jeps/412 Maurizio Cimadamore has updated the pull

Re: RFR: 4890732: GZIPOutputStream doesn't support optional GZIP fields [v6]

2021-04-30 Thread Lin Zang
On Thu, 15 Apr 2021 12:41:17 GMT, Lin Zang wrote: >> 4890732: GZIPOutputStream doesn't support optional GZIP fields > > Lin Zang 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

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v6]

2021-04-30 Thread Daniel Fuchs
On Fri, 30 Apr 2021 02:19:30 GMT, Yi Yang wrote: >> The JDK codebase re-created many variants of checkIndex(`grep -I -r >> 'cehckIndex' jdk/`). A notable variant is java.nio.Buffer.checkIndex, which >> annotated with @IntrinsicCandidate and it only has a corresponding C1 >> intrinsic version.