RFR: 8338979: Avoid bootstrapped switches in the classfile API [v2]

Chen Liang liach at openjdk.org
Mon Aug 26 15:03:07 UTC 2024


On Mon, 26 Aug 2024 14:54:59 GMT, Per Minborg <pminborg at openjdk.org> wrote:

>> Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Copyright
>
> src/java.base/share/classes/jdk/internal/classfile/impl/ClassFileImpl.java line 86:
> 
>> 84:         var amo = attributeMapperOption;
>> 85:         for (var o : options) {
>> 86:             if (o instanceof StackMapsOption oo) {
> 
> Just out of curiosity, will this be slower than the switch statement?

It may after `SwitchBootstraps` is improved; but this code will be relied on by `SwitchBootstraps` to generate switches, so it won't be able to use pattern matching switches.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20714#discussion_r1731382984


More information about the core-libs-dev mailing list