RFR: 8250563: Add KVHashtable::add_if_absent [v2]

Ioi Lam iklam at openjdk.java.net
Tue Sep 8 07:21:43 UTC 2020


On Tue, 8 Sep 2020 07:05:12 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Ioi Lam has refreshed the contents of this pull request, and previous commits have been removed. The incremental views
>> will show differences compared to the previous content of the PR. The pull request contains one new commit since the
>> last revision:
>>   8250563: Add KVHashtable::add_if_absent
>
> src/hotspot/share/utilities/hashtable.hpp line 327:
> 
>> 325:   //  pointer to the value.
>> 326:   // *p_created is true if entry was created, false if entry pre-existed.
>> 327:   V* add_if_absent(K const& key, V const& value, bool* p_created) {
> 
> Does it really need `const &` here? It looks inconsistent with `add(K,V)` and `lookup(K)` in the same class.

I'll remove the `const&`. I copied that from resourceHash.hpp but it doesn't fit in with the rest of hashtable.hpp.

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

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


More information about the hotspot-runtime-dev mailing list