Bug 235018 - Start taking advantage of C++20 default comparisons
Summary: Start taking advantage of C++20 default comparisons
Status: ASSIGNED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Enhancement
Assignee: Darin Adler
URL:
Keywords: InRadar
Depends on: 233963 256078
Blocks:
  Show dependency treegraph
 
Reported: 2022-01-09 09:42 PST by Darin Adler
Modified: 2023-05-06 12:42 PDT (History)
49 users (show)

See Also:


Attachments
Patch (586.79 KB, patch)
2022-01-09 14:12 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (589.21 KB, patch)
2022-01-11 15:59 PST, Darin Adler
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (589.38 KB, patch)
2022-01-11 16:42 PST, Darin Adler
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2022-01-09 09:42:38 PST
Lets us delete quite a bit of code
Comment 1 Darin Adler 2022-01-09 14:06:34 PST
My first patch probably contains too much for one bug; should be landed in pieces
Comment 2 Darin Adler 2022-01-09 14:12:13 PST
Created attachment 448719 [details]
Patch
Comment 3 Darin Adler 2022-01-11 15:59:14 PST
Created attachment 448885 [details]
Patch
Comment 4 Darin Adler 2022-01-11 16:42:09 PST
Created attachment 448891 [details]
Patch
Comment 5 Yusuke Suzuki 2022-01-11 16:46:06 PST
Unfortunately, our current GCC baseline is GCC 8.3.0, and I think default value comparisons are not supported in that GCC version...
According to the https://trac.webkit.org/wiki/WebKitGTK/GCCRequirement, we can upgrade our GCC to 9 at April. So, we can start many features we strongly wanted!

https://en.cppreference.com/w/cpp/compiler_support/20
Comment 6 Darin Adler 2022-01-11 16:54:11 PST
(In reply to Yusuke Suzuki from comment #5)
> Unfortunately, our current GCC baseline is GCC 8.3.0, and I think default
> value comparisons are not supported in that GCC version...
> According to the https://trac.webkit.org/wiki/WebKitGTK/GCCRequirement, we
> can upgrade our GCC to 9 at April. So, we can start many features we
> strongly wanted!
> 
> https://en.cppreference.com/w/cpp/compiler_support/20

Looks like three way comparison is not in GCC until GCC 10, so I really wasted my time on that!
Comment 7 Yusuke Suzuki 2022-01-11 17:14:54 PST
Probably, right now, the best feature we can use is bitfield initializer :)
https://en.cppreference.com/w/cpp/language/bit_field#Cpp20_Default_member_initializers_for_bit_fields
Comment 8 Radar WebKit Bug Importer 2022-01-16 09:43:17 PST
<rdar://problem/87654218>
Comment 9 Yusuke Suzuki 2023-05-06 12:18:52 PDT
@Darin Now, GCC gets 10.2, so this patch is unlocked :)
Comment 10 Darin Adler 2023-05-06 12:42:23 PDT
Yes, I hope we can do everything from this patch, but probably not all at once!