RFR: 8365245: Move size reducing operations to GrowableArrayWithAllocator
Kim Barrett
kbarrett at openjdk.org
Mon Aug 11 13:14:03 UTC 2025
Please review this change to GrowableArray to move size reducing operations
from GrowableArrayBase and GrowableArrayView to GrowableArrayWithAllocator.
See JBS for rationale for this move.
This is mostly just a simple code motion change, with the moved functions
being updated to account for different name lookup rules now that they are in
a class with a class template base class. For the most part this refactoring
didn't require any client code changes. All but one use of one moved function
was with a GrowableArrayWithAllocator-derived class, so not affected by moving
the functions. The one exception was a test of ZArraySlice that was modified
to no longer use GA::pop().
Testing: mach5 tier1.
-------------
Commit messages:
- move pop to GAWA, fixing gtest
- move remove_at to GAWA
- move remove_if_existing to GAWA
- move remove to GAWA
- move remove_till/remove_range to GAWA
- move delete_at to GAWA
- move trunc_to to GAWA
- move clear() to GAWA
Changes: https://git.openjdk.org/jdk/pull/26726/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26726&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8365245
Stats: 134 lines in 2 files changed: 69 ins; 64 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/26726.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26726/head:pull/26726
PR: https://git.openjdk.org/jdk/pull/26726
More information about the hotspot-dev
mailing list