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

Per Minborg pminborg at openjdk.org
Mon Aug 26 14:58:16 UTC 2024


On Mon, 26 Aug 2024 13:52:35 GMT, Claes Redestad <redestad at openjdk.org> wrote:

>> Noticed these on a few startup tests in code generating proxies. Desugaring switch expressions reduce risk of bootstrap circularity from any future changes to switch bootstrapping (which itself depends on the classfile API). It's also a tiny improvement to startup performance.
>
> 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?

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

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


More information about the core-libs-dev mailing list