RFR: 8178352: BitMap::get_next_zero_offset may give wrong result on Mac
kim.barrett at oracle.com
Mon Apr 10 18:21:32 UTC 2017
> On Apr 10, 2017, at 12:48 PM, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
> On 10/04/17 18:33, Kim Barrett wrote:
>>> On Apr 10, 2017, at 12:18 PM, Kim Barrett <kim.barrett at oracle.com>
>>>> You did a couple of stylistic changes that now make the code inconsistent:
>>>> I think these changes should be kept out of this patch.
>>> Post-decrement in for loops still makes me twitch, even though it doesn’t matter
>>> in this code base. But okay.
>> Updated webrev:
> To be consistent with the other code it in that file (res & 1) == 0 should be !(res & 1).
That would be contrary to hotspot style guide; I think that should take precedence.
> Maybe create a small, trivial cleanup RFE to change the following in the BitMap files:
> * !(res & 1) => (res & 1) == 0
> * res = res >> 1 => res >>= 1
I can do something like that, but would prefer it as a followup.
There are other similar syntactic / style guide cleanups, such as consistent use of
helpers like bit_in_word, word_index, and bit_index.
Having unit tests make these kinds of changes easier.
More information about the hotspot-dev