WTF::HashTable v2 |
|||
Issue descriptionCurrently, WTF::HashTable is waaaaay too complex. That causes several problems: * It's not very obvious how to write custom hash traits or hash functions. * There are two kinds of hash traits: HashTraits and hash functions (DefaultHash and the like). * HashTraits itself is very complex and nobody really knows which trait does what. Each trait controls rather random aspects, and the criteria for a "complete" HashTraits is not very obvious. * It has 7 template parameters; that's too many and we can probably reduce them to 4: Key, Value, (New)HashTableTraits, Allocator, putting all the traits information in HashTableTraits. We need to create a set of well-defined, easy-to-customize hash table traits, and clean up existing implementation.
,
Aug 29 2017
Design doc: https://docs.google.com/document/d/1-N-vUWg790wJc1CHCC4C_v-HtQNg9n9w5Y_6KtaKFlU/edit?usp=sharing
,
Aug 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8a7beb2d32b280e05602449bfc5e4123ae5d8c58 commit 8a7beb2d32b280e05602449bfc5e4123ae5d8c58 Author: Yuta Kitamura <yutak@chromium.org> Date: Wed Aug 30 09:07:07 2017 WTF experimental: Add README.md. This directory will contain work-in-progress implementation of HashTable v2. For HashTable v2, see the design doc below: https://docs.google.com/document/d/1-N-vUWg790wJc1CHCC4C_v-HtQNg9n9w5Y_6KtaKFlU/edit?usp=sharing Bug: 715430 Change-Id: I9be0554fcbae162b87e35ba2fe98c19282c4f29f Reviewed-on: https://chromium-review.googlesource.com/641072 Reviewed-by: Taiju Tsuiki <tzik@chromium.org> Commit-Queue: Yuta Kitamura <yutak@chromium.org> Cr-Commit-Position: refs/heads/master@{#498406} [add] https://crrev.com/8a7beb2d32b280e05602449bfc5e4123ae5d8c58/third_party/WebKit/Source/platform/wtf/experimental/README.md
,
Sep 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/34aae082912351a13973d87e34c4698f5d72901a commit 34aae082912351a13973d87e34c4698f5d72901a Author: Yuta Kitamura <yutak@chromium.org> Date: Wed Sep 13 09:58:13 2017 WTF HashTable v2: Add ContainerTypeOperations. ContainerTypeOperations is a class template representing type traits for various generic container operations, such as storage initialization or bulk copy. This can be used, for instance, to use memcpy for efficient copying for specific types. This will be used in HashTable v2 (see bug). The set of operations are mostly inspired by Vector's traits. This traits is intended to become the unified traits that can be applied to any WTF containers (currently, Vector and HashTable have separate sets of traits). This patch only provides a basic implementation that should work for any types. Specializations for other types will be added later. Bug: 715430 Change-Id: Ie1fb852942e4f6210eef26cad7606833c5d1949f Reviewed-on: https://chromium-review.googlesource.com/641290 Reviewed-by: Taiju Tsuiki <tzik@chromium.org> Commit-Queue: Yuta Kitamura <yutak@chromium.org> Cr-Commit-Position: refs/heads/master@{#501580} [modify] https://crrev.com/34aae082912351a13973d87e34c4698f5d72901a/third_party/WebKit/Source/platform/wtf/BUILD.gn [add] https://crrev.com/34aae082912351a13973d87e34c4698f5d72901a/third_party/WebKit/Source/platform/wtf/experimental/ContainerTypeOperations.h [add] https://crrev.com/34aae082912351a13973d87e34c4698f5d72901a/third_party/WebKit/Source/platform/wtf/experimental/ContainerTypeOperationsTest.cpp
,
Sep 18 2017
,
Sep 26 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/02bc3fe3d15fbb897cd251310199d38814130ab0 commit 02bc3fe3d15fbb897cd251310199d38814130ab0 Author: Yuta Kitamura <yutak@chromium.org> Date: Tue Sep 26 11:00:34 2017 HashTable v2: Add CompleteContainerTypeOperations<TypeOps, T>. This patch separates the ability to supplement missing traits functions from Complete*d*ContainerTypeOperations<T>. It turns out the upcoming changes will require the ability to complete arbitrary ContainerTypeOperations implementations, not just ContainerTypeOperations<T>. BUG=715430 Change-Id: I49828fd8e8f68ff97eb5f5117e6bdf0351ddcc9b Reviewed-on: https://chromium-review.googlesource.com/681534 Reviewed-by: Taiju Tsuiki <tzik@chromium.org> Commit-Queue: Yuta Kitamura <yutak@chromium.org> Cr-Commit-Position: refs/heads/master@{#504332} [modify] https://crrev.com/02bc3fe3d15fbb897cd251310199d38814130ab0/third_party/WebKit/Source/platform/wtf/experimental/ContainerTypeOperations.h |
|||
►
Sign in to add a comment |
|||
Comment 1 by bugdroid1@chromium.org
, Apr 28 2017