Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fdc91dd3319dac7f95a23885797a39c7951a5a6c
https://github.com/WebKit/WebKit/commit/fdc91dd3319dac7f95a23885797a39c7951a5a6c
Author: Sam Weinig <[email protected]>
Date: 2024-11-23 (Sat, 23 Nov 2024)
Changed paths:
M Source/WTF/WTF.xcodeproj/project.pbxproj
M Source/WTF/wtf/CMakeLists.txt
M Source/WTF/wtf/Forward.h
M Source/WTF/wtf/StdLibExtras.h
A Source/WTF/wtf/VariantList.h
A Source/WTF/wtf/VariantListOperations.h
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/WTF/VariantList.cpp
Log Message:
-----------
Add data structure for memory efficient lists of std::variants
https://bugs.webkit.org/show_bug.cgi?id=283423
Reviewed by Darin Adler.
Adds a new data structure, VariantList<std::variant<Ts...>> which acts
like a Vector<std::variant<Ts...>> except that each element only takes up
its own size (+ tag size). The tradeoff is that the list is not random
access capable, and access to the elements is only available via iteration.
In practice, this tradeoff is a good one for the CSS and Style value types.
Rather than vending std::variants, VariantList vends VariantListProxy
objects which act like std::variants, but don't require the extra costs
of construction.
* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/StdLibExtras.h:
* Source/WTF/wtf/VariantList.h: Added.
* Source/WTF/wtf/VariantListOperations.h: Added.
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WTF/VariantList.cpp: Added.
Canonical link: https://commits.webkit.org/287010@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