RFR: 8269004 Implement ResizableResourceHashtable [v2]
Ioi Lam
iklam at openjdk.java.net
Mon Jun 28 19:47:00 UTC 2021
On Wed, 23 Jun 2021 01:31:51 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>>
>> @coleenp comments
>
> src/hotspot/share/cds/classListParser.hpp line 37:
>
>> 35:
>> 36: class constantPoolHandle;
>> 37: class Thread;
>
> I was looking for the use of constantPoolHandle in the header and I know why the forward declaration is needed. Shouldn't this declaration use a const reference so that the handle code doesn't create an unnecessary copy?
>
> bool ClassListParser::is_matching_cp_entry(constantPoolHandle &pool, int cp_index, TRAPS) {
I changed it to pass `const constantPoolHandle &pool`. As we discussed offline, neither will create a new copy of the handle, but passing a `const` reference is cleaner.
> src/hotspot/share/utilities/resourceHash.hpp line 252:
>
>> 250: // http://stackoverflow.com/questions/8532961/template-argument-of-type-that-is-defined-by-inner-typedef-from-other-template-c
>> 251: //typename ResourceHashtableFns<K>::hash_fn HASH = primitive_hash<K>,
>> 252: //typename ResourceHashtableFns<K>::equals_fn EQUALS = primitive_equals<K>,
>
> Can you remove this xlC comment? Not sure why we care.
Done.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4536
More information about the hotspot-dev
mailing list