RFR: 8296139: Make GrowableBitMap the base class of all implementations [v2]

Xin Liu xliu at openjdk.org
Thu Nov 3 20:23:01 UTC 2022


> BitMap is an abstract class. All subclasses provide their own allocators. It is the allocator brings the capability to 'resize' the container. 
> I would like to add a new 'GrowableBitmap' and make it the common base class. 
> 
> To substitute 'VectorSet', we also need to merge ResourceBitMap and ArenaBitMap because VectorSet supports Resource and Arena storage at the same time. 
> This patch unifies them.  ResourceBitMap is a specialized ArenaBitMap whose allocator is with NULL arena.
> 
> All subclasses of GrowableBitMap are elastic. I will add new interface like VectorSet::test_set(index). It will grow to include the new index.

Xin Liu has updated the pull request incrementally with one additional commit since the last revision:

  Refactor GrowableBitMap using C++ CRTP
  
  With CPTP, we don't need to have explicit Allocators. Subclasses expose
  allocate/free member functions upward to GrowableBitMap<BitMapWithAllocator>. This
  aproach is similar to GrowableArray.

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/10941/files
  - new: https://git.openjdk.org/jdk/pull/10941/files/70716445..ef116492

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=10941&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10941&range=00-01

  Stats: 110 lines in 2 files changed: 26 ins; 53 del; 31 mod
  Patch: https://git.openjdk.org/jdk/pull/10941.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10941/head:pull/10941

PR: https://git.openjdk.org/jdk/pull/10941


More information about the hotspot-runtime-dev mailing list