< prev index next >

src/hotspot/share/oops/stackChunkOop.inline.hpp

Print this page
*** 254,16 ***
    DEBUG_ONLY(bitmap.verify_range(bit_index_for(start_address()), bit_index_for(end_address()));)
  
    return bitmap;
  }
  
! inline BitMap::idx_t stackChunkOopDesc::bit_index_for(intptr_t* p) const {
    return UseCompressedOops ? bit_index_for((narrowOop*)p) : bit_index_for((oop*)p);
  }
  
  template <typename OopT>
  inline BitMap::idx_t stackChunkOopDesc::bit_index_for(OopT* p) const {
    assert(p >= (OopT*)start_address(), "Address not in chunk");
    return p - (OopT*)start_address();
  }
  
  inline intptr_t* stackChunkOopDesc::address_for_bit(BitMap::idx_t index) const {
--- 254,17 ---
    DEBUG_ONLY(bitmap.verify_range(bit_index_for(start_address()), bit_index_for(end_address()));)
  
    return bitmap;
  }
  
! inline BitMap::idx_t stackChunkOopDesc::bit_index_for(address p) const {
    return UseCompressedOops ? bit_index_for((narrowOop*)p) : bit_index_for((oop*)p);
  }
  
  template <typename OopT>
  inline BitMap::idx_t stackChunkOopDesc::bit_index_for(OopT* p) const {
+   assert(is_aligned(p, alignof(OopT)), "should be aligned: " PTR_FORMAT, p2i(p));
    assert(p >= (OopT*)start_address(), "Address not in chunk");
    return p - (OopT*)start_address();
  }
  
  inline intptr_t* stackChunkOopDesc::address_for_bit(BitMap::idx_t index) const {
< prev index next >