RFR: 8270061: Change parameter order of ResourceHashtable [v3]

Ioi Lam iklam at openjdk.java.net
Wed Jul 28 16:41:05 UTC 2021


> 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.

Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - Merge branch 'master' into 8270061-reorder-resource-hash-params
 - Merge branch 'master' of https://github.com/openjdk/jdk into 8270061-reorder-resource-hash-params
 - 8270061: Change parameter order of ResourceHashtable

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/4912/files
  - new: https://git.openjdk.java.net/jdk/pull/4912/files/3a87c5db..56abd91e

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4912&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4912&range=01-02

  Stats: 4616 lines in 66 files changed: 81 ins; 4328 del; 207 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4912.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4912/head:pull/4912

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


More information about the hotspot-dev mailing list