RFR: 8327093: Add slice function to BitMap API [v3]
Ioi Lam
iklam at openjdk.org
Wed Mar 6 23:46:52 UTC 2024
On Wed, 6 Mar 2024 21:34:06 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> The BitMap does not currently have a "slice" method which can return a subset of the bitmap defined by a start and end bit. This utility can be used to analyze portions of a bitmap or to overwrite the existing map with a shorter, modified map.
>>
>> This implementation has two core methods:
>> `copy_of_range` allocates and returns a new word array as used internally by BitMap
>> `truncate` overwrites the internal array with the one generated by `copy_of_range` so none of the internal workings are exposed to callers outside of BitMap.
>>
>> This change is verified with an included test.
>
> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision:
>
> Ioi comments and moved tests
LGTM
-------------
Marked as reviewed by iklam (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/18092#pullrequestreview-1921045324
More information about the hotspot-dev
mailing list