Bug 235018

Summary: Start taking advantage of C++20 default comparisons
Product: WebKit Reporter: Darin Adler <darin>
Component: WebKit Misc.Assignee: Darin Adler <darin>
Status: ASSIGNED ---    
Severity: Enhancement CC: achristensen, alecflett, beidson, benjamin, cdumez, cgarcia, changseok, cmarcelo, dino, eric.carlson, esprehn+autocc, ews-watchlist, fmalita, fred.wang, glenn, gyuyoung.kim, hi, hta, jamesr, japhet, jer.noble, jfernandez, joepeck, jsbell, kangil.han, keith_miller, kondapallykalyan, luiz, macpherson, mark.lam, menard, mifenton, mmaxfield, msaboff, pangle, pdr, philipj, rego, saam, sabouhallawa, schenney, sergio, simon.fraser, svillar, tommyw, tonikitoo, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on: 233963, 256078    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
ews-feeder: commit-queue-
Patch ews-feeder: commit-queue-

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!