Re: RFR: 8306698: Add overloads to MethodTypeDesc::of [v2]

2023-05-05 Thread ExE Boss
On Sun, 23 Apr 2023 23:44:41 GMT, Chen Liang wrote: >> Please review this patch adding two new convenience methods that allows >> easier access to MethodTypeDesc instances and its associated CSR as well. >> This is a necessity to allow #13186 to reduce array copies in a few >> scenarios; the

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

2023-05-05 Thread Joe Darcy
On Thu, 27 Apr 2023 17:21:23 GMT, Jim Laskey wrote: >> 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

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

2023-05-05 Thread Joe Darcy
On Thu, 27 Apr 2023 17:21:23 GMT, Jim Laskey wrote: >> 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

Re: RFR: 8307523: [vectorapi] Optimize MaskFromLongBenchmark.java

2023-05-05 Thread Quan Anh Mai
On Sat, 6 May 2023 02:01:20 GMT, Chang Peng wrote: > To avoid dead code elimination, a use-point laneIsSet() is added in each > benchmark method in MaskFromLongBenchmark.java. > > However, currently laneIsSet() [1] is implemented by toLong(). So it may > generate a fromLong-toLong pair [2],

RFR: 8307523: [vectorapi] Optimize MaskFromLongBenchmark.java

2023-05-05 Thread Chang Peng
To avoid dead code elimination, a use-point laneIsSet() is added in each benchmark method in MaskFromLongBenchmark.java. However, currently laneIsSet() [1] is implemented by toLong(). So it may generate a fromLong-toLong pair [2], making this benchmark to be noneffective after inlining

RFR: 8307466: java.time.Instant calculation bug in until and between methods

2023-05-05 Thread Roger Riggs
The implementation of java.time.Instant.until(I2, ChronoUnit) in some cases did not correctly borrow or carry from the nanos to the seconds when computing using ChronoUnit.MILLIS or ChronoUnit.MICROS. The errant computation was introduced by

Withdrawn: 8303891: Zip64SizeTest could use a sparse file

2023-05-05 Thread duke
On Thu, 9 Mar 2023 12:06:52 GMT, Eirik Bjorsnos wrote: > This PR suggests we use a sparse file when the Zip64SizeTest writes a ZIP > file with a 5GB entry. > > The size requirement of this test is known to cause problems in some builds, > see

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-05 Thread Maurizio Cimadamore
Another way to help inference, in cases like this would be to break up the method chain - as follows: final Stream> stream = Stream.of(nestedDequeue, nestedList); final List> list = stream.toList(); In the above rewriting, now the target type Stream> "drives" inference for Stream::of -

Re: RFR: JDK-8077371: Binary files in JAXP test should be removed [v6]

2023-05-05 Thread Lance Andersen
On Wed, 3 May 2023 14:12:33 GMT, Mahendra Chhipa wrote: >> Test is updated to create the binary files during test execution. > > Mahendra Chhipa has updated the pull request incrementally with one > additional commit since the last revision: > > Move the pseudo code generation part from

Re: Time difference calculation bug

2023-05-05 Thread Roger Riggs
Hi, The PR with the fix is out for review: https://github.com/openjdk/jdk/pull/13846 Thanks for the issue report and followup. A possible workaround is to convert to millis and subtract, for example,     long diff = t2.toEpochMillis() - t1.toEpochMillis(); Thank you, Roger On 5/4/23

Re: RFR: 8307194: Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v7]

2023-05-05 Thread Erik Joelsson
On Fri, 5 May 2023 16:52:22 GMT, Jiangli Zhou wrote: >> This PR is branched from the makefile changes for >> https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for >> handling the JDK/hotspot static libraries: >> >> - Introduce new make target(s) for creating image/bundle

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v11]

2023-05-05 Thread Vicente Romero
On Fri, 5 May 2023 19:17:53 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > Refactor source code launcher looks good

Re: RFR: 8302845: Replace finalizer usage in JNDI DNS provider with Cleaner [v2]

2023-05-05 Thread Alan Bateman
On Fri, 5 May 2023 19:08:27 GMT, Aleksei Efimov wrote: >> JNDI `DnsClient` has a finalize method to close its internal datagram >> channel selector. >> The change proposed here replaces it with a cleaner to close the selector >> once the `DnsClient` >> instance becomes phantom reachable.

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v11]

2023-05-05 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Refactor source code launcher - Changes: - all: https://git.openjdk.org/jdk/pull/13689/files

Re: RFR: 8302845: Replace finalizer usage in JNDI DNS provider with Cleaner [v2]

2023-05-05 Thread Aleksei Efimov
> JNDI `DnsClient` has a finalize method to close its internal datagram channel > selector. > The change proposed here replaces it with a cleaner to close the selector > once the `DnsClient` > instance becomes phantom reachable. > > The change was tested with `jdk-tier1` to `jdk-tier3` test

Re: RFR: 8302845: Replace finalizer usage in JNDI DNS provider with Cleaner [v2]

2023-05-05 Thread Aleksei Efimov
On Fri, 5 May 2023 18:13:29 GMT, Alan Bateman wrote: >> Aleksei Efimov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fix comment > > src/jdk.naming.dns/share/classes/com/sun/jndi/dns/DnsClient.java line 163: > >> 161: } >>

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly [v2]

2023-05-05 Thread Daniel Fuchs
On Fri, 5 May 2023 16:38:13 GMT, Daniel Fuchs wrote: >> Several Handlers class use monitors to synchronize when formatting / >> publishing LogRecords. >> When logging within a VirtualThread, holding this monitor can cause the >> carrier thread to be pinned. >> Handlers could use

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly [v3]

2023-05-05 Thread Daniel Fuchs
> Several Handlers class use monitors to synchronize when formatting / > publishing LogRecords. > When logging within a VirtualThread, holding this monitor can cause the > carrier thread to be pinned. > Handlers could use jdk.internal.misc.InternalLock, in a similar way to some > java.io

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v10]

2023-05-05 Thread Jim Laskey
On Fri, 5 May 2023 18:15:20 GMT, Vicente Romero wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Typo > > src/jdk.compiler/share/classes/com/sun/tools/javac/launcher/Main.java line > 466: > >> 464: } catch

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v10]

2023-05-05 Thread Vicente Romero
On Fri, 5 May 2023 17:31:27 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > Typo

Re: RFR: 8302845: Replace finalizer usage in JNDI DNS provider with Cleaner

2023-05-05 Thread Alan Bateman
On Fri, 5 May 2023 17:25:38 GMT, Aleksei Efimov wrote: > JNDI `DnsClient` has a finalize method to close its internal datagram channel > selector. > The change proposed here replaces it with a cleaner to close the selector > once the `DnsClient` > instance becomes phantom reachable. > >

RFR: 8305972: Update XML Security for Java to 3.0.2

2023-05-05 Thread Weijun Wang
Update XML Security for Java to 3.0.2. Some change to tests: 1. No more Xalan. One test case is singled out to demonstrate how to use a special configuration. 2. EdDSA does not support `KeyValue`. Use X.509 certificate instead. - Commit messages: - the change Changes:

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v9]

2023-05-05 Thread Rémi Forax
On Fri, 5 May 2023 17:35:33 GMT, Vicente Romero wrote: >> `Flags.MANDATED` on a class is currently enough to know if it's a unnamed >> class or not, but it's not enough for classes not produced by javac. > > good point Just to be clear, here, Flags.UNNAMED_CLASS is needed because an an unnamed

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v9]

2023-05-05 Thread Vicente Romero
On Fri, 5 May 2023 17:22:03 GMT, Rémi Forax wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java >> line 3999: >> >>> 3997: Name name = names.fromString(simplename); >>> 3998: JCModifiers anonMods = F.at(primaryPos) >>> 3999: >>>

RFR: 8302845: Replace finalizer usage in JNDI DNS provider with Cleaner

2023-05-05 Thread Aleksei Efimov
JNDI `DnsClient` has a finalize method to close its internal datagram channel selector. The change proposed here replaces it with a cleaner to close the selector once the `DnsClient` instance becomes phantom reachable. The change was tested with `jdk-tier1` to `jdk-tier3` test sets which

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v10]

2023-05-05 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Typo - Changes: - all: https://git.openjdk.org/jdk/pull/13689/files - new:

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v9]

2023-05-05 Thread Jim Laskey
On Fri, 5 May 2023 16:42:43 GMT, Vicente Romero wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Recommended changes #2 > > src/java.base/share/classes/jdk/internal/misc/MainMethodFinder.java line 138: > >> 136:

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v9]

2023-05-05 Thread Rémi Forax
On Fri, 5 May 2023 17:08:35 GMT, Vicente Romero wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Recommended changes #2 > > src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java > line 3999: >

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v9]

2023-05-05 Thread Vicente Romero
On Fri, 5 May 2023 16:18:42 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > Recommended changes #2

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly

2023-05-05 Thread David M . Lloyd
On Fri, 5 May 2023 16:31:18 GMT, Daniel Fuchs wrote: > Thanks for your observations David! > > Use of synchronization in these handler classes has two purposes: one is > visibility. Since Handlers are used by multiple (logging) threads, and > potentially configured from different threads

Re: RFR: 8306927: Collator treats "v" and "w" as the same letter for Swedish language locale.

2023-05-05 Thread Naoto Sato
On Wed, 26 Apr 2023 20:42:01 GMT, Naoto Sato wrote: > Updating the collation rules for Swedish to the modern one, which is aligned > with the CLDR's default collation rules. Since it is changing the existing > behavior, a release note has also been drafted: >

Re: RFR: 8307194: Enhance static-libs-image [v7]

2023-05-05 Thread Jiangli Zhou
On Fri, 5 May 2023 16:43:46 GMT, Jiangli Zhou wrote: >>> [...] I'll see if I can test this on a mandrel build tomorrow... >> >> @jianglizhou So I've tested this with a mandrel build and it doesn't break >> terribly, but a graalvm build after this patch has *two* `libjvm.a` which a) >> doesn't

Re: RFR: 8307194: Enhance static-libs-image [v7]

2023-05-05 Thread Jiangli Zhou
> This PR is branched from the makefile changes for > https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for > handling the JDK/VM static libraries: > > - Create libjvm.a together with other JDK static libraries when building > 'static-libs-image' (or 'static-libs-bundles')

Re: RFR: 8307194: Enhance static-libs-image [v6]

2023-05-05 Thread Jiangli Zhou
On Thu, 4 May 2023 19:12:14 GMT, Severin Gehwolf wrote: >> As @jerboaa mentioned, for GraalVM native-image we produce our own >> `libjvm.a` as part of building GraalVM (every native image gets statically >> linked to that library). See >>

Re: RFR: 8307194: Enhance static-libs-image [v6]

2023-05-05 Thread Jiangli Zhou
> This PR is branched from the makefile changes for > https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for > handling the JDK/VM static libraries: > > - Create libjvm.a together with other JDK static libraries when building > 'static-libs-image' (or 'static-libs-bundles')

Re: RFR: 8307194: Enhance static-libs-image [v6]

2023-05-05 Thread Jiangli Zhou
> This PR is branched from the makefile changes for > https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for > handling the JDK/VM static libraries: > > - Create libjvm.a together with other JDK static libraries when building > 'static-libs-image' (or 'static-libs-bundles')

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly [v2]

2023-05-05 Thread Daniel Fuchs
> Several Handlers class use monitors to synchronize when formatting / > publishing LogRecords. > When logging within a VirtualThread, holding this monitor can cause the > carrier thread to be pinned. > Handlers could use jdk.internal.misc.InternalLock, in a similar way to some > java.io

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly

2023-05-05 Thread Daniel Fuchs
On Fri, 5 May 2023 13:43:43 GMT, Daniel Fuchs wrote: > Several Handlers class use monitors to synchronize when formatting / > publishing LogRecords. > When logging within a VirtualThread, holding this monitor can cause the > carrier thread to be pinned. > Handlers could use

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v9]

2023-05-05 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Recommended changes #2 - Changes: - all: https://git.openjdk.org/jdk/pull/13689/files - new:

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v8]

2023-05-05 Thread Jim Laskey
On Fri, 5 May 2023 10:15:02 GMT, Jaikiran Pai wrote: >> Jim Laskey has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Anonymous main classes renamed to unnamed classes >> - Add test > >

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v8]

2023-05-05 Thread Jim Laskey
On Fri, 5 May 2023 09:52:37 GMT, Jaikiran Pai wrote: >> Jim Laskey has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Anonymous main classes renamed to unnamed classes >> - Add test > >

Integrated: 8307375: Alignment check on layouts used as sequence element is not correct

2023-05-05 Thread Maurizio Cimadamore
On Wed, 3 May 2023 17:44:55 GMT, Maurizio Cimadamore wrote: > This patch fixes `Utils::checkElementAlignment` to do the right thing for > _all_ layouts. > > The current implementation is broken, as it only works correctly when the > input layout is a value layout. > Since value layouts have

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v8]

2023-05-05 Thread Jim Laskey
On Fri, 5 May 2023 09:43:04 GMT, Jaikiran Pai wrote: >> Jim Laskey has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Anonymous main classes renamed to unnamed classes >> - Add test > >

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v8]

2023-05-05 Thread Jim Laskey
On Fri, 5 May 2023 09:39:07 GMT, Jaikiran Pai wrote: >> Jim Laskey has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Anonymous main classes renamed to unnamed classes >> - Add test > >

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v8]

2023-05-05 Thread Jim Laskey
On Fri, 5 May 2023 09:30:54 GMT, Jaikiran Pai wrote: >> Jim Laskey has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Anonymous main classes renamed to unnamed classes >> - Add test > >

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v8]

2023-05-05 Thread Jim Laskey
On Fri, 5 May 2023 09:28:04 GMT, Jaikiran Pai wrote: >> Jim Laskey has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Anonymous main classes renamed to unnamed classes >> - Add test > >

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v27]

2023-05-05 Thread Martin Doerr
> Implementation of "Foreign Function & Memory API" for linux on Power (Little > Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". > > This PR does not include code for VaList support because it's supposed to get > removed by

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly

2023-05-05 Thread David M . Lloyd
On Fri, 5 May 2023 13:43:43 GMT, Daniel Fuchs wrote: > Several Handlers class use monitors to synchronize when formatting / > publishing LogRecords. > When logging within a VirtualThread, holding this monitor can cause the > carrier thread to be pinned. > Handlers could use

Re: RFR: 8307483: New micros for j.u.c.LockSupport

2023-05-05 Thread Alan Bateman
On Thu, 4 May 2023 20:17:11 GMT, Eric Caspole wrote: > These micros were developed while investigating JDK-8305670 by myself and > Sergey Kuksenko. The order of thread creation was important in that bug, so > there are 2 JMH for creating sleepers before and after the worker threads.

Re: RFR: 8304913: Use OperatingSystem, Architecture, and Version in jlink [v3]

2023-05-05 Thread Jaikiran Pai
On Fri, 5 May 2023 14:10:42 GMT, Roger Riggs wrote: >> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/Platform.java line 71: >> >>> 69: */ >>> 70: public static Platform runtime() { >>> 71: return new Platform(OperatingSystem.current(), >>> Architecture.current()); >>

Re: RFR: 8304913: Use OperatingSystem, Architecture, and Version in jlink [v3]

2023-05-05 Thread Jaikiran Pai
On Fri, 5 May 2023 13:59:37 GMT, Roger Riggs wrote: >> Refactor the Platform class of jlink to use jdk.internal.util >> OperatingSystem and Architecture instead of os.name and os.arch. >> They are direct replacements for the Platform enums except for UNKNOWN; its >> use is refactored to

Re: RFR: 8304913: Use OperatingSystem, Architecture, and Version in jlink [v3]

2023-05-05 Thread Roger Riggs
On Thu, 4 May 2023 12:36:32 GMT, Jaikiran Pai wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Source code cleanup suggested by reviewers > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/Platform.java line

Re: RFR: 8304914: Use OperatingSystem, Architecture, and Version in jpackage [v2]

2023-05-05 Thread Roger Riggs
> Refactor the Platform class in jdk.jpackage to use the internal > OperatingSystem, Architecture, and Version classes. > The OperatingSystem.isXXX() and Architecture.isYYY() methods replace > comparisons in the Platform class. > The checks of the os.version are replaced but may not be needed if

Re: RFR: 8307194: Enhance static-libs-image [v5]

2023-05-05 Thread Alan Bateman
On Thu, 4 May 2023 19:32:45 GMT, Jiangli Zhou wrote: >>> [...] I'll see if I can test this on a mandrel build tomorrow... >> >> @jianglizhou So I've tested this with a mandrel build and it doesn't break >> terribly, but a graalvm build after this patch has *two* `libjvm.a` which a) >> doesn't

Re: RFR: 8304913: Use OperatingSystem, Architecture, and Version in jlink [v3]

2023-05-05 Thread Roger Riggs
> Refactor the Platform class of jlink to use jdk.internal.util OperatingSystem > and Architecture instead of os.name and os.arch. > They are direct replacements for the Platform enums except for UNKNOWN; its > use is refactored to report errors via exceptions. > > Neither os.name nor os.arch

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly

2023-05-05 Thread Daniel Fuchs
On Fri, 5 May 2023 13:43:43 GMT, Daniel Fuchs wrote: > Several Handlers class use monitors to synchronize when formatting / > publishing LogRecords. > When logging within a VirtualThread, holding this monitor can cause the > carrier thread to be pinned. > Handlers could use

RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly

2023-05-05 Thread Daniel Fuchs
Several Handlers class use monitors to synchronize when formatting / publishing LogRecords. When logging within a VirtualThread, holding this monitor can cause the carrier thread to be pinned. Handlers could use jdk.internal.misc.InternalLock, in a similar way to some java.io classes (such as

Re: RFR: 8305734: BitSet.get(int, int) always returns the empty BitSet when the Integer.MAX VALUE is set

2023-05-05 Thread Chen Liang
On Fri, 7 Apr 2023 12:22:03 GMT, Andy-Tatman wrote: > See https://bugs.java.com/bugdatabase/view_bug?bug_id=8305734 A CSR has been created at https://bugs.openjdk.org/browse/JDK-8307539. You might have to use `/csr` in a comment to make the jdk dukebot update the info. Note: The specification

Re: RFR: 8305734: BitSet.get(int, int) always returns the empty BitSet when the Integer.MAX VALUE is set

2023-05-05 Thread Andy-Tatman
On Fri, 7 Apr 2023 12:22:03 GMT, Andy-Tatman wrote: > See https://bugs.java.com/bugdatabase/view_bug?bug_id=8305734 I was first in favour of just doing the suggested fix in the commit, but given that functions such as get(int **, int**) can't access this bit anyway, I agree it might make more

Re: RFR: 8305734: BitSet.get(int, int) always returns the empty BitSet when the Integer.MAX VALUE is set

2023-05-05 Thread Andy-Tatman
On Sat, 22 Apr 2023 01:26:08 GMT, Chen Liang wrote: > > I would be happy to fill out the CSR, but unfortunately I don't think I am > > able to currently as I'm not an author on OpenJDK and as such don't have a > > JBS account. (I reported the bug through the Oracle site, rather than > >

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization

2023-05-05 Thread Maurizio Cimadamore
On Fri, 5 May 2023 13:08:33 GMT, Chen Liang wrote: >> Also, perhaps @PaulSandoz knows more history on this one (I believe this >> code predates FFM). > > Eh? I am not sure what you mean here. This is the essence of the patch, where > the "TODO" above is fixed: lookup.findStaticVarHandle now

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization

2023-05-05 Thread Chen Liang
On Fri, 5 May 2023 13:02:05 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/invoke/VarHandles.java line 110: >> >>> 108: } >>> 109: else { >>> 110: if (UNSAFE.shouldBeInitialized(refc)) { >> >> This seems unrelated to the issue this PR is

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization

2023-05-05 Thread Maurizio Cimadamore
On Fri, 5 May 2023 13:03:14 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/invoke/IndirectVarHandle.java line 74: >> >>> 72: @Override >>> 73: public boolean isAccessModeSupported(AccessMode accessMode) { >>> 74: var directTarget = this.directTarget; >> >> Why

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization

2023-05-05 Thread Chen Liang
On Fri, 5 May 2023 13:00:11 GMT, Maurizio Cimadamore wrote: >> Also fixed the bug with NPE in `IndirectVarHandle::isAccessModeSupported`. >> >> A few implementation-detail methods in VarHandle are now documented with the >> implied constraints to avoid subtle problems in the future. Changed

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization

2023-05-05 Thread Maurizio Cimadamore
On Fri, 5 May 2023 13:01:09 GMT, Maurizio Cimadamore wrote: >> Also fixed the bug with NPE in `IndirectVarHandle::isAccessModeSupported`. >> >> A few implementation-detail methods in VarHandle are now documented with the >> implied constraints to avoid subtle problems in the future. Changed

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization

2023-05-05 Thread Maurizio Cimadamore
On Fri, 5 May 2023 04:48:09 GMT, Chen Liang wrote: > Also fixed the bug with NPE in `IndirectVarHandle::isAccessModeSupported`. > > A few implementation-detail methods in VarHandle are now documented with the > implied constraints to avoid subtle problems in the future. Changed >

Re: RFR: 8305990: Stripping debug info of ASM 9.5 fails [v12]

2023-05-05 Thread Adam Sotona
> Classfile API didn't handle transformations of class files version 50 and > below correctly. > > Proposed fix have two parts: > 1. Inflation of branch targets does not depend on StackMapTable attribute > presence for class file version 50 and below. Alternative fallback > implementation is

Re: RFR: 8303762: [vectorapi] Intrinsification of Vector.slice [v6]

2023-05-05 Thread Quan Anh Mai
On Tue, 25 Apr 2023 11:59:30 GMT, Jatin Bhateja wrote: >> src/hotspot/share/opto/vectorIntrinsics.cpp line 1914: >> >>> 1912: if (vector_klass->const_oop() == NULL || elem_klass->const_oop() == >>> NULL || >>> 1913: !vlen->is_con() || !origin_type->is_con()) { >>> 1914: if

Re: RFR: 8303762: [vectorapi] Intrinsification of Vector.slice [v6]

2023-05-05 Thread Quan Anh Mai
On Tue, 11 Apr 2023 19:03:21 GMT, Vladimir Ivanov wrote: >> Quan Anh Mai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> style > > src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ShortVector.java > line 2295: > >> 2293:

Re: RFR: 8303762: [vectorapi] Intrinsification of Vector.slice [v6]

2023-05-05 Thread Quan Anh Mai
On Thu, 6 Apr 2023 01:45:37 GMT, Xiaohong Gong wrote: >> Quan Anh Mai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> style > > test/hotspot/jtreg/compiler/vectorapi/TestVectorSlice.java line 466: > >> 464: @IR(counts =

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v3]

2023-05-05 Thread Jim Laskey
On Thu, 27 Apr 2023 20:51:53 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 14 commits: >> >> - Merge branch 'master' into 8306112 >> - PreviewFeatures.isEnabled() >> - Clean up

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-05 Thread forax
Hi Joe, in this peculiar case, there are several reasons to be worried compared to other potential breaking changes that has appeared in the past (see the message of Tagir for an example). Unlike other changes - this one touch the collection API, and those interfaces/types are widely used,

Re: RFR: 8304913: Use OperatingSystem, Architecture, and Version in jlink [v2]

2023-05-05 Thread Alan Bateman
On Thu, 4 May 2023 20:37:31 GMT, Roger Riggs wrote: >> Refactor the Platform class of jlink to use jdk.internal.util >> OperatingSystem and Architecture instead of os.name and os.arch. >> They are direct replacements for the Platform enums except for UNKNOWN; its >> use is refactored to

Re: RFR: 8304913: Use OperatingSystem, Architecture, and Version in jlink [v2]

2023-05-05 Thread Jaikiran Pai
On Thu, 4 May 2023 20:37:31 GMT, Roger Riggs wrote: >> Refactor the Platform class of jlink to use jdk.internal.util >> OperatingSystem and Architecture instead of os.name and os.arch. >> They are direct replacements for the Platform enums except for UNKNOWN; its >> use is refactored to

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-05 Thread Tagir Valeev
Hello! Such kind of incompatibility happens every single time the new supertype is introduced for two types. E.g., consider: import java.lang.invoke.MethodType; import java.util.List; import java.io.Serializable; class Main { void test() { MethodType mt =

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v8]

2023-05-05 Thread Jaikiran Pai
On Mon, 1 May 2023 13:06:24 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with two additional > commits since the last revision: > > - Anonymous main classes renamed to unnamed

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v8]

2023-05-05 Thread Jaikiran Pai
On Mon, 1 May 2023 13:06:24 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with two additional > commits since the last revision: > > - Anonymous main classes renamed to unnamed

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v8]

2023-05-05 Thread Jaikiran Pai
On Mon, 1 May 2023 13:06:24 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with two additional > commits since the last revision: > > - Anonymous main classes renamed to unnamed

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v8]

2023-05-05 Thread Jaikiran Pai
On Mon, 1 May 2023 13:06:24 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with two additional > commits since the last revision: > > - Anonymous main classes renamed to unnamed

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v8]

2023-05-05 Thread Jaikiran Pai
On Mon, 1 May 2023 13:06:24 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with two additional > commits since the last revision: > > - Anonymous main classes renamed to unnamed

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v8]

2023-05-05 Thread Jaikiran Pai
On Mon, 1 May 2023 13:06:24 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with two additional > commits since the last revision: > > - Anonymous main classes renamed to unnamed

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v8]

2023-05-05 Thread Jaikiran Pai
On Mon, 1 May 2023 13:06:24 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with two additional > commits since the last revision: > > - Anonymous main classes renamed to unnamed

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v8]

2023-05-05 Thread Jaikiran Pai
On Mon, 1 May 2023 13:06:24 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with two additional > commits since the last revision: > > - Anonymous main classes renamed to unnamed

Re: RFR: 8305990: Stripping debug info of ASM 9.5 fails [v11]

2023-05-05 Thread Adam Sotona
On Thu, 4 May 2023 16:19:04 GMT, Adam Sotona wrote: >> Classfile API didn't handle transformations of class files version 50 and >> below correctly. >> >> Proposed fix have two parts: >> 1. Inflation of branch targets does not depend on StackMapTable attribute >> presence for class file

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-05 Thread Jens Lideström
I want contribute an observation of a tangential fact about this example. This might be interesting reminder in a discussion of the tricky parts of type inference. ### The fact The reason that this example does not compile with Sequenced collections is a limitation in the type inference

Re: RFR: 8303530: Add system property for custom JAXP configuration file [v9]

2023-05-05 Thread Alan Bateman
On Tue, 2 May 2023 19:26:38 GMT, Joe Wang wrote: >> One other thing to say on this is that jaxp.properties has "XML Library >> (java.xml) Configuration File" at the top of the file, maybe that could be >> used in the module description instead of "JAXP Configuration File". > > Changed the

Re: RFR: 8305990: Stripping debug info of ASM 9.5 fails [v11]

2023-05-05 Thread Adam Sotona
On Fri, 5 May 2023 02:50:45 GMT, Chen Liang wrote: > Since we want an option to toggle stackmap generation, will you add it to the > Classfile options as a temporary measure, before we keep track of these > options in a stateful object (with hierarchy resolver etc.) like brian > envisioned?

Re: RFR: 8304914: Use OperatingSystem, Architecture, and Version in jpackage

2023-05-05 Thread Andrey Turbanov
On Fri, 21 Apr 2023 17:28:54 GMT, Roger Riggs wrote: > Refactor the Platform class in jdk.jpackage to use the internal > OperatingSystem, Architecture, and Version classes. > The OperatingSystem.isXXX() and Architecture.isYYY() methods replace > comparisons in the Platform class. > The checks

Re: RFR: 8304914: Use OperatingSystem, Architecture, and Version in jpackage

2023-05-05 Thread Andrey Turbanov
On Fri, 21 Apr 2023 17:28:54 GMT, Roger Riggs wrote: > Refactor the Platform class in jdk.jpackage to use the internal > OperatingSystem, Architecture, and Version classes. > The OperatingSystem.isXXX() and Architecture.isYYY() methods replace > comparisons in the Platform class. > The checks

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v9]

2023-05-05 Thread Jan Lahoda
> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: > > - the pattern matching for switch and record patterns features are made > final, together with updates to tests. > - parenthesized patterns are removed. > - qualified enum constants are supported for case

Re: RFR: 8306927: Collator treats "v" and "w" as the same letter for Swedish language locale.

2023-05-05 Thread Alan Bateman
On Thu, 27 Apr 2023 12:32:19 GMT, Naoto Sato wrote: >> The rule was changed in 2006, the year Jave SE 6 was released. Though it >> looks like very much a corner case, it goes all the way back. I wonder if a >> CSR is needed? > >> The rule was changed in 2006, the year Jave SE 6 was released.