< prev index next >
src/share/vm/utilities/bitMap.inline.hpp
Print this page
rev 12846 : [mq]: fix
*** 1,7 ****
/*
! * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 220,236 ****
idx_t index = word_index(l_offset);
idx_t r_index = word_index(r_offset-1) + 1;
idx_t res_offset = l_offset;
// check bits including and to the _left_ of offset's position
! idx_t pos = res_offset & (BitsPerWord - 1);
! bm_word_t res = (map(index) >> pos) | left_n_bits((int)pos);
! if (res != ~(bm_word_t)0) {
! // find the position of the 0-bit
! for (; res & 1; res_offset++) {
! res = res >> 1;
}
assert(res_offset >= l_offset, "just checking");
return MIN2(res_offset, r_offset);
}
// skip over all word length 1-bit runs
--- 220,236 ----
idx_t index = word_index(l_offset);
idx_t r_index = word_index(r_offset-1) + 1;
idx_t res_offset = l_offset;
// check bits including and to the _left_ of offset's position
! idx_t pos = bit_in_word(res_offset);
! bm_word_t res = ~map(index) >> pos; // flip bits and shift for l_offset
! if (res != 0) {
! // find the position of the 1-bit
! for (; (res & 1) == 0; ++res_offset) {
! res >>= 1;
}
assert(res_offset >= l_offset, "just checking");
return MIN2(res_offset, r_offset);
}
// skip over all word length 1-bit runs
< prev index next >