Re: RFR: 8251989: Hex formatting and parsing utility [v8]

2020-10-26 Thread Roger Riggs
On Fri, 23 Oct 2020 16:34:54 GMT, Roger Riggs wrote: >> Do you want to refactor some of the classes where `HexFormat` would be a >> well-suited replacement for the current code, and what do you think about my >> other previous review comments (mostly formatting related)? >> The bridgekeeper

Re: RFR: 8251989: Hex formatting and parsing utility [v9]

2020-10-26 Thread Roger Riggs
> java.util.HexFormat utility: > > - Format and parse hexadecimal strings, with parameters for delimiter, > prefix, suffix and upper/lowercase > - Static factories and builder methods to create HexFormat copies with > modified parameters. > - Consistent naming of methods for conversion of

Re: RFR: 8159746: (proxy) Support for default methods

2020-10-26 Thread Mandy Chung
On Fri, 23 Oct 2020 10:32:27 GMT, Peter Levart wrote: >>> NewInvocationHandler/DefaultMethodInvoker feels a bit awkward. If I have it >>> right, to use it as a lambda expression to Proxy.newProxyInterface would >>> require casting to NewInvocationHandler. I also need to be careful when >>>

Re: RFR: 8255231: Avoid upcalls when initializing the statSampler [v4]

2020-10-26 Thread David Holmes
On Mon, 26 Oct 2020 12:49:43 GMT, Claes Redestad wrote: >> Current implementation of the statSampler does upcalls to System.getProperty >> to collect values for a number of properties that are all provided by the VM >> itself. And since the sampling starts before any user code run then no >>

Integrated: 8255206: [macos] LicenseTest fails on macOS 11

2020-10-26 Thread Alexander Matveev
On Sat, 24 Oct 2020 00:49:12 GMT, Alexander Matveev wrote: > I did not reproduce issue with license is not shown as per SQE report. It > work as expected. However, jpackage fails due to unflatten/flatten being > removed from hdiutil on macOS 11. I am not sure why it was needed, probably >

Re: RFR: 8238263: Create at-requires mechanism for containers [v2]

2020-10-26 Thread Harold Seigel
On Mon, 26 Oct 2020 20:24:35 GMT, Igor Ignatyev wrote: >> Harold Seigel has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8238263: Create at-requires mechanism for containers > > LGTM, modulo my earlier comment/doubt about the name, but I

Integrated: 8238263: Create at-requires mechanism for containers

2020-10-26 Thread Harold Seigel
On Fri, 23 Oct 2020 18:44:54 GMT, Harold Seigel wrote: > Please review this change to add an @requires mechanism called > "jdk.containerized" to help mark tests that are incompatible with containers. > Users would add "@requires jdk.containerized != true" to the incompatible > tests and then

Re: RFR: 8238263: Create at-requires mechanism for containers [v2]

2020-10-26 Thread Igor Ignatyev
On Mon, 26 Oct 2020 18:13:29 GMT, Harold Seigel wrote: >> Please review this change to add an @requires mechanism called >> "jdk.containerized" to help mark tests that are incompatible with >> containers. Users would add "@requires jdk.containerized != true" to the >> incompatible tests and

Re: RFR: 8238263: Create at-requires mechanism for containers [v2]

2020-10-26 Thread Bob Vandette
On Mon, 26 Oct 2020 18:13:29 GMT, Harold Seigel wrote: >> Please review this change to add an @requires mechanism called >> "jdk.containerized" to help mark tests that are incompatible with >> containers. Users would add "@requires jdk.containerized != true" to the >> incompatible tests and

Re: RFR: 8248188: Add IntrinsicCandidate and API for Base64 decoding [v8]

2020-10-26 Thread Paul Murphy
On Thu, 22 Oct 2020 22:06:11 GMT, CoreyAshford wrote: >> src/hotspot/cpu/ppc/stubGenerator_ppc.cpp line 3878: >> >>> 3876: // |Element| | | >>> | | | | >>>

Re: RFR: 8254354: Add an asExact() VarHandle combinator [v8]

2020-10-26 Thread Jorn Vernee
> Hi, > > This patch adds an asExact() combinator to VarHandle, that will return a new > VarHandle that performs exact type checks, similar to > MethodHandle::invokeExact, to help developers catch inexact VarHandle usage, > which can lead to performance degradation. > > This is implemented

Re: RFR: 8254354: Add an asExact() VarHandle combinator [v7]

2020-10-26 Thread Jorn Vernee
> Hi, > > This patch adds an asExact() combinator to VarHandle, that will return a new > VarHandle that performs exact type checks, similar to > MethodHandle::invokeExact, to help developers catch inexact VarHandle usage, > which can lead to performance degradation. > > This is implemented

Re: RFR: 8254354: Add an asExact() VarHandle combinator

2020-10-26 Thread Rémi Forax
On Fri, 23 Oct 2020 17:47:36 GMT, Jorn Vernee wrote: > Hi, > > This patch adds an asExact() combinator to VarHandle, that will return a new > VarHandle that performs exact type checks, similar to > MethodHandle::invokeExact, to help developers catch inexact VarHandle usage, > which can lead

Re: RFR: 8254354: Add an asExact() VarHandle combinator [v2]

2020-10-26 Thread Jorn Vernee
On Mon, 26 Oct 2020 17:13:05 GMT, Rémi Forax wrote: >> We can clarify the new methods and tie them closer to method handle >> semantics. I suggest the names `asExactInvoker` and `asInvoker`, referencing >> `MethodHandles.exactInvoker` and `MethodHandles.invoker` respectively. (The >> term

Re: RFR: 8254354: Add an asExact() VarHandle combinator [v2]

2020-10-26 Thread Rémi Forax
On Mon, 26 Oct 2020 16:34:10 GMT, Paul Sandoz wrote: >> The direct use of the enum ordinal is because HotSpot accessing it from the >> enum value is (or was) not optimal in C2. >> >> You can avoid the addition of the stable array by doing the following: >> >> public final MethodType

Re: RFR: 8255206: [macos] LicenseTest fails on macOS 11

2020-10-26 Thread Andy Herrick
On Sat, 24 Oct 2020 00:49:12 GMT, Alexander Matveev wrote: > I did not reproduce issue with license is not shown as per SQE report. It > work as expected. However, jpackage fails due to unflatten/flatten being > removed from hdiutil on macOS 11. I am not sure why it was needed, probably >

Re: RFR: 8255398: Add a dropReturn MethodHandle combinator [v3]

2020-10-26 Thread Rémi Forax
On Mon, 26 Oct 2020 18:01:04 GMT, John R Rose wrote: >> @rose00 My bad. You're right, I realized we could also use `asType` later on >> (I did call it out in the CSR), but It's still a bit more wordy than what >> I'm proposing. >> >> `dropReturn` seemed like a good choice since we already

Re: RFR: 8238263: Create at-requires mechanism for containers

2020-10-26 Thread Harold Seigel
On Mon, 26 Oct 2020 14:25:14 GMT, Igor Ignatyev wrote: >> Defining an environment variable works when running JTReg from the command >> line. But, mach5 does not pass environment variable settings to its JTReg >> test runs. Some mach5 special command args would still be needed. > >> Defining

Re: RFR: 8238263: Create at-requires mechanism for containers [v2]

2020-10-26 Thread Harold Seigel
> Please review this change to add an @requires mechanism called > "jdk.containerized" to help mark tests that are incompatible with containers. > Users would add "@requires jdk.containerized != true" to the incompatible > tests and then use "make test ... OPTIONS=-Djdk.containerized=true" or

Re: RFR: 8255398: Add a dropReturn MethodHandle combinator [v3]

2020-10-26 Thread John R Rose
On Mon, 26 Oct 2020 17:29:11 GMT, Jorn Vernee wrote: > …`dropReturn` seemed like a good choice since we already have > `dropArguments`. WRT changing to `MethodHandle::changeReturnType`... That's a very reasonable point. People might look for `dropRT` after they find `dropAs`. And `MHs` is

Re: RFR: 8255398: Add a dropReturn MethodHandle combinator [v3]

2020-10-26 Thread Jorn Vernee
On Mon, 26 Oct 2020 17:16:17 GMT, John R Rose wrote: >> LGTM, pending CSR. >> >> A minor simplification suggested inline. > > I don't mind shorthands, but the existing idiom is shorter than advertised, > a one-liner assuming the MH is already bound to a var: > > target =

Re: RFR: 8255398: Add a dropReturn MethodHandle combinator [v3]

2020-10-26 Thread John R Rose
On Mon, 26 Oct 2020 15:45:00 GMT, Claes Redestad wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Collapse lform get and update into single line >> >> Co-authored-by: Claes Redestad > > LGTM, pending CSR. > >

Re: RFR: 8255206: [macos] LicenseTest fails on macOS 11

2020-10-26 Thread Alexey Semenyuk
On Sat, 24 Oct 2020 00:49:12 GMT, Alexander Matveev wrote: > I did not reproduce issue with license is not shown as per SQE report. It > work as expected. However, jpackage fails due to unflatten/flatten being > removed from hdiutil on macOS 11. I am not sure why it was needed, probably >

Re: RFR: 8254354: Add an asExact() VarHandle combinator [v2]

2020-10-26 Thread Paul Sandoz
On Mon, 26 Oct 2020 16:13:59 GMT, Paul Sandoz wrote: >> I've updated the javadoc, and added two benchmarks that show the existing >> discrepancy between an exact and a generic use of a VarHandle, as well as >> showing that an exact VarHandle is as fast as a generic VarHandle for an >> exact

Re: RFR: 8254354: Add an asExact() VarHandle combinator [v2]

2020-10-26 Thread Paul Sandoz
On Mon, 26 Oct 2020 13:37:58 GMT, Jorn Vernee wrote: >> @PaulSandoz I've implemented your suggestion, by moving the `exact` flag to >> VarHandle itself. FWIW, the VH::accessModeType method took an AccessMode >> value as an argument, and the AccessDescriptor only stored the ordinal, so I >>

Re: RFR: 8255398: Add a dropReturn MethodHandle combinator [v3]

2020-10-26 Thread Jorn Vernee
> Hi, > > This patch adds a `dropReturn` combinator to `MethodHandles` that can be used > to create a new method handle that drops the return value, from a given > method handle. Similar to the following code: > > MethodHandle target = ...; > Class targetReturnType =

Re: RFR: 8251989: Hex formatting and parsing utility [v8]

2020-10-26 Thread Roger Riggs
On Mon, 12 Oct 2020 21:17:47 GMT, Marcono1234 wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review comment updates to class javadoc > > src/java.base/share/classes/java/util/HexFormat.java line 148: > >> 146:

Re: RFR: 8255398: Add a dropReturn MethodHandle combinator [v2]

2020-10-26 Thread Claes Redestad
On Mon, 26 Oct 2020 15:45:34 GMT, Jorn Vernee wrote: >> Hi, >> >> This patch adds a `dropReturn` combinator to `MethodHandles` that can be >> used to create a new method handle that drops the return value, from a given >> method handle. Similar to the following code: >> >> MethodHandle

Re: RFR: 8255398: Add a dropReturn MethodHandle combinator [v2]

2020-10-26 Thread Jorn Vernee
> Hi, > > This patch adds a `dropReturn` combinator to `MethodHandles` that can be used > to create a new method handle that drops the return value, from a given > method handle. Similar to the following code: > > MethodHandle target = ...; > Class targetReturnType =

Re: RFR: 8255398: Add a dropReturn MethodHandle combinator

2020-10-26 Thread Remi Forax
- Mail original - > De: "Jorn Vernee" > À: "core-libs-dev" > Envoyé: Lundi 26 Octobre 2020 16:37:20 > Objet: RFR: 8255398: Add a dropReturn MethodHandle combinator > Hi, > > This patch adds a `dropReturn` combinator to `MethodHandles` that can be used > to > create a new method handle

RFR: 8255398: Add a dropReturn MethodHandle combinator

2020-10-26 Thread Jorn Vernee
Hi, This patch adds a `dropReturn` combinator to `MethodHandles` that can be used to create a new method handle that drops the return value, from a given method handle. Similar to the following code: MethodHandle target = ...; Class targetReturnType = target.type().returnType(); if

Re: RFR: 8238263: Create at-requires mechanism for containers

2020-10-26 Thread Igor Ignatyev
On Mon, 26 Oct 2020 13:49:26 GMT, Harold Seigel wrote: > Defining an environment variable works when running JTReg from the command > line. But, mach5 does not pass environment variable settings to its JTReg > test runs. Some mach5 special command args would still be needed. right, yet given

Re: RFR: 8238263: Create at-requires mechanism for containers

2020-10-26 Thread Harold Seigel
On Fri, 23 Oct 2020 20:08:01 GMT, Igor Ignatyev wrote: >>> I think it depends on whether the tests will be permanently or temporarily >>> excluded from running with containers. I thought this mechanism would be to >>> permanently exclude the tests. That's why I used `@requires`. >> >> I see,

Re: RFR: 8254354: Add an asExact() VarHandle combinator [v2]

2020-10-26 Thread Jorn Vernee
On Fri, 23 Oct 2020 23:58:29 GMT, Jorn Vernee wrote: >> @PaulSandoz Thanks. I initially tested this with memory access VarHandles, >> which don't erase the receiver type. e.g. >> >> MemoryLayout layout = MemoryLayout.ofSequence(10, JAVA_INT); >> VarHandle vh = layout.varHandle(int.class, >>

Re: RFR: 8254354: Add an asExact() VarHandle combinator [v6]

2020-10-26 Thread Jorn Vernee
> Hi, > > This patch adds an asExact() combinator to VarHandle, that will return a new > VarHandle that performs exact type checks, similar to > MethodHandle::invokeExact, to help developers catch inexact VarHandle usage, > which can lead to performance degradation. > > This is implemented

Re: RFR: 8255231: Avoid upcalls when initializing the statSampler [v4]

2020-10-26 Thread Claes Redestad
> Current implementation of the statSampler does upcalls to System.getProperty > to collect values for a number of properties that are all provided by the VM > itself. And since the sampling starts before any user code run then no > property can have changed. > > I suggest refactoring the code

Re: RFR: 8254354: Add an asExact() VarHandle combinator [v5]

2020-10-26 Thread Jorn Vernee
> Hi, > > This patch adds an asExact() combinator to VarHandle, that will return a new > VarHandle that performs exact type checks, similar to > MethodHandle::invokeExact, to help developers catch inexact VarHandle usage, > which can lead to performance degradation. > > This is implemented

Re: RFR: JDK-8250768: javac should be adapted to changes in JEP 12 [v4]

2020-10-26 Thread Magnus Ihse Bursie
On Fri, 23 Oct 2020 16:21:53 GMT, Jan Lahoda wrote: >> This is an update to javac and javadoc, to introduce support for Preview >> APIs, and generally improve javac and javadoc behavior to more closely >> adhere to JEP 12. >> >> The notable changes are: >> >> * adding support for Preview

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v12]

2020-10-26 Thread Magnus Ihse Bursie
On Fri, 23 Oct 2020 14:06:22 GMT, Maurizio Cimadamore wrote: >> Changes requested by ihse (Reviewer). > > @magicus the files you commented on are not part of this PR, but they are > introduced as part of: > https://git.openjdk.java.net/jdk/pull/548 > (you seemed to have approved the changes

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v12]

2020-10-26 Thread Magnus Ihse Bursie
On Thu, 22 Oct 2020 17:04:34 GMT, Maurizio Cimadamore wrote: >> This patch contains the changes associated with the first incubation round >> of the foreign linker access API incubation >> (see JEP 389 [1]). This work is meant to sit on top of the foreign memory >> access support (see JEP 393

Re: RFR: 8254162: Implementation of Foreign-Memory Access API (Third Incubator) [v13]

2020-10-26 Thread Magnus Ihse Bursie
On Mon, 19 Oct 2020 10:34:32 GMT, Maurizio Cimadamore wrote: >> This patch contains the changes associated with the third incubation round >> of the foreign memory access API incubation (see JEP 393 [1]). This >> iteration focus on improving the usability of the API in 3 main ways: >> >> *

Re: RFR: 8255331: Problemlist java/foreign/TestMismatch.java on 32-bit platforms until JDK-8254162

2020-10-26 Thread Aleksey Shipilev
On Fri, 23 Oct 2020 10:42:14 GMT, Aleksey Shipilev wrote: > I would like to have clean x86_32 test runs until JDK-8254162 arrives. > > Testing: > - [x] Affected test on Linux x86_64 (still passes) > - [x] Affected test on Linux x86_32 (now ignored) @mcimadamore, please take a look? This

Integrated: 8255343: java/util/stream/SpliteratorTest.java fails on 32-bit platforms with "Misaligned access at address: 12"

2020-10-26 Thread Aleksey Shipilev
On Fri, 23 Oct 2020 12:37:10 GMT, Aleksey Shipilev wrote: > It currently fails on x86_32 with `java.lang.IllegalStateException: > Misaligned access at address: 12`. I checked that once JDK-8254162 > integrates, that issue is gone. Until then, having clean x86_32 testing is > beneficial for