Re: RFR: 8304840: Dangling `CharacterCodingException` in a few javadoc descriptions

2023-03-28 Thread Jaikiran Pai
On Tue, 28 Mar 2023 18:25:21 GMT, Naoto Sato wrote: > Fixing a documentation bug for `CharacterCodingException` without any > description to it as attached. A corresponding CSR is also drafted. > > ![Screenshot 2023-03-28 at 11 19 00 >

Re: RFR: JDK-8304028: Port fdlibm IEEEremainder to Java [v3]

2023-03-28 Thread Joe Darcy
> Last but not least, a port of fdlibm IEEEremainder from C to Java. I plan to > write some more implementation-specific tests around decision points in the > FDLIBM algorithm, but I wanted to get the bulk of the changes out for review > first. > > Note that since IEEEremainder was the last

Re: RFR: JDK-8304028: Port fdlibm IEEEremainder to Java [v2]

2023-03-28 Thread Joe Darcy
On Mon, 27 Mar 2023 09:43:03 GMT, Raffaello Giulietti wrote: >> Joe Darcy 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 three additional

Re: RFR: JDK-8304028: Port fdlibm IEEEremainder to Java [v2]

2023-03-28 Thread Joe Darcy
> Last but not least, a port of fdlibm IEEEremainder from C to Java. I plan to > write some more implementation-specific tests around decision points in the > FDLIBM algorithm, but I wanted to get the bulk of the changes out for review > first. > > Note that since IEEEremainder was the last

Withdrawn: 8301043: Super-interface for PrintStream and PrintWriter

2023-03-28 Thread Tingjun Yuan
On Sun, 29 Jan 2023 01:54:02 GMT, Tingjun Yuan wrote: > Add `java.io.PrintOutput` to represent print operations, and modify > `java.io.PrintStream` and `java.io.PrintWriter` to implement it. This pull request has been closed without being integrated. - PR:

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v4]

2023-03-28 Thread Mandy Chung
> This implements a shared utility to dump generated classes defined as > normal/hidden classes via `Lookup` API. This replaces the implementation in > `LambdaMetaFactory` and method handle implementation that dumps the hidden > class bytes on disk for debugging. > > For classes defined

Re: RFR: 8304425: ClassHierarchyResolver from Reflection [v6]

2023-03-28 Thread Chen Liang
> Add API to explore Class Hierarchy with a `ClassLoader` or a `Lookup` with > proper privileges, with tests. > > This addition is useful in case classes at runtime are not loaded from the > system class loader, such as Proxy. This is also useful to APIs that generate > bytecode with a

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v16]

2023-03-28 Thread Jaikiran Pai
On Tue, 28 Mar 2023 10:57:36 GMT, Alan Bateman wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> use test.jdk system property in test > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/Platform.java line 39: >

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v17]

2023-03-28 Thread Jaikiran Pai
> Can I please get a review for this change which proposes to fix the issue > reported in https://bugs.openjdk.org/browse/JDK-8206890? > > The `jlink` command allows a `--endian` option to specify the byte order in > the generated image. Before this change, when such a image was being >

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion [v3]

2023-03-28 Thread Chen Liang
On Tue, 28 Mar 2023 10:57:28 GMT, Rémi Forax wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> rethrow error > > src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java line > 206: > >> 204:

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion [v3]

2023-03-28 Thread Chen Liang
> As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2. Does not allow future expansion to support SAM[^1]

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion

2023-03-28 Thread Chen Liang
On Mon, 27 Mar 2023 23:34:52 GMT, Chen Liang wrote: > As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2.

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion [v2]

2023-03-28 Thread Chen Liang
> As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2. Does not allow future expansion to support SAM[^1]

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion [v2]

2023-03-28 Thread Chen Liang
On Wed, 29 Mar 2023 00:31:46 GMT, Johannes Kuhn wrote: >> Do interfaces still implement these properly without definition if they >> extend interfaces that declare `@Override boolean equals();` etc.? > > Yes. You can use [`Comperator`][1] as test. > > [1]: >

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion

2023-03-28 Thread Johannes Kuhn
On Wed, 29 Mar 2023 00:25:09 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java line >> 338: >> >>> 336: .aload(1) >>> 337: .ifThenElse(Opcode.IF_ACMPEQ, >>> CodeBuilder::iconst_1, CodeBuilder::iconst_0) >>>

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion

2023-03-28 Thread Chen Liang
On Wed, 29 Mar 2023 00:13:56 GMT, Johannes Kuhn wrote: >> As John Rose has pointed out in this issue, the current j.l.r.Proxy based >> implementation of MethodHandleProxies.asInterface has a few issues: >> 1. Exposes too much information via Proxy supertype (and WrapperInstance >> interface)

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion

2023-03-28 Thread Johannes Kuhn
On Mon, 27 Mar 2023 23:34:52 GMT, Chen Liang wrote: > As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2.

Re: RFR: 8304919: Implementation of Virtual Threads [v2]

2023-03-28 Thread Leonid Mesnik
On Wed, 29 Mar 2023 00:08:21 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/java/lang/System.java line 2566: >> >>> 2564: >>> 2565: public V executeOnCarrierThread(Callable task) >>> throws Exception { >>> 2566: if (Thread.currentThread() instanceof

Re: RFR: 8304919: Implementation of Virtual Threads [v2]

2023-03-28 Thread Pavel Rappo
On Tue, 28 Mar 2023 23:47:02 GMT, Leonid Mesnik 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 four additional >>

Re: RFR: 8304919: Implementation of Virtual Threads [v2]

2023-03-28 Thread Leonid Mesnik
On Tue, 28 Mar 2023 19:36:18 GMT, Alan Bateman wrote: >> JEP 444 proposes to make virtual threads a permanent feature in Java 21. The >> APIs that were preview APIs in Java 19/20 are changed to permanent and their >> `@since`/equivalent are changed to 21 (as per the guidance in JEP 12). The

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

2023-03-28 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: 8303002: Reject packed structs from linker [v2]

2023-03-28 Thread Jorn Vernee
On Mon, 27 Mar 2023 14:51:28 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. > >

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

2023-03-28 Thread Jorn Vernee
On Tue, 28 Mar 2023 17:59:33 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 [v3]

2023-03-28 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 incrementally with one

Re: RFR: 8304993: bad sentence break in DateFormat

2023-03-28 Thread Iris Clark
On Tue, 28 Mar 2023 21:01:45 GMT, Justin Lu wrote: > This PR fixes a bad sentence break in DateFormat.FIELD AM_PM that caused > incomplete API > > Before: > src="https://user-images.githubusercontent.com/67398801/228359165-f8c66ca2-745b-47ea-bca9-9c4afc7af914.png;> > > After: >

Re: RFR: 8304990: unnecessary dash in @param gives double-dash in docs

2023-03-28 Thread Naoto Sato
On Tue, 28 Mar 2023 21:48:23 GMT, Lance Andersen wrote: > Please review this trivial change which removes a redundant `-` from an > `@param` and cleans up the formatting for the `isValid` method. > > > It looks like there is some additional formatting clean up that can be done > but I will

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v3]

2023-03-28 Thread Mandy Chung
On Tue, 28 Mar 2023 21:51:21 GMT, Roger Riggs wrote: >> Mandy Chung has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - move ClassFileDumper to jdk.internal.util >> - rename the system property for dumping class files > >

Re: RFR: 8304993: bad sentence break in DateFormat

2023-03-28 Thread Lance Andersen
On Tue, 28 Mar 2023 21:01:45 GMT, Justin Lu wrote: > This PR fixes a bad sentence break in DateFormat.FIELD AM_PM that caused > incomplete API > > Before: > src="https://user-images.githubusercontent.com/67398801/228359165-f8c66ca2-745b-47ea-bca9-9c4afc7af914.png;> > > After: >

Re: RFR: 8304993: bad sentence break in DateFormat

2023-03-28 Thread Naoto Sato
On Tue, 28 Mar 2023 21:01:45 GMT, Justin Lu wrote: > This PR fixes a bad sentence break in DateFormat.FIELD AM_PM that caused > incomplete API > > Before: > src="https://user-images.githubusercontent.com/67398801/228359165-f8c66ca2-745b-47ea-bca9-9c4afc7af914.png;> > > After: >

Re: RFR: 8304993: bad sentence break in DateFormat

2023-03-28 Thread Roger Riggs
On Tue, 28 Mar 2023 21:01:45 GMT, Justin Lu wrote: > This PR fixes a bad sentence break in DateFormat.FIELD AM_PM that caused > incomplete API > > Before: > src="https://user-images.githubusercontent.com/67398801/228359165-f8c66ca2-745b-47ea-bca9-9c4afc7af914.png;> > > After: >

Re: RFR: 8304990: unnecessary dash in @param gives double-dash in docs

2023-03-28 Thread Brian Burkhalter
On Tue, 28 Mar 2023 21:48:23 GMT, Lance Andersen wrote: > Please review this trivial change which removes a redundant `-` from an > `@param` and cleans up the formatting for the `isValid` method. > > > It looks like there is some additional formatting clean up that can be done > but I will

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v3]

2023-03-28 Thread Roger Riggs
On Mon, 27 Mar 2023 21:12:28 GMT, Mandy Chung wrote: >> This implements a shared utility to dump generated classes defined as >> normal/hidden classes via `Lookup` API. This replaces the implementation >> in `LambdaMetaFactory` and method handle implementation that dumps the >> hidden class

RFR: 8304990: unnecessary dash in @param gives double-dash in docs

2023-03-28 Thread Lance Andersen
Please review this trivial change which removes a redundant `-` from an `@param` and cleans up the formatting for the `invalid` method. It looks like there is some additional formatting clean up that can be done but I will handle that under a separate PR. - Commit messages: -

Re: RFR: 8266571: Sequenced Collections [v2]

2023-03-28 Thread Rémi Forax
On Tue, 28 Mar 2023 00:01:27 GMT, Stuart Marks wrote: >> This change is absolutely massive, implementing reversed() basically doubles >> the number of implementations which means multiple years of debugging / spec >> fixing. >> >> Reversing a List makes sense, reversing a

RFR: 8304993: bad sentence break in DateFormat

2023-03-28 Thread Justin Lu
This PR fixes a bad sentence break in DateFormat.FIELD AM_PM that caused incomplete API Before: https://user-images.githubusercontent.com/67398801/228359165-f8c66ca2-745b-47ea-bca9-9c4afc7af914.png;> After:

Re: RFR: 8225641: Calendar.roll(int field) does not work correctly for WEEK_OF_YEAR [v5]

2023-03-28 Thread Justin Lu
> This PR fixes the bug which occurred when `Calendar.roll(WEEK_OF_YEAR)` > rolled into a minimal first week with an invalid `WEEK_OF_YEAR` and > `DAY_OF_WEEK` combo. > > For example, Rolling _Monday, 30 December 2019_ by 1 week produced _Monday, > 31 December 2018_, which is incorrect. This

Re: RFR: 8302819: Remove JAR Index

2023-03-28 Thread Mandy Chung
On Thu, 23 Mar 2023 12:05:50 GMT, Eirik Bjorsnos wrote: > This PR removes the JAR index feature from the runtime: > > - `URLClassPath` is updated to remove the `enableJarIndex` system property > and any code which would be called when this property was `true` > - The `JarIndex` implementation

Re: RFR: 8304919: Implementation of Virtual Threads [v2]

2023-03-28 Thread Paul Sandoz
On Tue, 28 Mar 2023 19:36:18 GMT, Alan Bateman wrote: >> JEP 444 proposes to make virtual threads a permanent feature in Java 21. The >> APIs that were preview APIs in Java 19/20 are changed to permanent and their >> `@since`/equivalent are changed to 21 (as per the guidance in JEP 12). The

Re: RFR: 8304840: Dangling `CharacterCodingException` in a few javadoc descriptions

2023-03-28 Thread Roger Riggs
On Tue, 28 Mar 2023 18:25:21 GMT, Naoto Sato wrote: > Fixing a documentation bug for `CharacterCodingException` without any > description to it as attached. A corresponding CSR is also drafted. > > ![Screenshot 2023-03-28 at 11 19 00 >

Re: RFR: 8304840: Dangling `CharacterCodingException` in a few javadoc descriptions

2023-03-28 Thread Iris Clark
On Tue, 28 Mar 2023 18:25:21 GMT, Naoto Sato wrote: > Fixing a documentation bug for `CharacterCodingException` without any > description to it as attached. A corresponding CSR is also drafted. > > ![Screenshot 2023-03-28 at 11 19 00 >

Re: RFR: 8304919: Implementation of Virtual Threads [v2]

2023-03-28 Thread Alan Bateman
> JEP 444 proposes to make virtual threads a permanent feature in Java 21. The > APIs that were preview APIs in Java 19/20 are changed to permanent and their > `@since`/equivalent are changed to 21 (as per the guidance in JEP 12). The > JNI and JVMTI versions are bumped as this is the first

Re: RFR: 8302819: Remove JAR Index

2023-03-28 Thread Alan Bateman
On Tue, 28 Mar 2023 18:31:28 GMT, Lance Andersen wrote: > If we are thinking of emitting a warning, we probably should do that in = JDK > 22 as that could break tests with golden files so we might want to give a > heads up in JDK 21 before doing this The best option might be to just have `jar

Re: RFR: 8304840: Dangling `CharacterCodingException` in a few javadoc descriptions

2023-03-28 Thread Alan Bateman
On Tue, 28 Mar 2023 18:25:21 GMT, Naoto Sato wrote: > Fixing a documentation bug for `CharacterCodingException` without any > description to it as attached. A corresponding CSR is also drafted. > > ![Screenshot 2023-03-28 at 11 19 00 >

Re: RFR: 8302819: Remove JAR Index

2023-03-28 Thread Lance Andersen
On Sat, 25 Mar 2023 09:35:56 GMT, Alan Bateman wrote: > > I see that Alan suggested that we take up the `jar -i` deprecation in a > > separate PR. I think that simplifies the work in this PR. > > Yes, there are options for `jar -i` that include "leave it as is", have the > option create the

Re: RFR: 8304498: JShell does not switch to raw mode when there is no /bin/test [v2]

2023-03-28 Thread Andrey Turbanov
On Wed, 22 Mar 2023 18:38:08 GMT, Jan Lahoda wrote: >> If JShell is run on a system that does not have `/bin/test` (which is, >> apparently, possible for some systems, which only have `/usr/bin/test`), it >> won't switch the terminal into the raw mode, and the input will not work >> properly.

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion

2023-03-28 Thread Chen Liang
On Mon, 27 Mar 2023 23:34:52 GMT, Chen Liang wrote: > As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2.

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion

2023-03-28 Thread Chen Liang
On Tue, 28 Mar 2023 14:00:41 GMT, Jorn Vernee wrote: > But this doesn't implement the same ClassValue cache? And spinning byte code > can indeed be slow (I've seen this in other profiles). https://github.com/liachmodded/jdk/commit/821d6b382aeceb70c67c59771deb7438f3b4b7fd I attempted to spin

Re: RFR: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream [v3]

2023-03-28 Thread Eirik Bjorsnos
On Thu, 23 Mar 2023 14:00:40 GMT, Eirik Bjorsnos wrote: >> I cannot explain why, but the changes suggested in this PR seem to introduce >> a small, but significant performance regression on the >> `DataInputStreamTest.readInt` benchmark: >> >> Baseline: >> >> >> Benchmark

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

2023-03-28 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

Integrated: 8291598: Matcher.appendReplacement should not create new StringBuilder instances

2023-03-28 Thread Raffaello Giulietti
On Wed, 15 Mar 2023 18:15:02 GMT, Raffaello Giulietti wrote: > Remove instantiation of `StringBuilder` This pull request has now been integrated. Changeset: ca745cb4 Author:Raffaello Giulietti URL: https://git.openjdk.org/jdk/commit/ca745cb426a3287167ba5bbf1a554e56a84fd91c Stats:

Re: RFR: 8291598: Matcher.appendReplacement should not create new StringBuilder instances [v3]

2023-03-28 Thread Raffaello Giulietti
On Tue, 28 Mar 2023 17:35:22 GMT, Roger Riggs wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8291598: Matcher.appendReplacement should not create new StringBuilder >> instances >> >> Removed other

Re: RFR: 8302819: Remove JAR Index

2023-03-28 Thread Eirik Bjorsnos
On Thu, 23 Mar 2023 15:31:31 GMT, Eirik Bjorsnos wrote: > Do you know if the `jar` tool allows running with a `SecurityManager`? If > not, we could perhaps simply use `System.getProperty`? I ended up feeling opimistic and replaced the current code with just `System.getProperty`. If that is

Re: RFR: 8302819: Remove JAR Index

2023-03-28 Thread Eirik Bjorsnos
On Thu, 23 Mar 2023 15:10:39 GMT, Jaikiran Pai wrote: > I don't think we should be exporting that package. Instead, the `JarIndex` > class can be updated to do `AccessController.doPrivileged(...)`. Nice, I'll try that! Do you know if the `jar` tool allows running with a `SecurityManager`? If

Re: RFR: 8303524: Check FunctionDescriptor byte order when linking

2023-03-28 Thread Jorn Vernee
On Thu, 23 Mar 2023 16:47:08 GMT, Jorn Vernee wrote: > Linkers are strongly tied to a particular byte order, because they are tied > to a particular platform. So, the linker should reject layouts that have > another byte order. This patch implements that check. I will fold this into

Re: RFR: 8302819: Remove JAR Index

2023-03-28 Thread Eirik Bjorsnos
On Tue, 28 Mar 2023 13:42:21 GMT, Alan Bateman wrote: >Adding a test would be good. In the mean-time, I think it would be good to get >the review started to flush out any concerns about removing this index. Good! I will mark this ready for review. (I did not find time to write a test today)

Re: RFR: 8302819: Remove JAR Index

2023-03-28 Thread Eirik Bjorsnos
On Thu, 23 Mar 2023 14:09:32 GMT, Jaikiran Pai wrote: > Perhaps now is the time to add a deprecation/warning message when `jar -i` > option is used? I'm not entirely sure I know what you mean or suggest here, so I'll try to be explicit with what I do (think I) understand and what my reasoning

Re: RFR: 8302819: Remove JAR Index

2023-03-28 Thread Jaikiran Pai
On Thu, 23 Mar 2023 15:31:31 GMT, Eirik Bjorsnos wrote: > > I don't think we should be exporting that package. Instead, the `JarIndex` > > class can be updated to do `AccessController.doPrivileged(...)`. > > Nice, I'll try that! > > Do you know if the `jar` tool allows running with a

Re: RFR: 8302819: Remove JAR Index

2023-03-28 Thread Alan Bateman
On Mon, 27 Mar 2023 17:12:25 GMT, Eirik Bjorsnos wrote: > > Adding these tests I think will help us verify that these APIs and also > > exercise the code in these classes where we have checks for > > `META-INF/INDEX.LIST` entry. Is that something you could consider adding as > > part of this

Re: RFR: 8302819: Remove JAR Index

2023-03-28 Thread Jaikiran Pai
On Thu, 23 Mar 2023 12:05:50 GMT, Eirik Bjorsnos wrote: > This PR removes the JAR index feature from the runtime: > > - `URLClassPath` is updated to remove the `enableJarIndex` system property > and any code which would be called when this property was `true` > - The `JarIndex` implementation

Re: RFR: 8302819: Remove JAR Index

2023-03-28 Thread Alan Bateman
On Fri, 24 Mar 2023 16:22:33 GMT, Jaikiran Pai wrote: > I see that Alan suggested that we take up the `jar -i` deprecation in a > separate PR. I think that simplifies the work in this PR. Yes, there are options for `jar -i` that include "leave it as is", have the option create the index and

Re: RFR: 8302819: Remove JAR Index

2023-03-28 Thread Jaikiran Pai
On Thu, 23 Mar 2023 14:33:19 GMT, Jaikiran Pai wrote: >> This PR removes the JAR index feature from the runtime: >> >> - `URLClassPath` is updated to remove the `enableJarIndex` system property >> and any code which would be called when this property was `true` >> - The `JarIndex`

Re: RFR: 8302819: Remove JAR Index

2023-03-28 Thread Eirik Bjorsnos
On Fri, 24 Mar 2023 05:20:34 GMT, Jaikiran Pai wrote: >>> I don't think we should be exporting that package. Instead, the `JarIndex` >>> class can be updated to do `AccessController.doPrivileged(...)`. >> >> Nice, I'll try that! >> >> Do you know if the `jar` tool allows running with a

RFR: 8302819: Remove JAR Index

2023-03-28 Thread Eirik Bjorsnos
This PR removes the JAR index feature from the runtime: - `URLClassPath` is updated to remove the `enableJarIndex` system property and any code which would be called when this property was `true` - The `JarIndex` implementation class is moved into `jdk.jartool` module. - The

Re: RFR: 8302819: Remove JAR Index

2023-03-28 Thread Eirik Bjorsnos
On Thu, 23 Mar 2023 12:05:50 GMT, Eirik Bjorsnos wrote: > This PR removes the JAR index feature from the runtime: > > - `URLClassPath` is updated to remove the `enableJarIndex` system property > and any code which would be called when this property was `true` > - The `JarIndex` implementation

Withdrawn: 8303524: Check FunctionDescriptor byte order when linking

2023-03-28 Thread Jorn Vernee
On Thu, 23 Mar 2023 16:47:08 GMT, Jorn Vernee wrote: > Linkers are strongly tied to a particular byte order, because they are tied > to a particular platform. So, the linker should reject layouts that have > another byte order. This patch implements that check. This pull request has been

Re: RFR: 8205129: Remove java.lang.Compiler

2023-03-28 Thread Eirik Bjorsnos
On Tue, 28 Mar 2023 13:36:38 GMT, Alan Bateman wrote: > I think you should be able to finalize the CSR JDK-8304458. Thanks for the gentle nudge, Alan. I was actually not aware that finalization could be initiated by the assignee! I've seen the CSR lead handle this workflow previously. I

Re: RFR: 8291598: Matcher.appendReplacement should not create new StringBuilder instances [v3]

2023-03-28 Thread Roger Riggs
On Wed, 15 Mar 2023 20:01:05 GMT, Raffaello Giulietti wrote: >> Remove instantiation of `StringBuilder` > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > 8291598: Matcher.appendReplacement should not create new

Integrated: 8304498: JShell does not switch to raw mode when there is no /bin/test

2023-03-28 Thread Jan Lahoda
On Mon, 20 Mar 2023 12:10:04 GMT, Jan Lahoda wrote: > If JShell is run on a system that does not have `/bin/test` (which is, > apparently, possible for some systems, which only have `/usr/bin/test`), it > won't switch the terminal into the raw mode, and the input will not work > properly. >

Re: RFR: 8304976: Optimize DateTimeFormatterBuilder.ZoneTextPrinterParser.getTree()

2023-03-28 Thread Naoto Sato
On Fri, 17 Feb 2023 09:50:16 GMT, Sergey Tsypanov wrote: > 1) When `DateTimeFormatter` is reused we don't need to copy > `availableZoneIds` and allocate `nonRegionIds` as PrefixTree can be taken > from cache. In the related benchmark allocation of `HashSet` takes ~93% of > all time, so

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

2023-03-28 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: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion

2023-03-28 Thread Chen Liang
On Tue, 28 Mar 2023 14:00:41 GMT, Jorn Vernee wrote: > I think it should be possible to spin the class bytes once, stick the result > in a ClassValue cache, but then use the bytes to define multiple classes with > different class data (MethodHandles). Great point, I was dumbfounded there. >

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion

2023-03-28 Thread Jorn Vernee
On Mon, 27 Mar 2023 23:34:52 GMT, Chen Liang wrote: > As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2.

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v10]

2023-03-28 Thread Maurizio Cimadamore
On Tue, 28 Mar 2023 13:09:45 GMT, Per Minborg wrote: >> > src="https://user-images.githubusercontent.com/7457876/228246205-ff2730cb-610f-4673-aa30-d110845a34fc.png;> >> >> It belongs to the opening brace for `{@return`. Hard to see with other curls >> in between. > > I would have written: > >

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion

2023-03-28 Thread Jorn Vernee
On Tue, 28 Mar 2023 13:34:05 GMT, Chen Liang wrote: > > > I believe you can have better performance if you pass the method handle as > > the class data of the hidden class and you load it with a constant dynamic > >

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v12]

2023-03-28 Thread Jorn Vernee
On Tue, 28 Mar 2023 13:14:09 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >>

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-28 Thread Jorn Vernee
On Tue, 28 Mar 2023 10:07:12 GMT, Per Minborg wrote: >> src/java.base/share/classes/jdk/internal/foreign/abi/fallback/LibFallback.java >> line 61: >> >>> 59: static final MemorySegment VOID_TYPE = >>> MemorySegment.ofAddress(ffi_type_void()); >>> 60: static final short STRUCT_TAG =

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion

2023-03-28 Thread Chen Liang
On Mon, 27 Mar 2023 23:34:52 GMT, Chen Liang wrote: > As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2.

Re: RFR: 8205129: Remove java.lang.Compiler

2023-03-28 Thread Alan Bateman
On Sun, 19 Mar 2023 09:01:26 GMT, Eirik Bjorsnos wrote: > Please help review this PR which suggests we remove the class > `java.lang.Compiler`. The class seems non-functional for a decade, and was > terminally deprecated in Java 9. Time has come to let it go. I think you should be able to

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion

2023-03-28 Thread Rémi Forax
On Mon, 27 Mar 2023 23:34:52 GMT, Chen Liang wrote: > As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2.

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v12]

2023-03-28 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v11]

2023-03-28 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally

Integrated: 8300977: Retire java.io.ExpiringCache

2023-03-28 Thread Per Minborg
On Tue, 24 Jan 2023 14:02:26 GMT, Per Minborg wrote: > This PR proposed to retire the class 'java.io.ExpiringCache'. The use of the > class has been off by default since Java 16 but could be explicitly turned on > by means of two System properties. This pull request has now been integrated.

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v10]

2023-03-28 Thread Per Minborg
On Tue, 28 Mar 2023 13:08:22 GMT, Per Minborg wrote: >> It's to close the text span for the `{@return` > > src="https://user-images.githubusercontent.com/7457876/228246205-ff2730cb-610f-4673-aa30-d110845a34fc.png;> > > It belongs to the opening brace for `{@return`. Hard to see with other

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v10]

2023-03-28 Thread Per Minborg
On Tue, 28 Mar 2023 12:36:28 GMT, Jorn Vernee wrote: >> src/java.base/share/classes/java/lang/foreign/MemorySegment.java line 2310: >> >>> 2308: /** >>> 2309: * {@return {@code true}, if the provided object is also a >>> scope, which models the same lifetime as that >>> 2310:

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v10]

2023-03-28 Thread Jorn Vernee
On Tue, 28 Mar 2023 11:00:00 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 22 commits: >> >> - Merge with master >> - Make fallbacklinker.c consistent with downcallLinker.cpp >>

Integrated: 8304989: unnecessary dash in @param gives double-dash in docs

2023-03-28 Thread Jaikiran Pai
On Tue, 28 Mar 2023 08:06:48 GMT, Jaikiran Pai wrote: > Can I please get a review of this trivial doc-only change that addresses > https://bugs.openjdk.org/browse/JDK-8304989? > > I ran `make docs-image` with this change and the generated javadocs look fine. This pull request has now been

Re: RFR: 8304989: unnecessary dash in @param gives double-dash in docs

2023-03-28 Thread Jaikiran Pai
On Tue, 28 Mar 2023 08:06:48 GMT, Jaikiran Pai wrote: > Can I please get a review of this trivial doc-only change that addresses > https://bugs.openjdk.org/browse/JDK-8304989? > > I ran `make docs-image` with this change and the generated javadocs look fine. Thank you Lance for the review.

Re: RFR: 8291598: Matcher.appendReplacement should not create new StringBuilder instances [v3]

2023-03-28 Thread Raffaello Giulietti
On Wed, 15 Mar 2023 20:01:05 GMT, Raffaello Giulietti wrote: >> Remove instantiation of `StringBuilder` > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > 8291598: Matcher.appendReplacement should not create new

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v16]

2023-03-28 Thread Alan Bateman
On Tue, 28 Mar 2023 06:28:17 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which proposes to fix the issue >> reported in https://bugs.openjdk.org/browse/JDK-8206890? >> >> The `jlink` command allows a `--endian` option to specify the byte order in >> the generated

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion

2023-03-28 Thread Rémi Forax
On Mon, 27 Mar 2023 23:34:52 GMT, Chen Liang wrote: > As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2.

RFR: 8304919: Implementation of Virtual Threads

2023-03-28 Thread Alan Bateman
JEP 444 proposes to make virtual threads a permanent feature in Java 21. The APIs that were preview APIs in Java 19/20 are changed to permanent and their `@since`/equivalent are changed to 21 (as per the guidance in JEP 12). The JNI and JVMTI versions are bumped as this is the first change in

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v10]

2023-03-28 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request with a new

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion

2023-03-28 Thread Rémi Forax
On Mon, 27 Mar 2023 23:34:52 GMT, Chen Liang wrote: > As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2.

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v10]

2023-03-28 Thread Maurizio Cimadamore
On Tue, 28 Mar 2023 10:56:07 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >>

Integrated: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream

2023-03-28 Thread Per Minborg
On Tue, 21 Mar 2023 15:41:13 GMT, Per Minborg wrote: > This PR proposed to lazily initialize the scratch arrays only if/when needed. This pull request has now been integrated. Changeset: 60640a21 Author:Per Minborg URL:

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v16]

2023-03-28 Thread Alan Bateman
On Tue, 28 Mar 2023 06:28:17 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which proposes to fix the issue >> reported in https://bugs.openjdk.org/browse/JDK-8206890? >> >> The `jlink` command allows a `--endian` option to specify the byte order in >> the generated

Re: RFR: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream [v5]

2023-03-28 Thread Alan Bateman
On Tue, 28 Mar 2023 08:13:31 GMT, Per Minborg wrote: >> This PR proposed to lazily initialize the scratch arrays only if/when needed. > > Per Minborg has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev excludes the unrelated changes >

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer [v10]

2023-03-28 Thread Claes Redestad
On Mon, 27 Mar 2023 18:37:12 GMT, Jim Laskey wrote: >> Add the ability to repeatedly append char and CharSequence data to >> StringBuilder/StringBuffer. > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > Use Arrays.fill Looks

Re: RFR: 8300977: Retire java.io.ExpiringCache [v2]

2023-03-28 Thread Alan Bateman
On Tue, 28 Mar 2023 06:55:26 GMT, Per Minborg wrote: >> This PR proposed to retire the class 'java.io.ExpiringCache'. The use of the >> class has been off by default since Java 16 but could be explicitly turned >> on by means of two System properties. > > Per Minborg has updated the pull

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer [v10]

2023-03-28 Thread Claes Redestad
On Mon, 27 Mar 2023 18:37:12 GMT, Jim Laskey wrote: >> Add the ability to repeatedly append char and CharSequence data to >> StringBuilder/StringBuffer. > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > Use Arrays.fill

  1   2   >