• Patrick Thier's avatar
    Add Name::EnsureRawHash() · d1943586
    Patrick Thier authored
    to get rid of the pattern
    ```
    EnsureHash();
    uint32_t field = raw_hash_field();
    ```
    which requires an additional load and might be misleading in the
    presence of forwarding indices for shared strings, as raw_hash_field()
    can return a forwarding index, whereas EnsureRawHash() will always
    return a computed hash value.
    
    Bug: v8:12957
    Change-Id: I33426fef433f774fb323d4381e784c1037fb6fbb
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3829469Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
    Commit-Queue: Patrick Thier <pthier@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#82441}
    d1943586
test-strings.cc 75 KB