RFR: 8178352: BitMap::get_next_zero_offset may give wrong result on Mac
kim.barrett at oracle.com
Tue Apr 11 17:45:18 UTC 2017
> On Apr 10, 2017, at 2:21 PM, Kim Barrett <kim.barrett at oracle.com> wrote:
>> On Apr 10, 2017, at 12:48 PM, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
>> 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.
Stefan and I discussed this privately, and I’ve agreed to go with the locally consistent style here,
even though it’s contrary to the hotspot style guide. Part of my decision process is related to
the next part of this reply.
>> 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.
On further consideration, I don’t think we should do that. Instead, we should deal with the fact
that we have 3 functions of significant size and complexity, which differ in small ways, some of
which are intentional and some of which are not. We should instead have one parameterized
I’d forgotten that I actually have code that does that. I’d put it aside because I had more pressing
matters to deal with and that code needed more work, especially testing. That was actually the
driver for 8169039, which is how we got here…
More information about the hotspot-dev