Integrated: 8270061: Change parameter order of ResourceHashtable

Ioi Lam iklam at openjdk.java.net
Wed Jul 28 20:42:37 UTC 2021


On Tue, 27 Jul 2021 16:10:48 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> The template parameter for ResourceHashtable is currently in this order:
> 
> template<
>     typename K, typename V,
>     unsigned (*HASH)  (K const&)           = primitive_hash<K>,
>     bool     (*EQUALS)(K const&, K const&) = primitive_equals<K>,
>     unsigned SIZE = 256,
>     ResourceObj::allocation_type ALLOC_TYPE = ResourceObj::RESOURCE_AREA,
>     MEMFLAGS MEM_TYPE = mtInternal
>     >
> class ResourceHashtable {...}
> 
> 
> However, more often than not, default values of `HASH` and `EQUALS` will be used, where the other parameters may need to be specified.
> 
> We should move the `HASH` and `EQUALS` parameters to the end of the parameter list.

This pull request has now been integrated.

Changeset: 357947ac
Author:    Ioi Lam <iklam at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/357947acd80b50b1f26679608245de1f9566163e
Stats:     97 lines in 18 files changed: 24 ins; 48 del; 25 mod

8270061: Change parameter order of ResourceHashtable

Reviewed-by: coleenp, stuefe

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

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


More information about the hotspot-dev mailing list