hotspot/src/share/vm/utilities/bitMap.inline.hpp
changeset 26937 dd2b0f6de283
parent 25351 7c198a690050
child 37059 c482915a21aa
--- a/hotspot/src/share/vm/utilities/bitMap.inline.hpp	Tue Sep 30 13:14:22 2014 +0200
+++ b/hotspot/src/share/vm/utilities/bitMap.inline.hpp	Wed Oct 01 12:29:28 2014 +0400
@@ -130,7 +130,7 @@
 
 inline void BitMap::set_range_of_words(idx_t beg, idx_t end) {
   bm_word_t* map = _map;
-  for (idx_t i = beg; i < end; ++i) map[i] = ~(uintptr_t)0;
+  for (idx_t i = beg; i < end; ++i) map[i] = ~(bm_word_t)0;
 }
 
 
@@ -172,8 +172,8 @@
 
   // check bits including and to the _left_ of offset's position
   idx_t pos = bit_in_word(res_offset);
-  idx_t res = map(index) >> pos;
-  if (res != (uintptr_t)NoBits) {
+  bm_word_t res = map(index) >> pos;
+  if (res != 0) {
     // find the position of the 1-bit
     for (; !(res & 1); res_offset++) {
       res = res >> 1;
@@ -207,7 +207,7 @@
   // skip over all word length 0-bit runs
   for (index++; index < r_index; index++) {
     res = map(index);
-    if (res != (uintptr_t)NoBits) {
+    if (res != 0) {
       // found a 1, return the offset
       for (res_offset = bit_index(index); !(res & 1); res_offset++) {
         res = res >> 1;
@@ -235,9 +235,9 @@
 
   // check bits including and to the _left_ of offset's position
   idx_t pos = res_offset & (BitsPerWord - 1);
-  idx_t res = (map(index) >> pos) | left_n_bits((int)pos);
+  bm_word_t res = (map(index) >> pos) | left_n_bits((int)pos);
 
-  if (res != (uintptr_t)AllBits) {
+  if (res != ~(bm_word_t)0) {
     // find the position of the 0-bit
     for (; res & 1; res_offset++) {
       res = res >> 1;
@@ -248,7 +248,7 @@
   // skip over all word length 1-bit runs
   for (index++; index < r_index; index++) {
     res = map(index);
-    if (res != (uintptr_t)AllBits) {
+    if (res != ~(bm_word_t)0) {
       // found a 0, return the offset
       for (res_offset = index << LogBitsPerWord; res & 1;
            res_offset++) {
@@ -277,8 +277,8 @@
   idx_t res_offset = l_offset;
 
   // check bits including and to the _left_ of offset's position
-  idx_t res = map(index) >> bit_in_word(res_offset);
-  if (res != (uintptr_t)NoBits) {
+  bm_word_t res = map(index) >> bit_in_word(res_offset);
+  if (res != 0) {
     // find the position of the 1-bit
     for (; !(res & 1); res_offset++) {
       res = res >> 1;
@@ -290,7 +290,7 @@
   // skip over all word length 0-bit runs
   for (index++; index < r_index; index++) {
     res = map(index);
-    if (res != (uintptr_t)NoBits) {
+    if (res != 0) {
       // found a 1, return the offset
       for (res_offset = bit_index(index); !(res & 1); res_offset++) {
         res = res >> 1;
@@ -321,11 +321,11 @@
 }
 
 inline void BitMap::set_large_range_of_words(idx_t beg, idx_t end) {
-  memset(_map + beg, ~(unsigned char)0, (end - beg) * sizeof(uintptr_t));
+  memset(_map + beg, ~(unsigned char)0, (end - beg) * sizeof(bm_word_t));
 }
 
 inline void BitMap::clear_large_range_of_words(idx_t beg, idx_t end) {
-  memset(_map + beg, 0, (end - beg) * sizeof(uintptr_t));
+  memset(_map + beg, 0, (end - beg) * sizeof(bm_word_t));
 }
 
 inline BitMap::idx_t BitMap::word_index_round_up(idx_t bit) const {