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

2023-03-13 Thread Glavo
On Fri, 10 Mar 2023 21:21:56 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)

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

2023-03-13 Thread Jorn Vernee
On Mon, 13 Mar 2023 20:57:22 GMT, Martin Doerr wrote: > Note that argument and return value passing works. I'm getting all values > back. So, the native side seems to be ok. Only (one or two) values in > `returnBox` are broken. You mean you tested by returning each element of the array one by

RFR: 8294977: Convert test/jdk/java tests from ASM library to Classfile API

2023-03-13 Thread liach
Summaries: 1. A few recommendations about updating the constant API is made at https://mail.openjdk.org/pipermail/classfile-api-dev/2023-March/000233.html and I may update this patch shall the API changes be integrated before 2. One ASM library-specific test, `LambdaAsm` is removed. Others have

Re: RFR: 8303910: jdk/classfile/CorpusTest.java failed 1 of 6754 tests [v2]

2023-03-13 Thread Jaikiran Pai
On Mon, 13 Mar 2023 21:02:51 GMT, Adam Sotona wrote: >> jdk/classfile/CorpusTest.java rarely fails in 1 of 6754 parametrised >> parallel junit tests >> >> The root cause seems to be thread-unsafe lazy initialisation of >> `TypeKind.newarraycodeToTypeTag` in `TypeKind::fromNewArrayCode`.

Re: RFR: 8303018: Unicode Emoji Properties

2023-03-13 Thread Phil Race
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 >

Re: RFR: 8304031: Classfile API cannot encode Primitive Class as Condy

2023-03-13 Thread liach
On Mon, 13 Mar 2023 23:46:58 GMT, ExE Boss wrote: > Arguably, the `instanceof DynamicConstantDesc` check should go first, as  > there can be only one superclass, but multiple implemented interfaces. I think this ordering is rather ranked by their relative frequency in bytecode. Having integer

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

2023-03-13 Thread Mandy Chung
On Mon, 13 Mar 2023 16:22:30 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which proposes to fix the issue >> reported in https://bugs.openjdk.org/browse/JDK-8206890? >> >> The `jlink` command allows a `--endian` option to specify the byte order in >> the generated

Re: String encoding to ByteBuffer

2023-03-13 Thread Brian Burkhalter
Redirecting to nio-dev which is the more appropriate forum for this topic. > On Feb 26, 2023, at 3:39 PM, Carl M wrote: > > I'm looking into adding a fast path case for encoding Strings into > ByteBuffers, and wanted to get feedback on a possible approach. My use case > is taking

Re: RFR: 8303910: jdk/classfile/CorpusTest.java failed 1 of 6754 tests [v2]

2023-03-13 Thread liach
On Mon, 13 Mar 2023 21:02:51 GMT, Adam Sotona wrote: >> jdk/classfile/CorpusTest.java rarely fails in 1 of 6754 parametrised >> parallel junit tests >> >> The root cause seems to be thread-unsafe lazy initialisation of >> `TypeKind.newarraycodeToTypeTag` in `TypeKind::fromNewArrayCode`.

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

2023-03-13 Thread Roger Riggs
On Fri, 10 Mar 2023 05:42:18 GMT, David Holmes wrote: >> Good point. `OperatingSystemProps.java` can be a OS-specific class like: >> >> src/java.base/macosx/classes/jdk/internal/misc/OperatingSystemProps.java >> linux/classes/jdk/internal/misc/OperatingSystemProps.java >>

RFR: 8303018: Unicode Emoji Properties

2023-03-13 Thread Naoto Sato
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 currently existing ad-hoc emoji implementation in regex. A CSR has

Re: RFR: 8303910: jdk/classfile/CorpusTest.java failed 1 of 6754 tests [v2]

2023-03-13 Thread Adam Sotona
> jdk/classfile/CorpusTest.java rarely fails in 1 of 6754 parametrised parallel > junit tests > > The root cause seems to be thread-unsafe lazy initialisation of > `TypeKind.newarraycodeToTypeTag` in `TypeKind::fromNewArrayCode`. Provided > patch replaces that lazy-initialized helper array

Re: RFR: 8303910: jdk/classfile/CorpusTest.java failed 1 of 6754 tests [v2]

2023-03-13 Thread Adam Sotona
On Mon, 13 Mar 2023 19:04:45 GMT, liach wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> throwing IllegalArgumentException instead of IllegalStateException > >

Re: RFR: 8294962: Convert java.base/jdk.internal.module package to use the Classfile API to modify and write module-info.class [v4]

2023-03-13 Thread Mandy Chung
On Mon, 13 Mar 2023 19:59:18 GMT, Adam Sotona wrote: >>> I think it would be better to change is so that calling it with >>> ModuleAttribute will emit a Module attribute. The overloads that take a >>> Module plus a set of packages can emit a Module + ModulePackage >>> unconditionally. >> >>

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

2023-03-13 Thread Martin Doerr
On Mon, 13 Mar 2023 16:37:18 GMT, Jorn Vernee wrote: > > I'm currently wondering about the TestArrayStructs failures. Passing arrays > > with up to 7 elements seems to work fine. When I pass 8 elements, the last > > element of capturedArgs gets observed as 0. When I pass more than 8 > >

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v5]

2023-03-13 Thread Doug Simon
On Mon, 13 Mar 2023 19:23:39 GMT, Vladimir Kozlov wrote: >> Doug Simon has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains seven commits: >> >> - Merge remote-tracking branch 'openjdk-jdk/master' into JDK-8303431 >> - switched to

Re: RFR: 8288730: Lookup::accessClass(Class) should be generic on the type of targetClass

2023-03-13 Thread Mandy Chung
On Sat, 11 Mar 2023 03:28:16 GMT, liach wrote: > Parameterizes `Lookup::accessClass` and `Lookup::ensureInitialized`. Updated > an applicable use-site within JDK to benefit from this patch. This change looks fine. Adding a type parameter of a method is binary compatible. -

Re: RFR: 8294962: Convert java.base/jdk.internal.module package to use the Classfile API to modify and write module-info.class [v4]

2023-03-13 Thread Adam Sotona
On Mon, 13 Mar 2023 19:18:26 GMT, Mandy Chung wrote: >>> I see, I'll move the "packages magic" back from Classfile API to the >>> `ModuleInfoWriter` and correct the API accordingly. >> >> I would need to check the history in the jake repo but I think it dates from >> a prototype version of

Re: RFR: 8304031: Classfile API cannot encode Primitive Class as Condy

2023-03-13 Thread Adam Sotona
On Mon, 13 Mar 2023 08:13:44 GMT, liach wrote: > Without this patch, the Classfile API tries to encode PrimitiveClassDesc as > CONSTANT_Class_info and error in `toInternalName`. Looks good, thanks for catching and fixing it. - Marked as reviewed by asotona (Committer). PR:

Re: RFR: 8294962: Convert java.base/jdk.internal.module package to use the Classfile API to modify and write module-info.class [v4]

2023-03-13 Thread Mandy Chung
On Mon, 13 Mar 2023 18:46:28 GMT, Alan Bateman wrote: >> I see, I'll move the "packages magic" back from Classfile API to the >> `ModuleInfoWriter` and correct the API accordingly. > >> I see, I'll move the "packages magic" back from Classfile API to the >> `ModuleInfoWriter` and correct the

Re: RFR: 8303910: jdk/classfile/CorpusTest.java failed 1 of 6754 tests

2023-03-13 Thread liach
On Mon, 13 Mar 2023 18:54:11 GMT, Adam Sotona wrote: > jdk/classfile/CorpusTest.java rarely fails in 1 of 6754 parametrised parallel > junit tests > > The root cause seems to be thread-unsafe lazy initialisation of > `TypeKind.newarraycodeToTypeTag` in `TypeKind::fromNewArrayCode`. Provided

RFR: 8303910: jdk/classfile/CorpusTest.java failed 1 of 6754 tests

2023-03-13 Thread Adam Sotona
jdk/classfile/CorpusTest.java rarely fails in 1 of 6754 parametrised parallel junit tests The root cause seems to be thread-unsafe lazy initialisation of `TypeKind.newarraycodeToTypeTag` in `TypeKind::fromNewArrayCode`. Provided patch replaces that lazy-initialized helper array with switch

Re: RFR: 8294962: Convert java.base/jdk.internal.module package to use the Classfile API to modify and write module-info.class [v4]

2023-03-13 Thread Alan Bateman
On Mon, 13 Mar 2023 17:15:21 GMT, Adam Sotona wrote: > I see, I'll move the "packages magic" back from Classfile API to the > `ModuleInfoWriter` and correct the API accordingly. I would need to check the history in the jake repo but I think it dates from a prototype version of that attribute

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

2023-03-13 Thread Joe Wang
On Mon, 13 Mar 2023 11:34:50 GMT, Alan Bateman wrote: >> Joe Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> clean up tests; fix copy error. > > src/java.xml/share/classes/module-info.java line 89: > >> 87: * the StAX factories

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

2023-03-13 Thread Joe Wang
On Mon, 13 Mar 2023 11:28:15 GMT, Alan Bateman wrote: >> Joe Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> clean up tests; fix copy error. > > src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java line 139: > >> 137:

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

2023-03-13 Thread Joe Wang
On Mon, 13 Mar 2023 10:03:52 GMT, Alan Bateman wrote: >> Joe Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> clean up tests; fix copy error. > > src/java.xml/share/classes/javax/xml/catalog/CatalogFeatures.java line 183: > >> 181:

Re: RFR: 8303022: "assert(allocates2(pc)) failed: not in CodeBuffer memory" When linking downcall handle [v3]

2023-03-13 Thread Vladimir Kozlov
On Sat, 11 Mar 2023 00:15:10 GMT, Vladimir Kozlov wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> RISCV changes > > Good. > @vnkozlov Does this need another reviewer? Yes, it is not trivial - PR:

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

2023-03-13 Thread Joe Wang
On Mon, 13 Mar 2023 10:01:21 GMT, Alan Bateman wrote: >> Joe Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> clean up tests; fix copy error. > > src/java.xml/share/classes/javax/xml/catalog/CatalogFeatures.java line 171: > >> 169:

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

2023-03-13 Thread Joe Wang
On Mon, 13 Mar 2023 09:58:51 GMT, Alan Bateman wrote: >> Joe Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> clean up tests; fix copy error. > > src/java.xml/share/classes/javax/xml/XMLConstants.java line 247: > >> 245: *

Re: RFR: 8294962: Convert java.base/jdk.internal.module package to use the Classfile API to modify and write module-info.class [v4]

2023-03-13 Thread Adam Sotona
On Mon, 13 Mar 2023 14:18:55 GMT, Alan Bateman wrote: >> Or another approach for the specific use cases might be to use >> `Classfile::buildModule` with empty list of packages and then provide custom >> `ModulePackagesAttribute` to the handler directly. > >> `Classfile::buildModule` is a

Re: RFR: 8303022: "assert(allocates2(pc)) failed: not in CodeBuffer memory" When linking downcall handle [v3]

2023-03-13 Thread Jorn Vernee
On Sat, 11 Mar 2023 00:15:10 GMT, Vladimir Kozlov wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> RISCV changes > > Good. @vnkozlov Does this need another reviewer? - PR:

Re: RFR: 8303917: Update ISO 639 language codes table [v2]

2023-03-13 Thread Justin Lu
> This PR modifies `java.util.LocaleISOData.isoLanguageTable` to include (name > only) changes from up-to-date [ISO 639 > data](http://www.loc.gov/standards/iso639-2/php/code_list.php.). > > In addition, this PR updates the ISO 639 data (generated in 1999) in > `Bug4175998Test.java`. This

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

2023-03-13 Thread Jorn Vernee
On Thu, 9 Mar 2023 17:29:37 GMT, Martin Doerr wrote: >> 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 >>

Re: RFR: 8303814: getLastErrorString should avoid charset conversions [v3]

2023-03-13 Thread Naoto Sato
On Mon, 13 Mar 2023 15:55: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

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

2023-03-13 Thread Jorn Vernee
On Mon, 13 Mar 2023 16:20:22 GMT, Martin Doerr wrote: > I guess I should add a couple of Upcalls to my new test. Otherwise, I have > only planned to fix TestArrayStructs. Further changes (and maybe new tests) > can still get done when working on Big Endian / AIX or when there is a demand.

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

2023-03-13 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 209 commits: - Merge branch

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

2023-03-13 Thread Martin Doerr
On Sat, 11 Mar 2023 02:20:31 GMT, Jorn Vernee wrote: >> @JornVernee: Thanks! I've merged in your changes. TestArrayStructs is not >> yet completely working. I will need to investigate. I think I've done most >> other things you had requested. You may want to take a look at my recent >>

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

2023-03-13 Thread Jaikiran Pai
On Mon, 13 Mar 2023 15:51:46 GMT, Alan Bateman wrote: >>> Do you think this cross platform image creation would be relevant/used with >>> exploded builds and if so, should I update the PR to address it? >> >> Actually, now that I think about it, this `isJavaBaseFromCurrentPlatform()` >>

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

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

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

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

Re: RFR: 8304031: Classfile API cannot encode Primitive Class as Condy

2023-03-13 Thread liach
On Mon, 13 Mar 2023 08:13:44 GMT, liach wrote: > Without this patch, the Classfile API tries to encode PrimitiveClassDesc as > CONSTANT_Class_info and error in `toInternalName`. @asotona Would you mind review this? - PR: https://git.openjdk.org/jdk/pull/12996

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

2023-03-13 Thread Jaikiran Pai
On Mon, 13 Mar 2023 15:30:59 GMT, Alan Bateman wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> no need for security manager checks in jlink > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java

Re: RFR: 8303814: getLastErrorString should avoid charset conversions [v2]

2023-03-13 Thread Daniel Jeliński
On Mon, 13 Mar 2023 15:05:04 GMT, Roger Riggs wrote: >> Daniel Jeliński has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Address review comments >> - Mention that the returned text is static and thread safe >> - Define buffer size

Integrated: 8294974: Convert jdk.jshell/jdk.jshell.execution.LocalExecutionControl to use the Classfile API to instrument classes

2023-03-13 Thread Adam Sotona
On Tue, 29 Nov 2022 12:27:15 GMT, Adam Sotona wrote: > 8294974: jdk.jshell jdk.jshell.execution.LocalExecutionControl uses ASM to > instrument classes > This patch converts it to use Classfile API. > > Please review. > Thanks, > Adam This pull request has now been integrated. Changeset:

Re: RFR: 8303814: getLastErrorString should avoid charset conversions [v3]

2023-03-13 Thread Daniel Jeliński
> 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 implementation of `getLastErrorString` no longer checks

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

2023-03-13 Thread Alan Bateman
On Mon, 13 Mar 2023 15:34:51 GMT, Jaikiran Pai wrote: >>> jlink doesn't run with a security manager so no need for the >>> AccessController.doPriv. >> >> Thank you for that detail - I've now removed the SecurityManager checks from >> this newly introduced code. >> >>> Assuming the name of

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

2023-03-13 Thread Jaikiran Pai
On Mon, 13 Mar 2023 15:28:49 GMT, Jaikiran Pai wrote: > Do you think this cross platform image creation would be relevant/used with > exploded builds and if so, should I update the PR to address it? Actually, now that I think about it, this `isJavaBaseFromCurrentPlatform()` method will get

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

2023-03-13 Thread Jaikiran Pai
On Mon, 13 Mar 2023 14:42:26 GMT, Alan Bateman wrote: > jlink doesn't run with a security manager so no need for the > AccessController.doPriv. Thank you for that detail - I've now removed the SecurityManager checks from this newly introduced code. > Assuming the name of the jmod file is

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

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

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

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

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

2023-03-13 Thread Alan Bateman
On Mon, 13 Mar 2023 14:59:13 GMT, Jaikiran Pai wrote: > So that would then mean updating the build file where we create these jmod > file(s) to use a value for `--target-platform` that even includes the > endianness in the string value, example: `aix-ppc64-big` and > `macos-aarch64-little`.

Re: RFR: 8303814: getLastErrorString should avoid charset conversions [v2]

2023-03-13 Thread Roger Riggs
On Mon, 13 Mar 2023 09:48:19 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

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

2023-03-13 Thread Alan Bateman
On Fri, 10 Mar 2023 12:45:05 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 with a new target base due to a > merge or a

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

2023-03-13 Thread Jaikiran Pai
On Mon, 13 Mar 2023 14:43:35 GMT, Alan Bateman wrote: > To add to Jim's comment, the other thing we think about here is mapping the > value of the ModuleTarget attribute to endianness, meaning don't parse it to > extract the architecture. So that would then mean updating the build file where

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

2023-03-13 Thread Justin King
On Fri, 10 Mar 2023 21:21:56 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)

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

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

Re: RFR: 8294962: Convert java.base/jdk.internal.module package to use the Classfile API to modify and write module-info.class [v4]

2023-03-13 Thread Alan Bateman
On Mon, 13 Mar 2023 13:47:31 GMT, Adam Sotona wrote: >> `Classfile::buildModule` is a helper method simplifying the major use case - >> building valid module with minimal user effort and knowledge. It emits >> `ModulePackages` if there are any packages specified and not exported nor >>

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

2023-03-13 Thread Roger Riggs
On Fri, 10 Mar 2023 21:21:56 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)

Re: RFR: 8294962: Convert java.base/jdk.internal.module package to use the Classfile API to modify and write module-info.class [v4]

2023-03-13 Thread Adam Sotona
On Mon, 13 Mar 2023 13:43:22 GMT, Adam Sotona wrote: >> Maybe the variants of Classfile.buildModule need to be looked at again. For >> the usage here, buildModule(ModuleAttribute, Consumer) >> would be more useful as it would allow all of the additional attributes to >> be emitted in the

Re: RFR: 8294962: Convert java.base/jdk.internal.module package to use the Classfile API to modify and write module-info.class [v4]

2023-03-13 Thread Adam Sotona
On Sat, 11 Mar 2023 17:00:18 GMT, Alan Bateman wrote: >> `buildModules` is expected to be called with additional packages but instead >> it's called with all packages including all exported and open packages. >> >> >> /** >> * Build a module descriptor into a byte array. >> *

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

2023-03-13 Thread Alan Bateman
On Sat, 11 Mar 2023 05:34:39 GMT, Joe Wang wrote: >> Add a system property, jdk.xml.config.file, to return the path to a custom >> JAXP configuration file. The current configuration file, jaxp.properties, >> that the JDK supports will become the default configuration file. >> >> CSR:

Re: RFR: 8294974: Convert jdk.jshell/jdk.jshell.execution.LocalExecutionControl to use the Classfile API to instrument classes [v5]

2023-03-13 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 Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The pull request now

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

2023-03-13 Thread Jaikiran Pai
On Sat, 11 Mar 2023 11:38:43 GMT, Jim Laskey wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> undo unintentional copyright year change > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java line

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

2023-03-13 Thread Jaikiran Pai
On Sun, 12 Mar 2023 09:15:20 GMT, Alan Bateman wrote: > When cross linking and the target platform is unknown then it might be better > to have this fail rather than defaulting to the endianness of the current > platform, otherwise this risks create a run-time image that is not usable. I

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

2023-03-13 Thread Jaikiran Pai
On Mon, 13 Mar 2023 10:26:23 GMT, Jaikiran Pai wrote: >> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java line 827: >> >>> 825: if (ref instanceof ModuleReferenceImpl modRefImpl >>> 826: && modRefImpl.moduleTarget() != null) {

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

2023-03-13 Thread Jaikiran Pai
On Sun, 12 Mar 2023 08:55:19 GMT, Alan Bateman wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> missed ppc64 from the arch mapping > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java line 827: >

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

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

Integrated: 8294966: Convert jdk.jartool/sun.tools.jar.FingerPrint to use the ClassFile API to parse JAR entries

2023-03-13 Thread Adam Sotona
On Thu, 15 Dec 2022 14:56:03 GMT, Adam Sotona wrote: > 8294966: Convert jdk.jartool/sun.tools.jar.FingerPrint to use the ClassFile > API to parse JAR entries > > Please review. > Thanks, > Adam This pull request has now been integrated. Changeset: 25e7ac22 Author:Adam Sotona URL:

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

2023-03-13 Thread Alan Bateman
On Sat, 11 Mar 2023 05:34:39 GMT, Joe Wang wrote: >> Add a system property, jdk.xml.config.file, to return the path to a custom >> JAXP configuration file. The current configuration file, jaxp.properties, >> that the JDK supports will become the default configuration file. >> >> CSR:

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

2023-03-13 Thread Alan Bateman
On Sat, 11 Mar 2023 05:34:39 GMT, Joe Wang wrote: >> Add a system property, jdk.xml.config.file, to return the path to a custom >> JAXP configuration file. The current configuration file, jaxp.properties, >> that the JDK supports will become the default configuration file. >> >> CSR:

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

2023-03-13 Thread Alan Bateman
On Sat, 11 Mar 2023 05:34:39 GMT, Joe Wang wrote: >> Add a system property, jdk.xml.config.file, to return the path to a custom >> JAXP configuration file. The current configuration file, jaxp.properties, >> that the JDK supports will become the default configuration file. >> >> CSR:

Re: RFR: 8303814: getLastErrorString should avoid charset conversions [v2]

2023-03-13 Thread Daniel Jeliński
On Thu, 9 Mar 2023 18:08:32 GMT, Naoto Sato wrote: >> Daniel Jeliński has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Address review comments >> - Mention that the returned text is static and thread safe >> - Define buffer size >

Re: RFR: 8303814: getLastErrorString should avoid charset conversions [v2]

2023-03-13 Thread Daniel Jeliński
On Fri, 10 Mar 2023 21:47:45 GMT, Roger Riggs wrote: >> Daniel Jeliński has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Address review comments >> - Mention that the returned text is static and thread safe >> - Define buffer size

Re: RFR: 8303814: getLastErrorString should avoid charset conversions [v2]

2023-03-13 Thread Daniel Jeliński
> 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 implementation of `getLastErrorString` no longer checks

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v6]

2023-03-13 Thread Eirik Bjorsnos
On Sun, 12 Mar 2023 21:25:46 GMT, Eirik Bjorsnos wrote: >> Please review this PR which speeds up TestTooManyEntries and clarifies its >> purpose: >> >> - The name 'TestTooManyEntries' does not clearly convey the purpose of the >> test. What is tested is the validation that the total CEN size

Re: RFR: 8303648: Add String.indexOf(String str, int beginIndex, int endIndex) [v3]

2023-03-13 Thread Raffaello Giulietti
> As a followup of [JDK-8302590](https://bugs.openjdk.org/browse/JDK-8302590), > this issue covers the analogous case for a search of a string rather than a > character. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision:

RFR: JDK-8304036: Use CommandLine class from shared module

2023-03-13 Thread Christian Stein
This pull request addresses the open ends left by [JDK-8236919](https://bugs.openjdk.org/browse/JDK-8236919): - #11272 Changes: - [x] Extend list of targeted exports of `jdk.internal.opt/jdk.internal.opt` to `jdk.compiler` and `jdk.javadoc` - [x] Use shared `CommandLine.java` in `jdk.compiler`

RFR: 8304031: Classfile API cannot encode Primitive Class as Condy

2023-03-13 Thread liach
Without this patch, the Classfile API tries to encode PrimitiveClassDesc as CONSTANT_Class_info and error in `toInternalName`. - Commit messages: - 8304031: Classfile API cannot encode Primitive Class as Condy Changes: https://git.openjdk.org/jdk/pull/12996/files Webrev: