Re: RFR: JDK-8242888: Convert dynamic proxy to hidden classes

2022-04-17 Thread liach
On Sun, 17 Apr 2022 16:17:30 GMT, liach wrote: > Convert dynamic proxies to hidden classes. Modifies the serialization of > proxies (requires change in "Java Object Serialization Specification"). Makes > the proxies hidden in stack traces. Removes duplicate logic in proxy building. > > The

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-17 Thread Jie Fu
On Mon, 18 Apr 2022 05:09:33 GMT, Jie Fu wrote: >>> However, just image that someone would like to optimize some code segments >>> of bytes/shorts `>>>` >> >> Then that person can just use signed shift (`VectorOperators.ASHR`), right? >> Shifting on masked shift counts means that the shift

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-17 Thread Jie Fu
On Mon, 18 Apr 2022 04:25:23 GMT, Quan Anh Mai wrote: > > However, just image that someone would like to optimize some code segments > > of bytes/shorts `>>>` > > Then that person can just use signed shift (`VectorOperators.ASHR`), right? > Shifting on masked shift counts means that the shift

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-17 Thread Eric Liu
On Mon, 18 Apr 2022 04:14:39 GMT, Jie Fu wrote: >> Hi, >> >> Because unsigned cast should operate on unsigned types, the more appropriate >> usage is `(src[i] & 0xFF) >>> 3`, with the `&` operation is the cast from >> unsigned byte to int. Actually, I fail to understand the intention of your

Re: Improve `finally` block exception handling

2022-04-17 Thread David Holmes
Hello, On 18/04/2022 5:43 am, some-java-user-99206970363698485...@vodafonemail.de wrote: Hello, are there any plans to improve exception handling in combination with `finally` blocks? I'm not aware of anything, nor what that anything could realistically be. You make only one suggestion

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-17 Thread Quan Anh Mai
On Mon, 18 Apr 2022 04:14:39 GMT, Jie Fu wrote: > However, just image that someone would like to optimize some code segments of > bytes/shorts `>>>` Then that person can just use signed shift (`VectorOperators.ASHR`), right? Shifting on masked shift counts means that the shift count cannot be

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-17 Thread Jie Fu
On Mon, 18 Apr 2022 03:48:13 GMT, Quan Anh Mai wrote: > Because unsigned cast should operate on unsigned types, the more appropriate > usage is `(src[i] & 0xFF) >>> 3`, with the `&` operation is the cast from > unsigned byte to int. Actually, I fail to understand the intention of your >

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-17 Thread Quan Anh Mai
On Sun, 17 Apr 2022 14:35:14 GMT, Jie Fu wrote: > Hi all, > > According to the Vector API doc, the `LSHR` operator computes > `a>>>(n&(ESIZE*8-1))`. > However, current implementation is incorrect for negative bytes/shorts. > > The background is that one of our customers try to vectorize

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-17 Thread Jie Fu
On Sun, 17 Apr 2022 14:35:14 GMT, Jie Fu wrote: > Hi all, > > According to the Vector API doc, the `LSHR` operator computes > `a>>>(n&(ESIZE*8-1))`. > However, current implementation is incorrect for negative bytes/shorts. > > The background is that one of our customers try to vectorize

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-17 Thread Quan Anh Mai
On Sun, 17 Apr 2022 14:35:14 GMT, Jie Fu wrote: > Hi all, > > According to the Vector API doc, the `LSHR` operator computes > `a>>>(n&(ESIZE*8-1))`. > However, current implementation is incorrect for negative bytes/shorts. > > The background is that one of our customers try to vectorize

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-17 Thread Jie Fu
On Mon, 18 Apr 2022 02:32:39 GMT, Quan Anh Mai wrote: > What I try to convey here is that `src[i] >>> 3` is not a byte unsigned > shift, it is an int unsigned shift following a byte-to-int promotion. This is > different from the Vector API that has definition for the shift operations of >

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-17 Thread Quan Anh Mai
On Sun, 17 Apr 2022 14:35:14 GMT, Jie Fu wrote: > Hi all, > > According to the Vector API doc, the `LSHR` operator computes > `a>>>(n&(ESIZE*8-1))`. > However, current implementation is incorrect for negative bytes/shorts. > > The background is that one of our customers try to vectorize

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-17 Thread Quan Anh Mai
On Sun, 17 Apr 2022 14:35:14 GMT, Jie Fu wrote: > Hi all, > > According to the Vector API doc, the `LSHR` operator computes > `a>>>(n&(ESIZE*8-1))`. > However, current implementation is incorrect for negative bytes/shorts. > > The background is that one of our customers try to vectorize

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-17 Thread Bernd Eckenfels
Hello, Maybe offer operations which can do all variants (shift, roll, signed/unsigned) - maybe even with support for byte/int conversion? Any of those bit fiddling activities in a pipeline can benefit from vectoring. And also, the Javadoc can list the equivalent operator based code and maybe

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-17 Thread Jie Fu
On Sun, 17 Apr 2022 23:53:49 GMT, Quan Anh Mai wrote: > According to JLS section 5.8, any operand in a numeric arithmetic context > undergoes a promotion to int, long, float or double and the operation is only > defined for values of the promoted types. This means that `>>>` is not > defined

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-17 Thread Quan Anh Mai
On Sun, 17 Apr 2022 14:35:14 GMT, Jie Fu wrote: > Hi all, > > According to the Vector API doc, the `LSHR` operator computes > `a>>>(n&(ESIZE*8-1))`. > However, current implementation is incorrect for negative bytes/shorts. > > The background is that one of our customers try to vectorize

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-17 Thread Jie Fu
On Sun, 17 Apr 2022 17:25:57 GMT, Quan Anh Mai wrote: > Hi, > > The `>>>` operator is not defined for subword types, what the code in line 28 > does vs what it is supposed to do are different, which is more likely the bug > here. An unsigned shift should operate on subword types the same as

Improve `finally` block exception handling

2022-04-17 Thread some-java-user-99206970363698485155
Hello, are there any plans to improve exception handling in combination with `finally` blocks? Currently, when a `finally` block does not complete normally, the original exception is silently discarded (as described in the JLS). This behavior is error-prone, not obvious at all, and has been

Re: [External] : Re: jpackage usage problems

2022-04-17 Thread Hiran Chaudhuri
On Thu, 2022-04-07 at 19:53 -0400, Alexey Semenyuk wrote: > > I can see two separate issues with jpackage: 1. jpackage reports NPE if it can't figure out the package name > from > the supplied application image. It should issue a helpful error > message > instead > 2. jpackage fails to

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-17 Thread Quan Anh Mai
On Sun, 17 Apr 2022 14:35:14 GMT, Jie Fu wrote: > Hi all, > > According to the Vector API doc, the `LSHR` operator computes > `a>>>(n&(ESIZE*8-1))`. > However, current implementation is incorrect for negative bytes/shorts. > > The background is that one of our customers try to vectorize

RFR: JDK-8242888: Convert dynamic proxy to hidden classes

2022-04-17 Thread liach
Convert dynamic proxies to hidden classes. Modifies the serialization of proxies (requires change in "Java Object Serialization Specification"). Makes the proxies hidden in stack traces. Removes duplicate logic in proxy building. The main compatibility changes and their rationales are: 1.

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v2]

2022-04-17 Thread Alan Bateman
On Fri, 15 Apr 2022 21:15:45 GMT, Paul Sandoz wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh > > src/java.base/share/classes/jdk/internal/vm/Continuation.java line 94: > >> 92: default: >>

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v4]

2022-04-17 Thread Alan Bateman
> This is the implementation of JEP 425: Virtual Threads (Preview); TBD which > JDK version to target. > > We will refresh this PR periodically to pick up changes and fixes from the > loom repo. > > Most of the new mechanisms in the HotSpot VM are disabled by default and > require running

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v3]

2022-04-17 Thread Alan Bateman
On Sun, 17 Apr 2022 12:39:24 GMT, Jaikiran Pai wrote: > I had a look at the referenced > [JDK-4006245](https://bugs.openjdk.java.net/browse/JDK-4006245). The > previous/existing reference cleaning logic seems to have been added mainly to > `null` the reference to the user/application class

RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-17 Thread Jie Fu
Hi all, According to the Vector API doc, the `LSHR` operator computes `a>>>(n&(ESIZE*8-1))`. However, current implementation is incorrect for negative bytes/shorts. The background is that one of our customers try to vectorize `urshift` with `urshiftVector` like the following. 13 public

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v3]

2022-04-17 Thread Jaikiran Pai
On Fri, 15 Apr 2022 11:45:01 GMT, Alan Bateman wrote: >> This is the implementation of JEP 425: Virtual Threads (Preview); TBD which >> JDK version to target. >> >> We will refresh this PR periodically to pick up changes and fixes from the >> loom repo. >> >> Most of the new mechanisms in

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v3]

2022-04-17 Thread Jaikiran Pai
On Fri, 15 Apr 2022 11:45:01 GMT, Alan Bateman wrote: >> This is the implementation of JEP 425: Virtual Threads (Preview); TBD which >> JDK version to target. >> >> We will refresh this PR periodically to pick up changes and fixes from the >> loom repo. >> >> Most of the new mechanisms in

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

2022-04-17 Thread ExE Boss
On Sat, 19 Mar 2022 19:46:19 GMT, ExE Boss wrote: >> liach has updated the pull request incrementally with two additional commits >> since the last revision: >> >> - merge branch 'identityhashmap-bench' of >> https://github.com/liachmodded/jdk into identityhashmap-default >> - fix

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v3]

2022-04-17 Thread Alan Bateman
On Sun, 17 Apr 2022 03:49:19 GMT, Jaikiran Pai wrote: >> Alan Bateman 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 five additional >>

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v3]

2022-04-17 Thread Jaikiran Pai
On Fri, 15 Apr 2022 11:45:01 GMT, Alan Bateman wrote: >> This is the implementation of JEP 425: Virtual Threads (Preview); TBD which >> JDK version to target. >> >> We will refresh this PR periodically to pick up changes and fixes from the >> loom repo. >> >> Most of the new mechanisms in