Re: RFR: 8332457: Examine startup overheads from JDK-8294961 [v12]

2024-05-29 Thread Adam Sotona
tialization to CONDY bootstrap. > > 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 1

Re: RFR: 8332614: Type-checked ConstantPool.entryByIndex and ClassReader.readEntryOrNull [v4]

2024-05-29 Thread Adam Sotona
On Wed, 29 May 2024 05:19:28 GMT, Chen Liang wrote: >> I propose to add type-checked ConstantPool.entryByIndex and >> ClassReader.readEntryOrNull taking an extra Class parameter, which throws >> ConstantPoolException instead of ClassCastException on type mismatch, which >> can happen to

Re: RFR: 8332457: Examine startup overheads from JDK-8294961 [v11]

2024-05-28 Thread Adam Sotona
tialization to CONDY bootstrap. > > Please review. > > Thank you, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: missing bracket - Changes: - all: https://git.openjdk.org/jdk/pull/19410/files - new:

Re: RFR: 8332457: Examine startup overheads from JDK-8294961 [v10]

2024-05-28 Thread Adam Sotona
tialization to CONDY bootstrap. > > Please review. > > Thank you, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: Update src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java Co-authored-by:

Re: RFR: 8332457: Examine startup overheads from JDK-8294961 [v9]

2024-05-28 Thread Adam Sotona
On Tue, 28 May 2024 15:11:39 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> removed obsolete entry > > src/java.base/share/classes/java/lang/reflect/ProxyGene

Re: RFR: 8332457: Examine startup overheads from JDK-8294961 [v9]

2024-05-28 Thread Adam Sotona
tialization to CONDY bootstrap. > > Please review. > > Thank you, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: removed obsolete entry - Changes: - all: https://git.openjdk.org/jdk/pull/19410/files

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

2024-05-28 Thread Adam Sotona
On Fri, 24 May 2024 16:17:41 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

Integrated: 8332505: JEP 457: ClassRemapper forgets to remap bootstrap method references

2024-05-28 Thread Adam Sotona
On Mon, 20 May 2024 08:03:28 GMT, Adam Sotona wrote: > Class-File API `ClassRemapper` component suppose to remap all classes > referenced in a class file. > Actual implementation missed remapping of bootstrap methods referenced from > `invokedynamic` instructions. > T

Re: RFR: 8332457: Examine startup overheads from JDK-8294961 [v8]

2024-05-28 Thread Adam Sotona
s statically created and > each proxy class is transformed from the template. > > This patch is intended to examine plain proxy generation impact on > performance and JDK bootstrap (vs proxy transformation from template). > > Please review. > > Thank you, > Adam A

Re: RFR: 8332457: Examine startup overheads from JDK-8294961 [v7]

2024-05-28 Thread Adam Sotona
s statically created and > each proxy class is transformed from the template. > > This patch is intended to examine plain proxy generation impact on > performance and JDK bootstrap (vs proxy transformation from template). > > Please review. > > Thank you, > Adam A

Re: RFR: 8332457: Examine startup overheads from JDK-8294961 [v6]

2024-05-28 Thread Adam Sotona
s statically created and > each proxy class is transformed from the template. > > This patch is intended to examine plain proxy generation impact on > performance and JDK bootstrap (vs proxy transformation from template). > > Please review. > > Thank you, > Adam A

Re: RFR: 8332457: Examine startup overheads from JDK-8294961 [v3]

2024-05-27 Thread Adam Sotona
On Mon, 27 May 2024 12:24:31 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> performance improvements > > src/java.base/share/classes/java/lang/reflect/ProxyGene

Re: RFR: 8332457: Examine startup overheads from JDK-8294961 [v5]

2024-05-27 Thread Adam Sotona
s statically created and > each proxy class is transformed from the template. > > This patch is intended to examine plain proxy generation impact on > performance and JDK bootstrap (vs proxy transformation from template). > > Please review. > > Thank you, > Adam A

Re: RFR: 8332457: Examine startup overheads from JDK-8294961 [v4]

2024-05-27 Thread Adam Sotona
s statically created and > each proxy class is transformed from the template. > > This patch is intended to examine plain proxy generation impact on > performance and JDK bootstrap (vs proxy transformation from template). > > Please review. > > Thank you, > Adam A

Re: RFR: 8332457: Examine startup overheads from JDK-8294961 [v3]

2024-05-27 Thread Adam Sotona
s statically created and > each proxy class is transformed from the template. > > This patch is intended to examine plain proxy generation impact on > performance and JDK bootstrap (vs proxy transformation from template). > > Please review. > > Thank you, > Adam A

Re: RFR: 8332457: Examine startup overheads from JDK-8294961 [v2]

2024-05-27 Thread Adam Sotona
s statically created and > each proxy class is transformed from the template. > > This patch is intended to examine plain proxy generation impact on > performance and JDK bootstrap (vs proxy transformation from template). > > Please review. > > Thank you, > Adam A

RFR: 8332457: Examine startup overheads from JDK-8294961

2024-05-27 Thread Adam Sotona
[JDK-8294961](https://bugs.openjdk.org/browse/JDK-8294961) changed to use classfile API for reflection proxy-generation. Actual implementation of `ProxyGenerator` is focused on performance, however it causes JDK bootstrap regressions. `ProxyGenerator.TEMPLATE` class model is statically created

Re: RFR: 8307818: Convert Indify tool to Classfile API [v9]

2024-05-24 Thread Adam Sotona
On Fri, 24 May 2024 17:57:28 GMT, Oussama Louati wrote: >> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code >> private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, >> MethodType, and CallSite constants. >> It currently uses ad-hoc code to

Re: RFR: 8332597: Remove redundant methods from j.l.classfile.ClassReader API [v2]

2024-05-24 Thread Adam Sotona
gt; Class-File API implementation internally use these methods, however they > should not be exposed in the API. > > This patch removes the methods from the API. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request with a new target base due t

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

2024-05-24 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 23 commits: - Merge branch 'master' into JDK-8294960-invoke # Conflicts: #src/java.base/share/clas

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

2024-05-24 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 37 commits: - fixed ParserVerifier and Veri

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

2024-05-24 Thread Adam Sotona
On Mon, 29 Apr 2024 18:48:53 GMT, Adam Sotona wrote: > 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

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

2024-05-24 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 [v10]

2024-05-24 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: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v9]

2024-05-24 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 reque

Re: RFR: 8307818: Convert Indify tool to Classfile API [v8]

2024-05-21 Thread Adam Sotona
On Mon, 20 May 2024 20:56:18 GMT, Oussama Louati wrote: >> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code >> private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, >> MethodType, and CallSite constants. >> It currently uses ad-hoc code to

RFR: 8332597: Remove redundant methods from j.l.classfile.ClassReader API

2024-05-21 Thread Adam Sotona
j.l.classfile.ClassReader instance is exposed in the Class-File API through j.l.classfile.AttributeMapper::readAttribute method only. ClassReader only purpose is to serve as a tool for reading content of a custom attribute in a user-provided AttribtueMapper. It contains useful set of low-level

Integrated: 8332486: ClassFile API ArrayIndexOutOfBoundsException with label metadata

2024-05-21 Thread Adam Sotona
On Mon, 20 May 2024 08:37:49 GMT, Adam Sotona wrote: > Parsing of a specifically corrupted class file cause unexpected > `ArrayIndexOutOfBoundsException` during label inflation. > This patch checks the valid range and throws expected > `IllegalArgumentException` instead. >

RFR: 8332486: ClassFile API ArrayIndexOutOfBoundsException with label metadata

2024-05-20 Thread Adam Sotona
Parsing of a specifically corrupted class file cause unexpected `ArrayIndexOutOfBoundsException` during label inflation. This patch checks the valid range and throws expected `IllegalArgumentException` instead. Relevant test is added. Please review. Thanks, Adam - Commit

RFR: 8332505: JEP 457: ClassRemapper forgets to remap bootstrap method references

2024-05-20 Thread Adam Sotona
Class-File API `ClassRemapper` component suppose to remap all classes referenced in a class file. Actual implementation missed remapping of bootstrap methods referenced from `invokedynamic` instructions. This patch fixes the remapping and adds relevant test. Please review. Thanks, Adam

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

2024-05-17 Thread Adam Sotona
On Fri, 17 May 2024 08:28:51 GMT, Adam Sotona wrote: >> src/java.base/share/classes/jdk/internal/classfile/impl/verifier/ParserVerifier.java >> line 308: >> >>> 306: 0; >>> 307: default -> >>> 308:

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

2024-05-17 Thread Adam Sotona
. > > Also new `VerifierSelfTest::testParserVerifier` has been added. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with three additional commits since the last revision: - added verification of TypeAnnotation attributes - added ve

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

2024-05-17 Thread Adam Sotona
On Wed, 15 May 2024 11:34:37 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> applied the suggested changes > > src/java.base/share/classes/jdk/internal/classfile/imp

Re: RFR: 8331724: Refactor j.l.constant implementation to internal package [v13]

2024-05-17 Thread Adam Sotona
On Wed, 15 May 2024 11:17:42 GMT, Claes Redestad wrote: >> This PR suggests refactoring the implementation classes of >> java.lang.constant into a new package jdk.internal.constant to enable >> sharing some trusted static factory methods with users elsewhere in >> java.base, such as

Re: RFR: 8331855: Convert jdk.jdeps jdeprscan and jdeps to use the Classfile API [v2]

2024-05-17 Thread Adam Sotona
On Sun, 12 May 2024 02:42:32 GMT, Chen Liang wrote: >> Summary of the changes: >> - Moved `com.sun.tools.classfile.Dependency` and `Dependencies` to jdeps; >> they are exclusively used by jdeps in sources, and they are not used in any >> tests too. This will ease the removal of

Re: RFR: 8332109: Convert remaining tests using com.sun.tools.classfile to ClassFile API

2024-05-17 Thread Adam Sotona
On Sun, 12 May 2024 08:36:44 GMT, Chen Liang wrote: > Some tests are not migrated to the ClassFile API in previous migrations. > > - Some are simple oversights that didn't remove usages of > com.sun.tools.classfile; > - The CallerSensitive ones used an old utility, replaced by CF API-based

Re: RFR: 8332109: Convert remaining tests using com.sun.tools.classfile to ClassFile API

2024-05-17 Thread Adam Sotona
On Sun, 12 May 2024 08:36:44 GMT, Chen Liang wrote: > Some tests are not migrated to the ClassFile API in previous migrations. > > - Some are simple oversights that didn't remove usages of > com.sun.tools.classfile; > - The CallerSensitive ones used an old utility, replaced by CF API-based

Re: RFR: 8332109: Convert remaining tests using com.sun.tools.classfile to ClassFile API

2024-05-17 Thread Adam Sotona
On Sun, 12 May 2024 08:36:44 GMT, Chen Liang wrote: > Some tests are not migrated to the ClassFile API in previous migrations. > > - Some are simple oversights that didn't remove usages of > com.sun.tools.classfile; > - The CallerSensitive ones used an old utility, replaced by CF API-based

Re: RFR: 8332109: Convert remaining tests using com.sun.tools.classfile to ClassFile API

2024-05-17 Thread Adam Sotona
On Sun, 12 May 2024 08:36:44 GMT, Chen Liang wrote: > Some tests are not migrated to the ClassFile API in previous migrations. > > - Some are simple oversights that didn't remove usages of > com.sun.tools.classfile; > - The CallerSensitive ones used an old utility, replaced by CF API-based

Integrated: 8321622: ClassFile.verify(byte[] bytes) throws unexpected ConstantPoolException, IAE

2024-05-16 Thread Adam Sotona
On Thu, 16 May 2024 06:44:29 GMT, Adam Sotona wrote: > Class-File API `VerifierImpl` contains debugging stack trace print causing > unexpected output and confusion in specific verification cases. > > This patch removes the stack trace print. > > Please review. > > T

Re: RFR: 8321622: ClassFile.verify(byte[] bytes) throws unexpected ConstantPoolException, IAE [v2]

2024-05-16 Thread Adam Sotona
On Thu, 16 May 2024 07:28:20 GMT, Adam Sotona wrote: >> Class-File API `VerifierImpl` contains debugging stack trace print causing >> unexpected output and confusion in specific verification cases. >> >> This patch removes the stack trace print. >> >> P

Re: RFR: 8321622: ClassFile.verify(byte[] bytes) throws unexpected ConstantPoolException, IAE [v2]

2024-05-16 Thread Adam Sotona
> Class-File API `VerifierImpl` contains debugging stack trace print causing > unexpected output and confusion in specific verification cases. > > This patch removes the stack trace print. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull req

RFR: 8321622: ClassFile.verify(byte[] bytes) throws unexpected ConstantPoolException, IAE

2024-05-16 Thread Adam Sotona
Class-File API `VerifierImpl` contains debugging stack trace print causing unexpected output and confusion in specific verification cases. This patch removes the stack trace print. Please review. Thanks, Adam - Commit messages: - 8321622: ClassFile.verify(byte[] bytes) throws

Integrated: 8331940: ClassFile API ArrayIndexOutOfBoundsException with certain class files

2024-05-15 Thread Adam Sotona
On Tue, 14 May 2024 13:18:51 GMT, Adam Sotona wrote: > Class file with `LineNumberTable` attribute element pointing behind the > bytecode array throws `ArrayIndexOutOfBoundsException`. > This patch performs the check and throws expected `IllegalArgumentException` > instead. >

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

2024-05-15 Thread Adam Sotona
On Wed, 15 May 2024 10:06:42 GMT, Adam Sotona wrote: >> src/java.base/share/classes/jdk/internal/classfile/impl/verifier/ParserVerifier.java >> line 205: >> >>> 203: private void verifyAttribute(AttributedElement ae, Attribute a, >>> List errors) { >

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

2024-05-15 Thread Adam Sotona
On Wed, 15 May 2024 09:45:24 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> applied the suggested changes > > src/java.base/share/classes/jdk/in

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

2024-05-15 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: applied the suggested changes - Changes: - a

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

2024-05-15 Thread Adam Sotona
On Wed, 15 May 2024 09:43:04 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> applied the suggested changes > > src/java.base/share/classes/jdk/in

Re: RFR: 8331724: Refactor j.l.constant implementation to internal package [v10]

2024-05-15 Thread Adam Sotona
On Wed, 15 May 2024 07:20:37 GMT, Claes Redestad wrote: >> This PR suggests refactoring the implementation classes of >> java.lang.constant into a new package jdk.internal.constant to enable >> sharing some trusted static factory methods with users elsewhere in >> java.base, such as

Re: RFR: 8331940: ClassFile API ArrayIndexOutOfBoundsException with certain class files [v2]

2024-05-15 Thread Adam Sotona
On Tue, 14 May 2024 15:59:33 GMT, Paul Sandoz wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed exception message > > src/java.base/share/classes/jdk/internal/classfile/impl/CodeIm

Re: RFR: 8331940: ClassFile API ArrayIndexOutOfBoundsException with certain class files [v2]

2024-05-15 Thread Adam Sotona
> Class file with `LineNumberTable` attribute element pointing behind the > bytecode array throws `ArrayIndexOutOfBoundsException`. > This patch performs the check and throws expected `IllegalArgumentException` > instead. > Relevant test is added. > > Please review. >

RFR: 8331940: ClassFile API ArrayIndexOutOfBoundsException with certain class files

2024-05-14 Thread Adam Sotona
Class file with `LineNumberTable` attribute element pointing behind the bytecode array throws `ArrayIndexOutOfBoundsException`. This patch performs the check and throws expected `IllegalArgumentException` instead. Relevant test is added. Please review. Thanks, Adam - Commit

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

2024-05-14 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: applied the suggested changes - Changes: - a

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

2024-05-14 Thread Adam Sotona
On Mon, 13 May 2024 17:31:25 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - fixed error thrown by VerifierImpl >> - applied suggested changes > > src/

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

2024-05-14 Thread Adam Sotona
On Mon, 13 May 2024 17:22:07 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - fixed error thrown by VerifierImpl >> - applied suggested changes >

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

2024-05-14 Thread Adam Sotona
On Mon, 13 May 2024 17:21:03 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - fixed error thrown by VerifierImpl >> - applied suggested changes >

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

2024-05-14 Thread Adam Sotona
On Mon, 13 May 2024 17:17:40 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - fixed error thrown by VerifierImpl >> - applied suggested changes >

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

2024-05-14 Thread Adam Sotona
On Tue, 14 May 2024 08:51:57 GMT, Aggelos Biboudis wrote: >> Adam Sotona has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - fixed error thrown by VerifierImpl >> - applied suggested changes > > src/

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

2024-05-14 Thread Adam Sotona
On Tue, 14 May 2024 08:30:56 GMT, Aggelos Biboudis wrote: >> Adam Sotona has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - fixed error thrown by VerifierImpl >> - applied suggested changes > > src/

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

2024-05-14 Thread Adam Sotona
On Mon, 13 May 2024 17:35:39 GMT, Chen Liang wrote: >> Is this method only supposed to check the attribute size? It would be nice >> perhaps to enhance this to enforce more structural constraints - I added a >> couple of comments in that direction, but there's many more (e.g. for >> instance

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

2024-05-13 Thread Adam Sotona
On Sun, 12 May 2024 15:11:17 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed tests > > src/java.base/share/classes/java/lang/classfile/Attributes.jav

Re: RFR: 8331535: Incorrect prompt for Console.readLine [v6]

2024-05-10 Thread Adam Sotona
s updated the pull request incrementally with one additional > commit since the last revision: > > Update test/jdk/java/io/Console/ConsolePromptTest.java > > Co-authored-by: Adam Sotona <10807609+asot...@users.noreply.github.com> Looks good to me. - Marked as rev

Re: RFR: 8331535: Incorrect prompt for Console.readLine [v5]

2024-05-10 Thread Adam Sotona
On Fri, 10 May 2024 11:00:55 GMT, Jan Lahoda wrote: >> When JLine reads a line, there may be a prompt provided. However, JLine will >> not interpret the prompt literally, it will handle `%` specially. As a >> consequence, doing: >> >> System.console().readLine("%%s"); >> >> >> will not

Re: RFR: 8331744: java.lang.classfile.TypeKind improvements [v5]

2024-05-10 Thread Adam Sotona
On Thu, 9 May 2024 21:15:31 GMT, Chen Liang wrote: >> A peek into TypeKind during the research for #19105 reveals that TypeKind >> has a few issues: >> 1. Name mismatch for `newarraycode` and `fromNewArrayCode`: Renamed both to >> use "newarray code" >> 2. `fromDescriptor` can throw IOOBE if

Re: RFR: 8331744: java.lang.classfile.TypeKind improvements [v4]

2024-05-09 Thread Adam Sotona
On Thu, 9 May 2024 12:07:22 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/classfile/TypeKind.java line 139: >> >>> 137: case 'V' -> TypeKind.VoidType; >>> 138: default -> throw new IllegalArgumentException("Bad type: " >>> + s); >>> 139: }; >>

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

2024-05-09 Thread Adam Sotona
. > > Also new `VerifierSelfTest::testParserVerifier` has been added. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with two additional commits since the last revision: - fixed error thrown by VerifierImpl - applied suggested chan

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

2024-05-09 Thread Adam Sotona
On Tue, 7 May 2024 18:51:28 GMT, Chen Liang 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 28 commits: >> >> - Merge branch 'master' into JDK-8320396-verifier-extension >&g

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

2024-05-09 Thread Adam Sotona
On Tue, 7 May 2024 18:50:28 GMT, Chen Liang 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 28 commits: >> >> - Merge branch 'master' into JDK-8320396-verifier-extension >&g

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

2024-05-09 Thread Adam Sotona
On Tue, 7 May 2024 18:47:34 GMT, Chen Liang 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 28 commits: >> >> - Merge branch 'master' into JDK-8320396-verifier-extension >&g

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

2024-05-09 Thread Adam Sotona
On Tue, 7 May 2024 18:42:24 GMT, Chen Liang 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 28 commits: >> >> - Merge branch 'master' into JDK-8320396-verifier-extension >&g

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

2024-05-09 Thread Adam Sotona
On Tue, 7 May 2024 18:39:40 GMT, Chen Liang 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 28 commits: >> >> - Merge branch 'master' into JDK-8320396-verifier-extension >&g

Re: RFR: 8331744: java.lang.classfile.TypeKind improvements [v4]

2024-05-09 Thread Adam Sotona
On Tue, 7 May 2024 15:23:10 GMT, Chen Liang wrote: >> A peek into TypeKind during the research for #19105 reveals that TypeKind >> has a few issues: >> 1. Name mismatch for `newarraycode` and `fromNewArrayCode`: Renamed both to >> use "newarray code" >> 2. `fromDescriptor` can throw IOOBE if

Re: RFR: 8311175: Move BufWriter::asByteBuffer to BufWriterImpl [v2]

2024-05-09 Thread Adam Sotona
On Tue, 7 May 2024 15:30:25 GMT, Chen Liang wrote: >> As discussed on the mailing list >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-June/000381.html, >> BufWriter::asByteBuffer has a behavior not suitable for API and is only used >> by internal StackMapGenerator/StackCounter,

Re: RFR: 8311175: Move BufWriter::asByteBuffer to BufWriterImpl

2024-05-06 Thread Adam Sotona
On Fri, 30 Jun 2023 14:43:36 GMT, Chen Liang wrote: > As discussed on the mailing list > https://mail.openjdk.org/pipermail/classfile-api-dev/2023-June/000381.html, > BufWriter::asByteBuffer has a behavior not suitable for API and is only used > by internal StackMapGenerator/StackCounter, so

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

2024-05-06 Thread Adam Sotona
On Thu, 2 May 2024 10:30:06 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: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v7]

2024-05-06 Thread Adam Sotona
On Mon, 6 May 2024 18:07:06 GMT, Vicente Romero wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed tests > > src/java.base/share/classes/java/lang/classfile/Attributes.java lin

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

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 [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

  1   2   3   4   5   6   7   8   9   10   >