Re: RFR: 8294966: jdk.jartool sun.tools.jar.FingerPrint uses ASM to parse class jar entries [v2]

2023-03-09 Thread Adam Sotona
> 8294966: jdk.jartool sun.tools.jar.FingerPrint uses ASM to parse class jar > entries > This patch converts it to use Classfile API. > > Please review. > Thanks, > Adam Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 197

Re: RFR: 8294966: jdk.jartool sun.tools.jar.FingerPrint uses ASM to parse class jar entries [v2]

2023-03-09 Thread Adam Sotona
On Thu, 9 Mar 2023 18:16:49 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 197 commits: >> >> - Merge branch 'master' into JDK-8294966-jartool >> - Merge branch 'master' into JDK-8294966-j

Re: RFR: 8303919: Instant.ofEpochMilli says it can throw an exception that it can't

2023-03-09 Thread Alan Bateman
On Thu, 9 Mar 2023 22:07:17 GMT, Roger Riggs wrote: > I see your point, but no one has stumbled into/over it before. > Rationalizing here... > The presence of the exception is a reminder that there are values of epoch > milliseconds that `Instant` can not represent. > It is also the case that `l

Re: RFR: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test

2023-03-09 Thread Jaikiran Pai
On Thu, 9 Mar 2023 19:53:44 GMT, Eirik Bjorsnos wrote: > Please review this PR which brings the DataDescriptorSignatureMissing test > back to life. > > This test currently calls out to Python to create a test vector ZIP with a > Data Descriptor without the recommended but optional signature.

Re: RFR: 8294972: jdk.jlink internal plugins are heavily using ASM [v3]

2023-03-09 Thread Adam Sotona
On Thu, 9 Mar 2023 22:38:32 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 207 commits: >> >> - Merge branch 'master' into JDK-8294972-jlink-plugins >> - fixed SystemModulesPlugin formatti

Re: RFR: 8294972: jdk.jlink internal plugins are heavily using ASM [v3]

2023-03-09 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 with a new target base due to a merge or a rebase. The pull request now contains 207 commits: - Merge branch 'mas

Re: RFR: 8294971: jdk.jlink jdk.tools.jimage.JImageTask is using ASM to verify classes [v2]

2023-03-09 Thread Adam Sotona
> jdk.jlink jdk.tools.jimage.JImageTask is using ASM to verify classes > > This patch converts ASM calls to Classfile API. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 190 commits

Re: RFR: 8294972: jdk.jlink internal plugins are heavily using ASM [v2]

2023-03-09 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: Update src/jdk.jlink/share/classes/jdk/tools/

Re: RFR: 8294962: java.base jdk.internal.module package uses ASM to modify and write module-info.class [v2]

2023-03-09 Thread Adam Sotona
> 8294962: java.base jdk.internal.module package uses ASM to modify and write > module-info.class. > This patch converts it to use Classfile API. > > Please review. > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: Upd

Re: RFR: 8303814: getLastErrorString should avoid charset conversions

2023-03-09 Thread Chris Plummer
On Wed, 8 Mar 2023 11:30:27 GMT, Daniel Jeliński wrote: > This patch modifies the `getLastErrorString` method to return a `jstring`. > Thanks to that we can avoid unnecessary back and forth conversions between > Unicode and other charsets on Windows. > > Other changes include: > - the Windows

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread David Holmes
On Fri, 10 Mar 2023 05:09:49 GMT, Mandy Chung wrote: >> Don't we have a conditional compilation ability with these template files >> such that we can just generate true or false depending on the OS? > > Good point. `OperatingSystemProps.java` can be a OS-specific class like: > > src/java.base

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Mandy Chung
On Fri, 10 Mar 2023 02:51:43 GMT, David Holmes wrote: >> Using the naming from the build makes it clearer that there is a dependency >> between the build names and those in the template. > > Don't we have a conditional compilation ability with these template files > such that we can just genera

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread David Holmes
On Thu, 9 Mar 2023 17:18:35 GMT, Roger Riggs wrote: >> That would not yield a compile time constant. >> The TARGET_IS_XXX values must evaluate to compile time constants as >> evaluated by javac. > > Using the naming from the build makes it clearer that there is a dependency > between the build

Design principles of ConstantDesc.resolveConstantDesc

2023-03-09 Thread -
Hello, While looking at ConstantDesc.resolveConstantDesc, I find that user code cannot call resolveConstantDesc without extra casts for these types of constant descriptors: ClassDesc, MethodTypeDesc, MethodHandleDesc. Other constant descriptors can have their constants resolved without casts: Doubl

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread David Holmes
On Thu, 9 Mar 2023 17:12:53 GMT, Roger Riggs wrote: >>> I would argue that we should keep the replacement string matching the make >>> variable its getting the value from. It makes it easier to trace the origin >>> of the value. >> >> Then we can define a new make variable that will also allow

Re: RFR: 8303930: Fix ConstantUtils.skipOverFieldSignature void case return value [v2]

2023-03-09 Thread liach
> This typo doesn't allow creation of malformed ClassDesc or MethodTypeDesc, > but it produces an erroneous exception on certain inputs. Running > `java.lang.constant.MethodTypeDesc.ofDescriptor("(I[[[V)I")` in Jshell > 19.0.2 throws StringIndexOutOfBoundsException, and throws > IllegalArgu

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread David Holmes
The message from this sender included one or more files which could not be scanned for virus detection; do not open these files unless you are certain of the sender's intent. -- On Thu, 9 Mar 2023 16:12:26 GMT, Roger Riggs wrote:

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread David Holmes
On Thu, 9 Mar 2023 16:01:21 GMT, Roger Riggs wrote: >> src/java.base/share/classes/jdk/internal/misc/OperatingSystem.java line 74: >> >>> 72: * The Mac OS X Operating system. >>> 73: */ >>> 74: Mac("Mac OS X"), >> >> The current spelling used by Apple is "macOS", probably to align

Integrated: JDK-8302360 Atomic*.compareAndExchange Javadoc unclear

2023-03-09 Thread Viktor Klang
On Mon, 6 Mar 2023 13:23:59 GMT, Viktor Klang wrote: > I think the following proposal is very non-invasive and merely draws > attention to the fact that "witness value" is a specific term related to the > notion of these atomic methods. > > It's a small change which I think provides additional

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Justin King
On Thu, 9 Mar 2023 16:11:19 GMT, Roger Riggs wrote: > > Has this totally killed of BSD support on the JDK side? I thought building > > non-macOS BSD was still viable, but perhaps not - certainly not after this > > change. > > I haven't found any use of BSD and I don't think the build supports

DirectMethodHandleDesc for MethodHandles.classData/classDataAt

2023-03-09 Thread -
Hello, I request the addition of 2 common DirectMethodHandleDesc constants, for the bootstrap methods MethodHandles::classData and MethodHandles::classDataAt, in ConstantDescs. Since class data is almost exclusively accessed by generated bytecode only, having their condy bootstrap method available

Re: RFR: 8303392: Runtime.exec and ProcessBuilder.start should use System logger [v4]

2023-03-09 Thread Roger Riggs
> Runtime.exec and ProcessBuilder.start methods create a new operating system > process with the program and arguments. Many applications configure a logging > subsystem to monitor application events. Logging a process start message with > the program, arguments, and stack trace can identify the

RFR: 8303930: Fix ConstantUtils.skipOverFieldSignature void case return value

2023-03-09 Thread liach
This typo doesn't allow creation of malformed ClassDesc or MethodTypeDesc, but it produces an erroneous exception on certain inputs. Running `java.lang.constant.MethodTypeDesc.ofDescriptor("(I[[[V)I")` in Jshell 19.0.2 throws StringIndexOutOfBoundsException, and throws IllegalArgumentExcept

Re: RFR: 8294972: jdk.jlink internal plugins are heavily using ASM

2023-03-09 Thread Mandy Chung
On Thu, 9 Mar 2023 11:35:32 GMT, Adam Sotona wrote: > jdk.jlink internal plugins are heavily using ASM > > This patch converts ASM calls to Classfile API. > > Please review. > Thanks, > Adam Looks good in general. src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/IncludeLocalesPlug

Re: RFR: 8303919: Instant.ofEpochMilli says it can throw an exception that it can't

2023-03-09 Thread Roger Riggs
On Thu, 9 Mar 2023 19:49:29 GMT, Eamonn McManus wrote: > Instant.ofEpochMilli says this: > > > @throws DateTimeException if the instant exceeds the maximum or minimum > instant > > > But that can't happen. Even given `Long.MIN_VALUE` or `Long.MAX_VALUE` it > does not throw. That's already i

Re: RFR: 8294962: java.base jdk.internal.module package uses ASM to modify and write module-info.class

2023-03-09 Thread Uwe Schindler
On Fri, 25 Nov 2022 14:38:55 GMT, Adam Sotona wrote: > 8294962: java.base jdk.internal.module package uses ASM to modify and write > module-info.class. > This patch converts it to use Classfile API. > > Please review. > Thanks, > Adam src/java.base/share/classes/jdk/internal/module/ModuleInfoW

Re: RFR: 8294961: java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes [v2]

2023-03-09 Thread -
We can already accomplish that with type.describeConstable().orElseThrow(); and we can replace all map(ProxyGenerator::toClassDesc) calls with map(Class::describeConstable).map(Optional::orElseThrow) instead. On Thu, Mar 9, 2023 at 1:45 PM Brian Goetz wrote: > > > > src/java.base/share/classes/ja

Re: RFR: 8303919: Instant.ofEpochMilli says it can throw an exception that it can't

2023-03-09 Thread Eamonn McManus
On Thu, 9 Mar 2023 21:03:38 GMT, Roger Riggs wrote: > You're picking on a fine point here that is data dependent, and there's not > much value in changing it. Could you elaborate on this a bit? The way I see it, the argument to `ofEpochMillis` is a `long` with the same meaning as `System.curr

Re: RFR: 8294962: java.base jdk.internal.module package uses ASM to modify and write module-info.class

2023-03-09 Thread Mark Reinhold
On Fri, 25 Nov 2022 14:38:55 GMT, Adam Sotona wrote: > 8294962: java.base jdk.internal.module package uses ASM to modify and write > module-info.class. > This patch converts it to use Classfile API. > > Please review. > Thanks, > Adam Wouldn’t “Convert java.base/jdk.internal.module to use the

Re: RFR: 8303919: Instant.ofEpochMilli says it can throw an exception that it can't

2023-03-09 Thread Roger Riggs
On Thu, 9 Mar 2023 19:49:29 GMT, Eamonn McManus wrote: > Instant.ofEpochMilli says this: > > > @throws DateTimeException if the instant exceeds the maximum or minimum > instant > > > But that can't happen. Even given `Long.MIN_VALUE` or `Long.MAX_VALUE` it > does not throw. That's already i

Re: RFR: 8303392: Runtime.exec and ProcessBuilder.start should use System logger [v3]

2023-03-09 Thread Thomas Stuefe
On Thu, 9 Mar 2023 19:53:07 GMT, Roger Riggs wrote: >> Runtime.exec and ProcessBuilder.start methods create a new operating system >> process with the program and arguments. Many applications configure a >> logging subsystem to monitor application events. Logging a process start >> message wit

Re: RFR: 8303392: Runtime.exec and ProcessBuilder.start should use System logger [v2]

2023-03-09 Thread Roger Riggs
On Sun, 5 Mar 2023 06:14:49 GMT, Thomas Stuefe wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add javadoc @implNote to Runtime.exec and ProcessBuilder methods > > Hi Roger, > > I think to be even more useful it co

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Wed, 8 Mar 2023 19:15:16 GMT, Roger Riggs wrote: > Improvements to support OS specific customization for JDK internal use: > - To select values and code; allowing elimination of unused code and values > - Optionally evaluated by build processes, compilation, or archiving (i.e. > CDS) > - S

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Wed, 8 Mar 2023 23:23:38 GMT, Mandy Chung wrote: > I wonder if `jdk.internal.platform` would be a better home for > `OperatingSystem` class? jdk.internal.platform seems to be focused on information about container environments such as Docker. jdk.internal.misc already contains other classe

RFR: 8303922: build-test-lib target is broken

2023-03-09 Thread Eirik Bjorsnos
The Make target 'build-test-lib-target' is broken in a few ways: - make/test/BuildTestLib.gmk references the directory $(TEST_LIB_SOURCE_DIR)/sun which does not seem to exist. This can be fixed by removing the reference. - Some test-lib sources use preview-features which is not enabled by make/

RFR: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test

2023-03-09 Thread Eirik Bjorsnos
The message from this sender included one or more files which could not be scanned for virus detection; do not open these files unless you are certain of the sender's intent. -- Please review this PR which brings the DataDescript

RFR: 8303919: Instant.ofEpochMilli says it can throw an exception that it can't

2023-03-09 Thread Eamonn McManus
Instant.ofEpochMilli says this: @throws DateTimeException if the instant exceeds the maximum or minimum instant But that can't happen. Even given `Long.MIN_VALUE` or `Long.MAX_VALUE` it does not throw. That's already implicitly tested in [`TestInstant`](https://github.com/openjdk/jdk/blob/a9d

Re: RFR: 8303392: Runtime.exec and ProcessBuilder.start should use System logger [v3]

2023-03-09 Thread Roger Riggs
> Runtime.exec and ProcessBuilder.start methods create a new operating system > process with the program and arguments. Many applications configure a logging > subsystem to monitor application events. Logging a process start message with > the program, arguments, and stack trace can identify the

Re: RFR: 8294961: java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes [v2]

2023-03-09 Thread Brian Goetz
src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 390: 388: uniqueList.add(ex); 389: } 390: return uniqueList.stream().map(ex -> ClassDesc.ofDescriptor(ex.descriptorString())).toList(); It would be useful to add a helper method to convert Cla

Re: RFR: 8294962: java.base jdk.internal.module package uses ASM to modify and write module-info.class

2023-03-09 Thread liach
On Fri, 25 Nov 2022 14:38:55 GMT, Adam Sotona wrote: > 8294962: java.base jdk.internal.module package uses ASM to modify and write > module-info.class. > This patch converts it to use Classfile API. > > Please review. > Thanks, > Adam src/java.base/share/classes/jdk/internal/module/ModuleInfoW

Re: RFR: 8294962: java.base jdk.internal.module package uses ASM to modify and write module-info.class

2023-03-09 Thread Mandy Chung
On Fri, 25 Nov 2022 14:38:55 GMT, Adam Sotona wrote: > 8294962: java.base jdk.internal.module package uses ASM to modify and write > module-info.class. > This patch converts it to use Classfile API. > > Please review. > Thanks, > Adam src/java.base/share/classes/jdk/internal/module/ModuleInfoE

Re: RFR: 8303853: Update ISO 3166 country codes table

2023-03-09 Thread Naoto Sato
On Thu, 9 Mar 2023 17:50:32 GMT, Justin Lu wrote: > This PR incorporates all of the missing updates to ensure that > `java.util.LocaleISOData.isoCountryTable` is on par with the official [ISO > 3166 data](https://www.iso.org/obp/ui/#search/code/). Marked as reviewed by naoto (Reviewer). -

Re: RFR: 8294966: jdk.jartool sun.tools.jar.FingerPrint uses ASM to parse class jar entries

2023-03-09 Thread Mandy Chung
On Thu, 15 Dec 2022 14:56:03 GMT, Adam Sotona wrote: > 8294966: jdk.jartool sun.tools.jar.FingerPrint uses ASM to parse class jar > entries > This patch converts it to use Classfile API. > > Please review. > Thanks, > Adam make/modules/jdk.jartool/Java.gmk line 28: > 26: DISABLED_WARNINGS_jav

Re: RFR: 8294971: jdk.jlink jdk.tools.jimage.JImageTask is using ASM to verify classes

2023-03-09 Thread Adam Sotona
The message from this sender included one or more files which could not be scanned for virus detection; do not open these files unless you are certain of the sender's intent. -- On Thu, 9 Mar 2023 11:33:13 GMT, Adam Sotona wrote:

Integrated: 8294959: java.base java.lang.Module uses ASM to load module-info.class

2023-03-09 Thread Adam Sotona
On Fri, 25 Nov 2022 14:35:22 GMT, Adam Sotona wrote: > java.base java.lang.Module uses ASM to load module-info.class and this patch > converts it to use Classfile API. This pull request has now been integrated. Changeset: 595645c7 Author:Adam Sotona URL: https://git.openjdk.org/jdk

Re: RFR: 8303814: getLastErrorString should avoid charset conversions

2023-03-09 Thread Naoto Sato
On Wed, 8 Mar 2023 11:30:27 GMT, Daniel Jeliński wrote: > This patch modifies the `getLastErrorString` method to return a `jstring`. > Thanks to that we can avoid unnecessary back and forth conversions between > Unicode and other charsets on Windows. > > Other changes include: > - the Windows

Re: RFR: 8294971: jdk.jlink jdk.tools.jimage.JImageTask is using ASM to verify classes

2023-03-09 Thread Mandy Chung
On Thu, 9 Mar 2023 11:33:13 GMT, Adam Sotona wrote: > jdk.jlink jdk.tools.jimage.JImageTask is using ASM to verify classes > > This patch converts ASM calls to Classfile API. > > Please review. > > Thanks, > Adam I wonder if it's worth to provide a convenient method to verify a classfile by

Re: RFR: 8294959: java.base java.lang.Module uses ASM to load module-info.class

2023-03-09 Thread Mandy Chung
On Fri, 25 Nov 2022 14:35:22 GMT, Adam Sotona wrote: > java.base java.lang.Module uses ASM to load module-info.class and this patch > converts it to use Classfile API. LGTM - Marked as reviewed by mchung (Reviewer). PR: https://git.openjdk.org/jdk/pull/11367

Re: RFR: 8294962: java.base jdk.internal.module package uses ASM to modify and write module-info.class

2023-03-09 Thread Mandy Chung
On Thu, 9 Mar 2023 10:59:25 GMT, Adam Sotona wrote: >> src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java line >> 146: >> >>> 144: >>> 145: // packages >>> 146: md.packages().stream().map(PackageDesc::of).toList(), >> >> When writing `module_

RFR: 8303853: Update ISO 3166 country codes table

2023-03-09 Thread Justin Lu
This PR incorporates all of the missing updates to ensure that `java.util.LocaleISOData.isoCountryTable` is on par with the official [ISO 3166 data](https://www.iso.org/obp/ui/#search/code/). - Commit messages: - 2006-03-29 fix - 2007-09-21 fix - 2003-07-23 fix - 2013-02-06 upda

Re: RFR: 8294961: java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes [v5]

2023-03-09 Thread Mandy Chung
On Thu, 9 Mar 2023 15:53:25 GMT, Adam Sotona wrote: >> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy >> classes and this patch converts it to use Classfile API. >> >> Please review. >> >> Thank you, >> Adam > > Adam Sotona has updated the pull request with a new target

RFR: 8294972: jdk.jlink internal plugins are heavily using ASM

2023-03-09 Thread Adam Sotona
jdk.jlink internal plugins are heavily using ASM This patch converts ASM calls to Classfile API. Please review. Thanks, Adam - Commit messages: - Merge branch 'master' into JDK-8294972-jlink-plugins - renamed variables in SystemModulesPlugin - 8294972: jdk.jlink internal plugins

RFR: 8294971: jdk.jlink jdk.tools.jimage.JImageTask is using ASM to verify classes

2023-03-09 Thread Adam Sotona
The message from this sender included one or more files which could not be scanned for virus detection; do not open these files unless you are certain of the sender's intent. -- jdk.jlink jdk.tools.jimage.JImageTask is using ASM t

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

2023-03-09 Thread Martin Doerr
On Mon, 6 Mar 2023 16:38:37 GMT, Jorn Vernee wrote: >> @JornVernee: Thanks a lot for your detailed review! I have quite a few TODOs >> which include: >> - Include my tests for the HFA corner cases. >> - Try to improve handling of the overlapping registers as you suggested. >> - Check nesting of

Re: RFR: 8294966: jdk.jartool sun.tools.jar.FingerPrint uses ASM to parse class jar entries

2023-03-09 Thread Adam Sotona
On Tue, 7 Mar 2023 20:47:31 GMT, Mandy Chung wrote: >> 8294966: jdk.jartool sun.tools.jar.FingerPrint uses ASM to parse class jar >> entries >> This patch converts it to use Classfile API. >> >> Please review. >> Thanks, >> Adam > > src/jdk.jartool/share/classes/sun/tools/jar/FingerPrint.java l

RFR: 8294966: jdk.jartool sun.tools.jar.FingerPrint uses ASM to parse class jar entries

2023-03-09 Thread Adam Sotona
8294966: jdk.jartool sun.tools.jar.FingerPrint uses ASM to parse class jar entries This patch converts it to use Classfile API. Please review. Thanks, Adam - Commit messages: - Merge branch 'master' into JDK-8294966-jartool - FingerPrint fixes - Update src/jdk.jartool/share/class

Re: RFR: 8294966: jdk.jartool sun.tools.jar.FingerPrint uses ASM to parse class jar entries

2023-03-09 Thread Mandy Chung
On Thu, 15 Dec 2022 14:56:03 GMT, Adam Sotona wrote: > 8294966: jdk.jartool sun.tools.jar.FingerPrint uses ASM to parse class jar > entries > This patch converts it to use Classfile API. > > Please review. > Thanks, > Adam src/jdk.jartool/share/classes/sun/tools/jar/FingerPrint.java line 42:

RFR: 8294974: jdk.jshell jdk.jshell.execution.LocalExecutionControl uses ASM to instrument classes

2023-03-09 Thread Adam Sotona
8294974: jdk.jshell jdk.jshell.execution.LocalExecutionControl uses ASM to instrument classes This patch converts it to use Classfile API. Please review. Thanks, Adam - Commit messages: - Merge branch 'master' into JDK-8294974-jshell - Merge branch 'JDK-8294982' into JDK-8294974

Re: RFR: 8294962: java.base jdk.internal.module package uses ASM to modify and write module-info.class

2023-03-09 Thread Adam Sotona
On Wed, 1 Mar 2023 01:19:24 GMT, Mandy Chung wrote: >> 8294962: java.base jdk.internal.module package uses ASM to modify and write >> module-info.class. >> This patch converts it to use Classfile API. >> >> Please review. >> Thanks, >> Adam > > src/java.base/share/classes/jdk/internal/module/Mo

Re: RFR: 8294962: java.base jdk.internal.module package uses ASM to modify and write module-info.class

2023-03-09 Thread Adam Sotona
On Fri, 25 Nov 2022 14:43:32 GMT, Alan Bateman wrote: >> 8294962: java.base jdk.internal.module package uses ASM to modify and write >> module-info.class. >> This patch converts it to use Classfile API. >> >> Please review. >> Thanks, >> Adam > > src/java.base/share/classes/jdk/internal/module/

Re: RFR: 8294962: java.base jdk.internal.module package uses ASM to modify and write module-info.class

2023-03-09 Thread Mandy Chung
On Fri, 25 Nov 2022 14:38:55 GMT, Adam Sotona wrote: > 8294962: java.base jdk.internal.module package uses ASM to modify and write > module-info.class. > This patch converts it to use Classfile API. > > Please review. > Thanks, > Adam src/java.base/share/classes/jdk/internal/module/ModuleInfoW

Re: RFR: 8294962: java.base jdk.internal.module package uses ASM to modify and write module-info.class

2023-03-09 Thread Alan Bateman
On Fri, 25 Nov 2022 14:38:55 GMT, Adam Sotona wrote: > 8294962: java.base jdk.internal.module package uses ASM to modify and write > module-info.class. > This patch converts it to use Classfile API. > > Please review. > Thanks, > Adam src/java.base/share/classes/jdk/internal/module/ModuleInfoE

RFR: 8294962: java.base jdk.internal.module package uses ASM to modify and write module-info.class

2023-03-09 Thread Adam Sotona
8294962: java.base jdk.internal.module package uses ASM to modify and write module-info.class. This patch converts it to use Classfile API. Please review. Thanks, Adam - Commit messages: - Merge branch 'master' into JDK-8294962-internal-module - fixed jdk.internal.classfile.java.l

Re: RFR: 8294961: java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes [v3]

2023-03-09 Thread liach
On Thu, 9 Mar 2023 11:15:44 GMT, Adam Sotona wrote: >> src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 661: >> >>> 659: */ >>> 660: private void generateMethod(ClassBuilder clb, ClassDesc >>> className) { >>> 661: MethodTypeDesc desc = MethodT

Re: RFR: 8294961: java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes [v3]

2023-03-09 Thread Adam Sotona
On Sun, 19 Feb 2023 05:23:20 GMT, liach wrote: >> Adam Sotona 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 six additional >> commits since th

Re: RFR: 8294961: java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes [v3]

2023-03-09 Thread liach
On Thu, 9 Feb 2023 18:48:19 GMT, Adam Sotona wrote: >> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy >> classes and this patch converts it to use Classfile API. >> >> Please review. >> >> Thank you, >> Adam > > Adam Sotona has updated the pull request with a new target

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

2023-03-09 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 [JDK-8299736](https://bugs.openjdk.org/browse

Re: RFR: 8294959: java.base java.lang.Module uses ASM to load module-info.class

2023-03-09 Thread Mandy Chung
On Fri, 25 Nov 2022 14:35:22 GMT, Adam Sotona wrote: > java.base java.lang.Module uses ASM to load module-info.class and this patch > converts it to use Classfile API. This change looks good. - PR: https://git.openjdk.org/jdk/pull/11367

RFR: 8294959: java.base java.lang.Module uses ASM to load module-info.class

2023-03-09 Thread Adam Sotona
java.base java.lang.Module uses ASM to load module-info.class and this patch converts it to use Classfile API. - Commit messages: - Merge branch 'master' into JDK-8294959-module - Merge branch 'JDK-8294982' into JDK-8294959 - removed obsolete javadoc from implementation classes -

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Thu, 9 Mar 2023 16:05:56 GMT, Roger Riggs wrote: >> src/java.base/share/classes/jdk/internal/misc/OperatingSystem.java line 98: >> >>> 96: @ForceInline >>> 97: public static boolean isLinux() { >>> 98: return OperatingSystemProps.TARGET_OS_IS_LINUX; >> >> Suggestion: >> >>

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Thu, 9 Mar 2023 17:07:28 GMT, Mandy Chung wrote: >> The one in the template file is independent to the build variables. > >> I would argue that we should keep the replacement string matching the make >> variable its getting the value from. It makes it easier to trace the origin >> of the val

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
Hi Justin, How would I go about building one of those? Or knowing what the dependencies are? Thanks, Roger On 3/8/23 11:02 PM, Justin King wrote: Let's please not kill generic BSD support if at all possible. There is NetBSD, OpenBSD, FreeBSD, and DragonflyBSD. I know FreeBSD and NetBSD hav

Re: RFR: 8299088: ClassLoader.c contains 2 JNI exception pending defect groups

2023-03-09 Thread Naoto Sato
On Wed, 8 Mar 2023 22:02:22 GMT, Justin Lu wrote: > This PR removes the JNI Exception pending defect groups in ClassLoader.c. > > `getUTF()` throws an exception and subsequently returns `null`; the exception > should either be cleared, or control returned to the JVM. > `JNU_ThrowOutOfMemoryEr

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Mandy Chung
On Thu, 9 Mar 2023 17:03:05 GMT, Mandy Chung wrote: >> The symbol has to match the build usage of OPENJDK_TARGET_OS, not the name. > > The one in the template file is independent to the build variables. > I would argue that we should keep the replacement string matching the make > variable its

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Mandy Chung
On Thu, 9 Mar 2023 16:03:37 GMT, Roger Riggs wrote: >> I would argue that we should keep the replacement string matching the make >> variable its getting the value from. It makes it easier to trace the origin >> of the value. >> >> Using the terms `CURRENT` or `TARGET` inside the java class i

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Wed, 8 Mar 2023 23:09:06 GMT, Mandy Chung wrote: >> Improvements to support OS specific customization for JDK internal use: >> - To select values and code; allowing elimination of unused code and values >> - Optionally evaluated by build processes, compilation, or archiving (i.e. >> CDS) >>

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Thu, 9 Mar 2023 00:45:02 GMT, Naoto Sato wrote: >> Improvements to support OS specific customization for JDK internal use: >> - To select values and code; allowing elimination of unused code and values >> - Optionally evaluated by build processes, compilation, or archiving (i.e. >> CDS) >>

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Thu, 9 Mar 2023 15:24:04 GMT, Erik Joelsson wrote: >> src/java.base/share/classes/jdk/internal/misc/OperatingSystemProps.java.template >> line 39: >> >>> 37: >>> 38: // Index/ordinal of the current OperatingSystem enum as substituted >>> by the build >>> 39: static final int TARGET

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Wed, 8 Mar 2023 23:11:34 GMT, Mandy Chung wrote: >> Improvements to support OS specific customization for JDK internal use: >> - To select values and code; allowing elimination of unused code and values >> - Optionally evaluated by build processes, compilation, or archiving (i.e. >> CDS) >>

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Wed, 8 Mar 2023 22:49:05 GMT, Raffaello Giulietti wrote: >> Improvements to support OS specific customization for JDK internal use: >> - To select values and code; allowing elimination of unused code and values >> - Optionally evaluated by build processes, compilation, or archiving (i.e. >

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Thu, 9 Mar 2023 02:51:24 GMT, David Holmes wrote: > Has this totally killed of BSD support on the JDK side? I thought building > non-macOS BSD was still viable, but perhaps not - certainly not after this > change. I haven't found any use of BSD and I don't think the build supports a BSD bui

Re: RFR: 8303001: Add test for re-entrant upcalls

2023-03-09 Thread Maurizio Cimadamore
On Wed, 8 Mar 2023 15:51:05 GMT, Jorn Vernee wrote: > Add a test that tests re-entrant upcalls, which is a use-case that is > uncovered by testing until now. Nice test! - Marked as reviewed by mcimadamore (Reviewer). PR: https://git.openjdk.org/jdk/pull/12927

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v6]

2023-03-09 Thread Paul Sandoz
On Thu, 2 Mar 2023 11:22:26 GMT, Viktor Klang wrote: >> I noticed when looking at the code that there was no real need to use a CHM >> to perform the tracking of activation in an ordered fashion on >> ForEachOrderedTask, but instead a VarHandle can be used, reducing >> allocations and indirect

RFR: 8303001: Add test for re-entrant upcalls

2023-03-09 Thread Jorn Vernee
Add a test that tests re-entrant upcalls, which is a use-case that is uncovered by testing until now. - Commit messages: - add reentrant upcalls test Changes: https://git.openjdk.org/jdk/pull/12927/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12927&range=00 Issue: http

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

2023-03-09 Thread Martin Doerr
On Wed, 1 Mar 2023 06:27:19 GMT, Martin Doerr wrote: >> src/java.base/share/classes/jdk/internal/foreign/abi/ppc64/CallArranger.java >> line 68: >> >>> 66: public abstract class CallArranger { >>> 67: // Linux PPC64 Little Endian uses ABI v2. >>> 68: private static final boolean useABIv

Re: RFR: 8294961: java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes [v5]

2023-03-09 Thread Adam Sotona
> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes > and this patch converts it to use Classfile API. > > This pull request suppose to chain on the 8294982: Implementation of > Classfile API https://github.com/openjdk/jdk/pull/10982 > > Please review. > > Thank you

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

2023-03-09 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 [JDK-8299736](https://bugs.openjdk.org/browse

Integrated: 8294982: Implementation of Classfile API

2023-03-09 Thread Adam Sotona
On Fri, 4 Nov 2022 12:38:04 GMT, Adam Sotona wrote: > This is root pull request with Classfile API implementation, tests and > benchmarks initial drop into JDK. > > Following pull requests consolidating JDK class files parsing, generating, > and transforming ([JDK-8294957](https://bugs.openjdk

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Erik Joelsson
On Wed, 8 Mar 2023 22:21:08 GMT, Mandy Chung wrote: >> Improvements to support OS specific customization for JDK internal use: >> - To select values and code; allowing elimination of unused code and values >> - Optionally evaluated by build processes, compilation, or archiving (i.e. >> CDS) >>

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Erik Joelsson
On Wed, 8 Mar 2023 19:15:16 GMT, Roger Riggs wrote: > Improvements to support OS specific customization for JDK internal use: > - To select values and code; allowing elimination of unused code and values > - Optionally evaluated by build processes, compilation, or archiving (i.e. > CDS) > - S

Re: RFR: 8303863: RISC-V: TestArrayStructs.java fails after JDK-8303604

2023-03-09 Thread Jorn Vernee
On Thu, 9 Mar 2023 14:39:55 GMT, Feilong Jiang wrote: > [JDK-8303604](https://bugs.openjdk.org/browse/JDK-8303604) fixes an issue > with passing structs whose size is not a power of two on SysV and AArch64 > platforms. The same issue happens on RISC-V. > > Modifications are unnecessary for `ST

Re: RFR: JDK-8302360 Atomic*.compareAndExchange Javadoc unclear [v2]

2023-03-09 Thread Viktor Klang
On Tue, 7 Mar 2023 10:23:52 GMT, Viktor Klang wrote: >> I think the following proposal is very non-invasive and merely draws >> attention to the fact that "witness value" is a specific term related to the >> notion of these atomic methods. >> >> It's a small change which I think provides addit

RFR: 8303863: RISC-V: TestArrayStructs.java fails after JDK-8303604

2023-03-09 Thread Feilong Jiang
The message from this sender included one or more files which could not be scanned for virus detection; do not open these files unless you are certain of the sender's intent. -- [JDK-8303604](https://bugs.openjdk.org/browse/JDK-83

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

2023-03-09 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 [JDK-8299736](https://bugs.openjdk.org/browse

Re: RFR: 8303891: Zip64SizeTest could use a sparse file [v2]

2023-03-09 Thread Eirik Bjorsnos
> 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 [JDK-8259866](https://bugs.openjdk.org/browse/JDK-8259866) > > Using a sparse file reduces the disk space r

RFR: 8303891: Zip64SizeTest could use a sparse file

2023-03-09 Thread Eirik Bjorsnos
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 [JDK-8259866](https://bugs.openjdk.org/browse/JDK-8259866) Using a sparse file reduces the disk space requirements o

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v2]

2023-03-09 Thread Viktor Klang
On Fri, 17 Feb 2023 16:48:27 GMT, Paul Sandoz wrote: >> Viktor Klang has refreshed the contents of this pull request, and previous >> commits have been removed. Incremental views are not available. > > That's a nice find, looks good. (Update the year in the copyright header.) @PaulSandoz Ready

Re: RFR: 8303814: getLastErrorString should avoid charset conversions

2023-03-09 Thread Daniel Jeliński
On Wed, 8 Mar 2023 23:23:33 GMT, Chris Plummer wrote: >> This patch modifies the `getLastErrorString` method to return a `jstring`. >> Thanks to that we can avoid unnecessary back and forth conversions between >> Unicode and other charsets on Windows. >> >> Other changes include: >> - the Wind