< prev index next >

src/hotspot/share/utilities/bitMap.inline.hpp

Print this page
*** 25,10 ***
--- 25,11 ---
  #ifndef SHARE_UTILITIES_BITMAP_INLINE_HPP
  #define SHARE_UTILITIES_BITMAP_INLINE_HPP
  
  #include "utilities/bitMap.hpp"
  
+ #include "memory/iterator.inline.hpp"
  #include "runtime/atomic.hpp"
  #include "utilities/align.hpp"
  #include "utilities/count_trailing_zeros.hpp"
  
  inline void BitMap::set_bit(idx_t bit) {

*** 241,22 ***
  inline BitMap::idx_t
  BitMap::get_next_one_offset_aligned_right(idx_t l_offset, idx_t r_offset) const {
    return get_next_bit_impl<find_ones_flip, true>(l_offset, r_offset);
  }
  
! inline bool BitMap::iterate(BitMapClosure* cl, idx_t beg, idx_t end) {
    for (idx_t index = beg; true; ++index) {
      index = get_next_one_offset(index, end);
      if (index >= end) {
        return true;
!     } else if (!cl->do_bit(index)) {
        return false;
      }
    }
  }
  
! inline bool BitMap::iterate(BitMapClosure* cl) {
    return iterate(cl, 0, size());
  }
  
  // Returns a bit mask for a range of bits [beg, end) within a single word.  Each
  // bit in the mask is 0 if the bit is in the range, 1 if not in the range.  The
--- 242,24 ---
  inline BitMap::idx_t
  BitMap::get_next_one_offset_aligned_right(idx_t l_offset, idx_t r_offset) const {
    return get_next_bit_impl<find_ones_flip, true>(l_offset, r_offset);
  }
  
! template <class BitMapClosureType>
+ inline bool BitMap::iterate(BitMapClosureType* cl, idx_t beg, idx_t end) {
    for (idx_t index = beg; true; ++index) {
      index = get_next_one_offset(index, end);
      if (index >= end) {
        return true;
!     } else if (!Devirtualizer::do_bit(cl, index)) {
        return false;
      }
    }
  }
  
! template <class BitMapClosureType>
+ inline bool BitMap::iterate(BitMapClosureType* cl) {
    return iterate(cl, 0, size());
  }
  
  // Returns a bit mask for a range of bits [beg, end) within a single word.  Each
  // bit in the mask is 0 if the bit is in the range, 1 if not in the range.  The
< prev index next >