[webkit-changes] [WebKit/WebKit] 272547: Prepare to use C++23 in WebKit
Alex Christensen
noreply at github.com
Fri May 31 07:40:27 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 272547d4b0ece68623a629726f30a54d5705f802
https://github.com/WebKit/WebKit/commit/272547d4b0ece68623a629726f30a54d5705f802
Author: Alex Christensen <achristensen at apple.com>
Date: 2024-05-31 (Fri, 31 May 2024)
Changed paths:
M Source/JavaScriptCore/assembler/ProbeStack.h
M Source/JavaScriptCore/dfg/DFGAbstractValue.cpp
M Source/JavaScriptCore/runtime/JSBigInt.cpp
M Source/JavaScriptCore/wasm/WasmMemory.h
M Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.cpp
M Source/ThirdParty/libwebrtc/Source/webrtc/modules/audio_processing/include/audio_processing.cc
M Source/ThirdParty/libwebrtc/Source/webrtc/modules/audio_processing/include/audio_processing.h
M Source/ThirdParty/libwebrtc/Source/webrtc/rtc_base/untyped_function.h
M Source/WTF/wtf/EmbeddedFixedVector.h
M Source/WTF/wtf/HashTable.h
M Source/WTF/wtf/Int128.cpp
M Source/WTF/wtf/Int128.h
M Source/WTF/wtf/NeverDestroyed.h
M Source/WTF/wtf/RobinHoodHashTable.h
M Source/WTF/wtf/SizeLimits.cpp
M Source/WTF/wtf/ThreadSpecific.h
M Source/WTF/wtf/Vector.h
M Source/WTF/wtf/threads/Signals.h
M Source/WebCore/bindings/js/SerializedScriptValue.cpp
M Source/WebCore/bindings/js/SerializedScriptValue.h
M Source/WebCore/dom/TreeScope.cpp
M Source/WebCore/html/HTMLMediaElement.cpp
M Source/WebCore/page/CaptionUserPreferences.cpp
M Source/WebCore/page/CaptionUserPreferences.h
M Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
M Source/WebCore/rendering/GridTrackSizingAlgorithm.h
M Source/WebGPU/WGSL/Types.h
M Source/WebKit/Shared/Cocoa/APIObject.mm
M Source/WebKit/Shared/Cocoa/WKObject.h
M Source/WebKit/Shared/RemoteLayerTree/LayerProperties.h
M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm
M Source/WebKit/UIProcess/WebBackForwardCache.cpp
M Source/WebKit/UIProcess/WebBackForwardCacheEntry.h
M Source/bmalloc/bmalloc/AllIsoHeaps.h
M Source/bmalloc/bmalloc/BCompiler.h
M Source/bmalloc/bmalloc/CryptoRandom.cpp
M Source/bmalloc/bmalloc/DebugHeap.h
M Source/bmalloc/bmalloc/Environment.h
M Source/bmalloc/bmalloc/Gigacage.cpp
M Source/bmalloc/bmalloc/HeapConstants.h
M Source/bmalloc/bmalloc/IsoSharedHeap.h
M Source/bmalloc/bmalloc/IsoTLSLayout.h
M Source/bmalloc/bmalloc/PerHeapKind.h
M Source/bmalloc/bmalloc/Scavenger.h
Log Message:
-----------
Prepare to use C++23 in WebKit
https://bugs.webkit.org/show_bug.cgi?id=274952
rdar://129048503
Reviewed by Abrar Rahman Protyasha.
This is the parts of https://github.com/WebKit/WebKit/pull/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
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list