Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Begin using C++23 in WebKit #19053

Merged

Conversation

achristensen07
Copy link
Contributor

@achristensen07 achristensen07 commented Oct 13, 2023

619fc6b

Begin using C++23 in WebKit
https://bugs.webkit.org/show_bug.cgi?id=263122
rdar://116922827

Reviewed by Yusuke Suzuki, Abrar Rahman Protyasha and Dan Glastonbury.

* CMakeLists.txt:
* Configurations/CommonBase.xcconfig:
* Source/JavaScriptCore/Configurations/Base.xcconfig:
* Source/JavaScriptCore/DerivedSources.make:
* Source/ThirdParty/ANGLE/Configurations/Base.xcconfig:
* Source/ThirdParty/gmock/Configurations/Base.xcconfig:
* Source/ThirdParty/gtest/xcode/Config/General.xcconfig:
* Source/ThirdParty/libwebrtc/CMakeLists.txt:
* Source/ThirdParty/libwebrtc/Configurations/Base.xcconfig:
* Source/WTF/Configurations/Base.xcconfig:
* Source/WebCore/Configurations/Base.xcconfig:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/PAL/Configurations/Base.xcconfig:
* Source/WebCore/PAL/ThirdParty/libavif/Configurations/Base.xcconfig:
* Source/WebCore/PAL/ThirdParty/libavif/ThirdParty/dav1d/Configurations/Base.xcconfig:
* Source/WebGPU/Configurations/Base.xcconfig:
* Source/WebInspectorUI/Configurations/Base.xcconfig:
* Source/WebKit/Configurations/Base.xcconfig:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/PlatformMac.cmake:
* Source/WebKitLegacy/PlatformMac.cmake:
* Source/WebKitLegacy/mac/Configurations/Base.xcconfig:
* Source/bmalloc/Configurations/Base.xcconfig:
* Source/bmalloc/libpas/CMakeLists.txt:
* Source/cmake/OptionsCommon.cmake:
* Source/cmake/WebKitCompilerFlags.cmake:
* Tools/DumpRenderTree/DerivedSources.make:
* Tools/DumpRenderTree/mac/Configurations/Base.xcconfig:
* Tools/MiniBrowser/Configurations/Base.xcconfig:
* Tools/MobileMiniBrowser/Configurations/Base.xcconfig:
* Tools/Scripts/webkitperl/filter-build-webkit_unittest/shouldIgnoreLine_unittests.pl:
* Tools/TestWebKitAPI/Configurations/Base.xcconfig:
* Tools/WebGPUPlayground/Configurations/Base.xcconfig:
* Tools/WebKitTestRunner/Configurations/Base.xcconfig:
* Tools/WebKitTestRunner/DerivedSources.make:
* Tools/lldb/lldbWebKitTester/Configurations/Base.xcconfig:

Canonical link: https://commits.webkit.org/280217@main

e30ecb3

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2 βœ… πŸ§ͺ wincairo-tests
βœ… πŸ§ͺ webkitperl ❌ πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ§ͺ api-wpe
❌ πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1 βœ… πŸ›  wpe-cairo
βœ… πŸ›  πŸ§ͺ jsc   πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ›  gtk
βœ… πŸ›  πŸ§ͺ jsc-arm64 ⏳ πŸ›  vision βœ… πŸ§ͺ mac-AS-debug-wk2 βœ… πŸ§ͺ gtk-wk2
⏳ πŸ›  vision-sim βœ… πŸ§ͺ mac-wk2-stress βœ… πŸ§ͺ api-gtk
⏳ πŸ§ͺ vision-wk2   πŸ›  jsc-armv7
βœ… πŸ›  πŸ§ͺ unsafe-merge βœ… πŸ›  tv   πŸ§ͺ jsc-armv7-tests
βœ… πŸ›  tv-sim
βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@achristensen07 achristensen07 self-assigned this Oct 13, 2023
@achristensen07 achristensen07 added the WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore). label Oct 13, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Oct 13, 2023
@achristensen07 achristensen07 removed the merging-blocked Applied to prevent a change from being merged label Oct 13, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Oct 13, 2023
@achristensen07 achristensen07 removed the merging-blocked Applied to prevent a change from being merged label Oct 13, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Oct 13, 2023
@achristensen07 achristensen07 removed the merging-blocked Applied to prevent a change from being merged label Oct 13, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Oct 13, 2023
@achristensen07
Copy link
Contributor Author

According to https://docs.webkit.org/Ports/WebKitGTK%20and%20WPE%20WebKit/DependenciesPolicy.html we are planning to support Debian 11 with gcc 10 until 2024-06-10. I don't think we can do this until then.

Copy link
Contributor

@djg djg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

webkit-commit-queue pushed a commit to achristensen07/WebKit that referenced this pull request May 31, 2024
https://bugs.webkit.org/show_bug.cgi?id=274952
rdar://129048503

Reviewed by Abrar Rahman Protyasha.

This is the parts of WebKit#19053 that don't involve actually changing
the compiler flag, which we can't do until June 10 because of the GTK and WPE dependencies policy.

From that PR:

1. std::aligned_storage is deprecated, so I added deprecation warning ignoring macros around its use
   in order to not change any behavior with the transition.  We can figure out what to do later.
2. Something about implicitly calling constructors changed, which affected code in JSBigInt.
   I fixed this by just adding braces to more explicitly indicate that a different type is being
   returned and we are calling a constructor.  This should also not change behavior.
3. For a reason I don't completely understand, in order to fix the build I needed to change the name
   of WasmMemory::check to checkLifetime.  "check" is certainly not a new keyword.  This also does
   not change any behavior.
4. std::unique_ptr is now constexpr, and something in libc++'s implementation requires a complete
   class definition for its move constructor.  I filed rdar://116885103 for future investigation,
   but I also moved a few definitions around and included a few things to fix the build.
   The SerializedScriptValue constructor taking a unique_ptr<WasmModuleArray> was a little tricky,
   but I made it just take a WasmModuleArray&& instead, and call makeUnique between that and initializing
   the member variable, so I didn't change behavior or storage layout there either.
5. I needed to explicitly include <iterator> from EmbeddedFixedVector.h to fix the build.
   Something probably changed about what standardized headers include other standardized headers.

* Source/JavaScriptCore/assembler/ProbeStack.h:
* Source/JavaScriptCore/dfg/DFGAbstractValue.cpp:
(JSC::DFG::AbstractValue::ensureCanInitializeWithZeros):
* Source/JavaScriptCore/runtime/JSBigInt.cpp:
(JSC::JSBigInt::exponentiateImpl):
(JSC::JSBigInt::multiplyImpl):
(JSC::JSBigInt::remainderImpl):
(JSC::JSBigInt::leftShiftImpl):
(JSC::JSBigInt::signedRightShiftImpl):
(JSC::JSBigInt::absoluteAdd):
(JSC::JSBigInt::absoluteSub):
(JSC::JSBigInt::asIntNImpl):
(JSC::JSBigInt::asUintNImpl):
* Source/JavaScriptCore/wasm/WasmMemory.h:
* Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.cpp:
(JSC::JSWebAssemblyMemory::adopt):
(JSC::JSWebAssemblyMemory::growSuccessCallback):
* Source/ThirdParty/libwebrtc/Source/webrtc/modules/audio_processing/include/audio_processing.cc:
* Source/ThirdParty/libwebrtc/Source/webrtc/modules/audio_processing/include/audio_processing.h:
* Source/ThirdParty/libwebrtc/Source/webrtc/rtc_base/untyped_function.h:
* Source/WTF/wtf/EmbeddedFixedVector.h:
* Source/WTF/wtf/HashTable.h:
(WTF::KeyTraits>::checkKey):
* Source/WTF/wtf/Int128.cpp:
* Source/WTF/wtf/Int128.h:
* Source/WTF/wtf/NeverDestroyed.h:
* Source/WTF/wtf/RobinHoodHashTable.h:
(WTF::SizePolicy>::checkKey):
* Source/WTF/wtf/SizeLimits.cpp:
* Source/WTF/wtf/ThreadSpecific.h:
* Source/WTF/wtf/Vector.h:
* Source/WTF/wtf/threads/Signals.h:
* Source/WebCore/bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::create):
* Source/WebCore/bindings/js/SerializedScriptValue.h:
* Source/WebCore/dom/TreeScope.cpp:
* Source/WebCore/html/HTMLMediaElement.cpp:
* Source/WebCore/page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::createTestingModeToken):
* Source/WebCore/page/CaptionUserPreferences.h:
(WebCore::CaptionUserPreferences::createTestingModeToken): Deleted.
* Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithm::GridTrackSizingAlgorithm):
* Source/WebCore/rendering/GridTrackSizingAlgorithm.h:
* Source/WebGPU/WGSL/Types.h:
* Source/WebKit/Shared/Cocoa/APIObject.mm:
* Source/WebKit/Shared/Cocoa/WKObject.h:
* Source/WebKit/Shared/RemoteLayerTree/LayerProperties.h:
(WebKit::RemoteLayerBackingStoreOrProperties::RemoteLayerBackingStoreOrProperties): Deleted.
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStoreOrProperties::RemoteLayerBackingStoreOrProperties):
* Source/WebKit/UIProcess/WebBackForwardCache.cpp:
(WebKit::WebBackForwardCache::addEntry):
* Source/WebKit/UIProcess/WebBackForwardCacheEntry.h:
* Source/bmalloc/bmalloc/AllIsoHeaps.h:
* Source/bmalloc/bmalloc/BCompiler.h:
* Source/bmalloc/bmalloc/CryptoRandom.cpp:
* Source/bmalloc/bmalloc/DebugHeap.h:
* Source/bmalloc/bmalloc/Environment.h:
* Source/bmalloc/bmalloc/Gigacage.cpp:
* Source/bmalloc/bmalloc/HeapConstants.h:
* Source/bmalloc/bmalloc/IsoSharedHeap.h:
* Source/bmalloc/bmalloc/IsoTLSLayout.h:
* Source/bmalloc/bmalloc/PerHeapKind.h:
* Source/bmalloc/bmalloc/Scavenger.h:

Canonical link: https://commits.webkit.org/279578@main
@achristensen07 achristensen07 removed the merging-blocked Applied to prevent a change from being merged label Jun 14, 2024
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 14, 2024
Copy link
Member

@Constellation Constellation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me

Copy link
Member

@aprotyas aprotyas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚒 🚒 🚒

@achristensen07 achristensen07 removed the merging-blocked Applied to prevent a change from being merged label Jun 15, 2024
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 15, 2024
@achristensen07 achristensen07 removed the merging-blocked Applied to prevent a change from being merged label Jun 20, 2024
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 20, 2024
@achristensen07 achristensen07 removed the merging-blocked Applied to prevent a change from being merged label Jun 20, 2024
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 20, 2024
@achristensen07
Copy link
Contributor Author

iOS EWS is having some unrelated issues.

@achristensen07 achristensen07 added unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing and removed merging-blocked Applied to prevent a change from being merged labels Jun 20, 2024
https://bugs.webkit.org/show_bug.cgi?id=263122
rdar://116922827

Reviewed by Yusuke Suzuki, Abrar Rahman Protyasha and Dan Glastonbury.

* CMakeLists.txt:
* Configurations/CommonBase.xcconfig:
* Source/JavaScriptCore/Configurations/Base.xcconfig:
* Source/JavaScriptCore/DerivedSources.make:
* Source/ThirdParty/ANGLE/Configurations/Base.xcconfig:
* Source/ThirdParty/gmock/Configurations/Base.xcconfig:
* Source/ThirdParty/gtest/xcode/Config/General.xcconfig:
* Source/ThirdParty/libwebrtc/CMakeLists.txt:
* Source/ThirdParty/libwebrtc/Configurations/Base.xcconfig:
* Source/WTF/Configurations/Base.xcconfig:
* Source/WebCore/Configurations/Base.xcconfig:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/PAL/Configurations/Base.xcconfig:
* Source/WebCore/PAL/ThirdParty/libavif/Configurations/Base.xcconfig:
* Source/WebCore/PAL/ThirdParty/libavif/ThirdParty/dav1d/Configurations/Base.xcconfig:
* Source/WebGPU/Configurations/Base.xcconfig:
* Source/WebInspectorUI/Configurations/Base.xcconfig:
* Source/WebKit/Configurations/Base.xcconfig:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/PlatformMac.cmake:
* Source/WebKitLegacy/PlatformMac.cmake:
* Source/WebKitLegacy/mac/Configurations/Base.xcconfig:
* Source/bmalloc/Configurations/Base.xcconfig:
* Source/bmalloc/libpas/CMakeLists.txt:
* Source/cmake/OptionsCommon.cmake:
* Source/cmake/WebKitCompilerFlags.cmake:
* Tools/DumpRenderTree/DerivedSources.make:
* Tools/DumpRenderTree/mac/Configurations/Base.xcconfig:
* Tools/MiniBrowser/Configurations/Base.xcconfig:
* Tools/MobileMiniBrowser/Configurations/Base.xcconfig:
* Tools/Scripts/webkitperl/filter-build-webkit_unittest/shouldIgnoreLine_unittests.pl:
* Tools/TestWebKitAPI/Configurations/Base.xcconfig:
* Tools/WebGPUPlayground/Configurations/Base.xcconfig:
* Tools/WebKitTestRunner/Configurations/Base.xcconfig:
* Tools/WebKitTestRunner/DerivedSources.make:
* Tools/lldb/lldbWebKitTester/Configurations/Base.xcconfig:

Canonical link: https://commits.webkit.org/280217@main
@webkit-commit-queue
Copy link
Collaborator

Committed 280217@main (619fc6b): https://commits.webkit.org/280217@main

Reviewed commits have been landed. Closing PR #19053 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 619fc6b into WebKit:main Jun 20, 2024
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore).
Projects
None yet
8 participants