RFR: 8276789: Support C++ lambda in ResourceHashtable::iterate

Ioi Lam iklam at openjdk.java.net
Tue May 17 23:47:15 UTC 2022


I added two new template functions to reduce the boilerplate code when walking the entries in a ResourceHashtable

- `template<typename F> void ResourceHashtable::iterate(F f)`
- `template<typename F> void ResourceHashtable::iterate_all(F f)`

I also modified a couple of places in systemDictionaryShared.cpp to use the new functionality.

Testing with tiers 1-4.

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

Commit messages:
 - 8276789: Support C++ lambda in ResourceHashtable::iterate

Changes: https://git.openjdk.java.net/jdk/pull/8761/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8761&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8276789
  Stats: 106 lines in 4 files changed: 46 ins; 36 del; 24 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8761.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8761/head:pull/8761

PR: https://git.openjdk.java.net/jdk/pull/8761


More information about the hotspot-dev mailing list