RFR: 8292170: Convert CodeRootSetTable to use ResourceHashtable [v2]

Leo Korinth lkorinth at openjdk.org
Thu Dec 15 13:56:27 UTC 2022


> I am replacing the old hash table with ResourceHashtable. In the process I am also removing the redundant `_length` field. By removing the `_length` field, a lot of asserts can be removed as the length will trivially match the length of the underlying table.
> 
> I would like to have feedback on the addition of `unlink_destruct(Function&& should_remove)`. I added it because I prefer to use a functor object that can be used by lambdas instead of an iterator object. However, I did add code to "destruct" resource objects when they are removed instead of just letting them be to reflect that we use `delete` on c-heap objects. Maybe I should remove this "improvement" and then maybe implement the function by calling the existing unlink?

Leo Korinth has updated the pull request incrementally with two additional commits since the last revision:

 - copyrights
 - use iter function interface instead, make closure NONCOPYABLE

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/11675/files
  - new: https://git.openjdk.org/jdk/pull/11675/files/df19ac4c..4861d0d3

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

  Stats: 37 lines in 5 files changed: 1 ins; 30 del; 6 mod
  Patch: https://git.openjdk.org/jdk/pull/11675.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11675/head:pull/11675

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


More information about the hotspot-dev mailing list