Bug 233963 - Start using C++20
Summary: Start using C++20
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on: 233448 234933 234995
Blocks: 235018 235023
  Show dependency treegraph
 
Reported: 2021-12-07 17:29 PST by Alex Christensen
Modified: 2022-01-20 08:14 PST (History)
24 users (show)

See Also:


Attachments
Patch (120.17 KB, patch)
2021-12-07 17:30 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (75.94 KB, patch)
2021-12-09 17:15 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (80.09 KB, patch)
2021-12-09 23:01 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (81.87 KB, patch)
2021-12-10 09:52 PST, Alex Christensen
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (82.43 KB, patch)
2021-12-10 11:01 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
WinCairo fix (504 bytes, patch)
2021-12-21 13:26 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (44.30 KB, patch)
2021-12-21 15:04 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (52.77 KB, patch)
2022-01-05 15:16 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (49.42 KB, patch)
2022-01-05 17:30 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
char8_t (53.85 KB, patch)
2022-01-06 01:52 PST, Yusuke Suzuki
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
char8_t is not available on GCC 8 (51.74 KB, patch)
2022-01-06 02:05 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
char8_t is not available on GCC 8 (51.75 KB, patch)
2022-01-06 02:10 PST, Yusuke Suzuki
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
char8_t is not available on GCC 8 (51.77 KB, patch)
2022-01-06 02:14 PST, Yusuke Suzuki
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
char8_t is not available on GCC 8 (51.84 KB, patch)
2022-01-06 02:18 PST, Yusuke Suzuki
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
char8_t is not available on GCC 8 (52.10 KB, patch)
2022-01-06 02:25 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (57.88 KB, patch)
2022-01-07 13:08 PST, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2021-12-07 17:29:39 PST
Start using C++20
Comment 1 Alex Christensen 2021-12-07 17:30:09 PST
Created attachment 446264 [details]
Patch
Comment 2 Yusuke Suzuki 2021-12-07 18:24:09 PST
Can you separate code changes from C++20 compiler option change?
Also need to change the following things.

cmake/OptionsCommon.cmake (CMAKE_CXX_STANDARD)
bmalloc/libpas/CMakeLists.txt (CMAKE_CXX_STANDARD)
JavaScriptCore/shell/PlatformPlayStation.cmake
Comment 3 Alex Christensen 2021-12-07 20:05:02 PST
Totally.  This is just a preview of what it would take.
Comment 4 Alex Christensen 2021-12-09 17:15:12 PST
Created attachment 446640 [details]
Patch
Comment 5 EWS Watchlist 2021-12-09 17:17:01 PST
Note that there are important steps to take when updating ANGLE. See https://trac.webkit.org/wiki/UpdatingANGLE
Comment 6 Alex Christensen 2021-12-09 23:01:34 PST
Created attachment 446666 [details]
Patch
Comment 7 Alex Christensen 2021-12-10 09:52:00 PST
Created attachment 446745 [details]
Patch
Comment 8 Alex Christensen 2021-12-10 11:01:19 PST
Created attachment 446764 [details]
Patch
Comment 9 Radar WebKit Bug Importer 2021-12-14 17:30:23 PST
<rdar://problem/86498505>
Comment 10 Yusuke Suzuki 2021-12-17 14:08:42 PST
GCC builds are failing due to is_pod is deprecated.
Comment 11 Fujii Hironori 2021-12-21 13:26:01 PST
Created attachment 447747 [details]
WinCairo fix
Comment 12 Alex Christensen 2021-12-21 15:04:12 PST
Created attachment 447754 [details]
Patch
Comment 13 Darin Adler 2021-12-21 15:29:34 PST
Comment on attachment 447754 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=447754&action=review

> Source/WTF/wtf/VectorTraits.h:59
> +    struct VectorTraits : VectorTraitsBase<std::is_standard_layout<T>::value && std::is_trivial<T>::value, T> { };

Why not use is_standard_layout_v and is_trivial_v instead?

> Source/WebCore/platform/ios/wak/WebCoreThread.mm:248
> +#pragma clang diagnostic push
> +#pragma clang diagnostic ignored "-Wdeprecated-volatile"

Can we use IGNORE_CLANG_WARNINGS_BEGIN/END instead of direct use of the pragma?
Comment 14 Alex Christensen 2022-01-05 15:16:08 PST
Created attachment 448438 [details]
Patch
Comment 15 Darin Adler 2022-01-05 15:34:09 PST
Really looking forward to https://en.cppreference.com/w/cpp/language/default_comparisons
Comment 16 Alex Christensen 2022-01-05 17:30:12 PST
Created attachment 448456 [details]
Patch
Comment 17 Yusuke Suzuki 2022-01-06 01:52:19 PST
Created attachment 448471 [details]
char8_t
Comment 18 Yusuke Suzuki 2022-01-06 02:05:01 PST
Created attachment 448474 [details]
char8_t is not available on GCC 8
Comment 19 Yusuke Suzuki 2022-01-06 02:10:24 PST
Created attachment 448475 [details]
char8_t is not available on GCC 8
Comment 20 Yusuke Suzuki 2022-01-06 02:14:06 PST
Created attachment 448476 [details]
char8_t is not available on GCC 8
Comment 21 Yusuke Suzuki 2022-01-06 02:18:34 PST
Created attachment 448477 [details]
char8_t is not available on GCC 8
Comment 22 Yusuke Suzuki 2022-01-06 02:25:23 PST
Created attachment 448478 [details]
char8_t is not available on GCC 8
Comment 23 Yusuke Suzuki 2022-01-06 02:30:28 PST
Comment on attachment 448456 [details]
Patch

r=me with the attached char8_t fix :) (which makes EWS green)
Comment 24 Alex Christensen 2022-01-06 10:14:36 PST
r287698
Comment 25 Fujii Hironori 2022-01-06 13:26:01 PST
AppleWin EWS reported some test crashing. They are true-positive.
Filed: Bug 234933 – [AppleWin] Some fast/shadow-dom/fullscreen-in-* tests are crashing after r287698
Comment 26 Alex Christensen 2022-01-07 11:25:33 PST
Reverted in r287768 and r287770.  There is an internal header in pre-Monterey OSes that uses enums in ways that C++20 doesn't like.  Hopefully I can find a workaround...
Comment 27 Alex Christensen 2022-01-07 13:08:30 PST
Reopening to attach new patch.
Comment 28 Alex Christensen 2022-01-07 13:08:34 PST
Created attachment 448624 [details]
Patch
Comment 29 EWS 2022-01-10 11:17:30 PST
Committed r287848 (245897@main): <https://commits.webkit.org/245897@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 448624 [details].
Comment 30 David Kilzer (:ddkilzer) 2022-01-20 08:14:49 PST
I wonder if either of these NS Visual C++ bugs were fixed as part of this effort:

Bug 195548: [MS Visual C++] Source incompatibility with C++20
<https://bugs.webkit.org/show_bug.cgi?id=195548>

Bug 234546: MSVC reports "SVGPropertyAnimator.h(94): error C2839: invalid return type 'T *' for overloaded 'operator ->'" with /std:c++20
<https://bugs.webkit.org/show_bug.cgi?id=234546>