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

Ioi Lam iklam at openjdk.java.net
Wed Jul 28 04:21:03 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 two additional commits since the last revision:

 - 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/dd6afc8f..3a87c5db

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

  Stats: 6717 lines in 133 files changed: 5425 ins; 406 del; 886 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