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

Adam Sotona asotona at openjdk.org
Tue Jun 13 11:56:49 UTC 2023


On Tue, 13 Jun 2023 09:15:13 GMT, Chen Liang <liach at openjdk.org> 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 does not cache
>>   method-level caching is enabled if the provided resolver is not already cached
>
> src/java.base/share/classes/jdk/internal/classfile/impl/DirectCodeBuilder.java line 334:
> 
>> 332:                     maxLocals = original.maxLocals();
>> 333:                     maxStack = original.maxStack();
>> 334:                     stackMapAttr = original.findAttribute(Attributes.STACK_MAP_TABLE).orElse(null);
> 
> On the baseline, if a stack map table attribute can be reused but this findAttribute doesn't find an attribute (implying an implicit stack map, potentially for simple code?), we will not perform a stack map generation and simply reuse a trivial stack map (null), which should be a correct algorithm.

Yes, I caused this regression by "Revert of DirectCodeBuilder.needsStackMap pre-calculation" commit above.
The needStackMap pre-calculation on the other side caused regression in lambda performance, so one regression has been replaced with another.

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

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


More information about the core-libs-dev mailing list