WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
285099
Introduce a CompactVariant for efficient variants of pointers and types smaller than 56 bits
https://bugs.webkit.org/show_bug.cgi?id=285099
Summary
Introduce a CompactVariant for efficient variants of pointers and types small...
Sam Weinig
Reported
2024-12-23 05:50:27 PST
Adds `WTF::CompactVariant`. A `WTF::CompactVariant` acts like a `std::variant` with the following differences: - All alternatives must be pointers, smart pointers, have size of 56 bits or fewer, or be specialized for `CompactVariantTraits`. - It can only contain 254 or fewer alternatives. - Has a more limited API, only offering `holds_alternative()` for type checking and `switchOn()` for value access.
Attachments
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2024-12-23 06:38:41 PST
Pull request:
https://github.com/WebKit/WebKit/pull/38334
EWS
Comment 2
2024-12-24 07:30:14 PST
Committed
288271@main
(dc904eb4098b): <
https://commits.webkit.org/288271@main
> Reviewed commits have been landed. Closing PR #38334 and removing active labels.
Radar WebKit Bug Importer
Comment 3
2024-12-24 07:31:15 PST
<
rdar://problem/141993688
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug