On Wed, 3 Apr 2024 16:17:57 GMT, ExE Boss <d...@openjdk.org> wrote: >> Jan Lahoda has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains six commits: >> >> - Reflecting review feedback. >> - Merge branch 'master' into JDK-8291966 >> - Adding comments >> - Improving performance >> - Merge branch 'master' into JDK-8291966 >> - 8291966: SwitchBootstrap.typeSwitch could be faster > > src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java line 389: > >> 387: } >> 388: } >> 389: return enumMap.map[value.ordinal()]; > > `enumMap.map` never gets set before this line.
There's a bug filed for this already: https://bugs.openjdk.org/browse/JDK-8332522 @lahodaj explained that this broken code is part of an optimization which is never attempted (IIRC due to the bug you noted on line 327). JDK-833522 seem like a good place to continue this conversation..? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/9779#discussion_r1649761928