diff -r ff10f8f3a583 -r 96bd0f70ef99 src/hotspot/share/utilities/bitMap.hpp --- a/src/hotspot/share/utilities/bitMap.hpp Fri Nov 02 14:00:29 2018 -0700 +++ b/src/hotspot/share/utilities/bitMap.hpp Fri Nov 02 17:51:21 2018 -0400 @@ -61,6 +61,17 @@ bm_word_t* _map; // First word in bitmap idx_t _size; // Size of bitmap (in bits) + // Helper for get_next_{zero,one}_bit variants. + // - flip designates whether searching for 1s or 0s. Must be one of + // find_{zeros,ones}_flip. + // - aligned_right is true if r_index is a priori on a bm_word_t boundary. + template + inline idx_t get_next_bit_impl(idx_t l_index, idx_t r_index) const; + + // Values for get_next_bit_impl flip parameter. + static const bm_word_t find_ones_flip = 0; + static const bm_word_t find_zeros_flip = ~(bm_word_t)0; + protected: // Return the position of bit within the word that contains it (e.g., if // bitmap words are 32 bits, return a number 0 <= n <= 31).