[webkit-changes] [WebKit/WebKit] 25af45: [WTF] Define ENABLE(WYHASH_STRING_HASHER)
Yusuke Suzuki
noreply at github.com
Fri Feb 9 23:55:13 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 25af4548095896bc7fcb7cc232bcfd9f40cb4913
https://github.com/WebKit/WebKit/commit/25af4548095896bc7fcb7cc232bcfd9f40cb4913
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2024-02-09 (Fri, 09 Feb 2024)
Changed paths:
M Source/JavaScriptCore/create_hash_table
M Source/JavaScriptCore/tools/JSDollarVM.cpp
M Source/JavaScriptCore/yarr/hasher.py
M Source/WTF/wtf/PlatformEnable.h
M Source/WTF/wtf/text/StringHasher.h
M Source/WTF/wtf/text/StringHasherInlines.h
M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
M Source/WebCore/bindings/scripts/Hasher.pm
M Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp
Log Message:
-----------
[WTF] Define ENABLE(WYHASH_STRING_HASHER)
https://bugs.webkit.org/show_bug.cgi?id=269130
rdar://122690122
Reviewed by Alexey Shvayka.
Let's define ENABLE(WYHASH_STRING_HASHER) and use it instead of PLATFORM(MAC).
It allows us to easily enable / disable WYHash-based StringHasher by just flipping this flag.
And it is also super easy to read (And allows the other platforms to enable it easily).
* Source/JavaScriptCore/create_hash_table:
* Source/JavaScriptCore/tools/JSDollarVM.cpp:
* Source/JavaScriptCore/yarr/hasher.py:
(stringHash):
(createHashTable.createHashTableHelper):
(createHashTable):
* Source/WTF/wtf/PlatformEnable.h:
* Source/WTF/wtf/text/StringHasher.h:
* Source/WTF/wtf/text/StringHasherInlines.h:
(WTF::StringHasher::computeHashAndMaskTop8Bits):
(WTF::StringHasher::computeLiteralHashAndMaskTop8Bits):
(WTF::StringHasher::addCharacter):
(WTF::StringHasher::hashWithTop8BitsMasked):
* Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
(GenerateHashTable):
* Source/WebCore/bindings/scripts/Hasher.pm:
* Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp:
Canonical link: https://commits.webkit.org/274416@main
More information about the webkit-changes
mailing list