Re: RFR: JDK-8304028: Port fdlibm IEEEremainder to Java

2023-03-20 Thread Joe Darcy
On Tue, 21 Mar 2023 06:11:57 GMT, Joe Darcy wrote: > 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

RFR: JDK-8304028: Port fdlibm IEEEremainder to Java

2023-03-20 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 native method i

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Stuart Marks
On Mon, 20 Mar 2023 23:52:11 GMT, Chen Liang wrote: >> PR for Sequenced Collections implementation. > > Just curious, does sequenced collection specify if add simulates addLast if > addition supports custom ordering? I wish to have efficient reversible batch > addition operations available, lik

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Stuart Marks
On Tue, 8 Feb 2022 17:23:38 GMT, Stuart Marks wrote: > PR for Sequenced Collections implementation. (Heh, it looks like a whole bunch of old PR comments from when it was in draft state just got replayed to the mailing lists.) - PR Comment: https://git.openjdk.org/jdk/pull/7387#iss

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

2023-03-20 Thread David Holmes
On Tue, 21 Mar 2023 01:46:46 GMT, David Holmes wrote: >The only part of that we have left today is that -Djava.compiler=NONE is an >alias for -Xint mode. Edit: ... unless `-Xdebug` is specified in which case it is ignored. - PR Comment: https://git.openjdk.org/jdk/pull/13092#issue

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

2023-03-20 Thread David Holmes
On Mon, 20 Mar 2023 17:35:58 GMT, Stuart Marks wrote: > I don't know how much interdependency there is between the java.compiler > system property and the java.lang.Compiler class. > On the library side I think they're independent. That may be true today but originally they were very much inte

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

2023-03-20 Thread Paul Sandoz
On Fri, 17 Mar 2023 15:42:56 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: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html src

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

2023-03-20 Thread Paul Sandoz
On Fri, 17 Mar 2023 15:42:56 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: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html src

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Chen Liang
On Tue, 8 Feb 2022 17:23:38 GMT, Stuart Marks wrote: > PR for Sequenced Collections implementation. Just curious, does sequenced collection specify if add simulates addLast if addition supports custom ordering? I wish to have efficient reversible batch addition operations available, like order

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

2023-03-20 Thread Paul Sandoz
On Fri, 17 Mar 2023 15:42:56 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: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html src

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Stuart Marks
On Tue, 8 Feb 2022 17:23:38 GMT, Stuart Marks wrote: > PR for Sequenced Collections implementation. [JEP 431](https://openjdk.org/jeps/431) is now Targeted to JDK 21. Hooray! It thus seems as good a time as any to mark this PR as ready for review. Currently I'm focusing on getting the specific

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Stuart Marks
On Fri, 17 Mar 2023 07:30:12 GMT, ExE Boss wrote: >> PR for Sequenced Collections implementation. > > src/java.base/share/classes/java/util/SequencedMap.java line 343: > >> 341: return new SeqEntrySet(); >> 342: } >> 343: } > > Missing trailing newline: > Suggestion: > > } will fi

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Stuart Marks
On Wed, 5 Oct 2022 15:15:05 GMT, Viktor Klang wrote: >> src/java.base/share/classes/java/util/SequencedCollection.java line 93: >> >>> 91: * underlying collection. Changes to the underlying collection >>> might or might not be visible >>> 92: * in this reversed view, depending upon th

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Viktor Klang
On Tue, 4 Oct 2022 14:43:44 GMT, Viktor Klang wrote: >> PR for Sequenced Collections implementation. > > src/java.base/share/classes/java/util/SequencedCollection.java line 93: > >> 91: * underlying collection. Changes to the underlying collection might >> or might not be visible >> 92:

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Stuart Marks
On Sun, 28 Aug 2022 05:45:54 GMT, Grzegorz Piwowarek wrote: >> PR for Sequenced Collections implementation. > > src/java.base/share/classes/java/util/SequencedCollection.java line 84: > >> 82: * the iterator() method, calls next() on it and returns the result. >> 83: */ >> 84: defa

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Grzegorz Piwowarek
On Tue, 8 Feb 2022 17:23:38 GMT, Stuart Marks wrote: > PR for Sequenced Collections implementation. src/java.base/share/classes/java/util/SequencedCollection.java line 84: > 82: * the iterator() method, calls next() on it and returns the result. > 83: */ > 84: default E getFirst()

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Stuart Marks
On Wed, 13 Apr 2022 19:08:58 GMT, Stuart Marks wrote: >> Won’t `super.keySet()` resolve to a bridge method in that case? > > Oh yes, in this case it might resolve to a bridge method, and it might > actually work. In this case. However, the compatibility matrix for covariant > overrides and brid

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Stuart Marks
On Wed, 13 Apr 2022 11:53:52 GMT, ExE Boss wrote: >> Yes. Previously compiled binaries will also throw `NoSuchMethodError` if >> they call `super.keySet()`. Clearly these are incompatibilities; the >> question is whether they are severe enough to warrant pursuing a different >> approach. If yo

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread ExE Boss
On Tue, 12 Apr 2022 23:25:14 GMT, Stuart Marks wrote: >> src/java.base/share/classes/java/util/LinkedHashMap.java line 604: >> >>> 602: * @return a set view of the keys contained in this map >>> 603: */ >>> 604: public SequencedSet keySet() { >> >> Changing the return type means t

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Stuart Marks
On Tue, 12 Apr 2022 19:55:13 GMT, Eamonn McManus wrote: >> PR for Sequenced Collections implementation. > > src/java.base/share/classes/java/util/LinkedHashMap.java line 604: > >> 602: * @return a set view of the keys contained in this map >> 603: */ >> 604: public SequencedSet key

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Stuart Marks
On Thu, 3 Nov 2022 07:41:05 GMT, ExE Boss wrote: >> Yeah, the coupling here is rather distasteful. (Otherwise known as a quick >> and dirty hack.) Unfortunately the coupling between HashMap and >> LinkedHashMap is pretty special-purposed for exactly the intended usage >> modes (insertion-order

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread ExE Boss
On Thu, 3 Nov 2022 01:56:05 GMT, Stuart Marks wrote: >> src/java.base/share/classes/java/util/LinkedHashMap.java line 384: >> >>> 382: return this.put(k, v); >>> 383: } finally { >>> 384: putMode = PUT_NORM; >> >> @stuart-marks Would it be an alternative to have

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Stuart Marks
On Wed, 5 Oct 2022 13:30:08 GMT, Viktor Klang wrote: >> PR for Sequenced Collections implementation. > > src/java.base/share/classes/java/util/LinkedHashMap.java line 384: > >> 382: return this.put(k, v); >> 383: } finally { >> 384: putMode = PUT_NORM; > > @stuar

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Viktor Klang
On Tue, 8 Feb 2022 17:23:38 GMT, Stuart Marks wrote: > PR for Sequenced Collections implementation. src/java.base/share/classes/java/util/LinkedHashMap.java line 384: > 382: return this.put(k, v); > 383: } finally { > 384: putMode = PUT_NORM; @stuart-marks Would

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Srikanth Adayapalam
On Tue, 8 Nov 2022 20:36:40 GMT, Stuart Marks wrote: > @sadayapalam > > > Please include the following fix for the langtools test "failures": > > OK, applying these patches lets the tests pass. I can include them in this PR. > > The patch in TestJavacTaskScanner.java adjusts the expected numbe

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Paul Sandoz
On Tue, 8 Feb 2022 17:23:38 GMT, Stuart Marks wrote: > PR for Sequenced Collections implementation. src/java.base/share/classes/java/util/Collections.java line 376: > 374: * reversed-ordered view of a list without mutating it, use the > 375: * {@link List#reversed List::reversed} meth

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread ExE Boss
On Tue, 8 Feb 2022 17:23:38 GMT, Stuart Marks wrote: > PR for Sequenced Collections implementation. Note that `SortedMap::firstKey` and `SortedMap::lastKey` can now both have a  default implementation that delegates to `SequencedMap::firstEntry` and  `SequencedMap::lastEntry` respectively. src/

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Stuart Marks
On Tue, 8 Nov 2022 06:15:48 GMT, Srikanth Adayapalam wrote: >> PR for Sequenced Collections implementation. > > Please include the following fix for the langtools test "failures": > > > diff --git a/test/langtools/tools/javac/api/TestJavacTaskScanner.java > b/test/langtools/tools/javac/api/T

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Srikanth Adayapalam
On Tue, 8 Feb 2022 17:23:38 GMT, Stuart Marks wrote: > PR for Sequenced Collections implementation. Please include the following fix for the langtools test "failures": diff --git a/test/langtools/tools/javac/api/TestJavacTaskScanner.java b/test/langtools/tools/javac/api/TestJavacTaskScanner.

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Stuart Marks
On Sat, 5 Nov 2022 11:17:04 GMT, ExE Boss wrote: >> @liach >> >>> Is there a particular reason we define poll (null on empty) in SequencedMap >>> but remove (NSEE on empty) in SequencedCollection? >>> >>> I understand that SequencedCollection doesn't want to be null-ambiguous, >>> and map en

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread ExE Boss
On Sat, 5 Nov 2022 05:44:42 GMT, Stuart Marks wrote: >> Is there a particular reason we define poll (null on empty) in SequencedMap >> but remove (NSEE on empty) in SequencedCollection? >> >> I understand that SequencedCollection doesn't want to be null-ambiguous, and >> map entries are non-nu

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Stuart Marks
On Wed, 21 Sep 2022 04:01:13 GMT, Chen Liang wrote: >> PR for Sequenced Collections implementation. > > Since we added reversal to deque, can we add notes to a few Collections APIs > like `Collections::asLifoQueue` about this newer alternative? Also on using > `reverse` on the list view than ac

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Stuart Marks
On Tue, 8 Feb 2022 17:23:38 GMT, Stuart Marks wrote: > PR for Sequenced Collections implementation. I'm not convinced it's binary compatible. :-) Perhaps this particular case is, but there are a bunch of other cases (additional subclasses, etc.) that need to be considered. Thanks for the Sour

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Chen Liang
On Tue, 8 Feb 2022 17:23:38 GMT, Stuart Marks wrote: > PR for Sequenced Collections implementation. Since we added reversal to deque, can we add notes to a few Collections APIs like `Collections::asLifoQueue` about this newer alternative? Also on using `reverse` on the list view than actually

Re: RFR: 8266571: Sequenced Collections

2023-03-20 Thread Eamonn McManus
On Tue, 8 Feb 2022 17:23:38 GMT, Stuart Marks wrote: > PR for Sequenced Collections implementation. Yes, I think this `LinkedHashMap.keySet()` change is binary compatible but source incompatible. Surely binary incompatibility would have been enough to rule it out immediately. For the source co

RFR: 8266571: Sequenced Collections

2023-03-20 Thread Stuart Marks
PR for Sequenced Collections implementation. - Commit messages: - Specification cleanups. - Update spec of CopyOnWriteArrayList::reversed. - Move AbstractViewCollection to AbstractMap.ViewCollection to avoid exposing it publicly. - Merge branch 'master' into JDK-8266571-Sequenced

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

2023-03-20 Thread Paul Sandoz
On Fri, 17 Mar 2023 15:42:56 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: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html src

Re: RFR: JDK-8295859 Update Manual Test Groups [v2]

2023-03-20 Thread Bill Huang
> The purpose of this task is to add the difference between -manual jdk_core > and jdk_core_manual to the jdk_core_manual test goal. Furthermore, in order > to streamline the manual test execution process, a new test group called > jdk_core_manual_human has been created for manual tests that dem

Integrated: JDK-8304542: Convert use of internal VM::classFileVersion to ClassFileFormatVersion

2023-03-20 Thread Mandy Chung
On Mon, 20 Mar 2023 18:44:24 GMT, Mandy Chung wrote: > Replace calls to `jdk.internal.vm.VM::classFileVersion` with > `java.lang.reflect.ClassFileFormatVersion.latest().major()`. This also > fixes jlink SystemModulesPlugin plugin to use CFFV API instead of hardcoding > the class file version

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

2023-03-20 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 a

Integrated: 8303018: Unicode Emoji Properties

2023-03-20 Thread Naoto Sato
On Mon, 13 Mar 2023 21:16:24 GMT, Naoto Sato wrote: > Proposing accessor methods to Emoji properties defined in [Unicode Technical > Standard #51](https://unicode.org/reports/tr51/) in `java.lang.Character` > class. This is per a request from the client group, as well as refining the > current

Re: RFR: JDK-8304542: Convert use of internal VM::classFileVersion to ClassFileFormatVersion [v2]

2023-03-20 Thread Mandy Chung
> Replace calls to `jdk.internal.vm.VM::classFileVersion` with > `java.lang.reflect.ClassFileFormatVersion.latest().major()`. This also > fixes jlink SystemModulesPlugin plugin to use CFFV API instead of hardcoding > the class file version. Mandy Chung has updated the pull request incremental

Integrated: 8304303: implement VirtualThread class notifyJvmti methods as C2 intrinsics

2023-03-20 Thread Serguei Spitsyn
On Thu, 16 Mar 2023 05:03:51 GMT, Serguei Spitsyn wrote: > This is needed for future performance/scalability improvements in JVMTI > support of virtual threads. > The update includes the following: > > 1. Refactored the `VirtualThread` native methods: > `notifyJvmtiMountBegin` and `noti

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v14]

2023-03-20 Thread Alan Bateman
On Mon, 20 Mar 2023 16:00:40 GMT, Adam Sotona wrote: >> jdk.jlink internal plugins are heavily using ASM >> >> This patch converts ASM calls to Classfile API. >> >> Please review. >> Thanks, >> Adam > > Adam Sotona has updated the pull request incrementally with one additional > commit since t

Re: RFR: JDK-8304542: Convert use of internal VM::classFileVersion to ClassFileFormatVersion

2023-03-20 Thread Alan Bateman
On Mon, 20 Mar 2023 18:44:24 GMT, Mandy Chung wrote: > Replace calls to `jdk.internal.vm.VM::classFileVersion` with > `java.lang.reflect.ClassFileFormatVersion.latest().major()`. This also > fixes jlink SystemModulesPlugin plugin to use CFFV API instead of hardcoding > the class file version

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

2023-03-20 Thread Erik Joelsson
On Fri, 17 Mar 2023 15:42:56 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: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Bui

RFR: JDK-8304542: Convert use of internal VM::classFileVersion to ClassFileFormatVersion

2023-03-20 Thread Mandy Chung
Replace calls to `jdk.internal.vm.VM::classFileVersion` with `java.lang.reflect.ClassFileFormatVersion.latest().major()`. This also fixes jlink SystemModulesPlugin plugin to use CFFV API instead of hardcoding the class file version. - Commit messages: - JDK-8304542: Convert use

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v13]

2023-03-20 Thread Mandy Chung
On Mon, 20 Mar 2023 16:44:25 GMT, Mandy Chung wrote: >> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java >> line 581: >> >>> 579: clb.withFlags(ACC_FINAL + ACC_SUPER) >>> 580: >>> .withInterfaceSymbols(List

Re: RFR: 8301552: Use AtomicReferenceArray for caching instead of CHM in ZoneOffset [v8]

2023-03-20 Thread Chen Liang
On Thu, 9 Feb 2023 13:46:14 GMT, Per Minborg wrote: >> `ZoneOffset` instances are cached by the `ZoneOffset` class itself for >> values in the range [-18h, 18h] for each second that is on an even quarter >> of an hour (i.e. at most 2*18*4+1 = 145 values). >> >> Instead of using a `ConcurrentH

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

2023-03-20 Thread Maurizio Cimadamore
On Fri, 17 Mar 2023 15:42:56 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: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Her

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

2023-03-20 Thread ExE Boss
On Fri, 17 Mar 2023 15:42:56 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: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html src

RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview)

2023-03-20 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 - Commit messages: - Update after first round of comments

Re: RFR: 8301552: Use AtomicReferenceArray for caching instead of CHM in ZoneOffset [v8]

2023-03-20 Thread Per Minborg
On Thu, 9 Feb 2023 13:46:14 GMT, Per Minborg wrote: >> `ZoneOffset` instances are cached by the `ZoneOffset` class itself for >> values in the range [-18h, 18h] for each second that is on an even quarter >> of an hour (i.e. at most 2*18*4+1 = 145 values). >> >> Instead of using a `ConcurrentH

Re: RFR: JDK-8304163: Move jdk.internal.module.ModuleInfoWriter to the test library [v2]

2023-03-20 Thread Daniel D . Daugherty
On Sat, 18 Mar 2023 19:14:09 GMT, Mandy Chung wrote: >> `ModuleInfoWriter` is not used by the runtime. Move it to the test library >> as `jdk.test.lib.util.ModuleInfoWriter`. The tests are updated to use the >> test library instead. `ModuleInfoWriter` depends on `jdk.internal.module` >>

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

2023-03-20 Thread Stuart Marks
On Mon, 20 Mar 2023 02:01:38 GMT, David Holmes wrote: >>> The discussion is also a reminder that -Djava.compiler=NONE is the >>> equivalent of -Xint, I thought that system property was dropped a long time >>> ago. >> >> https://bugs.openjdk.org/browse/JDK-8041676 suggests to deprecate it, but

Integrated: JDK-8304163: Move jdk.internal.module.ModuleInfoWriter to the test library

2023-03-20 Thread Mandy Chung
On Fri, 17 Mar 2023 22:01:46 GMT, Mandy Chung wrote: > `ModuleInfoWriter` is not used by the runtime. Move it to the test library > as `jdk.test.lib.util.ModuleInfoWriter`. The tests are updated to use the > test library instead. `ModuleInfoWriter` depends on `jdk.internal.module` > type

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

2023-03-20 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 `Lookup`

Re: RFR: JDK-8304163: Move jdk.internal.module.ModuleInfoWriter to the test library [v2]

2023-03-20 Thread Mandy Chung
On Mon, 20 Mar 2023 06:57:32 GMT, Jaikiran Pai wrote: >> test/jdk/java/lang/ModuleTests/AnnotationsTest.java line 61: >> >>> 59: * java.base/jdk.internal.module >>> 60: * @library /test/lib >>> 61: * @build jdk.test.lib.util.ModuleInfoWriter >> >> You don't need to build library cla

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

2023-03-20 Thread Andrey Turbanov
On Mon, 20 Mar 2023 16:18:27 GMT, Chen Liang wrote: >> 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 al

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v13]

2023-03-20 Thread Mandy Chung
On Mon, 20 Mar 2023 15:34:31 GMT, Alan Bateman wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added default to thrown for unknown CP tag in IncludeLocalesPlugin > > src/jdk.jlink/share/classes/jdk/tools/jlink/inter

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v14]

2023-03-20 Thread Alan Bateman
On Mon, 20 Mar 2023 16:00:40 GMT, Adam Sotona wrote: >> jdk.jlink internal plugins are heavily using ASM >> >> This patch converts ASM calls to Classfile API. >> >> Please review. >> Thanks, >> Adam > > Adam Sotona has updated the pull request incrementally with one additional > commit since t

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

2023-03-20 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 `Lookup`

Re: RFR: 8304425: ClassHierarchyResolver from Reflection

2023-03-20 Thread Chen Liang
On Fri, 17 Mar 2023 18:18:48 GMT, Chen Liang wrote: > 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 us

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v14]

2023-03-20 Thread Adam Sotona
> jdk.jlink internal plugins are heavily using ASM > > This patch converts ASM calls to Classfile API. > > Please review. > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: fixed SystemModulesClassGenerator.moduleInfos

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v13]

2023-03-20 Thread Alan Bateman
On Mon, 20 Mar 2023 12:02:31 GMT, Adam Sotona wrote: >> jdk.jlink internal plugins are heavily using ASM >> >> This patch converts ASM calls to Classfile API. >> >> Please review. >> Thanks, >> Adam > > Adam Sotona has updated the pull request incrementally with one additional > commit since t

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v13]

2023-03-20 Thread Alan Bateman
On Mon, 20 Mar 2023 12:02:31 GMT, Adam Sotona wrote: >> jdk.jlink internal plugins are heavily using ASM >> >> This patch converts ASM calls to Classfile API. >> >> Please review. >> Thanks, >> Adam > > Adam Sotona has updated the pull request incrementally with one additional > commit since t

Re: RFR: 8304425: ClassHierarchyResolver from Reflection

2023-03-20 Thread Adam Sotona
On Mon, 20 Mar 2023 11:07:23 GMT, Adam Sotona wrote: >> 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 a

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v13]

2023-03-20 Thread Mandy Chung
On Mon, 20 Mar 2023 12:02:31 GMT, Adam Sotona wrote: >> jdk.jlink internal plugins are heavily using ASM >> >> This patch converts ASM calls to Classfile API. >> >> Please review. >> Thanks, >> Adam > > Adam Sotona has updated the pull request incrementally with one additional > commit since t

Re: RFR: 8304425: ClassHierarchyResolver from Reflection

2023-03-20 Thread Chen Liang
On Mon, 20 Mar 2023 11:07:23 GMT, Adam Sotona wrote: >> 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 a

Integrated: 8304443: bootcycle builds fail after JDK-8015831

2023-03-20 Thread Archie L . Cobbs
On Sat, 18 Mar 2023 17:46:00 GMT, Archie L. Cobbs wrote: > The fix for JDK-8015831, which added the new `this-escape` lint warning, > caused the build of the `bootcycle-images` make target to fail. > > This commit adds the additional `@SuppressWarnings("this-escape")` > annotations needed to f

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

2023-03-20 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 > launche

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

2023-03-20 Thread Jaikiran Pai
On Sun, 19 Mar 2023 09:07:41 GMT, Alan Bateman wrote: >> Hello Mandy, Alan, Jim, >> >> I've updated this PR to take into account these suggestions. I went ahead >> with what Mandy suggested and enhanced the existing (internal) >> `jdk.tools.jlink.internal.Platform` `record`to additional parse

Re: RFR: 8304502: Classfile API class hierarchy makes assumptions when class is not resolved [v2]

2023-03-20 Thread Chen Liang
On Mon, 20 Mar 2023 14:02:13 GMT, Adam Sotona wrote: >> Classfile API class hierarchy makes assumptions when class is not resolved >> and that may lead to silent generation of invalid stack maps. Only >> debug-level log information of case is actually provided. >> >> Proposed patch throws Ille

Re: RFR: 8304502: Classfile API class hierarchy makes assumptions when class is not resolved [v2]

2023-03-20 Thread Adam Sotona
> Classfile API class hierarchy makes assumptions when class is not resolved > and that may lead to silent generation of invalid stack maps. Only > debug-level log information of case is actually provided. > > Proposed patch throws IllegalArgumentException when the class is not resolved > inste

Integrated: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally

2023-03-20 Thread Viktor Klang
On Thu, 16 Mar 2023 13:37:10 GMT, Viktor Klang wrote: > Addresses the situation where exceptional completion of `orTimeout`:ed > CompletableFutures wouldn't cancel the timeout task which could lead to > memory leaks if done frequently enough with long enough timeout durations. > > Fix discusse

Re: RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally [v6]

2023-03-20 Thread Viktor Klang
On Fri, 17 Mar 2023 09:52:51 GMT, Viktor Klang wrote: >> Addresses the situation where exceptional completion of `orTimeout`:ed >> CompletableFutures wouldn't cancel the timeout task which could lead to >> memory leaks if done frequently enough with long enough timeout durations. >> >> Fix dis

Re: RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally [v6]

2023-03-20 Thread Jaikiran Pai
On Fri, 17 Mar 2023 09:52:51 GMT, Viktor Klang wrote: >> Addresses the situation where exceptional completion of `orTimeout`:ed >> CompletableFutures wouldn't cancel the timeout task which could lead to >> memory leaks if done frequently enough with long enough timeout durations. >> >> Fix dis

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

2023-03-20 Thread Alan Bateman
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: 8205129: Remove java.lang.Compiler

2023-03-20 Thread Eirik Bjorsnos
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 noticed there are quite a few us

Re: RFR: 8304425: ClassHierarchyResolver from Reflection

2023-03-20 Thread Glavo
On Fri, 17 Mar 2023 18:18:48 GMT, Chen Liang wrote: > 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 us

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

2023-03-20 Thread Jan Lahoda
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. The proposed fix herein is to detect whether `test` existing in

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v12]

2023-03-20 Thread Adam Sotona
On Fri, 17 Mar 2023 17:30:41 GMT, Mandy Chung wrote: >> Adam Sotona has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 220 commits: >> >> - Merge branch 'master' into JDK-8294972-jlink-plugins >> - SystemModulesPlugin::genClassByte

Re: RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v13]

2023-03-20 Thread Adam Sotona
> jdk.jlink internal plugins are heavily using ASM > > This patch converts ASM calls to Classfile API. > > Please review. > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: added default to thrown for unknown CP tag in

RFR: 8304502: Classfile API class hierarchy makes assumptions when class is not resolved

2023-03-20 Thread Adam Sotona
Classfile API class hierarchy makes assumptions when class is not resolved and that may lead to silent generation of invalid stack maps. Only debug-level log information of case is actually provided. Proposed patch throws IllegalArgumentException when the class is not resolved instead. Thanks

Re: RFR: 8304425: ClassHierarchyResolver from Reflection

2023-03-20 Thread Adam Sotona
On Fri, 17 Mar 2023 18:18:48 GMT, Chen Liang wrote: > 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 us

Re: RFR: 8304303: implement VirtualThread class notifyJvmti methods as C2 intrinsics [v4]

2023-03-20 Thread Serguei Spitsyn
On Fri, 17 Mar 2023 10:31:46 GMT, Serguei Spitsyn wrote: >> This is needed for future performance/scalability improvements in JVMTI >> support of virtual threads. >> The update includes the following: >> >> 1. Refactored the `VirtualThread` native methods: >> `notifyJvmtiMountBegin` and

Re: RFR: 8304303: implement VirtualThread class notifyJvmti methods as C2 intrinsics [v4]

2023-03-20 Thread Serguei Spitsyn
On Sat, 18 Mar 2023 11:24:47 GMT, Alan Bateman wrote: > The most important case is when there is no JVMTI env. If I read the changes > correctly, the overhead for park/continue changes from one volatile-read > (notifyJvmtiEvents) to two plain-writes (JavaThread::_is_in_VTMS_transition). > > If

Re: RFR: JDK-8304163: Move jdk.internal.module.ModuleInfoWriter to the test library [v2]

2023-03-20 Thread Jaikiran Pai
On Mon, 20 Mar 2023 01:34:11 GMT, Leonid Mesnik wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> move @library after @modules per the recommended ordering > > test/jdk/java/lang/ModuleTests/AnnotationsTest.java line