RFR: 8276789: Support C++ lambda in ResourceHashtable::iterate [v4]
Coleen Phillimore
coleenp at openjdk.java.net
Wed Jun 1 20:26:41 UTC 2022
On Mon, 23 May 2022 17:13:36 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> 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.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>
> some clean up suggested by @stefank
I'm a bit baffled by the layers of lambda expressions.
src/hotspot/share/cds/dumpTimeClassInfo.hpp line 209:
> 207: } else {
> 208: return _unregistered_count;
> 209: }
This file has a blank first line, can you fix this?
src/hotspot/share/cds/dumpTimeClassInfo.inline.hpp line 76:
> 74: return iter->do_entry(k, v);
> 75: };
> 76: iterate(function);
I don't understand this wrapper level. Why doesn't this call into the resourceHashtable::iterate function directly? Same with the iterate_all function?
src/hotspot/share/classfile/systemDictionaryShared.cpp line 665:
> 663: ResourceMark rm;
> 664: UnregisteredClassesDuplicationChecker dup_checker;
> 665: _dumptime_table->iterate(&dup_checker);
Which iterate function does this call?
-------------
PR: https://git.openjdk.java.net/jdk/pull/8761
More information about the hotspot-dev
mailing list