RFR: 8343700: ceil_log2 should not loop endlessly [v2]
Sonia Zaldana Calles
szaldana at openjdk.org
Wed Nov 13 19:58:34 UTC 2024
On Wed, 13 Nov 2024 18:35:01 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Sonia Zaldana Calles has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
>>
>> - Merge branch 'openjdk:master' into JDK-8343700
>> - 8343700: ceil_log2 should not loop endlessly
>
> src/hotspot/share/utilities/powerOfTwo.hpp line 127:
>
>> 125: inline T ceil_log2(T value) {
>> 126: assert(value > 0, "Invalid value");
>> 127: if (value == 1) return 0;
>
> Is this the same as starting the loop from `ret = 0`?
Yeah, I think so. Pushed an update since I agree it reads better that way. Thanks!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22074#discussion_r1841076334
More information about the hotspot-dev
mailing list