<i18n dev> RFR: 8332826: Make hashCode methods in ArraysSupport friendlier [v2]

Chen Liang liach at openjdk.org
Wed May 29 11:45:07 UTC 2024


On Mon, 27 May 2024 20:55:29 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

>> 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`
>
> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix incorrect utf16 hashCode adaptation

Marked as reviewed by liach (Author).

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

PR Review: https://git.openjdk.org/jdk/pull/19414#pullrequestreview-2085162416


More information about the i18n-dev mailing list