Skip to content

Commit afbbd13

Browse files
Alex Christensenwebkit-commit-queue
authored andcommitted
Remove WTF::Variant and WTF::get
https://bugs.webkit.org/show_bug.cgi?id=231675 Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-13 Reviewed by Chris Dumez. Source/JavaScriptCore: * bytecode/StructureStubClearingWatchpoint.cpp: (JSC::WatchpointsOnStructureStubInfo::ensureReferenceAndInstallWatchpoint): (JSC::WatchpointsOnStructureStubInfo::ensureReferenceAndAddWatchpoint): * jit/AssemblyHelpers.cpp: (JSC::AssemblyHelpers::branchIfValue): * jit/SnippetReg.h: (JSC::SnippetReg::gpr const): (JSC::SnippetReg::fpr const): (JSC::SnippetReg::jsValueRegs const): * jsc.cpp: (JSC_DEFINE_HOST_FUNCTION): * parser/Lexer.cpp: (JSC::Lexer<T>::lexWithoutClearingLineTerminator): * parser/VariableEnvironment.cpp: (JSC::CompactTDZEnvironment::toTDZEnvironmentSlow const): * parser/VariableEnvironment.h: (JSC::CompactTDZEnvironment::toTDZEnvironment const): * runtime/CacheUpdate.cpp: (JSC::CacheUpdate::asGlobal const): (JSC::CacheUpdate::asFunction const): * runtime/CachedTypes.cpp: (JSC::CachedCompactTDZEnvironment::encode): * wasm/WasmLLIntGenerator.cpp: (JSC::Wasm::LLIntGenerator::ControlType::isCatch): (JSC::Wasm::LLIntGenerator::ControlType::targetLabelForBranch const): (JSC::Wasm::LLIntGenerator::addLoop): (JSC::Wasm::LLIntGenerator::addElseToUnreachable): (JSC::Wasm::LLIntGenerator::addCatchToUnreachable): (JSC::Wasm::LLIntGenerator::addCatchAllToUnreachable): (JSC::Wasm::LLIntGenerator::addDelegateToUnreachable): (JSC::Wasm::LLIntGenerator::addRethrow): Source/WebCore: We are now using std::variant and std::get instead. * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp: (WebCore::ApplePayPaymentHandler::handlesIdentifier): (WebCore::ApplePayPaymentHandler::validateMerchant): (WebCore::ApplePayPaymentHandler::didAuthorizePayment): (WebCore::ApplePayPaymentHandler::didSelectPaymentMethod): (WebCore::ApplePayPaymentHandler::didChangeCouponCode): * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp: (WebCore::ClipboardItemBindingsDataSource::invokeCompletionHandler): (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::sanitizeDataIfNeeded): * Modules/cache/DOMCache.cpp: (WebCore::DOMCache::requestFromInfo): * Modules/fetch/FetchBody.h: (WebCore::FetchBody::blobBody const): (WebCore::FetchBody::formDataBody): (WebCore::FetchBody::formDataBody const): (WebCore::FetchBody::arrayBufferBody const): (WebCore::FetchBody::arrayBufferViewBody const): (WebCore::FetchBody::textBody): (WebCore::FetchBody::textBody const): (WebCore::FetchBody::urlSearchParamsBody const): * Modules/fetch/FetchHeaders.cpp: (WebCore::fillHeaderMap): * Modules/fetch/FetchRequest.cpp: (WebCore::FetchRequest::create): * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::createObjectStore): (WebCore::IDBDatabase::transaction): * Modules/indexeddb/IDBKey.cpp: (WebCore::IDBKey::isValid const): (WebCore::IDBKey::compare const): * Modules/indexeddb/IDBKey.h: (WebCore::IDBKey::array const): (WebCore::IDBKey::string const): (WebCore::IDBKey::date const): (WebCore::IDBKey::number const): (WebCore::IDBKey::binary const): * Modules/indexeddb/IDBKeyData.cpp: (WebCore::IDBKeyData::IDBKeyData): (WebCore::IDBKeyData::maybeCreateIDBKey const): (WebCore::IDBKeyData::isolatedCopy): (WebCore::IDBKeyData::encode const): (WebCore::IDBKeyData::decode): (WebCore::IDBKeyData::compare const): (WebCore::IDBKeyData::loggingString const): (WebCore::IDBKeyData::operator== const): (WebCore::IDBKeyData::size const): * Modules/indexeddb/IDBKeyData.h: (WebCore::IDBKeyData::hash const): (WebCore::IDBKeyData::string const): (WebCore::IDBKeyData::date const): (WebCore::IDBKeyData::number const): (WebCore::IDBKeyData::binary const): (WebCore::IDBKeyData::array const): (WebCore::IDBKeyData::encode const): (WebCore::IDBKeyData::decode): * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::addTransceiver): (WebCore::certificateTypeFromAlgorithmIdentifier): * Modules/mediastream/RTCRtpSFrameTransform.cpp: (WebCore::RTCRtpSFrameTransform::setEncryptionKey): * animation/AnimationEffect.cpp: (WebCore::AnimationEffect::updateTiming): * animation/KeyframeEffect.cpp: (WebCore::processIterableKeyframes): (WebCore::processPropertyIndexedKeyframes): (WebCore::KeyframeEffect::create): * bindings/js/IDBBindingUtilities.cpp: (WebCore::injectIDBKeyIntoScriptValue): (WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath): (WebCore::canInjectIDBKeyIntoScriptValue): * crypto/SubtleCrypto.cpp: (WebCore::normalizeCryptoAlgorithmParameters): (WebCore::SubtleCrypto::exportKey): (WebCore::SubtleCrypto::wrapKey): * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: (WebCore::CryptoAlgorithmAES_CBC::importKey): * crypto/algorithms/CryptoAlgorithmAES_CFB.cpp: (WebCore::CryptoAlgorithmAES_CFB::importKey): * crypto/algorithms/CryptoAlgorithmAES_CTR.cpp: (WebCore::CryptoAlgorithmAES_CTR::importKey): * crypto/algorithms/CryptoAlgorithmAES_GCM.cpp: (WebCore::CryptoAlgorithmAES_GCM::importKey): * crypto/algorithms/CryptoAlgorithmAES_KW.cpp: (WebCore::CryptoAlgorithmAES_KW::importKey): * crypto/algorithms/CryptoAlgorithmECDH.cpp: (WebCore::CryptoAlgorithmECDH::importKey): * crypto/algorithms/CryptoAlgorithmECDSA.cpp: (WebCore::CryptoAlgorithmECDSA::importKey): * crypto/algorithms/CryptoAlgorithmHKDF.cpp: (WebCore::CryptoAlgorithmHKDF::importKey): * crypto/algorithms/CryptoAlgorithmHMAC.cpp: (WebCore::CryptoAlgorithmHMAC::importKey): * crypto/algorithms/CryptoAlgorithmPBKDF2.cpp: (WebCore::CryptoAlgorithmPBKDF2::importKey): * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp: (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey): * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey): * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp: (WebCore::CryptoAlgorithmRSA_OAEP::importKey): * crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp: (WebCore::CryptoAlgorithmRSA_PSS::importKey): * css/CSSCustomPropertyValue.cpp: (WebCore::CSSCustomPropertyValue::equals const): * css/CSSCustomPropertyValue.h: * css/StyleRule.h: * css/parser/CSSParser.cpp: (WebCore::CSSParser::parseValueWithVariableReferences): * dom/DocumentMarker.h: (WebCore::DocumentMarker::description const): * dom/DocumentMarkerController.cpp: (WebCore::shouldInsertAsSeparateMarker): * dom/Element.cpp: (WebCore::Element::scrollIntoView): (WebCore::Element::animate): * editing/AlternativeTextController.cpp: (WebCore::AlternativeTextController::timerFired): (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord): (WebCore::AlternativeTextController::removeDictationAlternativesForMarker): (WebCore::AlternativeTextController::dictationAlternativesForMarker): * editing/Editor.cpp: (WebCore::Editor::advanceToNextMisspelling): * html/canvas/CanvasStyle.cpp: (WebCore::CanvasStyle::isEquivalentColor const): (WebCore::CanvasStyle::isEquivalent const): * html/canvas/CanvasStyle.h: (WebCore::CanvasStyle::overrideAlpha const): (WebCore::CanvasStyle::canvasGradient const): (WebCore::CanvasStyle::canvasPattern const): (WebCore::CanvasStyle::color const): * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::InspectorScopedShaderProgramHighlight::saveBlendValue): (WebCore::InspectorScopedShaderProgramHighlight::hasBufferBinding): (WebCore::InspectorScopedShaderProgramHighlight::hasFramebufferParameterAttachment): * html/track/VTTCue.cpp: (WebCore::VTTCue::setLine): (WebCore::VTTCue::setPosition): * inspector/agents/InspectorIndexedDBAgent.cpp: * layout/integration/InlineIteratorBox.cpp: (WebCore::InlineIterator::Box::modernPath const): (WebCore::InlineIterator::Box::legacyPath const): * layout/integration/InlineIteratorBox.h: (WebCore::InlineIterator::Box::legacyInlineBox const): (WebCore::InlineIterator::Box::inlineBox const): * page/ios/FrameIOS.mm: (WebCore::Frame::interpretationsForCurrentRoot const): * platform/PasteboardCustomData.cpp: (WebCore::copyPlatformData): (WebCore::PasteboardCustomData::readBuffer const): (WebCore::PasteboardCustomData::readString const): (WebCore::PasteboardCustomData::forEachPlatformString const): (WebCore::PasteboardCustomData::forEachPlatformStringOrBuffer const): * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::takeData): * platform/audio/cocoa/CAAudioStreamDescription.cpp: (WebCore::CAAudioStreamDescription::operator== const): * platform/audio/cocoa/CAAudioStreamDescription.h: (WebCore::toCAAudioStreamDescription): * platform/cocoa/MediaUtilities.cpp: (WebCore::createAudioFormatDescription): * platform/generic/KeyedDecoderGeneric.cpp: * platform/graphics/DecodingOptions.h: (WebCore::DecodingOptions::isAuto const): (WebCore::DecodingOptions::isSynchronous const): (WebCore::DecodingOptions::isAsynchronous const): (WebCore::DecodingOptions::sizeForDrawing const): * platform/graphics/Path.cpp: (WebCore::Path::apply const): (WebCore::Path::addQuadCurveTo): (WebCore::Path::addBezierCurveTo): * platform/graphics/Path.h: (WebCore::Path::inlineData const): (WebCore::Path::inlineData): * platform/graphics/displaylists/DisplayListItems.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfTrack): * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h: * platform/ios/PlatformPasteboardIOS.mm: (WebCore::createItemProviderRegistrationList): * platform/mac/PlatformPasteboardMac.mm: (WebCore::PlatformPasteboard::write): (WebCore::createPasteboardItem): * platform/mediastream/mac/MockAudioSharedUnit.mm: (WebCore::MockAudioSharedUnit::resetSampleRate): * platform/mediastream/mac/WebAudioSourceProviderCocoa.mm: (WebCore::WebAudioSourceProviderCocoa::receivedNewAudioSamples): * platform/mock/MockMediaDevice.h: (WebCore::MockMediaDevice::type const): (WebCore::MockMediaDevice::speakerProperties const): * platform/mock/MockRealtimeAudioSource.cpp: (WebCore::MockRealtimeAudioSource::MockRealtimeAudioSource): (WebCore::MockRealtimeAudioSource::startProducingData): * platform/mock/MockRealtimeMediaSourceCenter.cpp: (WebCore::MockDisplayCapturer::intrinsicSize const): * platform/mock/MockRealtimeVideoSource.cpp: (WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource): (WebCore::MockRealtimeVideoSource::generatePresets): (WebCore::MockRealtimeVideoSource::capabilities): (WebCore::MockRealtimeVideoSource::mockDisplayType const): * platform/network/DNS.h: (WebCore::IPAddress::ipv4Address const): (WebCore::IPAddress::ipv6Address const): * platform/network/FormData.cpp: (WebCore::FormData::appendMultiPartKeyValuePairItems): (WebCore::FormData::appendNonMultiPartKeyValuePairItems): * platform/network/curl/CurlSSLHandle.h: * platform/xr/PlatformXR.h: (PlatformXR::Device::FrameData::View::encode const): * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::legacyLineLayout const): (WebCore::RenderBlockFlow::legacyLineLayout): (WebCore::RenderBlockFlow::modernLineLayout const): (WebCore::RenderBlockFlow::modernLineLayout): * rendering/RenderReplaced.cpp: (WebCore::draggedContentContainsReplacedElement): * style/StyleBuilder.cpp: (WebCore::Style::Builder::applyProperty): * workers/service/ServiceWorkerJobData.cpp: (WebCore::ServiceWorkerJobData::serviceWorkerPageIdentifier const): * workers/service/context/ServiceWorkerThread.cpp: (WebCore::ServiceWorkerThread::queueTaskToPostMessage): * workers/service/server/SWServerJobQueue.cpp: (WebCore::SWServerJobQueue::cancelJobsFromServiceWorker): Source/WebKit: * GPUProcess/graphics/QualifiedResourceHeap.h: (WebKit::QualifiedResourceHeap::get const): * NetworkProcess/cache/NetworkCacheDataCurl.cpp: (WebKit::NetworkCache::Data::Data): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<PasteboardCustomData::Entry>::encode): (IPC::ArgumentCoder<IDBKeyPath>::encode): (IPC::ArgumentCoder<ServiceWorkerOrClientData>::encode): (IPC::ArgumentCoder<ServiceWorkerOrClientIdentifier>::encode): * Shared/WebPreferencesStore.cpp: (WebKit::valueForKey): * UIProcess/API/wpe/TouchGestureController.h: * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp: (WebKit::WebAutomationSession::platformSimulateKeyboardInteraction): * UIProcess/Automation/wpe/WebAutomationSessionWPE.cpp: (WebKit::WebAutomationSession::platformSimulateKeyboardInteraction): * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/ProcessThrottler.cpp: (WebKit::ProcessThrottler::isValidBackgroundActivity): (WebKit::ProcessThrottler::isValidForegroundActivity): * UIProcess/WebAuthentication/AuthenticatorManager.cpp: (WebKit::WebCore::getRpId): (WebKit::WebCore::getUserName): (WebKit::AuthenticatorManager::respondReceived): * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: (WebKit::LocalAuthenticator::makeCredential): (WebKit::LocalAuthenticator::continueMakeCredentialAfterDecidePolicy): (WebKit::LocalAuthenticator::continueMakeCredentialAfterUserVerification): (WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested): (WebKit::LocalAuthenticator::getAssertion): (WebKit::LocalAuthenticator::continueGetAssertionAfterResponseSelected): (WebKit::LocalAuthenticator::continueGetAssertionAfterUserVerification): (WebKit::LocalAuthenticator::deleteDuplicateCredential const): * UIProcess/WebAuthentication/WebAuthenticationRequestData.cpp: (WebKit::getUserVerificationRequirement): * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: (WebKit::CtapAuthenticator::makeCredential): (WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived): (WebKit::CtapAuthenticator::getAssertion): (WebKit::CtapAuthenticator::processGoogleLegacyAppIdSupportExtension): * UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp: (WebKit::U2fAuthenticator::makeCredential): (WebKit::U2fAuthenticator::checkExcludeList): (WebKit::U2fAuthenticator::issueRegisterCommand): (WebKit::U2fAuthenticator::getAssertion): (WebKit::U2fAuthenticator::issueSignCommand): (WebKit::U2fAuthenticator::continueRegisterCommandAfterResponseReceived): (WebKit::U2fAuthenticator::continueSignCommandAfterResponseReceived): * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp: (WebKit::ImageBufferShareableBitmapBackend::create): * WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.cpp: (WebKit::ImageBufferShareableIOSurfaceBackend::createImageBufferBackendHandle const): * WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.cpp: (WebKit::ImageBufferShareableMappedIOSurfaceBackend::create): * WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp: (WebKit::MediaRecorderPrivate::audioSamplesAvailable): * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp: (webkit_dom_html_select_element_add): * WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.cpp: * WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp: (WebKit::WebServiceWorkerFetchTaskClient::didReceiveData): * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: (WebKit::WebEditorClient::executePendingEditorCommands): * WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm: (WebKit::TextCheckingControllerProxy::removeAnnotationRelativeToSelection): (WebKit::TextCheckingControllerProxy::annotatedSubstringBetweenPositions): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getPlatformEditorState const): Source/WebKitLegacy/ios: * WebCoreSupport/WebVisiblePosition.mm: (-[WebVisiblePosition enclosingRangeWithDictationPhraseAlternatives:]): Source/WebKitLegacy/mac: * WebView/WebFrame.mm: (-[WebFrame getDictationResultRanges:andMetadatas:]): (-[WebFrame dictationResultMetadataForRange:]): Source/WTF: * wtf/Variant.h: (WTF::get): Deleted. Tools: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/Variant.cpp: Removed. * TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm: (addValuesToTable): Canonical link: https://commits.webkit.org/242923@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent a6fc2d6 commit afbbd13

133 files changed

Lines changed: 775 additions & 688 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Source/JavaScriptCore/ChangeLog

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
1+
2021-10-13 Alex Christensen <achristensen@webkit.org>
2+
3+
Remove WTF::Variant and WTF::get
4+
https://bugs.webkit.org/show_bug.cgi?id=231675
5+
6+
Reviewed by Chris Dumez.
7+
8+
* bytecode/StructureStubClearingWatchpoint.cpp:
9+
(JSC::WatchpointsOnStructureStubInfo::ensureReferenceAndInstallWatchpoint):
10+
(JSC::WatchpointsOnStructureStubInfo::ensureReferenceAndAddWatchpoint):
11+
* jit/AssemblyHelpers.cpp:
12+
(JSC::AssemblyHelpers::branchIfValue):
13+
* jit/SnippetReg.h:
14+
(JSC::SnippetReg::gpr const):
15+
(JSC::SnippetReg::fpr const):
16+
(JSC::SnippetReg::jsValueRegs const):
17+
* jsc.cpp:
18+
(JSC_DEFINE_HOST_FUNCTION):
19+
* parser/Lexer.cpp:
20+
(JSC::Lexer<T>::lexWithoutClearingLineTerminator):
21+
* parser/VariableEnvironment.cpp:
22+
(JSC::CompactTDZEnvironment::toTDZEnvironmentSlow const):
23+
* parser/VariableEnvironment.h:
24+
(JSC::CompactTDZEnvironment::toTDZEnvironment const):
25+
* runtime/CacheUpdate.cpp:
26+
(JSC::CacheUpdate::asGlobal const):
27+
(JSC::CacheUpdate::asFunction const):
28+
* runtime/CachedTypes.cpp:
29+
(JSC::CachedCompactTDZEnvironment::encode):
30+
* wasm/WasmLLIntGenerator.cpp:
31+
(JSC::Wasm::LLIntGenerator::ControlType::isCatch):
32+
(JSC::Wasm::LLIntGenerator::ControlType::targetLabelForBranch const):
33+
(JSC::Wasm::LLIntGenerator::addLoop):
34+
(JSC::Wasm::LLIntGenerator::addElseToUnreachable):
35+
(JSC::Wasm::LLIntGenerator::addCatchToUnreachable):
36+
(JSC::Wasm::LLIntGenerator::addCatchAllToUnreachable):
37+
(JSC::Wasm::LLIntGenerator::addDelegateToUnreachable):
38+
(JSC::Wasm::LLIntGenerator::addRethrow):
39+
140
2021-10-13 Diego Pino Garcia <dpino@igalia.com>
241

342
[GTK] Unreviewed, build fix for Ubuntu 18.04 after r283852

Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ void WatchpointsOnStructureStubInfo::ensureReferenceAndInstallWatchpoint(
8484
ASSERT(!!key);
8585
auto& watchpointVariant = holderRef->addWatchpoint(key);
8686
if (key.kind() == PropertyCondition::Equivalence) {
87-
auto& adaptiveWatchpoint = WTF::get<AdaptiveValueStructureStubClearingWatchpoint>(watchpointVariant);
87+
auto& adaptiveWatchpoint = std::get<AdaptiveValueStructureStubClearingWatchpoint>(watchpointVariant);
8888
adaptiveWatchpoint.install(codeBlock->vm());
8989
} else {
90-
auto* structureTransitionWatchpoint = &WTF::get<StructureTransitionStructureStubClearingWatchpoint>(watchpointVariant);
90+
auto* structureTransitionWatchpoint = &std::get<StructureTransitionStructureStubClearingWatchpoint>(watchpointVariant);
9191
key.object()->structure()->addTransitionWatchpoint(structureTransitionWatchpoint);
9292
}
9393
}
@@ -103,7 +103,7 @@ Watchpoint* WatchpointsOnStructureStubInfo::ensureReferenceAndAddWatchpoint(
103103
ASSERT(holderRef->m_stubInfo == stubInfo);
104104
}
105105

106-
return &WTF::get<StructureTransitionStructureStubClearingWatchpoint>(holderRef->addWatchpoint(ObjectPropertyCondition()));
106+
return &std::get<StructureTransitionStructureStubClearingWatchpoint>(holderRef->addWatchpoint(ObjectPropertyCondition()));
107107
}
108108

109109
void AdaptiveValueStructureStubClearingWatchpoint::handleFire(VM&, const FireDetail&)

Source/JavaScriptCore/jit/AssemblyHelpers.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -931,9 +931,9 @@ AssemblyHelpers::JumpList AssemblyHelpers::branchIfValue(VM& vm, JSValueRegs val
931931
isNotMasqueradesAsUndefined.append(branchTest8(Zero, Address(value.payloadGPR(), JSCell::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined)));
932932
emitLoadStructure(vm, value.payloadGPR(), scratch, scratchIfShouldCheckMasqueradesAsUndefined);
933933
if (std::holds_alternative<JSGlobalObject*>(globalObject))
934-
move(TrustedImmPtr(WTF::get<JSGlobalObject*>(globalObject)), scratchIfShouldCheckMasqueradesAsUndefined);
934+
move(TrustedImmPtr(std::get<JSGlobalObject*>(globalObject)), scratchIfShouldCheckMasqueradesAsUndefined);
935935
else
936-
move(WTF::get<GPRReg>(globalObject), scratchIfShouldCheckMasqueradesAsUndefined);
936+
move(std::get<GPRReg>(globalObject), scratchIfShouldCheckMasqueradesAsUndefined);
937937
isNotMasqueradesAsUndefined.append(branchPtr(NotEqual, Address(scratch, Structure::globalObjectOffset()), scratchIfShouldCheckMasqueradesAsUndefined));
938938

939939
// We act like we are "undefined" here.

Source/JavaScriptCore/jit/SnippetReg.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,17 @@ class SnippetReg {
7272
GPRReg gpr() const
7373
{
7474
ASSERT(isGPR());
75-
return WTF::get<GPRReg>(m_variant);
75+
return std::get<GPRReg>(m_variant);
7676
}
7777
FPRReg fpr() const
7878
{
7979
ASSERT(isFPR());
80-
return WTF::get<FPRReg>(m_variant);
80+
return std::get<FPRReg>(m_variant);
8181
}
8282
JSValueRegs jsValueRegs() const
8383
{
8484
ASSERT(isJSValueRegs());
85-
return WTF::get<JSValueRegs>(m_variant);
85+
return std::get<JSValueRegs>(m_variant);
8686
}
8787

8888
private:

Source/JavaScriptCore/jsc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,15 +2149,15 @@ JSC_DEFINE_HOST_FUNCTION(functionDollarAgentReceiveBroadcast, (JSGlobalObject* g
21492149
auto content = message->releaseContents();
21502150
JSValue result = ([&]() -> JSValue {
21512151
if (std::holds_alternative<ArrayBufferContents>(content)) {
2152-
auto nativeBuffer = ArrayBuffer::create(WTF::get<ArrayBufferContents>(WTFMove(content)));
2152+
auto nativeBuffer = ArrayBuffer::create(std::get<ArrayBufferContents>(WTFMove(content)));
21532153
ArrayBufferSharingMode sharingMode = nativeBuffer->sharingMode();
21542154
return JSArrayBuffer::create(vm, globalObject->arrayBufferStructure(sharingMode), WTFMove(nativeBuffer));
21552155
}
21562156
#if ENABLE(WEBASSEMBLY)
21572157
if (std::holds_alternative<Ref<Wasm::MemoryHandle>>(content)) {
21582158
JSWebAssemblyMemory* jsMemory = JSC::JSWebAssemblyMemory::tryCreate(globalObject, vm, globalObject->webAssemblyMemoryStructure());
21592159
scope.releaseAssertNoException();
2160-
Ref<Wasm::Memory> memory = Wasm::Memory::create(WTF::get<Ref<Wasm::MemoryHandle>>(WTFMove(content)),
2160+
Ref<Wasm::Memory> memory = Wasm::Memory::create(std::get<Ref<Wasm::MemoryHandle>>(WTFMove(content)),
21612161
[&vm] (Wasm::Memory::NotifyPressure) { vm.heap.collectAsync(CollectionScope::Full); },
21622162
[&vm] (Wasm::Memory::SyncTryToReclaim) { vm.heap.collectSync(CollectionScope::Full); },
21632163
[&vm, jsMemory] (Wasm::Memory::GrowSuccess, Wasm::PageCount oldPageCount, Wasm::PageCount newPageCount) { jsMemory->growSuccessCallback(vm, oldPageCount, newPageCount); });

Source/JavaScriptCore/parser/Lexer.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2298,11 +2298,11 @@ JSTokenType Lexer<T>::lexWithoutClearingLineTerminator(JSToken* tokenRecord, Opt
22982298
if (!parseNumberResult)
22992299
tokenData->doubleValue = 0;
23002300
else if (std::holds_alternative<double>(*parseNumberResult))
2301-
tokenData->doubleValue = WTF::get<double>(*parseNumberResult);
2301+
tokenData->doubleValue = std::get<double>(*parseNumberResult);
23022302
else {
23032303
token = BIGINT;
23042304
shift();
2305-
tokenData->bigIntString = WTF::get<const Identifier*>(*parseNumberResult);
2305+
tokenData->bigIntString = std::get<const Identifier*>(*parseNumberResult);
23062306
tokenData->radix = 16;
23072307
}
23082308

@@ -2337,11 +2337,11 @@ JSTokenType Lexer<T>::lexWithoutClearingLineTerminator(JSToken* tokenRecord, Opt
23372337
if (!parseNumberResult)
23382338
tokenData->doubleValue = 0;
23392339
else if (std::holds_alternative<double>(*parseNumberResult))
2340-
tokenData->doubleValue = WTF::get<double>(*parseNumberResult);
2340+
tokenData->doubleValue = std::get<double>(*parseNumberResult);
23412341
else {
23422342
token = BIGINT;
23432343
shift();
2344-
tokenData->bigIntString = WTF::get<const Identifier*>(*parseNumberResult);
2344+
tokenData->bigIntString = std::get<const Identifier*>(*parseNumberResult);
23452345
tokenData->radix = 2;
23462346
}
23472347

@@ -2377,11 +2377,11 @@ JSTokenType Lexer<T>::lexWithoutClearingLineTerminator(JSToken* tokenRecord, Opt
23772377
if (!parseNumberResult)
23782378
tokenData->doubleValue = 0;
23792379
else if (std::holds_alternative<double>(*parseNumberResult))
2380-
tokenData->doubleValue = WTF::get<double>(*parseNumberResult);
2380+
tokenData->doubleValue = std::get<double>(*parseNumberResult);
23812381
else {
23822382
token = BIGINT;
23832383
shift();
2384-
tokenData->bigIntString = WTF::get<const Identifier*>(*parseNumberResult);
2384+
tokenData->bigIntString = std::get<const Identifier*>(*parseNumberResult);
23852385
tokenData->radix = 8;
23862386
}
23872387

@@ -2418,7 +2418,7 @@ JSTokenType Lexer<T>::lexWithoutClearingLineTerminator(JSToken* tokenRecord, Opt
24182418
if (isASCIIOctalDigit(m_current)) {
24192419
auto parseNumberResult = parseOctal();
24202420
if (parseNumberResult && std::holds_alternative<double>(*parseNumberResult)) {
2421-
tokenData->doubleValue = WTF::get<double>(*parseNumberResult);
2421+
tokenData->doubleValue = std::get<double>(*parseNumberResult);
24222422
token = tokenTypeForIntegerLikeToken(tokenData->doubleValue);
24232423
}
24242424
}
@@ -2428,12 +2428,12 @@ JSTokenType Lexer<T>::lexWithoutClearingLineTerminator(JSToken* tokenRecord, Opt
24282428
auto parseNumberResult = parseDecimal();
24292429
if (parseNumberResult) {
24302430
if (std::holds_alternative<double>(*parseNumberResult)) {
2431-
tokenData->doubleValue = WTF::get<double>(*parseNumberResult);
2431+
tokenData->doubleValue = std::get<double>(*parseNumberResult);
24322432
token = tokenTypeForIntegerLikeToken(tokenData->doubleValue);
24332433
} else {
24342434
token = BIGINT;
24352435
shift();
2436-
tokenData->bigIntString = WTF::get<const Identifier*>(*parseNumberResult);
2436+
tokenData->bigIntString = std::get<const Identifier*>(*parseNumberResult);
24372437
tokenData->radix = 10;
24382438
}
24392439
} else {

Source/JavaScriptCore/parser/VariableEnvironment.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,14 +277,14 @@ TDZEnvironment& CompactTDZEnvironment::toTDZEnvironmentSlow() const
277277
{
278278
Inflated inflated;
279279
{
280-
auto& compact = WTF::get<Compact>(m_variables);
280+
auto& compact = std::get<Compact>(m_variables);
281281
for (size_t i = 0; i < compact.size(); ++i) {
282282
auto addResult = inflated.add(compact[i]);
283283
ASSERT_UNUSED(addResult, addResult.isNewEntry);
284284
}
285285
}
286286
m_variables = Variables(WTFMove(inflated));
287-
return const_cast<Inflated&>(WTF::get<Inflated>(m_variables));
287+
return const_cast<Inflated&>(std::get<Inflated>(m_variables));
288288
}
289289

290290
CompactTDZEnvironmentMap::Handle CompactTDZEnvironmentMap::get(const TDZEnvironment& env)

Source/JavaScriptCore/parser/VariableEnvironment.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ class CompactTDZEnvironment {
356356
TDZEnvironment& toTDZEnvironment() const
357357
{
358358
if (std::holds_alternative<Inflated>(m_variables))
359-
return const_cast<TDZEnvironment&>(WTF::get<Inflated>(m_variables));
359+
return const_cast<TDZEnvironment&>(std::get<Inflated>(m_variables));
360360
return toTDZEnvironmentSlow();
361361
}
362362

Source/JavaScriptCore/runtime/CacheUpdate.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ bool CacheUpdate::isGlobal() const
5454
const CacheUpdate::GlobalUpdate& CacheUpdate::asGlobal() const
5555
{
5656
ASSERT(isGlobal());
57-
return WTF::get<GlobalUpdate>(m_update);
57+
return std::get<GlobalUpdate>(m_update);
5858
}
5959

6060
const CacheUpdate::FunctionUpdate& CacheUpdate::asFunction() const
6161
{
6262
ASSERT(!isGlobal());
63-
return WTF::get<FunctionUpdate>(m_update);
63+
return std::get<FunctionUpdate>(m_update);
6464
}
6565

6666
} // namespace JSC

Source/JavaScriptCore/runtime/CachedTypes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,10 +1038,10 @@ class CachedCompactTDZEnvironment : public CachedObject<CompactTDZEnvironment> {
10381038
void encode(Encoder& encoder, const CompactTDZEnvironment& env)
10391039
{
10401040
if (std::holds_alternative<CompactTDZEnvironment::Compact>(env.m_variables))
1041-
m_variables.encode(encoder, WTF::get<CompactTDZEnvironment::Compact>(env.m_variables));
1041+
m_variables.encode(encoder, std::get<CompactTDZEnvironment::Compact>(env.m_variables));
10421042
else {
10431043
CompactTDZEnvironment::Compact compact;
1044-
for (auto& key : WTF::get<CompactTDZEnvironment::Inflated>(env.m_variables))
1044+
for (auto& key : std::get<CompactTDZEnvironment::Inflated>(env.m_variables))
10451045
compact.append(key);
10461046
m_variables.encode(encoder, compact);
10471047
}

0 commit comments

Comments
 (0)