Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v7]

2024-05-06 Thread Adam Sotona
> > Please let me know your comments or objections and please review the > [PR](https://github.com/openjdk/jdk/pull/19006) and > [CSR](https://bugs.openjdk.org/browse/JDK-8331414), so we can make it into 23. > > Thank you, > Adam Adam Sotona has updated the pull requ

Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v4]

2024-05-06 Thread Adam Sotona
On Mon, 6 May 2024 11:16:16 GMT, Claes Redestad wrote: > FWIW code changes looks good to me. There seems to be a number of tests that > still need to be updated to use the new methods instead of the old constants. Thank you! Yes, I'm cleaning the tests right now. - PR Comment:

Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v4]

2024-05-06 Thread Adam Sotona
On Thu, 2 May 2024 14:40:16 GMT, Chen Liang wrote: > On a side note, will we update JEP 466 to include this patch? I hope so, if we get it into 23 ;) - PR Comment: https://git.openjdk.org/jdk/pull/19006#issuecomment-2096378934

Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v6]

2024-05-06 Thread Adam Sotona
> > Please let me know your comments or objections and please review the > [PR](https://github.com/openjdk/jdk/pull/19006) and > [CSR](https://bugs.openjdk.org/browse/JDK-8331414), so we can make it into 23. > > Thank you, > Adam Adam Sotona has updated the pull requ

Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v5]

2024-05-06 Thread Adam Sotona
> > Please let me know your comments or objections and please review the > [PR](https://github.com/openjdk/jdk/pull/19006) and > [CSR](https://bugs.openjdk.org/browse/JDK-8331414), so we can make it into 23. > > Thank you, > Adam Adam Sotona has updated the pull request

Re: RFR: 8331708: jdk/internal/jline/RedirectedStdOut.java times-out on macosx-aarch64

2024-05-06 Thread Adam Sotona
On Mon, 6 May 2024 08:28:50 GMT, Jan Lahoda wrote: > When integrating: > https://github.com/openjdk/jdk/pull/18996 > > I've forgot to push one last commit which was stabilizing the test of Mac > OS/X. I am sorry for that. > > The test will create a pseudo terminal, and change the current

Integrated: 8331655: ClassFile API ClassCastException with verbose output of certain class files

2024-05-03 Thread Adam Sotona
On Fri, 3 May 2024 15:28:05 GMT, Adam Sotona wrote: > Specifically corrupted constant pool of a class file can cause > ClassCastException, when the entries are accessed by Class-File API in exact > order. > > This fix avoids the ClassCastException and throws ConstantPoolExcep

Re: RFR: 8331655: ClassFile API ClassCastException with verbose output of certain class files [v2]

2024-05-03 Thread Adam Sotona
Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: applied suggested changes - Changes: - all: https://git.openjdk.org/jdk/pull/19088/files - new: https://git.openjdk.org/jdk

Re: RFR: 8331655: ClassFile API ClassCastException with verbose output of certain class files [v2]

2024-05-03 Thread Adam Sotona
On Fri, 3 May 2024 16:25:30 GMT, Paul Sandoz wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> applied suggested changes > > src/java.base/share/classes/jdk/internal/classfile/impl/Cl

RFR: 8331655: ClassFile API ClassCastException with verbose output of certain class files

2024-05-03 Thread Adam Sotona
Specifically corrupted constant pool of a class file can cause ClassCastException, when the entries are accessed by Class-File API in exact order. This fix avoids the ClassCastException and throws ConstantPoolException instead. Test is attached. Please review. Thanks, Adam -

Integrated: 8331320: ClassFile API OutOfMemoryError with certain class files

2024-05-02 Thread Adam Sotona
On Tue, 30 Apr 2024 15:31:02 GMT, Adam Sotona wrote: > Class files with specifically corrupted tableswitch or lookupswitch > instructions in the bytecode cause OutOfMemoryError while parsing with > Class-File API. > This patch performs additional checks to avoid OOME and adds re

Integrated: 8331511: Tests should not use the "Classpath" exception form of the legal header

2024-05-02 Thread Adam Sotona
On Thu, 2 May 2024 09:01:22 GMT, Adam Sotona wrote: > This patch removes "Classpath" exception from > test/jdk/jdk/classfile/OptionsTest.java header. > > Please review. > > Thanks, > Adam This pull request has now been integrated. Changeset: 257a0

Re: RFR: 8182774: Verify code in javap [v2]

2024-05-02 Thread Adam Sotona
a release note will be > provided. > > Please review. > > Thank you, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: fixed typo - Changes: - all: https://git.openjdk.org/jdk/pull/18629/files -

RFR: 8182774: Verify code in javap

2024-05-02 Thread Adam Sotona
This patch adds `javap -verify` option to check the class and print obvious verification errors found. Implementation depends on extended Class-File API verification support, so PR #16809 is important to precede. The new `javap` option is mentioned in man pages and a release note will be

Re: RFR: 8331320: ClassFile API OutOfMemoryError with certain class files [v2]

2024-05-02 Thread Adam Sotona
> Class files with specifically corrupted tableswitch or lookupswitch > instructions in the bytecode cause OutOfMemoryError while parsing with > Class-File API. > This patch performs additional checks to avoid OOME and adds relevant tests. > > Please review. > > Thank

Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v4]

2024-05-02 Thread Adam Sotona
> > Please let me know your comments or objections and please review the > [PR](https://github.com/openjdk/jdk/pull/19006) and > [CSR](https://bugs.openjdk.org/browse/JDK-8331414), so we can make it into 23. > > Thank you, > Adam Adam Sotona has updated the pull request

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v12]

2024-05-02 Thread Adam Sotona
come. > > Please review. > > Thank you, > 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 22 commits: - fixed CodeBuilder use in j.l.invoke - Merge branch 'master' into JDK-8294960-invoke - Merge pul

Re: RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp [v4]

2024-05-02 Thread Adam Sotona
. > > Also new `VerifierSelfTest::testParserVerifier` has been added. > > 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 28 commits: - Merge branch 'master' into JDK

Integrated: 8323058: Revisit j.l.classfile.CodeBuilder API surface

2024-05-02 Thread Adam Sotona
On Fri, 5 Jan 2024 15:17:13 GMT, Adam Sotona wrote: > `java.lang.classfile.CodeBuilder` contains more than 230 API methods. > Existing ClassFile API use cases proved the concept one big CodeBuilder is > comfortable. However there are some redundancies, glitches in the naming >

RFR: 8331511: Tests should not use the "Classpath" exception form of the legal header

2024-05-02 Thread Adam Sotona
This patch removes "Classpath" exception from test/jdk/jdk/classfile/OptionsTest.java header. Please review. Thanks, Adam - Commit messages: - 8331511: Tests should not use the "Classpath" exception form of the legal header Changes: https://git.openjdk.org/jdk/pull/19050/files

Re: RFR: 8323058: Revisit j.l.classfile.CodeBuilder API surface [v7]

2024-05-02 Thread Adam Sotona
ind and some methods > have low practical use. > > This patch revisits the `CodeBuilder` API methods and introduces some changes. > > For more details, please, visit the [CSR > ](https://bugs.openjdk.org/browse/JDK-8323067) > > Please review. > > Thank you, > A

RFR: 8331320: ClassFile API OutOfMemoryError with certain class files

2024-04-30 Thread Adam Sotona
Class files with specifically corrupted tableswitch or lookupswitch instructions in the bytecode cause OutOfMemoryError while parsing with Class-File API. This patch performs additional checks to avoid OOME and adds relevant tests. Please review. Thank you, Adam - Commit

Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v3]

2024-04-30 Thread Adam Sotona
> > Please let me know your comments or objections and please review the > [PR](https://github.com/openjdk/jdk/pull/19006) and > [CSR](https://bugs.openjdk.org/browse/JDK-8331414), so we can make it into 23. > > Thank you, > Adam Adam Sotona has updated the pull requ

Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v2]

2024-04-30 Thread Adam Sotona
On Tue, 30 Apr 2024 12:05:46 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added bug number > > src/java.base/share/classes/jdk/internal/classfile/impl/BoundAttribu

Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v2]

2024-04-30 Thread Adam Sotona
> > Please let me know your comments or objections and please review the > [PR](https://github.com/openjdk/jdk/pull/19006) and > [CSR](https://bugs.openjdk.org/browse/JDK-8331414), so we can make it into 23. > > Thank you, > Adam Adam Sotona has updated the pull requ

Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations

2024-04-30 Thread Adam Sotona
On Tue, 30 Apr 2024 12:09:05 GMT, Chen Liang wrote: > Also the `final` modifier addition should be included in the CSR, as it > changes the access modifiers even if it has no real impact. The class already had only private constructor, so there was no way to extend it. - PR

RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations

2024-04-30 Thread Adam Sotona
Hi, During performance optimization work on Class-File API as JDK lambda generator we found some static initialization killers. One of them is `java.lang.classfile.Attributes` with tens of static fields initialized with individual attribute mappers, and common set of all mappers, and static map

Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations

2024-04-30 Thread Adam Sotona
On Mon, 29 Apr 2024 23:04:38 GMT, Chen Liang wrote: > Nice changes! Remarks > > 1. The `INSTANCE` fields should be declared `final`, still safe for lazy > initialization. > 2. Not from this patch, but the `AttributeStability stability()` overrides > can be moved to `AbstractAttributeMapper`,

Re: RFR: 8330467: NoClassDefFoundError when lambda is in a hidden class [v4]

2024-04-29 Thread Adam Sotona
On Mon, 29 Apr 2024 17:09:24 GMT, ExE Boss wrote: > This doesn’t fix the case where the lambda is created from an instance > method, e.g.: > Yes, unfortunately the fix is limited to invokeStatic (see the comments above). - PR Comment:

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v11]

2024-04-29 Thread Adam Sotona
come. > > Please review. > > Thank you, > Adam Adam Sotona has updated the pull request incrementally with two additional commits since the last revision: - Merge pull request #4 from cl4es/boxunbox_holder Only create box/unbox MethodRefEntries on request - Only creat

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v10]

2024-04-29 Thread Adam Sotona
come. > > Please review. > > Thank you, > Adam Adam Sotona has updated the pull request incrementally with three additional commits since the last revision: - Merge pull request #3 from cl4es/minor_init_improvements Reduce init overhead of InvokeBytecodeGenerato

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v9]

2024-04-29 Thread Adam Sotona
come. > > Please review. > > Thank you, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: Deferred initialization of attributes map by moving into a holder class Co-authored-by: Claes Redestad - Change

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v8]

2024-04-29 Thread Adam Sotona
come. > > Please review. > > Thank you, > 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 14 commits: - Merge branch 'master' into JDK-8294960-invoke - Merge branch 'master' into JDK-8294960-invoke #

Integrated: 8330684: ClassFile API runs into StackOverflowError while parsing certain class' bytes

2024-04-29 Thread Adam Sotona
On Tue, 23 Apr 2024 07:39:47 GMT, Adam Sotona wrote: > ClassFile API dives into the nested constant pool entries without type > restrictions, while parsing a class file. Validation of the entry is > performed post-parsing. Specifically corrupted constant pool entry may cause > i

Re: RFR: 8330684: ClassFile API runs into StackOverflowError while parsing certain class' bytes [v3]

2024-04-26 Thread Adam Sotona
patch resolves the issue by providing specific implementations for the > nested CP entries parsing, instead of sharing the common (post-checking) code. > Added test simulates the situation on inner-looped method reference entry. > > Please review. > > Thank you, > Adam Adam

Re: RFR: 8330684: ClassFile API runs into StackOverflowError while parsing certain class' bytes [v2]

2024-04-26 Thread Adam Sotona
On Thu, 25 Apr 2024 20:16:09 GMT, Paul Sandoz wrote: > It could be two tags, a lower and upper bound, because TAG_FIELDREF, > TAG_METHODREF, and TAG_INTERFACEMETHODREF are consecutive values (9 to 11). OK, I've implemented it with lower and upper bound tags. Thanks! - PR Comment:

Re: RFR: 8330684: ClassFile API runs into StackOverflowError while parsing certain class' bytes [v2]

2024-04-26 Thread Adam Sotona
patch resolves the issue by providing specific implementations for the > nested CP entries parsing, instead of sharing the common (post-checking) code. > Added test simulates the situation on inner-looped method reference entry. > > Please review. > > Thank you, > Adam Adam

Integrated: 8322847: java.lang.classfile.BufWriter should specify @throws for its writeXXX methods

2024-04-26 Thread Adam Sotona
On Tue, 23 Apr 2024 11:56:41 GMT, Adam Sotona wrote: > This patch adds missing `@throws` javadoc annotations to > `java.lang.classfile.BufWriter`. > > Please review. > > Thank you, > Adam This pull request has now been integrated. Changeset: ea061298 Author

Integrated: 8331097: Tests build is broken after pr/18914

2024-04-25 Thread Adam Sotona
On Thu, 25 Apr 2024 07:56:59 GMT, Adam Sotona wrote: > Pr/18914 broke tests build. > This patch fixes > `test/micro/org/openjdk/bench/jdk/classfile/CodeAttributeTools` > > Please review. > > Thanks, > Adam This pull request has now been integrated. Changeset: ef745a6

RFR: 8331097: Tests build is broken after pr/18914

2024-04-25 Thread Adam Sotona
Pr/18914 broke tests build. This patch fixes `test/micro/org/openjdk/bench/jdk/classfile/CodeAttributeTools` Please review. Thanks, Adam - Commit messages: - 8331097: Tests build is broken after pr/18914 Changes: https://git.openjdk.org/jdk/pull/18943/files Webrev:

Integrated: 8325373: Improve StackCounter error reporting for bad switch cases

2024-04-25 Thread Adam Sotona
On Tue, 23 Apr 2024 12:59:18 GMT, Adam Sotona wrote: > ClassFile API `StackMapGenerator` attaches print or hex dump of the method to > an error message. > However there is no such attachment when the stack maps generation is turned > off. > > This patch moves class print/

Re: RFR: 8325373: Improve StackCounter error reporting for bad switch cases [v2]

2024-04-25 Thread Adam Sotona
by `StackMapGenerator` and `StackCounter` to provide the same level of > details in case of an error. > > Please review. > > Thank you, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: applied suggested changes

Re: RFR: 8325373: Improve StackCounter error reporting for bad switch cases [v2]

2024-04-25 Thread Adam Sotona
On Wed, 24 Apr 2024 22:48:30 GMT, Paul Sandoz wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> applied suggested changes > > src/java.base/share/classes/jdk/internal/classfile/impl

Re: RFR: 8322847: java.lang.classfile.BufWriter should specify @throws for its writeXXX methods

2024-04-25 Thread Adam Sotona
On Wed, 24 Apr 2024 22:43:21 GMT, Paul Sandoz wrote: > This looks good, but for completeness it will need a CSR. CSR created, thanks. - PR Comment: https://git.openjdk.org/jdk/pull/18913#issuecomment-2076498451

Re: RFR: 8330684: ClassFile API runs into StackOverflowError while parsing certain class' bytes

2024-04-24 Thread Adam Sotona
On Wed, 24 Apr 2024 21:52:11 GMT, Paul Sandoz wrote: > Rather than duplicating some checks I wonder if it is possible to add a > private method `entryByIndex(int index, int expectedTag)` that the existing > `entryByIndex` defers to. If the `expectedTag` is non-negative then it checks > `tag`

RFR: 8325373: Improve StackCounter error reporting for bad switch cases

2024-04-23 Thread Adam Sotona
ClassFile API `StackMapGenerator` attaches print or hex dump of the method to an error message. However there is no such attachment when the stack maps generation is turned off. This patch moves class print/dump to `impl.Util::dumpMethod`, so it is shared by `StackMapGenerator` and

RFR: 8322847: java.lang.classfile.BufWriter should specify @throws for its writeXXX methods

2024-04-23 Thread Adam Sotona
This patch adds missing `@throws` javadoc annotations to `java.lang.classfile.BufWriter`. Please review. Thank you, Adam - Commit messages: - 8322847: java.lang.classfile.BufWriter should specify @throws for its writeXXX methods Changes:

RFR: 8330684: ClassFile API runs into StackOverflowError while parsing certain class' bytes

2024-04-23 Thread Adam Sotona
ClassFile API dives into the nested constant pool entries without type restrictions, while parsing a class file. Validation of the entry is performed post-parsing. Specifically corrupted constant pool entry may cause infinite loop during parsing and throws SOE. This patch resolves the issue by

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v7]

2024-04-18 Thread Adam Sotona
come. > > Please review. > > Thank you, > 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 13 commits: - Merge branch 'master' into JDK-8294960-invoke # Conflicts: # src/j

Re: RFR: 8330458: Add missing @since tag to ClassFile.JAVA_23_VERSION

2024-04-17 Thread Adam Sotona
On Wed, 17 Apr 2024 20:46:26 GMT, Joe Darcy wrote: > 8330458: Add missing @since tag to ClassFile.JAVA_23_VERSION Marked as reviewed by asotona (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/18828#pullrequestreview-2007907265

Integrated: 8330467: NoClassDefFoundError when lambda is in a hidden class

2024-04-17 Thread Adam Sotona
On Wed, 17 Apr 2024 08:46:59 GMT, Adam Sotona wrote: > Current implementation of `LambdaMetafactory` does not allow to use lambdas > in hidden classes. Invocation throws `NoClassDefFoundError` instead. > > This patch includes lambda implementation in a hidden class under

Re: RFR: 8330467: NoClassDefFoundError when lambda is in a hidden class [v4]

2024-04-17 Thread Adam Sotona
ch also fixes `j/l/i/defineHiddenClass/BasicTest::testLambda` to > correctly cover this test case. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: Update src/java

Re: RFR: 8330467: NoClassDefFoundError when lambda is in a hidden class [v2]

2024-04-17 Thread Adam Sotona
On Wed, 17 Apr 2024 15:39:11 GMT, Paul Sandoz wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> applied suggested changes > > test/jdk/java/lang/invoke/defineHiddenClass/src/Lambda.

Re: RFR: 8330467: NoClassDefFoundError when lambda is in a hidden class [v3]

2024-04-17 Thread Adam Sotona
ch also fixes `j/l/i/defineHiddenClass/BasicTest::testLambda` to > correctly cover this test case. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with two additional commits since the last revision: - typo in comm

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v6]

2024-04-17 Thread Adam Sotona
On Wed, 17 Apr 2024 15:21:32 GMT, Adam Sotona wrote: >> java.base java.lang.invoke package heavily uses ASM to generate lambdas and >> method handles. >> >> This patch converts ASM calls to Classfile API. >> >> This PR is continuation of https://github.c

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v6]

2024-04-17 Thread Adam Sotona
come. > > Please review. > > Thank you, > Adam 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 12 additional commits since the last

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v5]

2024-04-17 Thread Adam Sotona
On Tue, 16 Apr 2024 22:49:28 GMT, Mandy Chung 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 10 addi

Re: RFR: 8330467: NoClassDefFoundError when lambda is in a hidden class [v2]

2024-04-17 Thread Adam Sotona
ch also fixes `j/l/i/defineHiddenClass/BasicTest::testLambda` to > correctly cover this test case. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: applied suggested changes --

Re: RFR: 8330467: NoClassDefFoundError when lambda is in a hidden class

2024-04-17 Thread Adam Sotona
On Wed, 17 Apr 2024 09:14:31 GMT, Chen Liang wrote: >> Current implementation of `LambdaMetafactory` does not allow to use lambdas >> in hidden classes. Invocation throws `NoClassDefFoundError` instead. >> >> This patch includes lambda implementation in a hidden class under the >> special

Re: RFR: 8330182: Start of release updates for JDK 24 [v2]

2024-04-17 Thread Adam Sotona
On Wed, 17 Apr 2024 05:43:12 GMT, Joe Darcy wrote: >> Get JDK 24 underway. > > Joe Darcy has updated the pull request incrementally with two additional > commits since the last revision: > > - Correct release date as observed in review feedback. > - Improve javadoc of class file update.

RFR: 8330467: NoClassDefFoundError when lambda is in a hidden class

2024-04-17 Thread Adam Sotona
Current implementation of `LambdaMetafactory` does not allow to use lambdas in hidden classes. Invocation throws `NoClassDefFoundError` instead. This patch includes lambda implementation in a hidden class under the special handling of `useImplMethodHandle`. The patch also fixes

Integrated: 8329099: Undocumented exception thrown by Instruction factory methods accepting Opcode

2024-04-16 Thread Adam Sotona
On Tue, 2 Apr 2024 09:37:52 GMT, Adam Sotona wrote: > `IllegalArgumentException` thrown by some static factory methods of the > following `java.lang.classfile.instruction` interfaces are not documented: > > - `ArrayLoadInstruction` > - `ArrayStoreInstruction` > -

Re: RFR: 8323058: Revisit j.l.classfile.CodeBuilder API surface [v6]

2024-04-15 Thread Adam Sotona
ind and some methods > have low practical use. > > This patch revisits the `CodeBuilder` API methods and introduces some changes. > > For more details, please, visit the [CSR > ](https://bugs.openjdk.org/browse/JDK-8323067) > > Please review. > > Thank you, > A

Integrated: 8329955: Class-File API ClassPrinter does not print bootstrap methods arguments

2024-04-09 Thread Adam Sotona
On Tue, 9 Apr 2024 13:39:47 GMT, Adam Sotona wrote: > Class-File API `ClassPrinter` prints many useful info about bootstrap methods > and invoke dynamic instructions, however bootstrap methods arguments are > missing. > This patch fixes bootstrap methods and invoke dynamic

Re: RFR: 8329955: Class-File API ClassPrinter does not print bootstrap methods arguments

2024-04-09 Thread Adam Sotona
On Tue, 9 Apr 2024 14:21:59 GMT, Brian Goetz wrote: >> Class-File API `ClassPrinter` prints many useful info about bootstrap >> methods and invoke dynamic instructions, however bootstrap methods arguments >> are missing. >> This patch fixes bootstrap methods and invoke dynamic instructions

Integrated: 8325371: Missing ClassFile.Option in package summary

2024-04-09 Thread Adam Sotona
On Wed, 3 Apr 2024 08:48:43 GMT, Adam Sotona wrote: > Some of the Class-File API options were not mentioned in the package summary > and one exception mentioned `ClassFile.DeadLabelsOption` javadoc was wrong. > This patch fixes the javadoc. > > Please review. > > Thank y

Re: RFR: 8325371: Missing ClassFile.Option in package summary

2024-04-09 Thread Adam Sotona
On Tue, 9 Apr 2024 14:22:37 GMT, Brian Goetz wrote: >> Some of the Class-File API options were not mentioned in the package summary >> and one exception mentioned `ClassFile.DeadLabelsOption` javadoc was wrong. >> This patch fixes the javadoc. >> >> Please review. >> >> Thank you, >> Adam > >

Re: RFR: 8323707: Adjust Classfile API's type arg model to better represent the embodied type [v4]

2024-04-09 Thread Adam Sotona
` to `NONE` > > Chen Liang has updated the pull request with a new target base due to a merge > or a rebase. The pull request now contains 13 commits: > > - Merge branch 'master' of https://github.com/openjdk/jdk into > fix/typearg-model > - Missed renaming in tests, thanks to

Re: RFR: JDK-8326836 Incorrect `@since` Tags for ClassSignature methods [v2]

2024-04-09 Thread Adam Sotona
On Wed, 20 Mar 2024 02:10:35 GMT, Nizar Benalla wrote: >> # Issue >> - [JDK-8326836](https://bugs.openjdk.org/browse/JDK-8326836): changes were >> made to the method signatures but this modification isn't reflected in the @ >> since tags. The @ since tags need to be updated. >> >> I changed

RFR: 8329955: Class-File API ClassPrinter does not print bootstrap methods arguments

2024-04-09 Thread Adam Sotona
Class-File API `ClassPrinter` prints many useful info about bootstrap methods and invoke dynamic instructions, however bootstrap methods arguments are missing. This patch fixes bootstrap methods and invoke dynamic instructions printing. `ClassPrinterTest` is extended to print bootstrap method

Integrated: 8325485: IncrementInstructions.of(int, int) is not storing the args

2024-04-09 Thread Adam Sotona
On Thu, 8 Feb 2024 13:18:41 GMT, Adam Sotona wrote: > ClassFile API provides two sets of instructions implementations (bound and > unbound). > Unbound implementation of `IncrementInstruction::constant` returns invalid > value. > This bug discovered a hole in the ClassFile AP

Integrated: 8329527: Opcode.IFNONNULL.primaryTypeKind() is not ReferenceType

2024-04-09 Thread Adam Sotona
On Wed, 3 Apr 2024 08:15:52 GMT, Adam Sotona wrote: > `Opcode.IFNONNULL.primaryTypeKind()` wrongly returned `IntType` instead of > the right `ReferenceType`. > Primary type kinds of `BRANCH` opcodes have yet no functional effect in the > Class-File API. > This simple patch

Re: RFR: 8329099: Undocumented exception thrown by Instruction factory methods accepting Opcode [v4]

2024-04-09 Thread Adam Sotona
> > `NewPrimitiveArrayInstruction::of` factory method also does not perform the > check for invalid argument. > > This patch adds all the missing `@throws` Javadoc tags and fixes > `NewPrimitiveArrayInstruction::of` factory method to perform the argument > check. > >

Integrated: 8326744: Class-File API transition to Second Preview

2024-04-09 Thread Adam Sotona
On Tue, 27 Feb 2024 08:45:12 GMT, Adam Sotona wrote: > Task providing Class-File API transition to Second Preview. This pull request has now been integrated. Changeset: 19a99d02 Author: Adam Sotona URL: https://git.openjdk.org/jdk/commit/19a99d023e32fa9f4d26b76bd36993719e1df

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v5]

2024-04-04 Thread Adam Sotona
come. > > Please review. > > Thank you, > Adam 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 10 additional commits since the last

Re: RFR: 8329099: Undocumented exception thrown by Instruction factory methods accepting Opcode [v3]

2024-04-03 Thread Adam Sotona
> > `NewPrimitiveArrayInstruction::of` factory method also does not perform the > check for invalid argument. > > This patch adds all the missing `@throws` Javadoc tags and fixes > `NewPrimitiveArrayInstruction::of` factory method to perform the argument > check. > >

Re: RFR: 8329099: Undocumented exception thrown by Instruction factory methods accepting Opcode [v2]

2024-04-03 Thread Adam Sotona
On Wed, 3 Apr 2024 11:42:04 GMT, ExE Boss wrote: > The following factory methods are also missing `@throws  > IllegalArgumentException`: > > * `ConstantInstruction::ofIntrinsic` > * `ConstantInstruction::ofArgument` > * `ConstantInstruction::ofLoad` Great catch, I'll add them, thank you!

Re: RFR: 8329099: Undocumented exception thrown by Instruction factory methods accepting Opcode [v2]

2024-04-03 Thread Adam Sotona
> > `NewPrimitiveArrayInstruction::of` factory method also does not perform the > check for invalid argument. > > This patch adds all the missing `@throws` Javadoc tags and fixes > `NewPrimitiveArrayInstruction::of` factory method to perform the argument > check. > >

RFR: 8325371: Missing ClassFile.Option in package summary

2024-04-03 Thread Adam Sotona
Some of the Class-File API options were not mentioned in the package summary and one exception mentioned `ClassFile.DeadLabelsOption` javadoc was wrong. This patch fixes the javadoc. Please review. Thank you, Adam - Commit messages: - 8325371: Missing ClassFile.Option in package

RFR: 8329527: Opcode.IFNONNULL.primaryTypeKind() is not ReferenceType

2024-04-03 Thread Adam Sotona
`Opcode.IFNONNULL.primaryTypeKind()` wrongly returned `IntType` instead of the right `ReferenceType`. Primary type kinds of `BRANCH` opcodes have yet no functional effect in the Class-File API. This simple patch fixes the typo. Please review. Thank you, Adam - Commit messages: -

RFR: 8329099: Undocumented exception thrown by Instruction factory methods accepting Opcode

2024-04-02 Thread Adam Sotona
`IllegalArgumentException` thrown by some static factory methods of the following `java.lang.classfile.instruction` interfaces are not documented: - `ArrayLoadInstruction` - `ArrayStoreInstruction` - `BranchInstruction` - `ConvertInstruction` - `DiscontinuedInstruction` - `FieldInstruction` -

Re: RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp [v2]

2024-03-22 Thread Adam Sotona
On Fri, 22 Mar 2024 02:17:58 GMT, David Holmes 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 26 commits: >> >> - Merge remote-tracking branch 'openjdk/master' into >>

Re: RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp [v3]

2024-03-22 Thread Adam Sotona
. > > Also new `VerifierSelfTest::testParserVerifier` has been added. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: added references to jvms - Changes: - all: ht

Re: RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp [v2]

2024-03-22 Thread Adam Sotona
On Thu, 21 Mar 2024 14:40:37 GMT, Adam Sotona wrote: >> ClassFile API `jdk.internal.classfile.verifier.VerifierImpl` performed only >> bytecode-level class verification. >> This patch adds `jdk.internal.classfile.verifier.ParserVerifier` with >> additional class checks

Re: RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp [v2]

2024-03-21 Thread Adam Sotona
. > > Also new `VerifierSelfTest::testParserVerifier` has been added. > > 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 26 commits: - Merge remote-tracking branch 'openjd

RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp

2024-03-21 Thread Adam Sotona
ClassFile API `jdk.internal.classfile.verifier.VerifierImpl` performed only bytecode-level class verification. This patch adds `jdk.internal.classfile.verifier.ParserVerifier` with additional class checks inspired by `hotspot/share/classfile/classFileParser.cpp`. Also new

Re: RFR: 8323058: Revisit j.l.classfile.CodeBuilder API surface [v4]

2024-03-06 Thread Adam Sotona
On Wed, 6 Mar 2024 15:31:40 GMT, Chen Liang wrote: > Looking at 8326836 #18030, we might need `@since` tags on the new API methods. Thanks for pointing it out, I've added them. - PR Comment: https://git.openjdk.org/jdk/pull/17282#issuecomment-1981230434

Re: RFR: 8323058: Revisit j.l.classfile.CodeBuilder API surface [v5]

2024-03-06 Thread Adam Sotona
ind and some methods > have low practical use. > > This patch revisits the `CodeBuilder` API methods and introduces some changes. > > For more details, please, visit the [CSR > ](https://bugs.openjdk.org/browse/JDK-8323067) > > Please review. > > Thank you, > A

Re: RFR: 8323058: Revisit j.l.classfile.CodeBuilder API surface [v4]

2024-03-06 Thread Adam Sotona
ind and some methods > have low practical use. > > This patch revisits the `CodeBuilder` API methods and introduces some changes. > > For more details, please, visit the [CSR > ](https://bugs.openjdk.org/browse/JDK-8323067) > > Please review. > > Thank you, > A

Re: RFR: 8323058: Revisit j.l.classfile.CodeBuilder API surface [v3]

2024-03-05 Thread Adam Sotona
ind and some methods > have low practical use. > > This patch revisits the `CodeBuilder` API methods and introduces some changes. > > For more details, please, visit the [CSR > ](https://bugs.openjdk.org/browse/JDK-8323067) > > Please review. > > Thank you, > A

Integrated: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes

2024-03-05 Thread Adam Sotona
On Fri, 15 Dec 2023 12:54:27 GMT, Adam Sotona wrote: > java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes. > > This patch converts it to use Classfile API. > > It is continuation of https://github.com/openjdk/jdk/pull/10991 > > Any com

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v12]

2024-03-04 Thread Adam Sotona
> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes. > > This patch converts it to use Classfile API. > > It is continuation of https://github.com/openjdk/jdk/pull/10991 > > Any comments and suggestions are welcome. > > Please review. &

Integrated: 8323183: ClassFile API performance improvements

2024-03-04 Thread Adam Sotona
On Mon, 8 Jan 2024 13:38:16 GMT, Adam Sotona wrote: > ClassFile API performance related improvements have been separated from > #17121 into this PR. > > These improvements are important to minimize performance regression of > 8294961: Convert java.base/java.lang.reflect.ProxyG

Re: RFR: 8323183: ClassFile API performance improvements [v7]

2024-03-04 Thread Adam Sotona
On Mon, 4 Mar 2024 10:08:27 GMT, Claes Redestad wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update >> src/java.base/share/classes/jdk/internal/classfile/impl/StackMapDecod

Re: RFR: 8323183: ClassFile API performance improvements [v8]

2024-03-04 Thread Adam Sotona
oxy classes #17121 > > Please review. > > Thanks, > Adam 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 24 additional

Re: RFR: 8323183: ClassFile API performance improvements [v7]

2024-03-04 Thread Adam Sotona
On Mon, 15 Jan 2024 12:01:37 GMT, Adam Sotona wrote: >> ClassFile API performance related improvements have been separated from >> #17121 into this PR. >> >> These improvements are important to minimize performance regression of >> 8294961: Convert java.base/ja

RFR: 8326744: Class-File API transition to Second Preview

2024-02-27 Thread Adam Sotona
Task providing Class-File API transition to Second Preview. - Commit messages: - 8326744: Class-File API transition to Second Preview Changes: https://git.openjdk.org/jdk/pull/18021/files Webrev: https://webrevs.openjdk.org/?repo=jdk=18021=00 Issue:

Re: RFR: 8323707: Adjust Classfile API's type arg model to better represent the embodied type [v3]

2024-02-26 Thread Adam Sotona
On Thu, 22 Feb 2024 05:38:19 GMT, Chen Liang wrote: >> API changes as discussed on the mailing list: >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-November/000419.html >> >> Additional questions: >> 1. Whether to rename `WildcardIndicator.DEFAULT` to `NONE` > > Chen Liang has

Re: RFR: 8325485: IncrementInstructions.of(int, int) is not storing the args [v2]

2024-02-09 Thread Adam Sotona
ngTransformation`. Second pass has been > added to discover bugs in unbound-to-unbound instruction conversions. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: Update tes

RFR: 8325485: IncrementInstructions.of(int, int) is not storing the args

2024-02-08 Thread Adam Sotona
ClassFile API provides two sets of instructions implementations (bound and unbound). Unbound implementation of `IncrementInstruction::constant` returns invalid value. This bug discovered a hole in the ClassFile API test coverage. This patch provides very simple fix of `IncrementInstruction`

<    1   2   3   4   5   6   7   8   9   10   >