Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: df3e3ba21deda04897917f16f95844b5366c5a74
https://github.com/WebKit/WebKit/commit/df3e3ba21deda04897917f16f95844b5366c5a74
Author: Kiet Ho <[email protected]>
Date: 2025-04-30 (Wed, 30 Apr 2025)
Changed paths:
M Source/WTF/wtf/CompactVariant.h
M Source/WTF/wtf/CompactVariantOperations.h
M Tools/TestWebKitAPI/Tests/WTF/CompactVariant.cpp
Log Message:
-----------
Relocate variant index in WTF::CompactVariant
rdar://149655111
https://bugs.webkit.org/show_bug.cgi?id=291989
Reviewed by Sam Weinig, David Degazio, and Darin Adler.
Relocate the variant index bits in WTF::CompactVariant from bit
63-56 to 55-48. Some architectures support ignoring the top bits
in a pointer (ex: AArch64 Top Byte Ignore), so this allows storing
the top byte untouched for applications that store metadata there.
* Source/WTF/wtf/CompactVariant.h:
* Source/WTF/wtf/CompactVariantOperations.h:
(WTF::CompactVariantOperations::decodedIndex):
(WTF::CompactVariantOperations::encodedPayload):
(WTF::CompactVariantOperations::encodedPayloadFromArguments):
* Tools/TestWebKitAPI/Tests/WTF/CompactVariant.cpp:
(TestWebKitAPI::TEST(WTF_CompactVariant, Pointers64)):
- Added test to ensure the top byte in a 64-bit pointer is preserved.
This test is only built on architectures with 64-bit pointers.
Canonical link: https://commits.webkit.org/294327@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes