Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v25]

2023-06-26 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: 8308646: Typo in ConstantValueAttribute - Changes: - all: https://git.openjdk.org/jdk/pull/14180/files - new: https://git.openj

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v24]

2023-06-26 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with two additional commits since the last revision: - fixed String format arguments - Classfile API javadoc make patch - Changes: - all: https://git.openjdk.org/jdk/pull

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v23]

2023-06-26 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with two additional commits since the last revision: - Merge pull request #1 from liachmodded/fix/sotona-cf-obj-improvements Changes discussed on mailing list plus minor doc error - Change

Re: RFR: 8294982: Implementation of Classfile API [v58]

2023-06-26 Thread Adam Sotona
On Fri, 23 Jun 2023 09:05:21 GMT, Andrey Turbanov wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> removed obsolete javadoc from implementation classes > > src/java.base/share/

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v22]

2023-06-21 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: Apply suggestions from code review Co-authored-by: liach <7806504+li...@users.noreply.github.com> - Changes: - all:

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v21]

2023-06-21 Thread Adam Sotona
On Thu, 15 Jun 2023 17:22:32 GMT, Adam Sotona wrote: >> Classfile context object and multi-state options have been discussed at >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-May/000321.html >> This patch implements the proposed changes in Classfile API and fixe

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v21]

2023-06-15 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: ClassfileBenchmark::transformWithNewMaps changed to transformWithAddedNOP - Changes: - all: https://git.openjdk.org/jdk/pull

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v20]

2023-06-15 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: ClassfileBenchmark minor fix - Changes: - all: https://git.openjdk.org/jdk/pull/14180/files - new: https://git.openjdk.org/jd

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v19]

2023-06-15 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: added new ClassfileBenchmark - Changes: - all: https://git.openjdk.org/jdk/pull/14180/files - new: https://git.openjdk.org/jd

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v18]

2023-06-14 Thread Adam Sotona
On Thu, 1 Jun 2023 19:25:19 GMT, Adam Sotona wrote: >> src/java.base/share/classes/jdk/internal/classfile/Classfile.java line 55: >> >>> 53: >>> 54: static Classfile of() { >>> 55: return new ClassfileImpl(); >> >> We can cre

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v18]

2023-06-14 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: static instance of default Classfile context - Changes: - all: https://git.openjdk.org/jdk/pull/14180/files - new: https://git

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v17]

2023-06-14 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: Classfile.StackMapsOption names change - Changes: - all: https://git.openjdk.org/jdk/pull/14180/files - new: https://git.openj

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v14]

2023-06-13 Thread Adam Sotona
On Tue, 13 Jun 2023 09:34:17 GMT, Chen Liang wrote: >StackMapsOption doesn't fit in with other options, they should be >ALWAYS_STACK_MAPS, NEVER_STACK_MAPS, etc.) What about `STACK_MAPS_WHEN_REQUIRED`, `GENERATE_STACK_MAPS` and `DROP_STACK_MAPS`? - PR Comment:

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v16]

2023-06-13 Thread Adam Sotona
On Tue, 13 Jun 2023 11:32:59 GMT, Adam Sotona wrote: >> Classfile context object and multi-state options have been discussed at >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-May/000321.html >> This patch implements the proposed changes in Classfile API and fixe

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v16]

2023-06-13 Thread Adam Sotona
On Tue, 13 Jun 2023 09:15:13 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> ClassHierarchyResolver.DEFAULT_RESOLVER gets info from system class loader >> and do

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v14]

2023-06-13 Thread Adam Sotona
On Tue, 13 Jun 2023 09:19:00 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 38 commits: >> >> - Merge branch 'master' into JDK-8308

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v16]

2023-06-13 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: ClassHierarchyResolver.DEFAULT_RESOLVER gets info from system class loader and does not cache method-level caching is enabled if the provi

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v15]

2023-06-13 Thread Adam Sotona
> 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 40 commits: - performance fix - Merge branch 'master' into JDK-8308899-context - Merge branch 'master' into JD

Re: RFR: 8309838: Classfile API Util.toBinaryName and other cleanup

2023-06-13 Thread Adam Sotona
On Mon, 12 Jun 2023 09:45:18 GMT, Chen Liang wrote: > Thanks to @exe-boss for the reviews in #13082. This cleanup patch fixed the > typos you pointed out and removed other redundancies in classfile Util as > well. It looks good  - Marked as reviewed by asotona (Reviewer). PR

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v14]

2023-06-12 Thread Adam Sotona
> 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 38 commits: - Merge branch 'master' into JDK-8308899-context - Revert of DirectCodeBuilder.needsStackMap pre-cal

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v13]

2023-06-12 Thread Adam Sotona
On Mon, 12 Jun 2023 11:20:40 GMT, Adam Sotona wrote: >> Classfile context object and multi-state options have been discussed at >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-May/000321.html >> This patch implements the proposed changes in Classfile API and fixe

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v13]

2023-06-12 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with two additional commits since the last revision: - Revert "removal of ClassHierarchyImpl.DEFAULT_RESOLVER" esolver.java - Revert "proposed semi-synchronized caching, where t

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v12]

2023-06-09 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: fixed StackMapsOption dispatching in DirectCodeBuilder - Changes: - all: https://git.openjdk.org/jdk/pull/14180/files - new:

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v11]

2023-06-09 Thread Adam Sotona
From: kulla-dev on behalf of Brian Goetz > I think there's something fishy going on. Yes, transformation lambdas become significantly slower when moved from ClassModel to Classfile (unless I missed anything else). I’ll do some experiments to get the performance back.

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v11]

2023-06-09 Thread Adam Sotona
On Thu, 8 Jun 2023 16:37:22 GMT, Adam Sotona wrote: >> Classfile context object and multi-state options have been discussed at >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-May/000321.html >> This patch implements the proposed changes in Classfile API and fixe

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v9]

2023-06-09 Thread Adam Sotona
To: Adam Sotona , core-libs-dev@openjdk.org , kulla-...@openjdk.org Subject: Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v9] I still don't understand this point. Why are separate tests sharing a context at all? On 6/8/2023 9:26 AM, Adam Sotona wrote: Unfortunately

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v11]

2023-06-09 Thread Adam Sotona
On Thu, 8 Jun 2023 16:37:22 GMT, Adam Sotona wrote: >> Classfile context object and multi-state options have been discussed at >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-May/000321.html >> This patch implements the proposed changes in Classfile API and fixe

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v10]

2023-06-09 Thread Adam Sotona
On Thu, 8 Jun 2023 16:35:28 GMT, Brian Goetz wrote: > I have a hard time imagining heavy parallel use here; concurrency against the > same cache would most likely come from accidental sharing.  So this is not > necessarily a problem.  Are you imagining differnet use cases? I think it is

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v11]

2023-06-08 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with two additional commits since the last revision: - proposed semi-synchronized caching, where the map is not locked during delegate call - used Factory.INSTANCE for system C

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v10]

2023-06-08 Thread Adam Sotona
On Thu, 8 Jun 2023 14:07:24 GMT, Brian Goetz wrote: > Here are a few options:  - Make the CHA cache thread-safe using, say, CHM; This is current solution for the default system CH cache. We may also use a bit less strict custom semi-synchronization (just enough to be thread safe) instead

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v10]

2023-06-08 Thread Adam Sotona
f one method. On 6/8/2023 9:24 AM, Adam Sotona wrote: > > Unfortunately thread-unsafe context makes sharing of it in tests > executed in parallel a nightmare. > I can fix our Corpus tests and hope the race condition won't raise > also somewhere else later. > However how to e

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v10]

2023-06-08 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: Revert "ClassHierarchyResolver::ofSystem is now thread-unsafe" This reverts commit f3099cd5b252924392995bf65edc710c27822d2b. -

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v9]

2023-06-08 Thread Adam Sotona
On Thu, 8 Jun 2023 11:26:39 GMT, Adam Sotona wrote: >> Classfile context object and multi-state options have been discussed at >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-May/000321.html >> This patch implements the proposed changes in Classfile API and fixe

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v8]

2023-06-08 Thread Adam Sotona
On Thu, 8 Jun 2023 11:07:21 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 29 commits: >> >> - removal of ClassHierarchyImpl.DEFAULT_RESOLVER >>introduc

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v9]

2023-06-08 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: ClassHierarchyResolver::ofSystem is now thread-unsafe - Changes: - all: https://git.openjdk.org/jdk/pull/14180/files - new:

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v8]

2023-06-08 Thread Adam Sotona
> 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 29 commits: - removal of ClassHierarchyImpl.DEFAULT_RESOLVER introduction of ClassHierarchyResolver::ofSystem factory method

Re: RFR: 8304425: ClassHierarchyResolver from Reflection [v9]

2023-06-08 Thread Adam Sotona
On Wed, 7 Jun 2023 14:15:10 GMT, Chen Liang wrote: >> Add API to explore Class Hierarchy with a `ClassLoader` or a `Lookup` with >> proper privileges, with tests. >> >> This addition is useful in case classes at runtime are not loaded from the >> system class loader, such as Proxy. This is

Re: RFR: 8304425: ClassHierarchyResolver from Reflection [v8]

2023-06-07 Thread Adam Sotona
On Fri, 2 Jun 2023 03:36:35 GMT, Chen Liang wrote: >> Add API to explore Class Hierarchy with a `ClassLoader` or a `Lookup` with >> proper privileges, with tests. >> >> This addition is useful in case classes at runtime are not loaded from the >> system class loader, such as Proxy. This is

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v4]

2023-06-06 Thread Adam Sotona
> javap uses proprietary com.sun.tools.classfile library to parse class files. > > This patch converts javap 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 p

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v7]

2023-06-05 Thread Adam Sotona
> 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 27 commits: - Merge branch 'master' into JDK-8308899-context # Conflicts: #src/java.base/share/classes/jdk/intern

Integrated: 8308842: Consolidate exceptions thrown from Class-File API

2023-06-05 Thread Adam Sotona
On Thu, 25 May 2023 08:29:37 GMT, Adam Sotona wrote: > Class-File API actually throws wide variety of exceptions based on the actual > situation. Complete error handling code must cover > `IndexOutOfBoundsException`, `IllegalStateException` and > `IllegalArgumentException`.

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v5]

2023-06-05 Thread Adam Sotona
On Mon, 5 Jun 2023 15:14:35 GMT, Brian Goetz wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed copyright header > > src/java.base/share/classes/jdk/internal/classfile/Classfile.jav

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v6]

2023-06-05 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with two additional commits since the last revision: - added missing javadoc - simplified options names - Changes: - all: https://git.openjdk.org/jdk/pull/14180/files - new: https

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v5]

2023-06-05 Thread Adam Sotona
On Mon, 5 Jun 2023 16:30:16 GMT, Brian Goetz wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed copyright header > > src/java.base/share/classes/jdk/internal/classfile/constan

Re: RFR: 8308842: Consolidate exceptions thrown from Class-File API [v5]

2023-06-05 Thread Adam Sotona
onstant poll or not). > > Newly introduced `ConstantPoolException` extends `IllegalArgumentException` > to indicate the source of the problem is in constant pool. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one a

Re: RFR: 8308842: Consolidate exceptions thrown from Class-File API [v4]

2023-06-05 Thread Adam Sotona
onstant poll or not). > > Newly introduced `ConstantPoolException` extends `IllegalArgumentException` > to indicate the source of the problem is in constant pool. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one add

Re: RFR: 8308842: Consolidate exceptions thrown from Class-File API [v3]

2023-06-05 Thread Adam Sotona
On Mon, 5 Jun 2023 15:03:01 GMT, Brian Goetz 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 three addi

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v5]

2023-06-05 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: fixed copyright header - Changes: - all: https://git.openjdk.org/jdk/pull/14180/files - new: https://git.openjdk.org/jd

Re: RFR: 8308842: Consolidate exceptions thrown from Class-File API [v3]

2023-06-05 Thread Adam Sotona
onstant poll or not). > > Newly introduced `ConstantPoolException` extends `IllegalArgumentException` > to indicate the source of the problem is in constant pool. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request with a new target base due

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v4]

2023-06-05 Thread Adam Sotona
> 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 23 additional commits since the last revisio

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v3]

2023-06-02 Thread Adam Sotona
> 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 22 additional commits since the last revision:

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v2]

2023-06-02 Thread Adam Sotona
On Thu, 1 Jun 2023 19:23:05 GMT, Adam Sotona wrote: >> src/java.base/share/classes/java/lang/Module.java line 1593: >> >>> 1591: private Class loadModuleInfoClass(InputStream in) throws >>> IOException { >>> 1592: final String MODULE_INFO =

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v2]

2023-06-01 Thread Adam Sotona
On Thu, 1 Jun 2023 15:14:52 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed benchmarks > > src/java.base/share/classes/jdk/internal/classfile/impl/StackMapGenerat

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v2]

2023-06-01 Thread Adam Sotona
On Thu, 1 Jun 2023 15:04:00 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed benchmarks > > src/java.base/share/classes/java/lang/Module.java line 1593:

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v2]

2023-06-01 Thread Adam Sotona
> Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: fixed benchmarks - Changes: - all: https://git.openjdk.org/jdk/pull/14180/files - new: https://git.openjdk.org/jdk/pull/141

RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s)

2023-06-01 Thread Adam Sotona
Classfile context object and multi-state options have been discussed at https://mail.openjdk.org/pipermail/classfile-api-dev/2023-May/000321.html This patch implements the proposed changes in Classfile API and fixes all affected code across JDK sources and tests. Please review. Thanks, Adam

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s)

2023-06-01 Thread Adam Sotona
On Wed, 31 May 2023 05:42:58 GMT, Chen Liang wrote: >> Classfile context object and multi-state options have been discussed at >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-May/000321.html >> This patch implements the proposed changes in Classfile API and fixes all >> affected

Integrated: 8308856: jdk.internal.classfile.impl.EntryMap::nextPowerOfTwo math problem

2023-06-01 Thread Adam Sotona
On Thu, 25 May 2023 12:24:59 GMT, Adam Sotona wrote: > Fix of jdk.internal.classfile.impl.EntryMap::nextPowerOfTwo returning correct > zero power of two. > > Please review. > > Thanks, > Adam This pull request has now been integrated. Changeset: a6109bf1 Author

Re: RFR: 8308856: jdk.internal.classfile.impl.EntryMap::nextPowerOfTwo math problem [v2]

2023-05-29 Thread Adam Sotona
> Fix of jdk.internal.classfile.impl.EntryMap::nextPowerOfTwo returning correct > zero power of two. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: Update src/java.b

Re: RFR: 8308842: Consolidate exceptions thrown from Class-File API [v2]

2023-05-26 Thread Adam Sotona
On Thu, 25 May 2023 22:45:01 GMT, ExE Boss wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed javadoc > > src/java.base/share/classes/jdk/internal/classfile/CodeBuilder.java line 38

Re: RFR: 8308842: Consolidate exceptions thrown from Class-File API [v2]

2023-05-26 Thread Adam Sotona
onstant poll or not). > > Newly introduced `ConstantPoolException` extends `IllegalArgumentException` > to indicate the source of the problem is in constant pool. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one add

RFR: 8308856: jdk.internal.classfile.impl.EntryMap::nextPowerOfTwo math problem

2023-05-25 Thread Adam Sotona
Fix of jdk.internal.classfile.impl.EntryMap::nextPowerOfTwo returning correct zero power of two. Please review. Thanks, Adam - Commit messages: - 8308856: jdk.internal.classfile.impl.EntryMap::nextPowerOfTwo math problem Changes: https://git.openjdk.org/jdk/pull/14148/files

RFR: 8308842: Consolidate exceptions thrown from Class-File API

2023-05-25 Thread Adam Sotona
Class-File API actually throws wide variety of exceptions based on the actual situation. Complete error handling code must cover `IndexOutOfBoundsException`, `IllegalStateException` and `IllegalArgumentException`. Based on previous discussions we decided to consolidate on

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v3]

2023-05-25 Thread Adam Sotona
> javap uses proprietary com.sun.tools.classfile library to parse class files. > > This patch converts javap 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 p

Integrated: 8308549: Classfile API should fail to generate over-sized Code attribute

2023-05-25 Thread Adam Sotona
On Tue, 23 May 2023 12:54:20 GMT, Adam Sotona wrote: > Classfile API allowed to generate Code attribute exceeding the 65k limit. No > exception has been thrown during class generation and the class failed > verification later during class loading. > This patch adds Code size

Re: RFR: 8308549: Classfile API should fail to generate over-sized Code attribute [v2]

2023-05-24 Thread Adam Sotona
ass > verification process. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: added check for empty Code + test - Changes: - all: https://git.openjdk.org/jdk/pull

Re: RFR: 8308549: Classfile API should fail to generate over-sized Code attribute

2023-05-24 Thread Adam Sotona
On Wed, 24 May 2023 12:04:05 GMT, Jaikiran Pai wrote: >> Classfile API allowed to generate Code attribute exceeding the 65k limit. No >> exception has been thrown during class generation and the class failed >> verification later during class loading. >> This patch adds Code size limit check

Re: RFR: 8308549: Classfile API should fail to generate over-sized Code attribute

2023-05-24 Thread Adam Sotona
On Tue, 23 May 2023 15:13:04 GMT, Chen Liang wrote: > On a side note, does Classfile API reject methods with too many slots > (locals) (MethodTypeDesc can represent parameter lists with over 255 slots) > or stack (operand)? Classfile API does not perform any extra verifications of

RFR: 8308549: Classfile API should fail to generate over-sized Code attribute

2023-05-23 Thread Adam Sotona
Classfile API allowed to generate Code attribute exceeding the 65k limit. No exception has been thrown during class generation and the class failed verification later during class loading. This patch adds Code size limit check throwing IllegalArgumentException. The patch also adds similar check

Integrated: 8308093: Disable language preview features use in JDK

2023-05-23 Thread Adam Sotona
On Mon, 22 May 2023 10:01:55 GMT, Adam Sotona wrote: > This patch disables temporary use of language preview features in JDK. > Temporary enabled language preview features (to allow Pattern Matching for > switch use in the Classfile API library) are no more necessary. > All r

RFR: 8308093: Disable language preview features use in JDK

2023-05-22 Thread Adam Sotona
This patch disables temporary use of language preview features in JDK. Temporary enabled language preview features (to allow Pattern Matching for switch use in the Classfile API library) are no more necessary. All redundant use of --enable-preview in the Classfile API tests are also removed.

Integrated: 8308410: broken compilation of test\jdk\tools\launcher\exeJliLaunchTest.c

2023-05-19 Thread Adam Sotona
On Fri, 19 May 2023 12:08:55 GMT, Adam Sotona wrote: > JDK-8303669 patch to test\jdk\tools\launcher\exeJliLaunchTest.c broke > compilation on windows. > Unfortunately MSVC does not support variable length arrays. > This patch fixes test\jdk\tools\launcher\exeJliLaunchTest.c to

Re: RFR: 8308410: broken compilation of test\jdk\tools\launcher\exeJliLaunchTest.c

2023-05-19 Thread Adam Sotona
On Fri, 19 May 2023 12:08:55 GMT, Adam Sotona wrote: > JDK-8303669 patch to test\jdk\tools\launcher\exeJliLaunchTest.c broke > compilation on windows. > Unfortunately MSVC does not support variable length arrays. > This patch fixes test\jdk\tools\launcher\exeJliLaunchTest.c to

Re: RFR: 8308410: broken compilation of test\jdk\tools\launcher\exeJliLaunchTest.c

2023-05-19 Thread Adam Sotona
On Fri, 19 May 2023 12:35:47 GMT, Alan Bateman wrote: >> JDK-8303669 patch to test\jdk\tools\launcher\exeJliLaunchTest.c broke >> compilation on windows. >> Unfortunately MSVC does not support variable length arrays. >> This patch fixes test\jdk\tools\launcher\exeJliLaunchTest.c to use dynamic

Re: RFR: 8308410: broken compilation of test\jdk\tools\launcher\exeJliLaunchTest.c

2023-05-19 Thread Adam Sotona
On Fri, 19 May 2023 13:01:37 GMT, Adam Sotona wrote: >> test/jdk/tools/launcher/exeJliLaunchTest.c line 39: >> >>> 37: { >>> 38: //avoid null-terminated array of arguments to test JDK-8303669 >>> 39: char **argv = malloc(sizeof(char *) * a

RFR: 8308410: broken compilation of test\jdk\tools\launcher\exeJliLaunchTest.c

2023-05-19 Thread Adam Sotona
JDK-8303669 patch to test\jdk\tools\launcher\exeJliLaunchTest.c broke compilation on windows. Unfortunately MSVC does not support variable length arrays. This patch fixes test\jdk\tools\launcher\exeJliLaunchTest.c to use dynamic array allocation. Please review. Thanks, Adam -

Integrated: 8303669: SelectVersion indexes past the end of the argv array

2023-05-19 Thread Adam Sotona
On Wed, 3 May 2023 12:03:34 GMT, Adam Sotona wrote: > libjli/java.c's SelectVersion method receives argc and argv but ignores argc > in some circumstances an instead checks if *argv == 0 in its while loop, > which results in a segmentation fault if the provided array is not NULL >

Re: RFR: 8303669: SelectVersion indexes past the end of the argv array [v2]

2023-05-19 Thread Adam Sotona
On Thu, 4 May 2023 09:17:05 GMT, Adam Sotona wrote: >> libjli/java.c's SelectVersion method receives argc and argv but ignores argc >> in some circumstances an instead checks if *argv == 0 in its while loop, >> which results in a segmentation fault if the provided

Re: RFR: 8306842: Classfile API performance improvements [v9]

2023-05-18 Thread Adam Sotona
pt 4 13380.272 ± 810.113 ops/s > RebuildMethodBodies.unshared thrpt 49399.863 ± 557.060 ops/s Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: removed obsolete exports - Changes: - all: https://git.openj

Integrated: 8306842: Classfile API performance improvements

2023-05-18 Thread Adam Sotona
On Wed, 26 Apr 2023 15:04:50 GMT, Adam Sotona wrote: > Following improvements implemented: > - Switch over `String` replaced with switch single char > - Binary search for frames in `StackMapGenerator` > - `StackMapGenerator.rawHandlers` with pre-calculated offsets > - `ClassEn

Re: RFR: 8306842: Classfile API performance improvements [v8]

2023-05-18 Thread Adam Sotona
On Wed, 17 May 2023 13:42:32 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 34 commits: >> >> - Merge branch 'master' into JDK-8306842-perf-improvements

Re: RFR: 8306842: Classfile API performance improvements [v8]

2023-05-17 Thread Adam Sotona
pt 4 13380.272 ± 810.113 ops/s > RebuildMethodBodies.unshared thrpt 49399.863 ± 557.060 ops/s Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 34 commits: - Merge branch 'master' into JDK-8306842-perf-impro

Re: RFR: 8306842: Classfile API performance improvements [v7]

2023-05-17 Thread Adam Sotona
On Tue, 16 May 2023 22:00:18 GMT, Claes Redestad wrote: >> I plan to share a backing list in #13186, with API additions so users can >> avoid copying their input immutable parameter list as well. I see no reason >> to use a direct array, for MTD is not passed to and used by the VM, unlike >>

Re: RFR: 8306457: Classfile API components implementations should not be exposed [v3]

2023-05-17 Thread Adam Sotona
On Tue, 16 May 2023 18:10:08 GMT, Chen Liang wrote: >> The jdk.internal.classfile.components package's interfaces have >> implementations in their nested classes, which are implicitly public and >> exported with the package. They are now moved to the impl package to avoid >> unwanted

Integrated: 8307326: Package jdk.internal.classfile.java.lang.constant become obsolete

2023-05-17 Thread Adam Sotona
On Mon, 15 May 2023 08:38:54 GMT, Adam Sotona wrote: > Package `jdk.internal.classfile.java.lang.constant` containing `ModuleDesc` > and `PackageDesc` become obsolete after > [JDK-8306729](https://bugs.openjdk.org/browse/JDK-8306729). > Al

Re: RFR: 8306842: Classfile API performance improvements [v5]

2023-05-16 Thread Adam Sotona
On Mon, 15 May 2023 19:06:16 GMT, Glavo wrote: >> Adam Sotona has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - changed LinkedList to ArrayList in RebuildMethodBodies benchmark >> - added RepeatedModelTr

Re: RFR: 8306842: Classfile API performance improvements [v7]

2023-05-16 Thread Adam Sotona
pt 4 13380.272 ± 810.113 ops/s > RebuildMethodBodies.unshared thrpt 49399.863 ± 557.060 ops/s Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: LinkedList replaced with ArrayList in benchmarks - Changes: - all:

Re: RFR: 8306842: Classfile API performance improvements [v4]

2023-05-16 Thread Adam Sotona
On Mon, 15 May 2023 17:04:54 GMT, Claes Redestad wrote: >> I'm not questioning performance differences between list implementations. >> The implementation of top level list for this benchmark is irrelevant >> because ~10ns difference cannot affect ~100µs benchmark run. > > Fair point. The only

Re: RFR: 8306842: Classfile API performance improvements [v6]

2023-05-16 Thread Adam Sotona
pt 4 13380.272 ± 810.113 ops/s > RebuildMethodBodies.unshared thrpt 49399.863 ± 557.060 ops/s Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: Apply suggestions from code review Co-authored-by: Andrey Turbanov

Re: RFR: 8306842: Classfile API performance improvements [v5]

2023-05-15 Thread Adam Sotona
pt 4 13380.272 ± 810.113 ops/s > RebuildMethodBodies.unshared thrpt 49399.863 ± 557.060 ops/s Adam Sotona has updated the pull request incrementally with two additional commits since the last revision: - changed LinkedList to ArrayList in RebuildMethodBodies benchmark - a

Re: RFR: 8306842: Classfile API performance improvements [v4]

2023-05-15 Thread Adam Sotona
On Mon, 15 May 2023 13:42:05 GMT, Claes Redestad wrote: >> test/micro/org/openjdk/bench/jdk/classfile/RebuildMethodBodies.java line 57: >> >>> 55: public void setup() throws IOException { >>> 56: shared = new LinkedList<>(); >>> 57: unshared = new LinkedList<>(); >> >>

Re: RFR: 8306842: Classfile API performance improvements [v4]

2023-05-15 Thread Adam Sotona
On Fri, 12 May 2023 13:19:44 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed jmh benchmark parameters > > test/micro/org/openjdk/bench/jdk/classfile/RebuildMetho

Re: RFR: 8306457: Classfile API components implementations should not be exposed [v2]

2023-05-15 Thread Adam Sotona
On Sat, 13 May 2023 14:11:11 GMT, Chen Liang wrote: >> The jdk.internal.classfile.components package's interfaces have >> implementations in their nested classes, which are implicitly public and >> exported with the package. They are now moved to the impl package to avoid >> unwanted

RFR: 8307326: Package jdk.internal.classfile.java.lang.constant become obsolete

2023-05-15 Thread Adam Sotona
Package `jdk.internal.classfile.java.lang.constant` containing `ModuleDesc` and `PackageDesc` become obsolete after [JDK-8306729](https://bugs.openjdk.org/browse/JDK-8306729). All references to `jdk.internal.classfile.java.lang.constant.ModuleDesc` and

Re: RFR: 8291966: SwitchBootstrap.typeSwitch could be faster [v2]

2023-05-12 Thread Adam Sotona
On Tue, 17 Jan 2023 15:55:40 GMT, Jan Lahoda wrote: >> The pattern matching switches are using a bootstrap method >> `SwitchBootstrap.typeSwitch` to implement the jumps in the switch. >> Basically, for a switch like: >> >> switch (obj) { >> case String s when s.isEmpty() -> {} >> case

Re: RFR: 8306842: Classfile API performance improvements [v4]

2023-05-10 Thread Adam Sotona
pt 4 13380.272 ± 810.113 ops/s > RebuildMethodBodies.unshared thrpt 49399.863 ± 557.060 ops/s Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: fixed jmh benchmark parameters - Changes: - all: https://git.openj

Re: RFR: 8306842: Classfile API performance improvements [v4]

2023-05-10 Thread Adam Sotona
On Tue, 9 May 2023 16:15:27 GMT, Claes Redestad wrote: >> They are added in the `make/RunTests.gmk`: >> https://github.com/openjdk/jdk/pull/13550/files#diff-041bf69ea79b333b9ce99c1f879e398d698538530a35c361500b72631f059233R599-R608 > > That seems misplaced. Please file an RFE to have this

Re: RFR: 8306842: Classfile API performance improvements [v3]

2023-05-09 Thread Adam Sotona
pt 4 13380.272 ± 810.113 ops/s > RebuildMethodBodies.unshared thrpt 49399.863 ± 557.060 ops/s Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: fixed StackMapGenerator - Changes: - all: https://git.openjdk.org/jd

Re: RFR: 8306842: Classfile API performance improvements [v2]

2023-05-09 Thread Adam Sotona
pt 4 13380.272 ± 810.113 ops/s > RebuildMethodBodies.unshared thrpt 49399.863 ± 557.060 ops/s Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: Apply suggestions from code review Co-authored-by: liach <7806504+li...@use

Re: RFR: 8304425: ClassHierarchyResolver from Reflection [v7]

2023-05-09 Thread Adam Sotona
On Tue, 9 May 2023 15:09:54 GMT, Chen Liang wrote: >> Add API to explore Class Hierarchy with a `ClassLoader` or a `Lookup` with >> proper privileges, with tests. >> >> This addition is useful in case classes at runtime are not loaded from the >> system class loader, such as Proxy. This is

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