-
Leszek Swirski authored
Split the capacity calculation logic and the allocation logic for StringTable resizing (both shrinking and enlarging). This allows us to: a) Precalculate the new size, without potentially first shrinking then resizing again, b) Make the final size calculation more explicit, b) In the future, maybe allow the allocation to happen outside a lock, and the rehashing to be inside it, for a concurrent string table. Change-Id: Ie41773520f2b20d9d244c151a153ed784f17283e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2307218 Auto-Submit: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#68958}
c0a11e49