RFR: 8332826: Make hashCode methods in ArraysSupport friendlier
Pavel Rappo
prappo at openjdk.org
Mon May 27 16:33:09 UTC 2024
Please review this PR, which supersedes a now withdrawn https://github.com/openjdk/jdk/pull/14831.
This PR replaces `ArraysSupport.vectorizedHashCode` with a set of more user-friendly methods. Here's a summary:
- Made the operand constants (i.e. `T_BOOLEAN` and friends) and the `vectorizedHashCode` method private
- Made the `vectorizedHashCode` method private, but didn't rename it. Renaming would dramatically increase this PR review cost, because that method's name is used by a lot of VM code. On a bright side, since the method is now private, it's no longer callable by clients of `ArraysSupport`, thus a problem of an inaccurate name is less severe.
- Made the `ArraysSupport.utf16HashCode` method private
- Moved tiny cases (i.e. 0, 1, 2) to `ArraysSupport`
-------------
Commit messages:
- Initial commit
Changes: https://git.openjdk.org/jdk/pull/19414/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19414&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8332826
Stats: 258 lines in 13 files changed: 186 ins; 32 del; 40 mod
Patch: https://git.openjdk.org/jdk/pull/19414.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19414/head:pull/19414
PR: https://git.openjdk.org/jdk/pull/19414
More information about the hotspot-compiler-dev
mailing list