RFR: 8327093: Add truncate function to BitMap API [v4]
Matias Saavedra Silva
matsaave at openjdk.org
Fri Mar 8 16:51:10 UTC 2024
> 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 two additional commits since the last revision:
- Fixed CV-qualifier style
- Axel comments and new test case
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/18092/files
- new: https://git.openjdk.org/jdk/pull/18092/files/17ac26f2..f02e07fe
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=18092&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=18092&range=02-03
Stats: 51 lines in 2 files changed: 41 ins; 0 del; 10 mod
Patch: https://git.openjdk.org/jdk/pull/18092.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18092/head:pull/18092
PR: https://git.openjdk.org/jdk/pull/18092
More information about the hotspot-dev
mailing list