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

Chen Liang liach at openjdk.org
Wed Jun 21 06:53:14 UTC 2023


On Thu, 15 Jun 2023 17:22:32 GMT, Adam Sotona <asotona at openjdk.org> 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 code across JDK sources and tests.
>> 
>> 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

src/java.base/share/classes/jdk/internal/classfile/impl/ClassfileImpl.java line 63:

> 61:             DeadCodeOption.PATCH_DEAD_CODE,
> 62:             DeadLabelsOption.FAIL_ON_DEAD_LABELS,
> 63:             new ClassHierarchyResolverOptionImpl(ClassHierarchyResolver.defaultResolver()),

Don't users of the default context still share a non-thread-safe-cached version of the default resolver? We might still need to convert DEFAULT_CONTEXT field to a static defaultContext() method that returns a `new ClassfileImpl(...);` (the attribute mapper option can be shared).

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14180#discussion_r1236461953


More information about the core-libs-dev mailing list