1. 04 Dec, 2013 1 commit
    • fpizlo@apple.com's avatar
      Fold constant typed arrays · ee327c85
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125205
      
      Source/JavaScriptCore: 
      
      Reviewed by Oliver Hunt and Mark Hahnenberg.
              
      If by some other mechanism we have a typed array access on a compile-time constant
      typed array pointer, then fold:
              
      - Array bounds checks. Specifically, fold the load of length.
              
      - Loading the vector.
              
      This needs to install a watchpoint on the array itself because of the possibility of
      neutering. Neutering is ridiculous. We do this without bloating the size of
      ArrayBuffer or JSArrayBufferView in the common case (i.e. the case where you
      allocated an array that didn't end up becoming a compile-time constant). To install
      the watchpoint, we slowDownAndWasteMemory and then create an incoming reference to
      the ArrayBuffer, where that incoming reference is from a watchpoint object. The
      ArrayBuffer already knows about such incoming references and can fire the
      watchpoints that way.
              
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * dfg/DFGDesiredWatchpoints.cpp:
      (JSC::DFG::ArrayBufferViewWatchpointAdaptor::add):
      (JSC::DFG::DesiredWatchpoints::addLazily):
      * dfg/DFGDesiredWatchpoints.h:
      (JSC::DFG::GenericSetAdaptor::add):
      (JSC::DFG::GenericSetAdaptor::hasBeenInvalidated):
      (JSC::DFG::ArrayBufferViewWatchpointAdaptor::hasBeenInvalidated):
      (JSC::DFG::GenericDesiredWatchpoints::reallyAdd):
      (JSC::DFG::GenericDesiredWatchpoints::areStillValid):
      (JSC::DFG::GenericDesiredWatchpoints::isStillValid):
      (JSC::DFG::GenericDesiredWatchpoints::shouldAssumeMixedState):
      (JSC::DFG::DesiredWatchpoints::isStillValid):
      (JSC::DFG::DesiredWatchpoints::shouldAssumeMixedState):
      (JSC::DFG::DesiredWatchpoints::isValidOrMixed):
      * dfg/DFGGraph.cpp:
      (JSC::DFG::Graph::tryGetFoldableView):
      * dfg/DFGGraph.h:
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::jumpForTypedArrayOutOfBounds):
      (JSC::DFG::SpeculativeJIT::emitTypedArrayBoundsCheck):
      (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
      (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
      (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
      (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
      (JSC::DFG::SpeculativeJIT::compileConstantIndexedPropertyStorage):
      (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
      * dfg/DFGSpeculativeJIT.h:
      * dfg/DFGWatchpointCollectionPhase.cpp:
      (JSC::DFG::WatchpointCollectionPhase::handle):
      (JSC::DFG::WatchpointCollectionPhase::addLazily):
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::compileGetIndexedPropertyStorage):
      (JSC::FTL::LowerDFGToLLVM::compileGetByVal):
      (JSC::FTL::LowerDFGToLLVM::compilePutByVal):
      (JSC::FTL::LowerDFGToLLVM::typedArrayLength):
      * runtime/ArrayBuffer.cpp:
      (JSC::ArrayBuffer::transfer):
      * runtime/ArrayBufferNeuteringWatchpoint.cpp: Added.
      (JSC::ArrayBufferNeuteringWatchpoint::ArrayBufferNeuteringWatchpoint):
      (JSC::ArrayBufferNeuteringWatchpoint::~ArrayBufferNeuteringWatchpoint):
      (JSC::ArrayBufferNeuteringWatchpoint::finishCreation):
      (JSC::ArrayBufferNeuteringWatchpoint::destroy):
      (JSC::ArrayBufferNeuteringWatchpoint::create):
      (JSC::ArrayBufferNeuteringWatchpoint::createStructure):
      * runtime/ArrayBufferNeuteringWatchpoint.h: Added.
      (JSC::ArrayBufferNeuteringWatchpoint::set):
      * runtime/VM.cpp:
      (JSC::VM::VM):
      * runtime/VM.h:
      
      LayoutTests: 
      
      Reviewed by Oliver Hunt and Mark Hahnenberg.
      
      * js/regress/fixed-typed-array-storage-expected.txt: Added.
      * js/regress/fixed-typed-array-storage-var-index-expected.txt: Added.
      * js/regress/fixed-typed-array-storage-var-index.html: Added.
      * js/regress/fixed-typed-array-storage.html: Added.
      * js/regress/script-tests/fixed-typed-array-storage-var-index.js: Added.
      (foo):
      * js/regress/script-tests/fixed-typed-array-storage.js: Added.
      (foo):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee327c85
  2. 30 Oct, 2013 1 commit
    • fpizlo@apple.com's avatar
      Add InvalidationPoints to the DFG and use them for all watchpoints · d84425d1
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123472
      
      Reviewed by Mark Hahnenberg.
              
      This makes a fundamental change to how watchpoints work in the DFG.
              
      Previously, a watchpoint was an instruction whose execution semantics were something
      like:
              
          if (watchpoint->invalidated)
              exit
              
      We would implement this without any branch by using jump replacement.
              
      This is a very good optimization. But it's a bit awkward once you get a lot of
      watchpoints: semantically we will have lots of these branches in the code, which the
      compiler needs to reason about even though they don't actually result in any emitted
      code.
              
      Separately, we also had a mechanism for jettisoning a CodeBlock. This mechanism would
      be invoked if a CodeBlock exited a lot. It would ensure that a CodeBlock wouldn't be
      called into again, but it would do nothing for CodeBlocks that were already on the
      stack.
              
      This change flips jettisoning and watchpoint invalidation on their heads. Now, the jump
      replacement has nothing to do with watchpoints; instead it's something that happens if
      you ever jettison a CodeBlock. Jump replacement is now an all-or-nothing operation over
      all of the potential call-return safe-exit-points in a CodeBlock. We call these
      "InvalidationPoint"s. A watchpoint instruction is now "lowered" by having the DFG
      collect all of the watchpoint sets that the CodeBlock cares about, and then registering
      a CodeBlockJettisoningWatchpoint with all of them. That is, if the watchpoint fires, it
      jettisons the CodeBlock, which in turn ensures that the CodeBlock can't be called into
      (because the entrypoint now points to baseline code) and can't be returned into
      (because returning exits to baseline before the next bytecode instruction).
              
      This will allow for a sensible lowering of watchpoints to LLVM IR. It will also allow
      for jettison() to be used effectively for things like breakpointing and single-stepping
      in the debugger.
              
      Well, basically, this mechanism just takes us into the HotSpot-style world where anyone
      can, at any time and for any reason, request that an optimized CodeBlock is rendered
      immediately invalid. You can use this for many cool things, I'm sure.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * assembler/AbstractMacroAssembler.h:
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::jettison):
      * bytecode/CodeBlock.h:
      * bytecode/CodeBlockJettisoningWatchpoint.cpp: Added.
      (JSC::CodeBlockJettisoningWatchpoint::fireInternal):
      * bytecode/CodeBlockJettisoningWatchpoint.h: Added.
      (JSC::CodeBlockJettisoningWatchpoint::CodeBlockJettisoningWatchpoint):
      * bytecode/ExitKind.cpp:
      (JSC::exitKindToString):
      * bytecode/ExitKind.h:
      * bytecode/ProfiledCodeBlockJettisoningWatchpoint.cpp: Added.
      (JSC::ProfiledCodeBlockJettisoningWatchpoint::fireInternal):
      * bytecode/ProfiledCodeBlockJettisoningWatchpoint.h: Added.
      (JSC::ProfiledCodeBlockJettisoningWatchpoint::ProfiledCodeBlockJettisoningWatchpoint):
      * dfg/DFGAbstractHeap.h:
      * dfg/DFGAbstractInterpreterInlines.h:
      (JSC::DFG::::executeEffects):
      * dfg/DFGClobberize.cpp:
      (JSC::DFG::writesOverlap):
      * dfg/DFGClobberize.h:
      (JSC::DFG::clobberize):
      (JSC::DFG::AbstractHeapOverlaps::AbstractHeapOverlaps):
      (JSC::DFG::AbstractHeapOverlaps::operator()):
      (JSC::DFG::AbstractHeapOverlaps::result):
      * dfg/DFGCommonData.cpp:
      (JSC::DFG::CommonData::invalidate):
      * dfg/DFGCommonData.h:
      (JSC::DFG::CommonData::CommonData):
      * dfg/DFGDesiredWatchpoints.cpp:
      (JSC::DFG::DesiredWatchpoints::addLazily):
      (JSC::DFG::DesiredWatchpoints::reallyAdd):
      * dfg/DFGDesiredWatchpoints.h:
      (JSC::DFG::WatchpointForGenericWatchpointSet::WatchpointForGenericWatchpointSet):
      (JSC::DFG::GenericDesiredWatchpoints::addLazily):
      (JSC::DFG::GenericDesiredWatchpoints::reallyAdd):
      (JSC::DFG::GenericDesiredWatchpoints::areStillValid):
      * dfg/DFGFixupPhase.cpp:
      (JSC::DFG::FixupPhase::fixupNode):
      * dfg/DFGInvalidationPointInjectionPhase.cpp: Added.
      (JSC::DFG::InvalidationPointInjectionPhase::InvalidationPointInjectionPhase):
      (JSC::DFG::InvalidationPointInjectionPhase::run):
      (JSC::DFG::InvalidationPointInjectionPhase::handle):
      (JSC::DFG::InvalidationPointInjectionPhase::insertInvalidationCheck):
      (JSC::DFG::performInvalidationPointInjection):
      * dfg/DFGInvalidationPointInjectionPhase.h: Added.
      * dfg/DFGJITCode.h:
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::linkOSRExits):
      (JSC::DFG::JITCompiler::link):
      * dfg/DFGJITCompiler.h:
      * dfg/DFGJumpReplacement.cpp: Added.
      (JSC::DFG::JumpReplacement::fire):
      * dfg/DFGJumpReplacement.h: Added.
      (JSC::DFG::JumpReplacement::JumpReplacement):
      * dfg/DFGNodeType.h:
      * dfg/DFGOSRExitCompilationInfo.h:
      * dfg/DFGOperations.cpp:
      * dfg/DFGPlan.cpp:
      (JSC::DFG::Plan::compileInThreadImpl):
      (JSC::DFG::Plan::reallyAdd):
      * dfg/DFGPredictionPropagationPhase.cpp:
      (JSC::DFG::PredictionPropagationPhase::propagate):
      * dfg/DFGSafeToExecute.h:
      (JSC::DFG::safeToExecute):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::emitInvalidationPoint):
      (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
      (JSC::DFG::SpeculativeJIT::compileGetByValOnString):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::masqueradesAsUndefinedWatchpointIsStillValid):
      (JSC::DFG::SpeculativeJIT::speculateStringObjectForStructure):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
      (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
      (JSC::DFG::SpeculativeJIT::compileObjectEquality):
      (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
      (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
      (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
      (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
      (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
      (JSC::DFG::SpeculativeJIT::compileObjectEquality):
      (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
      (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
      (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
      (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGWatchpointCollectionPhase.cpp: Added.
      (JSC::DFG::WatchpointCollectionPhase::WatchpointCollectionPhase):
      (JSC::DFG::WatchpointCollectionPhase::run):
      (JSC::DFG::WatchpointCollectionPhase::handle):
      (JSC::DFG::WatchpointCollectionPhase::handleEdge):
      (JSC::DFG::WatchpointCollectionPhase::handleMasqueradesAsUndefined):
      (JSC::DFG::WatchpointCollectionPhase::handleStringGetByVal):
      (JSC::DFG::WatchpointCollectionPhase::addLazily):
      (JSC::DFG::WatchpointCollectionPhase::globalObject):
      (JSC::DFG::performWatchpointCollection):
      * dfg/DFGWatchpointCollectionPhase.h: Added.
      * ftl/FTLCapabilities.cpp:
      (JSC::FTL::canCompile):
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::compileNode):
      (JSC::FTL::LowerDFGToLLVM::compileStructureTransitionWatchpoint):
      (JSC::FTL::LowerDFGToLLVM::compileGetByVal):
      (JSC::FTL::LowerDFGToLLVM::compileGlobalVarWatchpoint):
      (JSC::FTL::LowerDFGToLLVM::compileCompareEqConstant):
      (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq):
      (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEqConstant):
      (JSC::FTL::LowerDFGToLLVM::compileInvalidationPoint):
      (JSC::FTL::LowerDFGToLLVM::equalNullOrUndefined):
      (JSC::FTL::LowerDFGToLLVM::speculateNonNullObject):
      * jit/JITOperations.cpp:
      * jit/JumpReplacementWatchpoint.cpp: Removed.
      * jit/JumpReplacementWatchpoint.h: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d84425d1
  3. 18 Oct, 2013 1 commit
    • andersca@apple.com's avatar
      Remove spaces between template angle brackets · c3523f8d
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123040
      
      Reviewed by Andreas Kling.
      
      Source/JavaScriptCore:
      
      * API/JSCallbackObject.cpp:
      (JSC::::create):
      * API/JSObjectRef.cpp:
      * bytecode/CodeBlock.h:
      (JSC::CodeBlock::constants):
      (JSC::CodeBlock::setConstantRegisters):
      * bytecode/DFGExitProfile.h:
      * bytecode/EvalCodeCache.h:
      * bytecode/Operands.h:
      * bytecode/UnlinkedCodeBlock.h:
      (JSC::UnlinkedCodeBlock::constantRegisters):
      * bytecode/Watchpoint.h:
      * bytecompiler/BytecodeGenerator.h:
      * bytecompiler/StaticPropertyAnalysis.h:
      * bytecompiler/StaticPropertyAnalyzer.h:
      * dfg/DFGArgumentsSimplificationPhase.cpp:
      * dfg/DFGBlockInsertionSet.h:
      * dfg/DFGCSEPhase.cpp:
      (JSC::DFG::performCSE):
      (JSC::DFG::performStoreElimination):
      * dfg/DFGCommonData.h:
      * dfg/DFGDesiredStructureChains.h:
      * dfg/DFGDesiredWatchpoints.h:
      * dfg/DFGJITCompiler.h:
      * dfg/DFGOSRExitCompiler32_64.cpp:
      (JSC::DFG::OSRExitCompiler::compileExit):
      * dfg/DFGOSRExitCompiler64.cpp:
      (JSC::DFG::OSRExitCompiler::compileExit):
      * dfg/DFGWorklist.h:
      * heap/BlockAllocator.h:
      (JSC::CopiedBlock):
      (JSC::MarkedBlock):
      (JSC::WeakBlock):
      (JSC::MarkStackSegment):
      (JSC::CopyWorkListSegment):
      (JSC::HandleBlock):
      * heap/Heap.h:
      * heap/Local.h:
      * heap/MarkedBlock.h:
      * heap/Strong.h:
      * jit/AssemblyHelpers.cpp:
      (JSC::AssemblyHelpers::decodedCodeMapFor):
      * jit/AssemblyHelpers.h:
      * jit/SpecializedThunkJIT.h:
      * parser/Nodes.h:
      * parser/Parser.cpp:
      (JSC::::parseIfStatement):
      * parser/Parser.h:
      (JSC::Scope::copyCapturedVariablesToVector):
      (JSC::parse):
      * parser/ParserArena.h:
      * parser/SourceProviderCacheItem.h:
      * profiler/LegacyProfiler.cpp:
      (JSC::dispatchFunctionToProfiles):
      * profiler/LegacyProfiler.h:
      (JSC::LegacyProfiler::currentProfiles):
      * profiler/ProfileNode.h:
      (JSC::ProfileNode::children):
      * profiler/ProfilerDatabase.h:
      * runtime/Butterfly.h:
      (JSC::Butterfly::contiguousInt32):
      (JSC::Butterfly::contiguous):
      * runtime/GenericTypedArrayViewInlines.h:
      (JSC::::create):
      * runtime/Identifier.h:
      (JSC::Identifier::add):
      * runtime/JSPromise.h:
      * runtime/PropertyMapHashTable.h:
      * runtime/PropertyNameArray.h:
      * runtime/RegExpCache.h:
      * runtime/SparseArrayValueMap.h:
      * runtime/SymbolTable.h:
      * runtime/VM.h:
      * tools/CodeProfile.cpp:
      (JSC::truncateTrace):
      * tools/CodeProfile.h:
      * yarr/YarrInterpreter.cpp:
      * yarr/YarrInterpreter.h:
      (JSC::Yarr::BytecodePattern::BytecodePattern):
      * yarr/YarrJIT.cpp:
      (JSC::Yarr::YarrGenerator::opCompileParenthesesSubpattern):
      (JSC::Yarr::YarrGenerator::opCompileParentheticalAssertion):
      (JSC::Yarr::YarrGenerator::opCompileBody):
      * yarr/YarrPattern.cpp:
      (JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses):
      (JSC::Yarr::YarrPatternConstructor::optimizeDotStarWrappedExpressions):
      * yarr/YarrPattern.h:
      
      Source/WebCore:
      
      * Modules/encryptedmedia/MediaKeySession.h:
      * Modules/encryptedmedia/MediaKeys.h:
      * Modules/geolocation/Geolocation.h:
      * Modules/geolocation/GeolocationController.cpp:
      (WebCore::GeolocationController::positionChanged):
      (WebCore::GeolocationController::errorOccurred):
      * Modules/geolocation/GeolocationController.h:
      * Modules/indexeddb/IDBCallbacks.h:
      * Modules/indexeddb/IDBDatabase.h:
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      * Modules/indexeddb/IDBEventDispatcher.cpp:
      (WebCore::IDBEventDispatcher::dispatch):
      * Modules/indexeddb/IDBEventDispatcher.h:
      * Modules/indexeddb/IDBKey.h:
      * Modules/indexeddb/IDBObjectStore.h:
      * Modules/indexeddb/IDBPendingTransactionMonitor.cpp:
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::dispatchEvent):
      * Modules/indexeddb/IDBRequest.h:
      (WebCore::IDBRequest::onSuccessWithPrefetch):
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::dispatchEvent):
      * Modules/indexeddb/IDBTransaction.h:
      * Modules/mediacontrols/MediaControlsHost.cpp:
      (WebCore::MediaControlsHost::sortedTrackListForMenu):
      * Modules/mediacontrols/MediaControlsHost.h:
      * Modules/mediasource/MediaSource.cpp:
      (WebCore::MediaSource::activeRanges):
      * Modules/mediasource/MediaSource.h:
      * Modules/mediasource/MediaSourceBase.cpp:
      (WebCore::MediaSourceBase::buffered):
      * Modules/mediasource/MediaSourceBase.h:
      * Modules/mediasource/MediaSourceRegistry.cpp:
      (WebCore::MediaSourceRegistry::unregisterURL):
      * Modules/mediasource/MediaSourceRegistry.h:
      * Modules/mediasource/SourceBufferList.h:
      * Modules/mediasource/WebKitMediaSource.cpp:
      (WebCore::WebKitMediaSource::activeRanges):
      * Modules/mediasource/WebKitMediaSource.h:
      * Modules/mediasource/WebKitSourceBufferList.h:
      * Modules/mediastream/MediaStream.cpp:
      (WebCore::MediaStream::scheduledEventTimerFired):
      * Modules/mediastream/MediaStream.h:
      * Modules/mediastream/MediaStreamRegistry.h:
      * Modules/mediastream/MediaStreamTrack.h:
      * Modules/mediastream/RTCDTMFSender.cpp:
      (WebCore::RTCDTMFSender::scheduledEventTimerFired):
      * Modules/mediastream/RTCDTMFSender.h:
      * Modules/mediastream/RTCDataChannel.cpp:
      (WebCore::RTCDataChannel::scheduledEventTimerFired):
      * Modules/mediastream/RTCDataChannel.h:
      * Modules/mediastream/RTCPeerConnection.cpp:
      (WebCore::RTCPeerConnection::stop):
      (WebCore::RTCPeerConnection::scheduledEventTimerFired):
      * Modules/mediastream/RTCPeerConnection.h:
      * Modules/mediastream/RTCStatsResponse.h:
      (WebCore::RTCStatsResponse::result):
      * Modules/notifications/Notification.h:
      * Modules/notifications/NotificationCenter.h:
      * Modules/speech/SpeechSynthesis.cpp:
      (WebCore::SpeechSynthesis::getVoices):
      * Modules/speech/SpeechSynthesis.h:
      * Modules/webaudio/AudioBuffer.h:
      * Modules/webaudio/AudioNode.h:
      * Modules/webaudio/AudioNodeOutput.h:
      * Modules/webaudio/MediaStreamAudioSource.cpp:
      (WebCore::MediaStreamAudioSource::setAudioFormat):
      (WebCore::MediaStreamAudioSource::consumeAudio):
      * Modules/webaudio/PeriodicWave.h:
      * Modules/webaudio/ScriptProcessorNode.h:
      * Modules/webdatabase/AbstractDatabaseServer.h:
      * Modules/webdatabase/DatabaseBackend.h:
      * Modules/webdatabase/DatabaseManager.cpp:
      (WebCore::DatabaseManager::origins):
      * Modules/webdatabase/DatabaseManager.h:
      * Modules/webdatabase/DatabaseServer.cpp:
      (WebCore::DatabaseServer::origins):
      * Modules/webdatabase/DatabaseServer.h:
      * Modules/webdatabase/DatabaseThread.h:
      * Modules/webdatabase/DatabaseTracker.cpp:
      (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
      (WebCore::DatabaseTracker::origins):
      (WebCore::DatabaseTracker::getOpenDatabases):
      (WebCore::DatabaseTracker::deleteAllDatabases):
      (WebCore::DatabaseTracker::deleteDatabaseFile):
      * Modules/webdatabase/DatabaseTracker.h:
      * Modules/webdatabase/SQLStatementBackend.cpp:
      * Modules/webdatabase/SQLTransactionBackend.cpp:
      * Modules/webdatabase/SQLTransactionBackend.h:
      * Modules/webdatabase/SQLTransactionCoordinator.cpp:
      (WebCore::SQLTransactionCoordinator::shutdown):
      * Modules/webdatabase/SQLTransactionCoordinator.h:
      * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
      (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
      (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
      (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback):
      * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
      * Modules/websockets/WebSocket.cpp:
      (WebCore::WebSocket::didReceiveBinaryData):
      * Modules/websockets/WebSocket.h:
      * Modules/websockets/WebSocketChannel.cpp:
      (WebCore::WebSocketChannel::processFrame):
      * Modules/websockets/WebSocketChannel.h:
      * Modules/websockets/WebSocketChannelClient.h:
      (WebCore::WebSocketChannelClient::didReceiveBinaryData):
      * Modules/websockets/WebSocketExtensionDispatcher.h:
      * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
      (WebCore::workerGlobalScopeDidReceiveBinaryData):
      (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
      (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer):
      (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
      * Modules/websockets/WorkerThreadableWebSocketChannel.h:
      * accessibility/AXObjectCache.cpp:
      (WebCore::AXObjectCache::~AXObjectCache):
      * accessibility/AXObjectCache.h:
      * accessibility/AccessibilityNodeObject.cpp:
      (WebCore::AccessibilityNodeObject::ariaLabeledByText):
      * accessibility/AccessibilityObject.h:
      (WebCore::AccessibilityText::AccessibilityText):
      * bindings/js/DOMWrapperWorld.h:
      * bindings/js/JSDOMBinding.h:
      (WebCore::toRefPtrNativeArray):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSMutationCallback.cpp:
      (WebCore::JSMutationCallback::call):
      * bindings/js/JSMutationCallback.h:
      * bindings/js/JSWebGLRenderingContextCustom.cpp:
      (WebCore::JSWebGLRenderingContext::getAttachedShaders):
      * bindings/js/PageScriptDebugServer.h:
      * bindings/js/ScheduledAction.h:
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::collectIsolatedContexts):
      * bindings/js/ScriptController.h:
      * bindings/js/ScriptDebugServer.h:
      * bindings/js/ScriptProfile.cpp:
      (WebCore::buildInspectorObjectFor):
      * bindings/objc/ObjCNodeFilterCondition.h:
      * bridge/objc/objc_class.h:
      * bridge/runtime_root.cpp:
      (JSC::Bindings::RootObject::invalidate):
      * bridge/runtime_root.h:
      * css/BasicShapeFunctions.cpp:
      (WebCore::basicShapeForValue):
      * css/CSSBasicShapes.h:
      (WebCore::CSSBasicShapePolygon::values):
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::ComputedStyleExtractor::valueForFilter):
      * css/CSSFontFace.h:
      * css/CSSFontFaceSource.h:
      * css/CSSFontSelector.cpp:
      (WebCore::CSSFontSelector::addFontFaceRule):
      (WebCore::CSSFontSelector::getFontFace):
      (WebCore::CSSFontSelector::beginLoadTimerFired):
      * css/CSSFontSelector.h:
      * css/CSSGroupingRule.h:
      * css/CSSImageGeneratorValue.h:
      * css/CSSParserValues.cpp:
      (WebCore::CSSParserSelector::adoptSelectorVector):
      * css/CSSParserValues.h:
      * css/CSSPropertySourceData.h:
      * css/CSSRuleList.h:
      (WebCore::StaticCSSRuleList::rules):
      * css/CSSSegmentedFontFace.cpp:
      (WebCore::CSSSegmentedFontFace::fontLoaded):
      * css/CSSSegmentedFontFace.h:
      * css/CSSSelectorList.cpp:
      (WebCore::CSSSelectorList::adoptSelectorVector):
      * css/CSSSelectorList.h:
      * css/CSSStyleSheet.h:
      * css/CSSValue.h:
      (WebCore::compareCSSValueVector):
      * css/CSSValuePool.h:
      * css/DocumentRuleSets.cpp:
      (WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets):
      (WebCore::DocumentRuleSets::appendAuthorStyleSheets):
      * css/DocumentRuleSets.h:
      * css/ElementRuleCollector.cpp:
      (WebCore::ElementRuleCollector::matchedRuleList):
      * css/ElementRuleCollector.h:
      * css/FontLoader.h:
      * css/InspectorCSSOMWrappers.cpp:
      (WebCore::InspectorCSSOMWrappers::collectFromStyleSheetContents):
      (WebCore::InspectorCSSOMWrappers::collectFromStyleSheets):
      * css/InspectorCSSOMWrappers.h:
      * css/MediaList.cpp:
      (WebCore::MediaQuerySet::parse):
      (WebCore::MediaList::item):
      (WebCore::reportMediaQueryWarningIfNeeded):
      * css/MediaList.h:
      (WebCore::MediaQuerySet::queryVector):
      * css/MediaQueryEvaluator.cpp:
      (WebCore::MediaQueryEvaluator::eval):
      * css/MediaQueryMatcher.h:
      * css/PropertySetCSSStyleDeclaration.cpp:
      (WebCore::PropertySetCSSStyleDeclaration::cloneAndCacheForCSSOM):
      * css/PropertySetCSSStyleDeclaration.h:
      * css/RuleSet.cpp:
      (WebCore::RuleSet::addToRuleSet):
      (WebCore::RuleSet::addRegionRule):
      (WebCore::RuleSet::addChildRules):
      (WebCore::RuleSet::addRulesFromSheet):
      * css/RuleSet.h:
      * css/SelectorFilter.h:
      * css/StyleInvalidationAnalysis.cpp:
      (WebCore::StyleInvalidationAnalysis::analyzeStyleSheet):
      * css/StylePropertySet.cpp:
      (WebCore::StylePropertySet::getLayeredShorthandValue):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::appendAuthorStyleSheets):
      (WebCore::StyleResolver::keyframeStylesForAnimation):
      (WebCore::StyleResolver::styleRulesForElement):
      (WebCore::StyleResolver::pseudoStyleRulesForElement):
      (WebCore::StyleResolver::resolveVariables):
      (WebCore::StyleResolver::applyProperty):
      (WebCore::StyleResolver::loadPendingSVGDocuments):
      (WebCore::StyleResolver::loadPendingShaders):
      * css/StyleResolver.h:
      * css/StyleRule.cpp:
      (WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
      (WebCore::StyleRuleGroup::StyleRuleGroup):
      (WebCore::StyleRuleMedia::StyleRuleMedia):
      (WebCore::StyleRuleSupports::StyleRuleSupports):
      (WebCore::StyleRuleRegion::StyleRuleRegion):
      * css/StyleRule.h:
      (WebCore::StyleRule::parserAdoptSelectorVector):
      (WebCore::StyleRulePage::parserAdoptSelectorVector):
      (WebCore::StyleRuleGroup::childRules):
      (WebCore::StyleRuleMedia::create):
      (WebCore::StyleRuleSupports::create):
      (WebCore::StyleRuleRegion::create):
      (WebCore::StyleRuleHost::create):
      (WebCore::StyleRuleHost::StyleRuleHost):
      * css/StyleScopeResolver.h:
      * css/StyleSheetContents.cpp:
      (WebCore::StyleSheetContents::parserAppendRule):
      (WebCore::childRulesHaveFailedOrCanceledSubresources):
      * css/StyleSheetContents.h:
      (WebCore::StyleSheetContents::childRules):
      (WebCore::StyleSheetContents::importRules):
      * css/StyleSheetList.cpp:
      (WebCore::StyleSheetList::styleSheets):
      (WebCore::StyleSheetList::item):
      * css/StyleSheetList.h:
      * css/WebKitCSSKeyframesRule.h:
      (WebCore::StyleRuleKeyframes::keyframes):
      * dom/CheckedRadioButtons.h:
      * dom/ClientRectList.h:
      * dom/ContainerNode.h:
      (WebCore::ChildNodesLazySnapshot::nextNode):
      (WebCore::ChildNodesLazySnapshot::takeSnapshot):
      * dom/CrossThreadTask.h:
      * dom/Document.cpp:
      (WebCore::Document::webkitCancelFullScreen):
      (WebCore::Document::webkitExitFullscreen):
      (WebCore::Document::fullScreenChangeDelayTimerFired):
      (WebCore::Document::didAssociateFormControlsTimerFired):
      * dom/Document.h:
      * dom/DocumentMarkerController.cpp:
      (WebCore::DocumentMarkerController::removeMarkers):
      * dom/DocumentMarkerController.h:
      * dom/DocumentStyleSheetCollection.cpp:
      (WebCore::DocumentStyleSheetCollection::injectedUserStyleSheets):
      (WebCore::DocumentStyleSheetCollection::injectedAuthorStyleSheets):
      (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
      (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
      (WebCore::styleSheetsUseRemUnits):
      (WebCore::filterEnabledNonemptyCSSStyleSheets):
      (WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
      (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
      * dom/DocumentStyleSheetCollection.h:
      * dom/Element.cpp:
      (WebCore::Element::attrNodeList):
      (WebCore::Element::webkitGetRegionFlowRanges):
      * dom/Element.h:
      * dom/EventListenerMap.h:
      * dom/EventSender.h:
      (WebCore::EventSender::timerFired):
      * dom/IdTargetObserverRegistry.h:
      * dom/MutationCallback.h:
      * dom/MutationObserver.cpp:
      (WebCore::MutationObserver::takeRecords):
      (WebCore::MutationObserver::deliver):
      (WebCore::MutationObserver::deliverAllMutations):
      * dom/MutationObserver.h:
      * dom/MutationObserverRegistration.h:
      * dom/NamedFlowCollection.cpp:
      (WebCore::NamedFlowCollection::namedFlows):
      * dom/NamedFlowCollection.h:
      * dom/Node.cpp:
      (WebCore::Node::didMoveToNewDocument):
      (WebCore::Node::mutationObserverRegistry):
      (WebCore::Node::registerMutationObserver):
      (WebCore::Node::unregisterMutationObserver):
      (WebCore::Node::notifyMutationObserversNodeWillDetach):
      * dom/Node.h:
      * dom/NodeRareData.h:
      * dom/Range.cpp:
      (WebCore::Range::processContents):
      (WebCore::Range::processNodes):
      (WebCore::Range::processAncestorsAndTheirSiblings):
      * dom/Range.h:
      * dom/ScopedEventQueue.h:
      * dom/ScriptExecutionContext.cpp:
      (WebCore::ScriptExecutionContext::reportException):
      * dom/ScriptExecutionContext.h:
      * dom/ScriptedAnimationController.h:
      * editing/ApplyStyleCommand.cpp:
      (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
      * editing/BreakBlockquoteCommand.cpp:
      (WebCore::BreakBlockquoteCommand::doApply):
      * editing/CompositeEditCommand.cpp:
      (WebCore::CompositeEditCommand::removeChildrenInRange):
      (WebCore::CompositeEditCommand::deleteInsignificantText):
      (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
      * editing/CompositeEditCommand.h:
      * editing/EditingStyle.cpp:
      (WebCore::htmlElementEquivalents):
      (WebCore::EditingStyle::conflictsWithImplicitStyleOfElement):
      (WebCore::htmlAttributeEquivalents):
      (WebCore::EditingStyle::conflictsWithImplicitStyleOfAttributes):
      (WebCore::EditingStyle::extractConflictingImplicitStyleOfAttributes):
      (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
      (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
      (WebCore::styleFromMatchedRulesForElement):
      * editing/Editor.cpp:
      (WebCore::Editor::countMatchesForText):
      * editing/Editor.h:
      * editing/InsertParagraphSeparatorCommand.cpp:
      (WebCore::InsertParagraphSeparatorCommand::getAncestorsInsideBlock):
      (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock):
      (WebCore::InsertParagraphSeparatorCommand::doApply):
      * editing/InsertParagraphSeparatorCommand.h:
      * editing/MergeIdenticalElementsCommand.cpp:
      (WebCore::MergeIdenticalElementsCommand::doApply):
      (WebCore::MergeIdenticalElementsCommand::doUnapply):
      * editing/RemoveNodePreservingChildrenCommand.cpp:
      (WebCore::RemoveNodePreservingChildrenCommand::doApply):
      * editing/ReplaceSelectionCommand.cpp:
      (WebCore::ReplacementFragment::removeUnrenderedNodes):
      * editing/SimplifyMarkupCommand.cpp:
      (WebCore::SimplifyMarkupCommand::doApply):
      (WebCore::SimplifyMarkupCommand::pruneSubsequentAncestorsToRemove):
      * editing/SimplifyMarkupCommand.h:
      * editing/SpellChecker.h:
      * editing/SplitElementCommand.cpp:
      (WebCore::SplitElementCommand::executeApply):
      (WebCore::SplitElementCommand::doUnapply):
      * editing/WrapContentsInDummySpanCommand.cpp:
      (WebCore::WrapContentsInDummySpanCommand::executeApply):
      (WebCore::WrapContentsInDummySpanCommand::doUnapply):
      * editing/mac/AlternativeTextUIController.h:
      * fileapi/FileList.h:
      * history/BackForwardList.h:
      * history/HistoryItem.cpp:
      (WebCore::HistoryItem::setRedirectURLs):
      * history/HistoryItem.h:
      * history/mac/HistoryItemMac.mm:
      (WebCore::HistoryItem::setTransientProperty):
      * html/FormController.h:
      * html/HTMLAnchorElement.cpp:
      * html/HTMLCollection.cpp:
      (WebCore::HTMLCollection::append):
      * html/HTMLCollection.h:
      * html/HTMLFormControlElement.cpp:
      (WebCore::HTMLFormControlElement::checkValidity):
      * html/HTMLFormControlElement.h:
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::validateInteractively):
      (WebCore::HTMLFormElement::checkValidity):
      (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
      * html/HTMLFormElement.h:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
      (WebCore::HTMLMediaElement::platformTextTracks):
      (WebCore::HTMLMediaElement::configureTextTrackGroup):
      * html/HTMLMediaElement.h:
      * html/HTMLPlugInImageElement.cpp:
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::setLength):
      * html/MediaController.cpp:
      (MediaController::asyncEventTimerFired):
      * html/MediaController.h:
      * html/MediaFragmentURIParser.h:
      * html/ValidationMessage.h:
      * html/canvas/WebGLFramebuffer.h:
      * html/canvas/WebGLRenderingContext.cpp:
      (WebCore::WebGLRenderingContext::getAttachedShaders):
      * html/canvas/WebGLRenderingContext.h:
      * html/canvas/WebGLTexture.h:
      * html/parser/BackgroundHTMLParser.cpp:
      (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
      * html/parser/BackgroundHTMLParser.h:
      (WebCore::BackgroundHTMLParser::create):
      * html/parser/HTMLDocumentParser.cpp:
      (WebCore::HTMLDocumentParser::startBackgroundParser):
      * html/parser/HTMLDocumentParser.h:
      * html/parser/HTMLMetaCharsetParser.h:
      * html/parser/HTMLPreloadScanner.cpp:
      (WebCore::TokenPreloadScanner::scan):
      (WebCore::TokenPreloadScanner::scanCommon):
      * html/parser/HTMLResourcePreloader.h:
      * html/parser/XSSAuditor.h:
      * html/shadow/ContentDistributor.cpp:
      (WebCore::ContentDistributor::ensureInsertionPointList):
      (WebCore::ContentDistributor::distribute):
      (WebCore::ContentDistributor::invalidate):
      * html/shadow/ContentDistributor.h:
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
      (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
      * html/shadow/MediaControlElements.h:
      * html/track/InbandGenericTextTrack.h:
      * html/track/InbandWebVTTTextTrack.cpp:
      (WebCore::InbandWebVTTTextTrack::newCuesParsed):
      * html/track/LoadableTextTrack.cpp:
      (WebCore::LoadableTextTrack::newCuesAvailable):
      (WebCore::LoadableTextTrack::newRegionsAvailable):
      * html/track/TextTrackCueList.h:
      * html/track/TextTrackList.cpp:
      (TextTrackList::invalidateTrackIndexesAfterTrack):
      (TextTrackList::remove):
      (TextTrackList::contains):
      * html/track/TextTrackList.h:
      * html/track/TrackListBase.cpp:
      (TrackListBase::asyncEventTimerFired):
      * html/track/TrackListBase.h:
      * html/track/WebVTTParser.cpp:
      (WebCore::WebVTTParser::getNewCues):
      (WebCore::WebVTTParser::getNewRegions):
      * html/track/WebVTTParser.h:
      * inspector/ConsoleMessage.cpp:
      (WebCore::ConsoleMessage::addToFrontend):
      * inspector/ContentSearchUtils.cpp:
      (WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines):
      (WebCore::ContentSearchUtils::lineEndings):
      (WebCore::ContentSearchUtils::searchInTextByLines):
      * inspector/ContentSearchUtils.h:
      * inspector/DOMPatchSupport.cpp:
      (WebCore::DOMPatchSupport::patchNode):
      (WebCore::DOMPatchSupport::diff):
      (WebCore::DOMPatchSupport::innerPatchChildren):
      * inspector/DOMPatchSupport.h:
      * inspector/InjectedScript.cpp:
      (WebCore::InjectedScript::getProperties):
      (WebCore::InjectedScript::getInternalProperties):
      (WebCore::InjectedScript::wrapCallFrames):
      * inspector/InjectedScript.h:
      * inspector/InjectedScriptHost.h:
      * inspector/InspectorAgent.cpp:
      (WebCore::InspectorAgent::enable):
      * inspector/InspectorApplicationCacheAgent.cpp:
      (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
      (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
      * inspector/InspectorApplicationCacheAgent.h:
      * inspector/InspectorBaseAgent.h:
      * inspector/InspectorCSSAgent.cpp:
      (WebCore::SelectorProfile::toInspectorObject):
      (WebCore::UpdateRegionLayoutTask::onTimer):
      (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
      (WebCore::InspectorCSSAgent::getComputedStyleForNode):
      (WebCore::InspectorCSSAgent::getAllStyleSheets):
      (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
      (WebCore::InspectorCSSAgent::getNamedFlowCollection):
      (WebCore::InspectorCSSAgent::buildArrayForRuleList):
      (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
      (WebCore::InspectorCSSAgent::buildArrayForRegions):
      (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
      * inspector/InspectorCSSAgent.h:
      * inspector/InspectorConsoleAgent.h:
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::RevalidateStyleAttributeTask::onTimer):
      (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
      (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
      (WebCore::InspectorDOMAgent::getEventListenersForNode):
      (WebCore::InspectorDOMAgent::performSearch):
      (WebCore::InspectorDOMAgent::getSearchResults):
      (WebCore::InspectorDOMAgent::getAttributes):
      (WebCore::InspectorDOMAgent::buildObjectForNode):
      (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
      (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
      (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
      * inspector/InspectorDOMAgent.h:
      * inspector/InspectorDOMStorageAgent.cpp:
      (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
      * inspector/InspectorDOMStorageAgent.h:
      * inspector/InspectorDatabaseAgent.cpp:
      (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
      * inspector/InspectorDatabaseAgent.h:
      * inspector/InspectorDebuggerAgent.cpp:
      (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
      (WebCore::InspectorDebuggerAgent::searchInContent):
      (WebCore::InspectorDebuggerAgent::setScriptSource):
      (WebCore::InspectorDebuggerAgent::currentCallFrames):
      * inspector/InspectorDebuggerAgent.h:
      * inspector/InspectorHeapProfilerAgent.cpp:
      (WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
      * inspector/InspectorHeapProfilerAgent.h:
      * inspector/InspectorHistory.h:
      * inspector/InspectorIndexedDBAgent.cpp:
      * inspector/InspectorLayerTreeAgent.cpp:
      (WebCore::InspectorLayerTreeAgent::layersForNode):
      (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
      (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
      * inspector/InspectorLayerTreeAgent.h:
      * inspector/InspectorMemoryAgent.h:
      * inspector/InspectorPageAgent.cpp:
      (WebCore::buildArrayForCookies):
      (WebCore::InspectorPageAgent::getCookies):
      (WebCore::InspectorPageAgent::searchInResource):
      (WebCore::InspectorPageAgent::searchInResources):
      (WebCore::InspectorPageAgent::buildObjectForFrameTree):
      * inspector/InspectorPageAgent.h:
      * inspector/InspectorProfilerAgent.cpp:
      (WebCore::InspectorProfilerAgent::getProfileHeaders):
      * inspector/InspectorProfilerAgent.h:
      * inspector/InspectorResourceAgent.h:
      * inspector/InspectorRuntimeAgent.cpp:
      (WebCore::InspectorRuntimeAgent::getProperties):
      * inspector/InspectorRuntimeAgent.h:
      * inspector/InspectorState.h:
      * inspector/InspectorStyleSheet.cpp:
      (WebCore::asCSSRuleList):
      (WebCore::InspectorStyle::buildArrayForComputedStyle):
      (WebCore::InspectorStyle::styleWithProperties):
      (WebCore::selectorsFromSource):
      (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
      (WebCore::InspectorStyleSheet::buildObjectForRule):
      (WebCore::InspectorStyleSheet::lineEndings):
      (WebCore::InspectorStyleSheet::buildArrayForRuleList):
      (WebCore::InspectorStyleSheetForInlineStyle::lineEndings):
      * inspector/InspectorStyleSheet.h:
      * inspector/InspectorValues.cpp:
      (WebCore::InspectorArrayBase::writeJSON):
      * inspector/InspectorValues.h:
      * inspector/PageRuntimeAgent.cpp:
      (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
      * inspector/ScriptCallStack.cpp:
      (WebCore::ScriptCallStack::buildInspectorArray):
      * inspector/ScriptCallStack.h:
      * loader/CrossOriginPreflightResultCache.h:
      * loader/DocumentLoader.cpp:
      (WebCore::cancelAll):
      (WebCore::setAllDefersLoading):
      (WebCore::DocumentLoader::getSubresources):
      * loader/DocumentLoader.h:
      * loader/FormState.h:
      * loader/FormSubmission.cpp:
      (WebCore::FormSubmission::create):
      * loader/ProgressTracker.h:
      * loader/ResourceLoadScheduler.h:
      * loader/TextTrackLoader.cpp:
      (WebCore::TextTrackLoader::getNewCues):
      (WebCore::TextTrackLoader::getNewRegions):
      * loader/TextTrackLoader.h:
      * loader/WorkerThreadableLoader.cpp:
      (WebCore::workerGlobalScopeDidReceiveData):
      (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
      * loader/appcache/ApplicationCache.cpp:
      (WebCore::ApplicationCache::removeResource):
      (WebCore::ApplicationCache::dump):
      * loader/appcache/ApplicationCache.h:
      * loader/appcache/ApplicationCacheStorage.cpp:
      (WebCore::ApplicationCacheStorage::getOriginsWithCache):
      * loader/archive/Archive.cpp:
      (WebCore::Archive::clearAllSubframeArchives):
      (WebCore::Archive::clearAllSubframeArchivesImpl):
      * loader/archive/Archive.h:
      (WebCore::Archive::subresources):
      (WebCore::Archive::subframeArchives):
      * loader/archive/ArchiveResourceCollection.cpp:
      (WebCore::ArchiveResourceCollection::addAllResources):
      * loader/archive/ArchiveResourceCollection.h:
      * loader/archive/cf/LegacyWebArchive.cpp:
      (WebCore::LegacyWebArchive::createPropertyListRepresentation):
      (WebCore::LegacyWebArchive::create):
      (WebCore::LegacyWebArchive::createFromSelection):
      * loader/archive/cf/LegacyWebArchive.h:
      * loader/archive/mhtml/MHTMLParser.h:
      * loader/cache/CachedResource.h:
      * loader/cache/CachedResourceLoader.h:
      * loader/cache/MemoryCache.h:
      * loader/icon/IconDatabase.cpp:
      (WebCore::IconDatabase::notifyPendingLoadDecisions):
      * loader/icon/IconDatabase.h:
      * page/CaptionUserPreferencesMediaAF.cpp:
      (WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu):
      * page/CaptionUserPreferencesMediaAF.h:
      * page/ChromeClient.h:
      (WebCore::ChromeClient::didAssociateFormControls):
      * page/Console.h:
      * page/ContentSecurityPolicy.h:
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::getMatchedCSSRules):
      * page/DeviceController.cpp:
      (WebCore::DeviceController::dispatchDeviceEvent):
      (WebCore::DeviceController::fireDeviceEvent):
      * page/DeviceController.h:
      * page/EditorClient.h:
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleTouchEvent):
      * page/EventHandler.h:
      * page/FrameView.cpp:
      (WebCore::FrameView::serviceScriptedAnimations):
      * page/Page.cpp:
      (WebCore::Page::findStringMatchingRanges):
      * page/Page.h:
      * page/PageGroup.h:
      * page/Performance.cpp:
      (WebCore::Performance::webkitGetEntriesByType):
      (WebCore::Performance::webkitGetEntriesByName):
      * page/Performance.h:
      * page/PerformanceEntryList.cpp:
      (WebCore::PerformanceEntryList::appendAll):
      * page/PerformanceEntryList.h:
      * page/SecurityOriginHash.h:
      * page/SecurityPolicy.cpp:
      * page/SpeechInputResult.h:
      * page/animation/AnimationController.cpp:
      (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
      * page/animation/AnimationControllerPrivate.h:
      * page/animation/CSSPropertyAnimation.cpp:
      (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
      * page/animation/CompositeAnimation.h:
      * page/scrolling/ScrollingStateNode.cpp:
      (WebCore::ScrollingStateNode::appendChild):
      * page/scrolling/ScrollingStateNode.h:
      (WebCore::ScrollingStateNode::children):
      * page/scrolling/ScrollingThread.cpp:
      (WebCore::ScrollingThread::dispatchFunctionsFromScrollingThread):
      * page/scrolling/ScrollingThread.h:
      * page/scrolling/ScrollingTree.cpp:
      (WebCore::ScrollingTree::updateTreeFromStateNode):
      * page/scrolling/ScrollingTreeNode.cpp:
      (WebCore::ScrollingTreeNode::appendChild):
      * page/scrolling/ScrollingTreeNode.h:
      * page/scrolling/mac/ScrollingCoordinatorMac.mm:
      (WebCore::ScrollingCoordinatorMac::syncChildPositions):
      * platform/CrossThreadCopier.cpp:
      * platform/CrossThreadCopier.h:
      * platform/DragData.h:
      * platform/MainThreadTask.h:
      * platform/PODFreeListArena.h:
      (WebCore::PODFreeListArena::freeObject):
      (WebCore::PODFreeListArena::allocate):
      * platform/PODIntervalTree.h:
      * platform/PODRedBlackTree.h:
      (WebCore::PODRedBlackTree::PODRedBlackTree):
      * platform/PlatformSpeechSynthesizer.cpp:
      (WebCore::PlatformSpeechSynthesizer::voiceList):
      * platform/PlatformSpeechSynthesizer.h:
      * platform/RunLoop.h:
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::frameRectsChanged):
      (WebCore::ScrollView::clipRectChanged):
      (WebCore::ScrollView::setParentVisible):
      (WebCore::ScrollView::show):
      (WebCore::ScrollView::hide):
      * platform/ScrollView.h:
      * platform/SharedBuffer.h:
      * platform/Supplementable.h:
      (WebCore::Supplement::provideTo):
      (WebCore::Supplementable::provideSupplement):
      * platform/URL.cpp:
      (WebCore::findHostnamesInMailToURL):
      (WebCore::encodeHostnames):
      * platform/audio/AudioBus.h:
      * platform/audio/AudioDSPKernelProcessor.h:
      * platform/audio/AudioResampler.h:
      * platform/audio/DynamicsCompressor.h:
      * platform/audio/DynamicsCompressorKernel.h:
      * platform/audio/HRTFDatabase.h:
      * platform/audio/HRTFKernel.h:
      * platform/audio/MultiChannelResampler.h:
      * platform/audio/Reverb.h:
      * platform/audio/ReverbConvolver.h:
      * platform/cf/SharedBufferCF.cpp:
      (WebCore::SharedBuffer::copyBufferAndClear):
      (WebCore::SharedBuffer::copySomeDataFromDataArray):
      * platform/graphics/FloatPolygon.cpp:
      (WebCore::FloatPolygon::FloatPolygon):
      * platform/graphics/FloatPolygon.h:
      * platform/graphics/FontCache.cpp:
      (WebCore::FontCache::getCachedFontData):
      (WebCore::FontCache::purgeInactiveFontData):
      * platform/graphics/GlyphMetricsMap.h:
      (WebCore::::locatePageSlowCase):
      * platform/graphics/GlyphPageTreeNode.h:
      * platform/graphics/GraphicsContext3D.h:
      * platform/graphics/GraphicsLayer.cpp:
      * platform/graphics/GraphicsLayer.h:
      * platform/graphics/PlatformTextTrackMenu.h:
      * platform/graphics/SimpleFontData.h:
      * platform/graphics/WidthCache.h:
      * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
      (WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks):
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks):
      (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions):
      * platform/graphics/ca/GraphicsLayerCA.cpp:
      (WebCore::GraphicsLayerCA::setFilterAnimationKeyframes):
      (WebCore::GraphicsLayerCA::fetchCloneLayers):
      * platform/graphics/ca/GraphicsLayerCA.h:
      * platform/graphics/ca/PlatformCAAnimation.h:
      * platform/graphics/ca/PlatformCALayer.h:
      * platform/graphics/ca/mac/LayerPool.h:
      * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
      (PlatformCAAnimation::setValues):
      * platform/graphics/ca/mac/TileController.h:
      * platform/graphics/cg/SubimageCacheWithTimer.h:
      * platform/graphics/filters/CustomFilterParameterList.h:
      * platform/graphics/filters/FilterEffect.h:
      * platform/graphics/filters/FilterOperations.h:
      (WebCore::FilterOperations::operations):
      * platform/graphics/gpu/Texture.cpp:
      (WebCore::Texture::Texture):
      (WebCore::Texture::create):
      * platform/graphics/gpu/Texture.h:
      * platform/graphics/mac/ComplexTextController.h:
      * platform/graphics/mac/SimpleFontDataCoreText.cpp:
      (WebCore::SimpleFontData::getCFStringAttributes):
      * platform/graphics/transforms/TransformOperations.h:
      (WebCore::TransformOperations::operations):
      * platform/ios/PasteboardIOS.mm:
      (WebCore::documentFragmentWithRTF):
      * platform/mac/PlatformSpeechSynthesizerMac.mm:
      (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
      * platform/mediastream/MediaStreamDescriptor.h:
      * platform/mediastream/MediaStreamSource.h:
      * platform/mediastream/RTCConfiguration.h:
      * platform/network/BlobRegistryImpl.h:
      * platform/network/HTTPHeaderMap.h:
      * platform/network/ResourceResponseBase.cpp:
      (WebCore::ResourceResponseBase::parseCacheControlDirectives):
      (WebCore::parseCacheHeader):
      * platform/network/cf/ResourceHandleCFNet.cpp:
      (WebCore::clientCerts):
      (WebCore::ResourceHandle::createCFURLConnection):
      * platform/text/cf/HyphenationCF.cpp:
      (WebCore::::createValueForNullKey):
      (WebCore::::createValueForKey):
      (WebCore::cfLocaleCache):
      * plugins/PluginMainThreadScheduler.h:
      * rendering/HitTestResult.h:
      * rendering/InlineFlowBox.h:
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::paintContinuationOutlines):
      (WebCore::RenderBlock::removeFromTrackedRendererMaps):
      * rendering/RenderBlock.h:
      * rendering/RenderButton.h:
      * rendering/RenderCounter.cpp:
      * rendering/RenderGrid.cpp:
      (WebCore::RenderGrid::GridIterator::GridIterator):
      * rendering/RenderGrid.h:
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrder):
      (WebCore::RenderLayer::rebuildZOrderLists):
      (WebCore::RenderLayer::collectLayers):
      * rendering/RenderLayer.h:
      * rendering/RenderNamedFlowThread.cpp:
      (WebCore::RenderNamedFlowThread::getRanges):
      * rendering/RenderNamedFlowThread.h:
      * rendering/RenderRegion.cpp:
      (WebCore::RenderRegion::getRanges):
      * rendering/RenderRegion.h:
      * rendering/RenderView.cpp:
      (WebCore::RenderView::selectionBounds):
      (WebCore::RenderView::setSelection):
      * rendering/RootInlineBox.h:
      * rendering/shapes/PolygonShape.cpp:
      (WebCore::computeShapePaddingBounds):
      (WebCore::computeShapeMarginBounds):
      * rendering/shapes/PolygonShape.h:
      (WebCore::PolygonShape::PolygonShape):
      * rendering/shapes/Shape.cpp:
      (WebCore::createPolygonShape):
      (WebCore::Shape::createShape):
      * rendering/shapes/ShapeInfo.h:
      * rendering/shapes/ShapeInterval.h:
      * rendering/style/QuotesData.cpp:
      (WebCore::QuotesData::create):
      (WebCore::QuotesData::QuotesData):
      * rendering/style/QuotesData.h:
      * rendering/style/RenderStyle.cpp:
      (WebCore::requireTransformOrigin):
      (WebCore::RenderStyle::applyTransform):
      * rendering/style/StyleGridData.h:
      * rendering/svg/RenderSVGResourceGradient.h:
      * rendering/svg/RenderSVGResourcePattern.h:
      * rendering/svg/SVGResourcesCache.h:
      * storage/StorageEventDispatcher.cpp:
      (WebCore::StorageEventDispatcher::dispatchSessionStorageEvents):
      (WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
      (WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
      (WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames):
      * storage/StorageEventDispatcher.h:
      * storage/StorageNamespaceImpl.h:
      * storage/StorageThread.h:
      * storage/StorageTracker.cpp:
      (WebCore::StorageTracker::origins):
      * storage/StorageTracker.h:
      * svg/SVGAnimatedPath.cpp:
      (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
      * svg/SVGAnimatedTypeAnimator.cpp:
      (WebCore::SVGElementAnimatedProperties::SVGElementAnimatedProperties):
      (WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
      * svg/SVGAnimatedTypeAnimator.h:
      * svg/SVGDocumentExtensions.cpp:
      (WebCore::SVGDocumentExtensions::startAnimations):
      (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
      (WebCore::SVGDocumentExtensions::addPendingResource):
      (WebCore::SVGDocumentExtensions::isElementPendingResources):
      (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
      (WebCore::SVGDocumentExtensions::setOfElementsReferencingTarget):
      (WebCore::SVGDocumentExtensions::addElementReferencingTarget):
      (WebCore::SVGDocumentExtensions::rebuildAllElementReferencesForTarget):
      * svg/SVGDocumentExtensions.h:
      * svg/SVGFontElement.h:
      * svg/SVGGlyphMap.h:
      * svg/SVGMarkerElement.cpp:
      (WebCore::SVGMarkerElement::orientTypeAnimated):
      * svg/SVGMarkerElement.h:
      * svg/SVGPathSegList.h:
      * svg/animation/SMILTimeContainer.h:
      * svg/graphics/SVGImageCache.h:
      * svg/graphics/filters/SVGFilterBuilder.h:
      (WebCore::SVGFilterBuilder::addBuiltinEffects):
      * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
      (WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
      * svg/properties/SVGAnimatedListPropertyTearOff.h:
      (WebCore::SVGAnimatedListPropertyTearOff::create):
      * svg/properties/SVGAnimatedPropertyTearOff.h:
      (WebCore::SVGAnimatedPropertyTearOff::create):
      * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
      (WebCore::SVGAnimatedStaticPropertyTearOff::create):
      * svg/properties/SVGAttributeToPropertyMap.cpp:
      (WebCore::SVGAttributeToPropertyMap::animatedPropertiesForAttribute):
      * svg/properties/SVGAttributeToPropertyMap.h:
      * svg/properties/SVGStaticListPropertyTearOff.h:
      (WebCore::SVGStaticListPropertyTearOff::create):
      * svg/properties/SVGTransformListPropertyTearOff.h:
      (WebCore::SVGTransformListPropertyTearOff::create):
      (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix):
      (WebCore::SVGTransformListPropertyTearOff::consolidate):
      * workers/DefaultSharedWorkerRepository.h:
      * workers/WorkerMessagingProxy.h:
      * xml/XMLHttpRequestProgressEventThrottle.cpp:
      (WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):
      * xml/XMLHttpRequestProgressEventThrottle.h:
      * xml/XPathNodeSet.cpp:
      (WebCore::XPath::NodeSet::sort):
      (WebCore::XPath::NodeSet::traversalSort):
      * xml/XSLStyleSheet.h:
      * xml/parser/XMLDocumentParserLibxml2.cpp:
      
      Source/WebKit/mac:
      
      * History/WebHistory.mm:
      (-[WebHistoryPrivate rebuildHistoryByDayIfNeeded:]):
      * History/WebHistoryItem.mm:
      (-[WebHistoryItem initFromDictionaryRepresentation:]):
      * Plugins/Hosted/NetscapePluginHostProxy.h:
      * Plugins/Hosted/NetscapePluginInstanceProxy.h:
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::idForObject):
      (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::retain):
      (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::release):
      (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::forget):
      (WebKit::NetscapePluginInstanceProxy::stopAllStreams):
      * Plugins/WebNetscapePluginView.h:
      * Plugins/WebNetscapePluginView.mm:
      (-[WebNetscapePluginView destroyPlugin]):
      * Storage/WebDatabaseManager.mm:
      (-[WebDatabaseManager origins]):
      * Storage/WebStorageManager.mm:
      (-[WebStorageManager origins]):
      * WebCoreSupport/WebApplicationCache.mm:
      (+[WebApplicationCache originsWithCache]):
      * WebCoreSupport/WebEditorClient.h:
      * WebCoreSupport/WebEditorClient.mm:
      (WebEditorClient::getClientPasteboardDataForRange):
      (WebEditorClient::documentFragmentFromAttributedString):
      * WebCoreSupport/WebFrameLoaderClient.h:
      * WebCoreSupport/WebNotificationClient.h:
      * WebCoreSupport/WebNotificationClient.mm:
      (WebNotificationClient::show):
      (WebNotificationClient::clearNotifications):
      * WebView/WebArchive.mm:
      (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
      (-[WebArchive subresources]):
      (-[WebArchive subframeArchives]):
      * WebView/WebDataSource.mm:
      (-[WebDataSource subresources]):
      * WebView/WebViewData.h:
      
      Source/WebKit2:
      
      * UIProcess/mac/WebColorPickerMac.h:
      * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::setProcessSuppressionEnabled):
      
      Source/WTF:
      
      * wtf/AVLTree.h:
      * wtf/CheckedArithmetic.h:
      * wtf/Compression.h:
      * wtf/Functional.h:
      (WTF::R):
      * wtf/HashFunctions.h:
      * wtf/HashIterators.h:
      * wtf/HashSet.h:
      (WTF::::contains):
      * wtf/ListHashSet.h:
      (WTF::::contains):
      * wtf/RefCountedLeakCounter.cpp:
      * wtf/RetainPtr.h:
      * wtf/SentinelLinkedList.h:
      (WTF::::remove):
      * wtf/SizeLimits.cpp:
      * wtf/StreamBuffer.h:
      * wtf/Vector.h:
      * wtf/VectorTraits.h:
      * wtf/WeakPtr.h:
      (WTF::WeakReference::create):
      (WTF::WeakReference::createUnbound):
      (WTF::WeakPtr::WeakPtr):
      (WTF::WeakPtrFactory::WeakPtrFactory):
      * wtf/text/AtomicString.cpp:
      (WTF::AtomicString::add):
      (WTF::findString):
      * wtf/text/StringConcatenate.h:
      * wtf/text/StringImpl.h:
      * wtf/text/StringOperators.h:
      (WTF::operator+):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3523f8d
  4. 24 Jul, 2013 3 commits
    • oliver@apple.com's avatar
      fourthTier: WatchpointSet should make racy uses easier to reason about · 9055d143
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=115299
      
      Reviewed by Anders Carlsson.
      
      The compiler often does things like:
      
      1c) Observe something that would imply that a WatchpointSet ought to be invalid
      
      2c) Check that it is invalid
      
      The main thread often does things like:
      
      1m) Fire the watchpoint set
      
      2m) Do some other thing that would cause the compiler to assume that the WatchpointSet
      ought to be invalid
      
      An example is structure transitions, where (1c) is the compiler noticing that a
      put_by_id inline cache is in a transition state, with the source structure being S;
      (2c) is the compiler asserting that S's watchpoint set is invalid; (1m) is the main
      thread firing S's watchpoint set before it does the first transition away from S; and
      (2m) is the main thread caching the put_by_id transition away from S.
      
      This is totally fine, except that (1c) and (2c), and (1m) and (2m) could be reordered.
      Probably, in most cases, this ought to do enough things that the main thread probably
      already has some fencing. But the compiler thread definitely doesn't have fencing. In
      any case, we should play it safe and just have additional fencing in all of the
      relevant places.
      
      We already have some idioms to put load-load and store-store fences in the right
      places. But this change just makes WatchpointSet take care of this for us, thus
      reducing the chances of us getting this wrong.
      
      * bytecode/Watchpoint.cpp:
      (JSC::WatchpointSet::notifyWriteSlow):
      * bytecode/Watchpoint.h:
      (WatchpointSet):
      (JSC::WatchpointSet::isStillValid):
      (JSC::WatchpointSet::hasBeenInvalidated):
      (JSC::InlineWatchpointSet::hasBeenInvalidated):
      (JSC::InlineWatchpointSet::notifyWrite):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGDesiredWatchpoints.h:
      (JSC::DFG::GenericDesiredWatchpoints::shouldAssumeMixedState):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9055d143
    • oliver@apple.com's avatar
      fourthTier: CFA should defend against results seeming inconsistent due to a... · 67e0f33a
      oliver@apple.com authored
      fourthTier: CFA should defend against results seeming inconsistent due to a watchpoint firing during compilation
      https://bugs.webkit.org/show_bug.cgi?id=115083
      
      Reviewed by Geoffrey Garen.
      
      This ruggedizes our racyness with respect to watchpoints. We want to be able to assert,
      in some places, that a watchpoint-based optimization has only occurred if the
      watchpoint set was still valid. But currently we *can* soundly do watchpoint-based
      optimizations even for invalid watchpoints, so long as we recorded in the IR that we
      had done so; this will then lead to the code being insta-jettisoned after compilation
      completes. Obviously, we don't want this to happen often - but we do want to allow it
      precisely in the case of watchpoint races.
      
      This adds the ability to assert that we hadn't over-watchpointed ourselves, with and
      exemption for races.
      
      * dfg/DFGAbstractState.cpp:
      (JSC::DFG::AbstractState::executeEffects):
      * dfg/DFGAbstractValue.cpp:
      (JSC::DFG::AbstractValue::setFuturePossibleStructure):
      (JSC::DFG::AbstractValue::filterFuturePossibleStructure):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::addStructureTransitionCheck):
      (JSC::DFG::ByteCodeParser::parseResolveOperations):
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGConstantFoldingPhase.cpp:
      (JSC::DFG::ConstantFoldingPhase::addStructureTransitionCheck):
      * dfg/DFGDesiredWatchpoints.h:
      (GenericDesiredWatchpoints):
      (JSC::DFG::GenericDesiredWatchpoints::isStillValid):
      (JSC::DFG::GenericDesiredWatchpoints::shouldAssumeMixedState):
      (JSC::DFG::GenericDesiredWatchpoints::isValidOrMixed):
      (JSC::DFG::DesiredWatchpoints::isStillValid):
      (JSC::DFG::DesiredWatchpoints::shouldAssumeMixedState):
      (JSC::DFG::DesiredWatchpoints::isValidOrMixed):
      (DesiredWatchpoints):
      * dfg/DFGFixupPhase.cpp:
      (JSC::DFG::FixupPhase::canOptimizeStringObjectAccess):
      * dfg/DFGGraph.h:
      (JSC::DFG::Graph::masqueradesAsUndefinedWatchpointIsStillValid):
      (Graph):
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::link):
      (JSC::DFG::JITCompiler::compile):
      (JSC::DFG::JITCompiler::compileFunction):
      * dfg/DFGJITCompiler.h:
      (JSC::DFG::JITCompiler::addLazily):
      (JITCompiler):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
      * dfg/DFGSpeculativeJIT.h:
      (SpeculativeJIT):
      (JSC::DFG::SpeculativeJIT::masqueradesAsUndefinedWatchpointIsStillValid):
      (JSC::DFG::SpeculativeJIT::speculationWatchpointForMasqueradesAsUndefined):
      (JSC::DFG::SpeculativeJIT::speculateStringObjectForStructure):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
      (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
      (JSC::DFG::SpeculativeJIT::compileObjectEquality):
      (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
      (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
      (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
      (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
      (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
      (JSC::DFG::SpeculativeJIT::compileObjectEquality):
      (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
      (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
      (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
      (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
      (JSC::DFG::SpeculativeJIT::compile):
      * ftl/FTLCompile.cpp:
      (JSC::FTL::compile):
      * ftl/FTLState.h:
      (State):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      67e0f33a
    • oliver@apple.com's avatar
      fourthTier: It should be possible to query WatchpointSets, and add... · 9397e00c
      oliver@apple.com authored
      fourthTier: It should be possible to query WatchpointSets, and add Watchpoints, even if the compiler is running in another thread
      https://bugs.webkit.org/show_bug.cgi?id=114909
      
      Source/JavaScriptCore:
      
      Reviewed by Oliver Hunt.
      
      The idea here is that a concurrent compiler will use watchpoint sets as follows:
      
      During concurrent compilation: It will create Watchpoints, and query WatchpointSets only
      for the purpose of profiling. That is, it will use decide whether it is profitable to
      compile the code "as if" the watchpoint sets are valid.
      
      During synchronous linking: By "linking" I don't necessarily mean the LinkBuffer stuff,
      but just the very bitter end of compilation where we make the JIT code callable. This
      can happen after LinkBuffer stuff. Anyway, this will have to happen synchronously, and
      at that point we can (a) check that all WatchpointSets that we assumed were valid are
      still valid and (b) if they are then we add the watchpoints to those sets. If any of the
      sets are invalid, we give up on this compilation and try again later.
      
      The querying of WatchpointSets is engineered to say that the set is still valid if it
      is so *right now*, but this is done in a racy way and so it may say so spuriously: we
      may, with hopefully low probability, have a set that says it is valid even though it was
      just invalidated. The goal is only to ensure that (i) a set never claims to be invalid
      if it is actually valid, (ii) a set doesn't claim to be valid if it was invalidated
      before compilation even began, and (iii) querying the validity of a set doesn't cause us
      to crash.
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/Watchpoint.cpp:
      (JSC::InlineWatchpointSet::inflateSlow):
      * bytecode/Watchpoint.h:
      (WatchpointSet):
      (InlineWatchpointSet):
      (JSC::InlineWatchpointSet::hasBeenInvalidated):
      (JSC::InlineWatchpointSet::isThin):
      (JSC::InlineWatchpointSet::isFat):
      (JSC::InlineWatchpointSet::fat):
      * dfg/DFGDesiredWatchpoints.cpp: Added.
      (DFG):
      (JSC::DFG::DesiredWatchpoints::DesiredWatchpoints):
      (JSC::DFG::DesiredWatchpoints::~DesiredWatchpoints):
      (JSC::DFG::DesiredWatchpoints::addLazily):
      (JSC::DFG::DesiredWatchpoints::reallyAdd):
      (JSC::DFG::DesiredWatchpoints::areStillValid):
      * dfg/DFGDesiredWatchpoints.h: Added.
      (DFG):
      (JSC::DFG::WatchpointForGenericWatchpointSet::WatchpointForGenericWatchpointSet):
      (WatchpointForGenericWatchpointSet):
      (GenericDesiredWatchpoints):
      (JSC::DFG::GenericDesiredWatchpoints::GenericDesiredWatchpoints):
      (JSC::DFG::GenericDesiredWatchpoints::addLazily):
      (JSC::DFG::GenericDesiredWatchpoints::reallyAdd):
      (JSC::DFG::GenericDesiredWatchpoints::areStillValid):
      (DesiredWatchpoints):
      * dfg/DFGDriver.cpp:
      (JSC::DFG::compile):
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::link):
      (JSC::DFG::JITCompiler::compile):
      (JSC::DFG::JITCompiler::compileFunction):
      * dfg/DFGJITCompiler.h:
      (JSC::DFG::JITCompiler::addLazily):
      (JITCompiler):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
      (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
      (JSC::DFG::SpeculativeJIT::compileObjectEquality):
      (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
      (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
      (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
      (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
      (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
      (JSC::DFG::SpeculativeJIT::compileObjectEquality):
      (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
      (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
      (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
      (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
      (JSC::DFG::SpeculativeJIT::compile):
      * ftl/FTLCompile.cpp:
      (JSC::FTL::compile):
      * ftl/FTLCompile.h:
      (FTL):
      * ftl/FTLState.h:
      (State):
      * runtime/JSFunction.h:
      (JSFunction):
      (JSC::JSFunction::allocationProfileWatchpointSet):
      * runtime/Structure.h:
      (Structure):
      (JSC::Structure::transitionWatchpointSet):
      
      Source/WTF:
      
      Reviewed by Oliver Hunt.
      
      Harden our notions of memory fences, now that we're doing racy algorithms.
      
      * wtf/Atomics.h:
      (WTF):
      (WTF::compilerFence):
      (WTF::armV7_dmb):
      (WTF::armV7_dmb_st):
      (WTF::loadLoadFence):
      (WTF::loadStoreFence):
      (WTF::storeLoadFence):
      (WTF::storeStoreFence):
      (WTF::memoryBarrierAfterLock):
      (WTF::memoryBarrierBeforeUnlock):
      (WTF::x86_mfence):
      
      
      Conflicts:
      	Source/WTF/wtf/Atomics.h
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9397e00c