RFR: 8324649: Shenandoah: replace implementation of free set [v39]
Roman Kennke
rkennke at openjdk.org
Fri May 10 16:20:24 UTC 2024
On Tue, 16 Apr 2024 00:19:11 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 42:
>>
>>> 40: case Mutator: return "Mutator";
>>> 41: case Collector: return "Collector";
>>> 42: default: return "Unrecognized";
>>
>> I believe using an 'enum class' for ShenandoahFreeSetPartitionId means you don't need to have a default.
>
> Compiler still wants the default clause. Otherwise, "control reaches end of non-void function". You'd think the compiler could be less strict, but will leave as is, unless we can figure out a way to get around this.
Hmm, ok. So maybe at least put a ShouldNotReachHere(); before the return?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17561#discussion_r1596574706
More information about the shenandoah-dev
mailing list