Ignore:
Timestamp:
Oct 13, 2021, 9:17:09 AM (4 years ago)
Author:
[email protected]
Message:

Remove WTF::Variant and WTF::get
https://bugs.webkit.org/show_bug.cgi?id=231675

Patch by Alex Christensen <[email protected]> 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):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/VariableEnvironment.h

    r284075 r284095  
    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    }
Note: See TracChangeset for help on using the changeset viewer.