haikuwebkit/Source/WTF/wtf/Insertion.h

84 lines
3.0 KiB
C
Raw Permalink Normal View History

fourthTier: DFG should have an SSA form for use by FTL https://bugs.webkit.org/show_bug.cgi?id=118338 Source/JavaScriptCore: Reviewed by Mark Hahnenberg. Adds an SSA form to the DFG. We can convert ThreadedCPS form into SSA form after breaking critical edges. The conversion algorithm follows Aycock and Horspool, and the SSA form itself follows something I've done before, where instead of having Phi functions specify input nodes corresponding to block predecessors, we instead have Upsilon functions in the predecessors that specify which value in that block goes into which subsequent Phi. Upsilons don't have to dominate Phis (usually they don't) and they correspond to a non-SSA "mov" into the Phi's "variable". This gives all of the good properties of SSA, while ensuring that a bunch of CFG transformations don't have to be SSA-aware. So far the only DFG phases that are SSA-aware are DCE and CFA. CFG simplification is probably SSA-aware by default, though I haven't tried it. Constant folding probably needs a few tweaks, but is likely ready. Ditto for CSE, though it's not clear that we'd want to use block-local CSE when we could be doing GVN. Currently only the FTL can generate code from the SSA form, and there is no way to convert from SSA to ThreadedCPS or LoadStore. There probably will never be such a capability. In order to handle OSR exit state in the SSA, we place MovHints at Phi points. Other than that, you can reconstruct state-at-exit by forward propagating MovHints. Note that MovHint is the new SetLocal in SSA. SetLocal and GetLocal only survive into SSA if they are on captured variables, or in the case of flushes. A "live SetLocal" will be NodeMustGenerate and will always correspond to a flush. Computing the state-at-exit requires running SSA liveness analysis, OSR availability analysis, and flush liveness analysis. The FTL runs all of these prior to generating code. While OSR exit continues to be tricky, much of the logic is now factored into separate phases and the backend has to do less work to reason about what happened outside of the basic block that is being lowered. Conversion from DFG SSA to LLVM SSA is done by ensuring that we generate code in depth-first order, thus guaranteeing that a node will always be lowered (and hence have a LValue) before any of the blocks dominated by that node's block have code generated. For Upsilon/Phi, we just use alloca's. We could do something more clever there, but it's probably not worth it, at least not now. Finally, while the SSA form is currently only being converted to LLVM IR, there is nothing that prevents us from considering other backends in the future - with the caveat that this form is designed to be first lowered to a lower-level SSA before actual machine code generation commences. So we ought to either use LLVM (the intended path) or we will have to write our own SSA low-level backend. This runs all of the code that the FTL was known to run previously. No change in performance for now. But it does open some exciting possibilities! * JavaScriptCore.xcodeproj/project.pbxproj: * bytecode/Operands.h: (JSC::OperandValueTraits::dump): (JSC::Operands::fill): (Operands): (JSC::Operands::clear): (JSC::Operands::operator==): * dfg/DFGAbstractState.cpp: (JSC::DFG::AbstractState::beginBasicBlock): (JSC::DFG::setLiveValues): (DFG): (JSC::DFG::AbstractState::initialize): (JSC::DFG::AbstractState::endBasicBlock): (JSC::DFG::AbstractState::executeEffects): (JSC::DFG::AbstractState::mergeStateAtTail): (JSC::DFG::AbstractState::merge): * dfg/DFGAbstractState.h: (AbstractState): * dfg/DFGAdjacencyList.h: (JSC::DFG::AdjacencyList::justOneChild): (AdjacencyList): * dfg/DFGBasicBlock.cpp: Added. (DFG): (JSC::DFG::BasicBlock::BasicBlock): (JSC::DFG::BasicBlock::~BasicBlock): (JSC::DFG::BasicBlock::ensureLocals): (JSC::DFG::BasicBlock::isInPhis): (JSC::DFG::BasicBlock::isInBlock): (JSC::DFG::BasicBlock::removePredecessor): (JSC::DFG::BasicBlock::replacePredecessor): (JSC::DFG::BasicBlock::dump): (JSC::DFG::BasicBlock::SSAData::SSAData): (JSC::DFG::BasicBlock::SSAData::~SSAData): * dfg/DFGBasicBlock.h: (BasicBlock): (JSC::DFG::BasicBlock::operator[]): (JSC::DFG::BasicBlock::successor): (JSC::DFG::BasicBlock::successorForCondition): (SSAData): * dfg/DFGBasicBlockInlines.h: (DFG): * dfg/DFGBlockInsertionSet.cpp: Added. (DFG): (JSC::DFG::BlockInsertionSet::BlockInsertionSet): (JSC::DFG::BlockInsertionSet::~BlockInsertionSet): (JSC::DFG::BlockInsertionSet::insert): (JSC::DFG::BlockInsertionSet::insertBefore): (JSC::DFG::BlockInsertionSet::execute): * dfg/DFGBlockInsertionSet.h: Added. (DFG): (BlockInsertionSet): * dfg/DFGCFAPhase.cpp: (JSC::DFG::CFAPhase::run): * dfg/DFGCFGSimplificationPhase.cpp: * dfg/DFGCPSRethreadingPhase.cpp: (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock): * dfg/DFGCommon.cpp: (WTF::printInternal): * dfg/DFGCommon.h: (JSC::DFG::doesKill): (DFG): (JSC::DFG::killStatusForDoesKill): * dfg/DFGConstantFoldingPhase.cpp: (JSC::DFG::ConstantFoldingPhase::foldConstants): (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter): * dfg/DFGCriticalEdgeBreakingPhase.cpp: Added. (DFG): (CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::run): (JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge): (JSC::DFG::performCriticalEdgeBreaking): * dfg/DFGCriticalEdgeBreakingPhase.h: Added. (DFG): * dfg/DFGDCEPhase.cpp: (JSC::DFG::DCEPhase::run): (JSC::DFG::DCEPhase::findTypeCheckRoot): (JSC::DFG::DCEPhase::countNode): (DCEPhase): (JSC::DFG::DCEPhase::countEdge): (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren): * dfg/DFGDriver.cpp: (JSC::DFG::compile): * dfg/DFGEdge.cpp: (JSC::DFG::Edge::dump): * dfg/DFGEdge.h: (JSC::DFG::Edge::Edge): (JSC::DFG::Edge::setNode): (JSC::DFG::Edge::useKindUnchecked): (JSC::DFG::Edge::setUseKind): (JSC::DFG::Edge::setProofStatus): (JSC::DFG::Edge::willNotHaveCheck): (JSC::DFG::Edge::willHaveCheck): (Edge): (JSC::DFG::Edge::killStatusUnchecked): (JSC::DFG::Edge::killStatus): (JSC::DFG::Edge::setKillStatus): (JSC::DFG::Edge::doesKill): (JSC::DFG::Edge::doesNotKill): (JSC::DFG::Edge::shift): (JSC::DFG::Edge::makeWord): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGFlushFormat.cpp: Added. (WTF): (WTF::printInternal): * dfg/DFGFlushFormat.h: Added. (DFG): (JSC::DFG::resultFor): (JSC::DFG::useKindFor): (WTF): * dfg/DFGFlushLivenessAnalysisPhase.cpp: Added. (DFG): (FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::run): (JSC::DFG::FlushLivenessAnalysisPhase::process): (JSC::DFG::FlushLivenessAnalysisPhase::setForNode): (JSC::DFG::FlushLivenessAnalysisPhase::flushFormat): (JSC::DFG::performFlushLivenessAnalysis): * dfg/DFGFlushLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): (JSC::DFG::Graph::dumpBlockHeader): (DFG): (JSC::DFG::Graph::addForDepthFirstSort): (JSC::DFG::Graph::getBlocksInDepthFirstOrder): * dfg/DFGGraph.h: (JSC::DFG::Graph::convertToConstant): (JSC::DFG::Graph::valueProfileFor): (Graph): * dfg/DFGInsertionSet.h: (DFG): (JSC::DFG::InsertionSet::execute): * dfg/DFGLivenessAnalysisPhase.cpp: Added. (DFG): (LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::run): (JSC::DFG::LivenessAnalysisPhase::process): (JSC::DFG::LivenessAnalysisPhase::addChildUse): (JSC::DFG::performLivenessAnalysis): * dfg/DFGLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGNode.cpp: (JSC::DFG::Node::hasVariableAccessData): (DFG): * dfg/DFGNode.h: (DFG): (Node): (JSC::DFG::Node::hasLocal): (JSC::DFG::Node::variableAccessData): (JSC::DFG::Node::hasPhi): (JSC::DFG::Node::phi): (JSC::DFG::Node::takenBlock): (JSC::DFG::Node::notTakenBlock): (JSC::DFG::Node::successor): (JSC::DFG::Node::successorForCondition): (JSC::DFG::nodeComparator): (JSC::DFG::nodeListDump): (JSC::DFG::nodeMapDump): * dfg/DFGNodeFlags.cpp: (JSC::DFG::dumpNodeFlags): * dfg/DFGNodeType.h: (DFG): * dfg/DFGOSRAvailabilityAnalysisPhase.cpp: Added. (DFG): (OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::run): (JSC::DFG::performOSRAvailabilityAnalysis): * dfg/DFGOSRAvailabilityAnalysisPhase.h: Added. (DFG): * dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): * dfg/DFGPredictionInjectionPhase.cpp: (JSC::DFG::PredictionInjectionPhase::run): * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSSAConversionPhase.cpp: Added. (DFG): (SSAConversionPhase): (JSC::DFG::SSAConversionPhase::SSAConversionPhase): (JSC::DFG::SSAConversionPhase::run): (JSC::DFG::SSAConversionPhase::forwardPhiChildren): (JSC::DFG::SSAConversionPhase::forwardPhi): (JSC::DFG::SSAConversionPhase::forwardPhiEdge): (JSC::DFG::SSAConversionPhase::deduplicateChildren): (JSC::DFG::SSAConversionPhase::addFlushedLocalOp): (JSC::DFG::SSAConversionPhase::addFlushedLocalEdge): (JSC::DFG::performSSAConversion): * dfg/DFGSSAConversionPhase.h: Added. (DFG): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (Validate): (JSC::DFG::Validate::validateCPS): * dfg/DFGVariableAccessData.h: (JSC::DFG::VariableAccessData::flushFormat): (VariableAccessData): * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToLLVM.cpp: (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::lower): (JSC::FTL::LowerDFGToLLVM::createPhiVariables): (JSC::FTL::LowerDFGToLLVM::compileBlock): (JSC::FTL::LowerDFGToLLVM::compileNode): (JSC::FTL::LowerDFGToLLVM::compileUpsilon): (LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::compilePhi): (JSC::FTL::LowerDFGToLLVM::compileJSConstant): (JSC::FTL::LowerDFGToLLVM::compileWeakJSConstant): (JSC::FTL::LowerDFGToLLVM::compileGetArgument): (JSC::FTL::LowerDFGToLLVM::compileGetLocal): (JSC::FTL::LowerDFGToLLVM::compileSetLocal): (JSC::FTL::LowerDFGToLLVM::compileAdd): (JSC::FTL::LowerDFGToLLVM::compileArithSub): (JSC::FTL::LowerDFGToLLVM::compileArithMul): (JSC::FTL::LowerDFGToLLVM::compileArithDiv): (JSC::FTL::LowerDFGToLLVM::compileArithMod): (JSC::FTL::LowerDFGToLLVM::compileArithMinOrMax): (JSC::FTL::LowerDFGToLLVM::compileArithAbs): (JSC::FTL::LowerDFGToLLVM::compileArithNegate): (JSC::FTL::LowerDFGToLLVM::compileBitAnd): (JSC::FTL::LowerDFGToLLVM::compileBitOr): (JSC::FTL::LowerDFGToLLVM::compileBitXor): (JSC::FTL::LowerDFGToLLVM::compileBitRShift): (JSC::FTL::LowerDFGToLLVM::compileBitLShift): (JSC::FTL::LowerDFGToLLVM::compileBitURShift): (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber): (JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble): (JSC::FTL::LowerDFGToLLVM::compileGetButterfly): (JSC::FTL::LowerDFGToLLVM::compileGetArrayLength): (JSC::FTL::LowerDFGToLLVM::compileGetByVal): (JSC::FTL::LowerDFGToLLVM::compileGetByOffset): (JSC::FTL::LowerDFGToLLVM::compileGetGlobalVar): (JSC::FTL::LowerDFGToLLVM::compileCompareEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareLess): (JSC::FTL::LowerDFGToLLVM::compileCompareLessEq): (JSC::FTL::LowerDFGToLLVM::compileCompareGreater): (JSC::FTL::LowerDFGToLLVM::compileCompareGreaterEq): (JSC::FTL::LowerDFGToLLVM::compileLogicalNot): (JSC::FTL::LowerDFGToLLVM::speculateBackward): (JSC::FTL::LowerDFGToLLVM::lowInt32): (JSC::FTL::LowerDFGToLLVM::lowCell): (JSC::FTL::LowerDFGToLLVM::lowBoolean): (JSC::FTL::LowerDFGToLLVM::lowDouble): (JSC::FTL::LowerDFGToLLVM::lowJSValue): (JSC::FTL::LowerDFGToLLVM::lowStorage): (JSC::FTL::LowerDFGToLLVM::speculate): (JSC::FTL::LowerDFGToLLVM::speculateBoolean): (JSC::FTL::LowerDFGToLLVM::isLive): (JSC::FTL::LowerDFGToLLVM::use): (JSC::FTL::LowerDFGToLLVM::initializeOSRExitStateForBlock): (JSC::FTL::LowerDFGToLLVM::appendOSRExit): (JSC::FTL::LowerDFGToLLVM::emitOSRExitCall): (JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode): (JSC::FTL::LowerDFGToLLVM::linkOSRExitsAndCompleteInitializationBlocks): (JSC::FTL::LowerDFGToLLVM::setInt32): (JSC::FTL::LowerDFGToLLVM::setJSValue): (JSC::FTL::LowerDFGToLLVM::setBoolean): (JSC::FTL::LowerDFGToLLVM::setStorage): (JSC::FTL::LowerDFGToLLVM::setDouble): (JSC::FTL::LowerDFGToLLVM::isValid): * ftl/FTLLoweredNodeValue.h: Added. (FTL): (LoweredNodeValue): (JSC::FTL::LoweredNodeValue::LoweredNodeValue): (JSC::FTL::LoweredNodeValue::isSet): (JSC::FTL::LoweredNodeValue::operator!): (JSC::FTL::LoweredNodeValue::value): (JSC::FTL::LoweredNodeValue::block): * ftl/FTLValueFromBlock.h: (JSC::FTL::ValueFromBlock::ValueFromBlock): (ValueFromBlock): * ftl/FTLValueSource.cpp: (JSC::FTL::ValueSource::dump): * ftl/FTLValueSource.h: Source/WTF: Reviewed by Mark Hahnenberg. - Extend variadicity of PrintStream and dataLog. - Give HashSet the ability to add a span of things. - Give HashSet the ability to == another HashSet. - Note FIXME's in HashTable concerning copying performance, that affects the way that the DFG now uses HashSets and HashMaps. - Factor out the bulk-insertion logic of JSC::DFG::InsertionSet into WTF::Insertion, so that it can be used in more places. - Create a dumper for lists and maps. * WTF.xcodeproj/project.pbxproj: * wtf/DataLog.h: (WTF): (WTF::dataLog): * wtf/HashSet.h: (HashSet): (WTF): (WTF::::add): (WTF::=): * wtf/HashTable.h: (WTF::::HashTable): (WTF::=): * wtf/Insertion.h: Added. (WTF): (Insertion): (WTF::Insertion::Insertion): (WTF::Insertion::index): (WTF::Insertion::element): (WTF::Insertion::operator<): (WTF::executeInsertions): * wtf/ListDump.h: Added. (WTF): (ListDump): (WTF::ListDump::ListDump): (WTF::ListDump::dump): (MapDump): (WTF::MapDump::MapDump): (WTF::MapDump::dump): (WTF::listDump): (WTF::sortedListDump): (WTF::lessThan): (WTF::mapDump): (WTF::sortedMapDump): * wtf/PrintStream.h: (PrintStream): (WTF::PrintStream::print): Conflicts: Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj Canonical link: https://commits.webkit.org/137058@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-07-25 04:04:45 +00:00
/*
Source/JavaScriptCore: DFG and FTL should constant-fold RegExpExec, RegExpTest, and StringReplace https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. This enables constant-folding of RegExpExec, RegExpTest, and StringReplace. It's now possible to run Yarr on the JIT threads. Since previous work on constant-folding strings gave the DFG an API for reasoning about JSString constants in terms of JIT-thread-local WTF::Strings, it's now super easy to just pass strings to Yarr and build IR based on the results. But RegExpExec is hard: the folded version still must allocate a RegExpMatchesArray. We must use the same Structure that the code would have used or else we'll pollute the program's inline caches. Also, RegExpMatchesArray.h|cpp will allocate the array and its named properties in one go - we don't want to lose that optimization. So, this patch enables MaterializeNewObject to allocate objects or arrays with any number of indexed or named properties. Previously it could only handle objects (but not arrays) and named properties (but not indexed ones). This also adds a few minor things for setting the RegExpConstructor cached result. This is about a 2x speed-up on microbenchmarks when we fold a match success and about a 8x speed-up when we fold a match failure. It's a 10% speed-up on Octane/regexp. * JavaScriptCore.xcodeproj/project.pbxproj: * dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): * dfg/DFGClobberize.h: (JSC::DFG::clobberize): * dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): * dfg/DFGInsertionSet.cpp: (JSC::DFG::InsertionSet::insertSlow): (JSC::DFG::InsertionSet::execute): * dfg/DFGInsertionSet.h: (JSC::DFG::InsertionSet::insertCheck): * dfg/DFGLazyJSValue.cpp: (JSC::DFG::LazyJSValue::tryGetString): * dfg/DFGMayExit.cpp: (JSC::DFG::mayExit): * dfg/DFGNode.h: (JSC::DFG::StackAccessData::flushedAt): (JSC::DFG::OpInfo::OpInfo): Deleted. * dfg/DFGNodeType.h: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGObjectMaterializationData.cpp: (JSC::DFG::ObjectMaterializationData::dump): (JSC::DFG::PhantomPropertyValue::dump): Deleted. (JSC::DFG::ObjectMaterializationData::oneWaySimilarityScore): Deleted. (JSC::DFG::ObjectMaterializationData::similarityScore): Deleted. * dfg/DFGObjectMaterializationData.h: (JSC::DFG::PhantomPropertyValue::PhantomPropertyValue): Deleted. (JSC::DFG::PhantomPropertyValue::operator==): Deleted. * dfg/DFGOpInfo.h: Added. (JSC::DFG::OpInfo::OpInfo): * dfg/DFGOperations.cpp: * dfg/DFGOperations.h: * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGPromotedHeapLocation.cpp: (WTF::printInternal): * dfg/DFGPromotedHeapLocation.h: * dfg/DFGSafeToExecute.h: (JSC::DFG::safeToExecute): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::~SpeculativeJIT): (JSC::DFG::SpeculativeJIT::emitAllocateRawObject): (JSC::DFG::SpeculativeJIT::emitGetLength): (JSC::DFG::SpeculativeJIT::compileLazyJSConstant): (JSC::DFG::SpeculativeJIT::compileMaterializeNewObject): (JSC::DFG::SpeculativeJIT::compileRecordRegExpCachedResult): (JSC::DFG::SpeculativeJIT::emitAllocateJSArray): Deleted. * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::emitAllocateDestructibleObject): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGStrengthReductionPhase.cpp: (JSC::DFG::StrengthReductionPhase::StrengthReductionPhase): (JSC::DFG::StrengthReductionPhase::handleNode): (JSC::DFG::StrengthReductionPhase::handleCommutativity): (JSC::DFG::StrengthReductionPhase::executeInsertionSet): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (JSC::DFG::Validate::validateCPS): * ftl/FTLAbstractHeapRepository.cpp: * ftl/FTLAbstractHeapRepository.h: * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileNode): (JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSize): (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject): (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeCreateActivation): (JSC::FTL::DFG::LowerDFGToB3::compileSetRegExpObjectLastIndex): (JSC::FTL::DFG::LowerDFGToB3::compileRecordRegExpCachedResult): (JSC::FTL::DFG::LowerDFGToB3::didOverflowStack): (JSC::FTL::DFG::LowerDFGToB3::storageForTransition): (JSC::FTL::DFG::LowerDFGToB3::initializeArrayElements): (JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorage): (JSC::FTL::DFG::LowerDFGToB3::isNotCellOrMisc): (JSC::FTL::DFG::LowerDFGToB3::unboxDouble): * ftl/FTLOperations.cpp: (JSC::FTL::operationPopulateObjectInOSR): (JSC::FTL::operationNewObjectWithButterfly): Deleted. * ftl/FTLOperations.h: * inspector/ContentSearchUtilities.cpp: * runtime/JSObject.h: (JSC::JSObject::createRawObject): (JSC::JSFinalObject::create): * runtime/RegExp.cpp: (JSC::RegExp::compile): (JSC::RegExp::match): (JSC::RegExp::matchConcurrently): (JSC::RegExp::compileMatchOnly): (JSC::RegExp::deleteCode): * runtime/RegExp.h: * runtime/RegExpCachedResult.h: (JSC::RegExpCachedResult::offsetOfLastRegExp): (JSC::RegExpCachedResult::offsetOfLastInput): (JSC::RegExpCachedResult::offsetOfResult): (JSC::RegExpCachedResult::offsetOfReified): * runtime/RegExpConstructor.h: (JSC::RegExpConstructor::offsetOfCachedResult): * runtime/RegExpInlines.h: (JSC::RegExp::hasCodeFor): (JSC::RegExp::compileIfNecessary): (JSC::RegExp::matchInline): (JSC::RegExp::hasMatchOnlyCodeFor): (JSC::RegExp::compileIfNecessaryMatchOnly): * runtime/RegExpObjectInlines.h: (JSC::RegExpObject::execInline): * runtime/StringPrototype.cpp: (JSC::substituteBackreferencesSlow): (JSC::substituteBackreferencesInline): (JSC::substituteBackreferences): (JSC::StringRange::StringRange): * runtime/StringPrototype.h: * runtime/VM.h: * tests/stress/simple-regexp-exec-folding-fail.js: Added. (foo): * tests/stress/simple-regexp-exec-folding.js: Added. (foo): * tests/stress/simple-regexp-test-folding-fail.js: Added. (foo): * tests/stress/simple-regexp-test-folding.js: Added. (foo): * yarr/RegularExpression.cpp: * yarr/Yarr.h: * yarr/YarrInterpreter.cpp: (JSC::Yarr::Interpreter::interpret): (JSC::Yarr::ByteCompiler::ByteCompiler): (JSC::Yarr::ByteCompiler::compile): (JSC::Yarr::ByteCompiler::checkInput): (JSC::Yarr::byteCompile): (JSC::Yarr::interpret): * yarr/YarrInterpreter.h: (JSC::Yarr::BytecodePattern::BytecodePattern): Source/WTF: DFG and FTL should constant-fold RegExpExec https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. Make executeInsertions() return the amount by which the vector increased in size. This is a convenient feature that I use in DFG::InsertionSet. * wtf/Insertion.h: (WTF::executeInsertions): LayoutTests: DFG and FTL should constant-fold RegExpExec https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. * js/regress/script-tests/simple-regexp-exec-folding-fail.js: Added. * js/regress/script-tests/simple-regexp-exec-folding.js: Added. * js/regress/script-tests/simple-regexp-test-folding-fail.js: Added. * js/regress/script-tests/simple-regexp-test-folding.js: Added. * js/regress/simple-regexp-exec-folding-expected.txt: Added. * js/regress/simple-regexp-exec-folding-fail-expected.txt: Added. * js/regress/simple-regexp-exec-folding-fail.html: Added. * js/regress/simple-regexp-exec-folding.html: Added. * js/regress/simple-regexp-test-folding-expected.txt: Added. * js/regress/simple-regexp-test-folding-fail-expected.txt: Added. * js/regress/simple-regexp-test-folding-fail.html: Added. * js/regress/simple-regexp-test-folding.html: Added. Canonical link: https://commits.webkit.org/174348@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-05 22:13:16 +00:00
* Copyright (C) 2013, 2015-2016 Apple Inc. All rights reserved.
fourthTier: DFG should have an SSA form for use by FTL https://bugs.webkit.org/show_bug.cgi?id=118338 Source/JavaScriptCore: Reviewed by Mark Hahnenberg. Adds an SSA form to the DFG. We can convert ThreadedCPS form into SSA form after breaking critical edges. The conversion algorithm follows Aycock and Horspool, and the SSA form itself follows something I've done before, where instead of having Phi functions specify input nodes corresponding to block predecessors, we instead have Upsilon functions in the predecessors that specify which value in that block goes into which subsequent Phi. Upsilons don't have to dominate Phis (usually they don't) and they correspond to a non-SSA "mov" into the Phi's "variable". This gives all of the good properties of SSA, while ensuring that a bunch of CFG transformations don't have to be SSA-aware. So far the only DFG phases that are SSA-aware are DCE and CFA. CFG simplification is probably SSA-aware by default, though I haven't tried it. Constant folding probably needs a few tweaks, but is likely ready. Ditto for CSE, though it's not clear that we'd want to use block-local CSE when we could be doing GVN. Currently only the FTL can generate code from the SSA form, and there is no way to convert from SSA to ThreadedCPS or LoadStore. There probably will never be such a capability. In order to handle OSR exit state in the SSA, we place MovHints at Phi points. Other than that, you can reconstruct state-at-exit by forward propagating MovHints. Note that MovHint is the new SetLocal in SSA. SetLocal and GetLocal only survive into SSA if they are on captured variables, or in the case of flushes. A "live SetLocal" will be NodeMustGenerate and will always correspond to a flush. Computing the state-at-exit requires running SSA liveness analysis, OSR availability analysis, and flush liveness analysis. The FTL runs all of these prior to generating code. While OSR exit continues to be tricky, much of the logic is now factored into separate phases and the backend has to do less work to reason about what happened outside of the basic block that is being lowered. Conversion from DFG SSA to LLVM SSA is done by ensuring that we generate code in depth-first order, thus guaranteeing that a node will always be lowered (and hence have a LValue) before any of the blocks dominated by that node's block have code generated. For Upsilon/Phi, we just use alloca's. We could do something more clever there, but it's probably not worth it, at least not now. Finally, while the SSA form is currently only being converted to LLVM IR, there is nothing that prevents us from considering other backends in the future - with the caveat that this form is designed to be first lowered to a lower-level SSA before actual machine code generation commences. So we ought to either use LLVM (the intended path) or we will have to write our own SSA low-level backend. This runs all of the code that the FTL was known to run previously. No change in performance for now. But it does open some exciting possibilities! * JavaScriptCore.xcodeproj/project.pbxproj: * bytecode/Operands.h: (JSC::OperandValueTraits::dump): (JSC::Operands::fill): (Operands): (JSC::Operands::clear): (JSC::Operands::operator==): * dfg/DFGAbstractState.cpp: (JSC::DFG::AbstractState::beginBasicBlock): (JSC::DFG::setLiveValues): (DFG): (JSC::DFG::AbstractState::initialize): (JSC::DFG::AbstractState::endBasicBlock): (JSC::DFG::AbstractState::executeEffects): (JSC::DFG::AbstractState::mergeStateAtTail): (JSC::DFG::AbstractState::merge): * dfg/DFGAbstractState.h: (AbstractState): * dfg/DFGAdjacencyList.h: (JSC::DFG::AdjacencyList::justOneChild): (AdjacencyList): * dfg/DFGBasicBlock.cpp: Added. (DFG): (JSC::DFG::BasicBlock::BasicBlock): (JSC::DFG::BasicBlock::~BasicBlock): (JSC::DFG::BasicBlock::ensureLocals): (JSC::DFG::BasicBlock::isInPhis): (JSC::DFG::BasicBlock::isInBlock): (JSC::DFG::BasicBlock::removePredecessor): (JSC::DFG::BasicBlock::replacePredecessor): (JSC::DFG::BasicBlock::dump): (JSC::DFG::BasicBlock::SSAData::SSAData): (JSC::DFG::BasicBlock::SSAData::~SSAData): * dfg/DFGBasicBlock.h: (BasicBlock): (JSC::DFG::BasicBlock::operator[]): (JSC::DFG::BasicBlock::successor): (JSC::DFG::BasicBlock::successorForCondition): (SSAData): * dfg/DFGBasicBlockInlines.h: (DFG): * dfg/DFGBlockInsertionSet.cpp: Added. (DFG): (JSC::DFG::BlockInsertionSet::BlockInsertionSet): (JSC::DFG::BlockInsertionSet::~BlockInsertionSet): (JSC::DFG::BlockInsertionSet::insert): (JSC::DFG::BlockInsertionSet::insertBefore): (JSC::DFG::BlockInsertionSet::execute): * dfg/DFGBlockInsertionSet.h: Added. (DFG): (BlockInsertionSet): * dfg/DFGCFAPhase.cpp: (JSC::DFG::CFAPhase::run): * dfg/DFGCFGSimplificationPhase.cpp: * dfg/DFGCPSRethreadingPhase.cpp: (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock): * dfg/DFGCommon.cpp: (WTF::printInternal): * dfg/DFGCommon.h: (JSC::DFG::doesKill): (DFG): (JSC::DFG::killStatusForDoesKill): * dfg/DFGConstantFoldingPhase.cpp: (JSC::DFG::ConstantFoldingPhase::foldConstants): (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter): * dfg/DFGCriticalEdgeBreakingPhase.cpp: Added. (DFG): (CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::run): (JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge): (JSC::DFG::performCriticalEdgeBreaking): * dfg/DFGCriticalEdgeBreakingPhase.h: Added. (DFG): * dfg/DFGDCEPhase.cpp: (JSC::DFG::DCEPhase::run): (JSC::DFG::DCEPhase::findTypeCheckRoot): (JSC::DFG::DCEPhase::countNode): (DCEPhase): (JSC::DFG::DCEPhase::countEdge): (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren): * dfg/DFGDriver.cpp: (JSC::DFG::compile): * dfg/DFGEdge.cpp: (JSC::DFG::Edge::dump): * dfg/DFGEdge.h: (JSC::DFG::Edge::Edge): (JSC::DFG::Edge::setNode): (JSC::DFG::Edge::useKindUnchecked): (JSC::DFG::Edge::setUseKind): (JSC::DFG::Edge::setProofStatus): (JSC::DFG::Edge::willNotHaveCheck): (JSC::DFG::Edge::willHaveCheck): (Edge): (JSC::DFG::Edge::killStatusUnchecked): (JSC::DFG::Edge::killStatus): (JSC::DFG::Edge::setKillStatus): (JSC::DFG::Edge::doesKill): (JSC::DFG::Edge::doesNotKill): (JSC::DFG::Edge::shift): (JSC::DFG::Edge::makeWord): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGFlushFormat.cpp: Added. (WTF): (WTF::printInternal): * dfg/DFGFlushFormat.h: Added. (DFG): (JSC::DFG::resultFor): (JSC::DFG::useKindFor): (WTF): * dfg/DFGFlushLivenessAnalysisPhase.cpp: Added. (DFG): (FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::run): (JSC::DFG::FlushLivenessAnalysisPhase::process): (JSC::DFG::FlushLivenessAnalysisPhase::setForNode): (JSC::DFG::FlushLivenessAnalysisPhase::flushFormat): (JSC::DFG::performFlushLivenessAnalysis): * dfg/DFGFlushLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): (JSC::DFG::Graph::dumpBlockHeader): (DFG): (JSC::DFG::Graph::addForDepthFirstSort): (JSC::DFG::Graph::getBlocksInDepthFirstOrder): * dfg/DFGGraph.h: (JSC::DFG::Graph::convertToConstant): (JSC::DFG::Graph::valueProfileFor): (Graph): * dfg/DFGInsertionSet.h: (DFG): (JSC::DFG::InsertionSet::execute): * dfg/DFGLivenessAnalysisPhase.cpp: Added. (DFG): (LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::run): (JSC::DFG::LivenessAnalysisPhase::process): (JSC::DFG::LivenessAnalysisPhase::addChildUse): (JSC::DFG::performLivenessAnalysis): * dfg/DFGLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGNode.cpp: (JSC::DFG::Node::hasVariableAccessData): (DFG): * dfg/DFGNode.h: (DFG): (Node): (JSC::DFG::Node::hasLocal): (JSC::DFG::Node::variableAccessData): (JSC::DFG::Node::hasPhi): (JSC::DFG::Node::phi): (JSC::DFG::Node::takenBlock): (JSC::DFG::Node::notTakenBlock): (JSC::DFG::Node::successor): (JSC::DFG::Node::successorForCondition): (JSC::DFG::nodeComparator): (JSC::DFG::nodeListDump): (JSC::DFG::nodeMapDump): * dfg/DFGNodeFlags.cpp: (JSC::DFG::dumpNodeFlags): * dfg/DFGNodeType.h: (DFG): * dfg/DFGOSRAvailabilityAnalysisPhase.cpp: Added. (DFG): (OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::run): (JSC::DFG::performOSRAvailabilityAnalysis): * dfg/DFGOSRAvailabilityAnalysisPhase.h: Added. (DFG): * dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): * dfg/DFGPredictionInjectionPhase.cpp: (JSC::DFG::PredictionInjectionPhase::run): * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSSAConversionPhase.cpp: Added. (DFG): (SSAConversionPhase): (JSC::DFG::SSAConversionPhase::SSAConversionPhase): (JSC::DFG::SSAConversionPhase::run): (JSC::DFG::SSAConversionPhase::forwardPhiChildren): (JSC::DFG::SSAConversionPhase::forwardPhi): (JSC::DFG::SSAConversionPhase::forwardPhiEdge): (JSC::DFG::SSAConversionPhase::deduplicateChildren): (JSC::DFG::SSAConversionPhase::addFlushedLocalOp): (JSC::DFG::SSAConversionPhase::addFlushedLocalEdge): (JSC::DFG::performSSAConversion): * dfg/DFGSSAConversionPhase.h: Added. (DFG): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (Validate): (JSC::DFG::Validate::validateCPS): * dfg/DFGVariableAccessData.h: (JSC::DFG::VariableAccessData::flushFormat): (VariableAccessData): * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToLLVM.cpp: (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::lower): (JSC::FTL::LowerDFGToLLVM::createPhiVariables): (JSC::FTL::LowerDFGToLLVM::compileBlock): (JSC::FTL::LowerDFGToLLVM::compileNode): (JSC::FTL::LowerDFGToLLVM::compileUpsilon): (LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::compilePhi): (JSC::FTL::LowerDFGToLLVM::compileJSConstant): (JSC::FTL::LowerDFGToLLVM::compileWeakJSConstant): (JSC::FTL::LowerDFGToLLVM::compileGetArgument): (JSC::FTL::LowerDFGToLLVM::compileGetLocal): (JSC::FTL::LowerDFGToLLVM::compileSetLocal): (JSC::FTL::LowerDFGToLLVM::compileAdd): (JSC::FTL::LowerDFGToLLVM::compileArithSub): (JSC::FTL::LowerDFGToLLVM::compileArithMul): (JSC::FTL::LowerDFGToLLVM::compileArithDiv): (JSC::FTL::LowerDFGToLLVM::compileArithMod): (JSC::FTL::LowerDFGToLLVM::compileArithMinOrMax): (JSC::FTL::LowerDFGToLLVM::compileArithAbs): (JSC::FTL::LowerDFGToLLVM::compileArithNegate): (JSC::FTL::LowerDFGToLLVM::compileBitAnd): (JSC::FTL::LowerDFGToLLVM::compileBitOr): (JSC::FTL::LowerDFGToLLVM::compileBitXor): (JSC::FTL::LowerDFGToLLVM::compileBitRShift): (JSC::FTL::LowerDFGToLLVM::compileBitLShift): (JSC::FTL::LowerDFGToLLVM::compileBitURShift): (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber): (JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble): (JSC::FTL::LowerDFGToLLVM::compileGetButterfly): (JSC::FTL::LowerDFGToLLVM::compileGetArrayLength): (JSC::FTL::LowerDFGToLLVM::compileGetByVal): (JSC::FTL::LowerDFGToLLVM::compileGetByOffset): (JSC::FTL::LowerDFGToLLVM::compileGetGlobalVar): (JSC::FTL::LowerDFGToLLVM::compileCompareEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareLess): (JSC::FTL::LowerDFGToLLVM::compileCompareLessEq): (JSC::FTL::LowerDFGToLLVM::compileCompareGreater): (JSC::FTL::LowerDFGToLLVM::compileCompareGreaterEq): (JSC::FTL::LowerDFGToLLVM::compileLogicalNot): (JSC::FTL::LowerDFGToLLVM::speculateBackward): (JSC::FTL::LowerDFGToLLVM::lowInt32): (JSC::FTL::LowerDFGToLLVM::lowCell): (JSC::FTL::LowerDFGToLLVM::lowBoolean): (JSC::FTL::LowerDFGToLLVM::lowDouble): (JSC::FTL::LowerDFGToLLVM::lowJSValue): (JSC::FTL::LowerDFGToLLVM::lowStorage): (JSC::FTL::LowerDFGToLLVM::speculate): (JSC::FTL::LowerDFGToLLVM::speculateBoolean): (JSC::FTL::LowerDFGToLLVM::isLive): (JSC::FTL::LowerDFGToLLVM::use): (JSC::FTL::LowerDFGToLLVM::initializeOSRExitStateForBlock): (JSC::FTL::LowerDFGToLLVM::appendOSRExit): (JSC::FTL::LowerDFGToLLVM::emitOSRExitCall): (JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode): (JSC::FTL::LowerDFGToLLVM::linkOSRExitsAndCompleteInitializationBlocks): (JSC::FTL::LowerDFGToLLVM::setInt32): (JSC::FTL::LowerDFGToLLVM::setJSValue): (JSC::FTL::LowerDFGToLLVM::setBoolean): (JSC::FTL::LowerDFGToLLVM::setStorage): (JSC::FTL::LowerDFGToLLVM::setDouble): (JSC::FTL::LowerDFGToLLVM::isValid): * ftl/FTLLoweredNodeValue.h: Added. (FTL): (LoweredNodeValue): (JSC::FTL::LoweredNodeValue::LoweredNodeValue): (JSC::FTL::LoweredNodeValue::isSet): (JSC::FTL::LoweredNodeValue::operator!): (JSC::FTL::LoweredNodeValue::value): (JSC::FTL::LoweredNodeValue::block): * ftl/FTLValueFromBlock.h: (JSC::FTL::ValueFromBlock::ValueFromBlock): (ValueFromBlock): * ftl/FTLValueSource.cpp: (JSC::FTL::ValueSource::dump): * ftl/FTLValueSource.h: Source/WTF: Reviewed by Mark Hahnenberg. - Extend variadicity of PrintStream and dataLog. - Give HashSet the ability to add a span of things. - Give HashSet the ability to == another HashSet. - Note FIXME's in HashTable concerning copying performance, that affects the way that the DFG now uses HashSets and HashMaps. - Factor out the bulk-insertion logic of JSC::DFG::InsertionSet into WTF::Insertion, so that it can be used in more places. - Create a dumper for lists and maps. * WTF.xcodeproj/project.pbxproj: * wtf/DataLog.h: (WTF): (WTF::dataLog): * wtf/HashSet.h: (HashSet): (WTF): (WTF::::add): (WTF::=): * wtf/HashTable.h: (WTF::::HashTable): (WTF::=): * wtf/Insertion.h: Added. (WTF): (Insertion): (WTF::Insertion::Insertion): (WTF::Insertion::index): (WTF::Insertion::element): (WTF::Insertion::operator<): (WTF::executeInsertions): * wtf/ListDump.h: Added. (WTF): (ListDump): (WTF::ListDump::ListDump): (WTF::ListDump::dump): (MapDump): (WTF::MapDump::MapDump): (WTF::MapDump::dump): (WTF::listDump): (WTF::sortedListDump): (WTF::lessThan): (WTF::mapDump): (WTF::sortedMapDump): * wtf/PrintStream.h: (PrintStream): (WTF::PrintStream::print): Conflicts: Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj Canonical link: https://commits.webkit.org/137058@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-07-25 04:04:45 +00:00
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
Use pragma once in WTF https://bugs.webkit.org/show_bug.cgi?id=190527 Reviewed by Chris Dumez. Source/WTF: We also need to consistently include wtf headers from within wtf so we can build wtf without symbol redefinition errors from including the copy in Source and the copy in the build directory. * wtf/ASCIICType.h: * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Atomics.h: * wtf/AutomaticThread.cpp: * wtf/AutomaticThread.h: * wtf/BackwardsGraph.h: * wtf/Bag.h: * wtf/BagToHashMap.h: * wtf/BitVector.cpp: * wtf/BitVector.h: * wtf/Bitmap.h: * wtf/BloomFilter.h: * wtf/Box.h: * wtf/BubbleSort.h: * wtf/BumpPointerAllocator.h: * wtf/ByteOrder.h: * wtf/CPUTime.cpp: * wtf/CallbackAggregator.h: * wtf/CheckedArithmetic.h: * wtf/CheckedBoolean.h: * wtf/ClockType.cpp: * wtf/ClockType.h: * wtf/CommaPrinter.h: * wtf/CompilationThread.cpp: * wtf/CompilationThread.h: * wtf/Compiler.h: * wtf/ConcurrentPtrHashSet.cpp: * wtf/ConcurrentVector.h: * wtf/Condition.h: * wtf/CountingLock.cpp: * wtf/CrossThreadTaskHandler.cpp: * wtf/CryptographicUtilities.cpp: * wtf/CryptographicUtilities.h: * wtf/CryptographicallyRandomNumber.cpp: * wtf/CryptographicallyRandomNumber.h: * wtf/CurrentTime.cpp: * wtf/DataLog.cpp: * wtf/DataLog.h: * wtf/DateMath.cpp: * wtf/DateMath.h: * wtf/DecimalNumber.cpp: * wtf/DecimalNumber.h: * wtf/Deque.h: * wtf/DisallowCType.h: * wtf/Dominators.h: * wtf/DoublyLinkedList.h: * wtf/FastBitVector.cpp: * wtf/FastMalloc.cpp: * wtf/FastMalloc.h: * wtf/FeatureDefines.h: * wtf/FilePrintStream.cpp: * wtf/FilePrintStream.h: * wtf/FlipBytes.h: * wtf/FunctionDispatcher.cpp: * wtf/FunctionDispatcher.h: * wtf/GetPtr.h: * wtf/Gigacage.cpp: * wtf/GlobalVersion.cpp: * wtf/GraphNodeWorklist.h: * wtf/GregorianDateTime.cpp: * wtf/GregorianDateTime.h: * wtf/HashFunctions.h: * wtf/HashMap.h: * wtf/HashMethod.h: * wtf/HashSet.h: * wtf/HashTable.cpp: * wtf/HashTraits.h: * wtf/Indenter.h: * wtf/IndexSparseSet.h: * wtf/InlineASM.h: * wtf/Insertion.h: * wtf/IteratorAdaptors.h: * wtf/IteratorRange.h: * wtf/JSONValues.cpp: * wtf/JSValueMalloc.cpp: * wtf/LEBDecoder.h: * wtf/Language.cpp: * wtf/ListDump.h: * wtf/Lock.cpp: * wtf/Lock.h: * wtf/LockAlgorithm.h: * wtf/LockedPrintStream.cpp: * wtf/Locker.h: * wtf/MD5.cpp: * wtf/MD5.h: * wtf/MainThread.cpp: * wtf/MainThread.h: * wtf/MallocPtr.h: * wtf/MathExtras.h: * wtf/MediaTime.cpp: * wtf/MediaTime.h: * wtf/MemoryPressureHandler.cpp: * wtf/MessageQueue.h: * wtf/MetaAllocator.cpp: * wtf/MetaAllocator.h: * wtf/MetaAllocatorHandle.h: * wtf/MonotonicTime.cpp: * wtf/MonotonicTime.h: * wtf/NakedPtr.h: * wtf/NoLock.h: * wtf/NoTailCalls.h: * wtf/Noncopyable.h: * wtf/NumberOfCores.cpp: * wtf/NumberOfCores.h: * wtf/OSAllocator.h: * wtf/OSAllocatorPosix.cpp: * wtf/OSRandomSource.cpp: * wtf/OSRandomSource.h: * wtf/ObjcRuntimeExtras.h: * wtf/OrderMaker.h: * wtf/PackedIntVector.h: * wtf/PageAllocation.h: * wtf/PageBlock.cpp: * wtf/PageBlock.h: * wtf/PageReservation.h: * wtf/ParallelHelperPool.cpp: * wtf/ParallelHelperPool.h: * wtf/ParallelJobs.h: * wtf/ParallelJobsLibdispatch.h: * wtf/ParallelVectorIterator.h: * wtf/ParkingLot.cpp: * wtf/ParkingLot.h: * wtf/Platform.h: * wtf/PointerComparison.h: * wtf/Poisoned.cpp: * wtf/PrintStream.cpp: * wtf/PrintStream.h: * wtf/ProcessID.h: * wtf/ProcessPrivilege.cpp: * wtf/RAMSize.cpp: * wtf/RAMSize.h: * wtf/RandomDevice.cpp: * wtf/RandomNumber.cpp: * wtf/RandomNumber.h: * wtf/RandomNumberSeed.h: * wtf/RangeSet.h: * wtf/RawPointer.h: * wtf/ReadWriteLock.cpp: * wtf/RedBlackTree.h: * wtf/Ref.h: * wtf/RefCountedArray.h: * wtf/RefCountedLeakCounter.cpp: * wtf/RefCountedLeakCounter.h: * wtf/RefCounter.h: * wtf/RefPtr.h: * wtf/RetainPtr.h: * wtf/RunLoop.cpp: * wtf/RunLoop.h: * wtf/RunLoopTimer.h: * wtf/RunLoopTimerCF.cpp: * wtf/SHA1.cpp: * wtf/SHA1.h: * wtf/SaturatedArithmetic.h: (saturatedSubtraction): * wtf/SchedulePair.h: * wtf/SchedulePairCF.cpp: * wtf/SchedulePairMac.mm: * wtf/ScopedLambda.h: * wtf/Seconds.cpp: * wtf/Seconds.h: * wtf/SegmentedVector.h: * wtf/SentinelLinkedList.h: * wtf/SharedTask.h: * wtf/SimpleStats.h: * wtf/SingleRootGraph.h: * wtf/SinglyLinkedList.h: * wtf/SixCharacterHash.cpp: * wtf/SixCharacterHash.h: * wtf/SmallPtrSet.h: * wtf/Spectrum.h: * wtf/StackBounds.cpp: * wtf/StackBounds.h: * wtf/StackStats.cpp: * wtf/StackStats.h: * wtf/StackTrace.cpp: * wtf/StdLibExtras.h: * wtf/StreamBuffer.h: * wtf/StringHashDumpContext.h: * wtf/StringPrintStream.cpp: * wtf/StringPrintStream.h: * wtf/ThreadGroup.cpp: * wtf/ThreadMessage.cpp: * wtf/ThreadSpecific.h: * wtf/Threading.cpp: * wtf/Threading.h: * wtf/ThreadingPrimitives.h: * wtf/ThreadingPthreads.cpp: * wtf/TimeWithDynamicClockType.cpp: * wtf/TimeWithDynamicClockType.h: * wtf/TimingScope.cpp: * wtf/TinyLRUCache.h: * wtf/TinyPtrSet.h: * wtf/TriState.h: * wtf/TypeCasts.h: * wtf/UUID.cpp: * wtf/UnionFind.h: * wtf/VMTags.h: * wtf/ValueCheck.h: * wtf/Vector.h: * wtf/VectorTraits.h: * wtf/WallTime.cpp: * wtf/WallTime.h: * wtf/WeakPtr.h: * wtf/WeakRandom.h: * wtf/WordLock.cpp: * wtf/WordLock.h: * wtf/WorkQueue.cpp: * wtf/WorkQueue.h: * wtf/WorkerPool.cpp: * wtf/cf/LanguageCF.cpp: * wtf/cf/RunLoopCF.cpp: * wtf/cocoa/Entitlements.mm: * wtf/cocoa/MachSendRight.cpp: * wtf/cocoa/MainThreadCocoa.mm: * wtf/cocoa/MemoryFootprintCocoa.cpp: * wtf/cocoa/WorkQueueCocoa.cpp: * wtf/dtoa.cpp: * wtf/dtoa.h: * wtf/ios/WebCoreThread.cpp: * wtf/ios/WebCoreThread.h: * wtf/mac/AppKitCompatibilityDeclarations.h: * wtf/mac/DeprecatedSymbolsUsedBySafari.mm: * wtf/mbmalloc.cpp: * wtf/persistence/PersistentCoders.cpp: * wtf/persistence/PersistentDecoder.cpp: * wtf/persistence/PersistentEncoder.cpp: * wtf/spi/cf/CFBundleSPI.h: * wtf/spi/darwin/CommonCryptoSPI.h: * wtf/text/ASCIIFastPath.h: * wtf/text/ASCIILiteral.cpp: * wtf/text/AtomicString.cpp: * wtf/text/AtomicString.h: * wtf/text/AtomicStringHash.h: * wtf/text/AtomicStringImpl.cpp: * wtf/text/AtomicStringImpl.h: * wtf/text/AtomicStringTable.cpp: * wtf/text/AtomicStringTable.h: * wtf/text/Base64.cpp: * wtf/text/CString.cpp: * wtf/text/CString.h: * wtf/text/ConversionMode.h: * wtf/text/ExternalStringImpl.cpp: * wtf/text/IntegerToStringConversion.h: * wtf/text/LChar.h: * wtf/text/LineEnding.cpp: * wtf/text/StringBuffer.h: * wtf/text/StringBuilder.cpp: * wtf/text/StringBuilder.h: * wtf/text/StringBuilderJSON.cpp: * wtf/text/StringCommon.h: * wtf/text/StringConcatenate.h: * wtf/text/StringHash.h: * wtf/text/StringImpl.cpp: * wtf/text/StringImpl.h: * wtf/text/StringOperators.h: * wtf/text/StringView.cpp: * wtf/text/StringView.h: * wtf/text/SymbolImpl.cpp: * wtf/text/SymbolRegistry.cpp: * wtf/text/SymbolRegistry.h: * wtf/text/TextBreakIterator.cpp: * wtf/text/TextBreakIterator.h: * wtf/text/TextBreakIteratorInternalICU.h: * wtf/text/TextPosition.h: * wtf/text/TextStream.cpp: * wtf/text/UniquedStringImpl.h: * wtf/text/WTFString.cpp: * wtf/text/WTFString.h: * wtf/text/cocoa/StringCocoa.mm: * wtf/text/cocoa/StringViewCocoa.mm: * wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp: * wtf/text/icu/UTextProvider.cpp: * wtf/text/icu/UTextProvider.h: * wtf/text/icu/UTextProviderLatin1.cpp: * wtf/text/icu/UTextProviderLatin1.h: * wtf/text/icu/UTextProviderUTF16.cpp: * wtf/text/icu/UTextProviderUTF16.h: * wtf/threads/BinarySemaphore.cpp: * wtf/threads/BinarySemaphore.h: * wtf/threads/Signals.cpp: * wtf/unicode/CharacterNames.h: * wtf/unicode/Collator.h: * wtf/unicode/CollatorDefault.cpp: * wtf/unicode/UTF8.cpp: * wtf/unicode/UTF8.h: Tools: Put WorkQueue in namespace DRT so it does not conflict with WTF::WorkQueue. * DumpRenderTree/TestRunner.cpp: (TestRunner::queueLoadHTMLString): (TestRunner::queueLoadAlternateHTMLString): (TestRunner::queueBackNavigation): (TestRunner::queueForwardNavigation): (TestRunner::queueLoadingScript): (TestRunner::queueNonLoadingScript): (TestRunner::queueReload): * DumpRenderTree/WorkQueue.cpp: (WorkQueue::singleton): Deleted. (WorkQueue::WorkQueue): Deleted. (WorkQueue::queue): Deleted. (WorkQueue::dequeue): Deleted. (WorkQueue::count): Deleted. (WorkQueue::clear): Deleted. (WorkQueue::processWork): Deleted. * DumpRenderTree/WorkQueue.h: (WorkQueue::setFrozen): Deleted. * DumpRenderTree/WorkQueueItem.h: * DumpRenderTree/mac/DumpRenderTree.mm: (runTest): * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate processWork:]): (-[FrameLoadDelegate webView:locationChangeDone:forDataSource:]): * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::notifyDone): (TestRunner::forceImmediateCompletion): (TestRunner::queueLoad): * DumpRenderTree/win/DumpRenderTree.cpp: (runTest): * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::processWork): (FrameLoadDelegate::locationChangeDone): * DumpRenderTree/win/TestRunnerWin.cpp: (TestRunner::notifyDone): (TestRunner::forceImmediateCompletion): (TestRunner::queueLoad): Canonical link: https://commits.webkit.org/205473@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-15 14:24:49 +00:00
#pragma once
fourthTier: DFG should have an SSA form for use by FTL https://bugs.webkit.org/show_bug.cgi?id=118338 Source/JavaScriptCore: Reviewed by Mark Hahnenberg. Adds an SSA form to the DFG. We can convert ThreadedCPS form into SSA form after breaking critical edges. The conversion algorithm follows Aycock and Horspool, and the SSA form itself follows something I've done before, where instead of having Phi functions specify input nodes corresponding to block predecessors, we instead have Upsilon functions in the predecessors that specify which value in that block goes into which subsequent Phi. Upsilons don't have to dominate Phis (usually they don't) and they correspond to a non-SSA "mov" into the Phi's "variable". This gives all of the good properties of SSA, while ensuring that a bunch of CFG transformations don't have to be SSA-aware. So far the only DFG phases that are SSA-aware are DCE and CFA. CFG simplification is probably SSA-aware by default, though I haven't tried it. Constant folding probably needs a few tweaks, but is likely ready. Ditto for CSE, though it's not clear that we'd want to use block-local CSE when we could be doing GVN. Currently only the FTL can generate code from the SSA form, and there is no way to convert from SSA to ThreadedCPS or LoadStore. There probably will never be such a capability. In order to handle OSR exit state in the SSA, we place MovHints at Phi points. Other than that, you can reconstruct state-at-exit by forward propagating MovHints. Note that MovHint is the new SetLocal in SSA. SetLocal and GetLocal only survive into SSA if they are on captured variables, or in the case of flushes. A "live SetLocal" will be NodeMustGenerate and will always correspond to a flush. Computing the state-at-exit requires running SSA liveness analysis, OSR availability analysis, and flush liveness analysis. The FTL runs all of these prior to generating code. While OSR exit continues to be tricky, much of the logic is now factored into separate phases and the backend has to do less work to reason about what happened outside of the basic block that is being lowered. Conversion from DFG SSA to LLVM SSA is done by ensuring that we generate code in depth-first order, thus guaranteeing that a node will always be lowered (and hence have a LValue) before any of the blocks dominated by that node's block have code generated. For Upsilon/Phi, we just use alloca's. We could do something more clever there, but it's probably not worth it, at least not now. Finally, while the SSA form is currently only being converted to LLVM IR, there is nothing that prevents us from considering other backends in the future - with the caveat that this form is designed to be first lowered to a lower-level SSA before actual machine code generation commences. So we ought to either use LLVM (the intended path) or we will have to write our own SSA low-level backend. This runs all of the code that the FTL was known to run previously. No change in performance for now. But it does open some exciting possibilities! * JavaScriptCore.xcodeproj/project.pbxproj: * bytecode/Operands.h: (JSC::OperandValueTraits::dump): (JSC::Operands::fill): (Operands): (JSC::Operands::clear): (JSC::Operands::operator==): * dfg/DFGAbstractState.cpp: (JSC::DFG::AbstractState::beginBasicBlock): (JSC::DFG::setLiveValues): (DFG): (JSC::DFG::AbstractState::initialize): (JSC::DFG::AbstractState::endBasicBlock): (JSC::DFG::AbstractState::executeEffects): (JSC::DFG::AbstractState::mergeStateAtTail): (JSC::DFG::AbstractState::merge): * dfg/DFGAbstractState.h: (AbstractState): * dfg/DFGAdjacencyList.h: (JSC::DFG::AdjacencyList::justOneChild): (AdjacencyList): * dfg/DFGBasicBlock.cpp: Added. (DFG): (JSC::DFG::BasicBlock::BasicBlock): (JSC::DFG::BasicBlock::~BasicBlock): (JSC::DFG::BasicBlock::ensureLocals): (JSC::DFG::BasicBlock::isInPhis): (JSC::DFG::BasicBlock::isInBlock): (JSC::DFG::BasicBlock::removePredecessor): (JSC::DFG::BasicBlock::replacePredecessor): (JSC::DFG::BasicBlock::dump): (JSC::DFG::BasicBlock::SSAData::SSAData): (JSC::DFG::BasicBlock::SSAData::~SSAData): * dfg/DFGBasicBlock.h: (BasicBlock): (JSC::DFG::BasicBlock::operator[]): (JSC::DFG::BasicBlock::successor): (JSC::DFG::BasicBlock::successorForCondition): (SSAData): * dfg/DFGBasicBlockInlines.h: (DFG): * dfg/DFGBlockInsertionSet.cpp: Added. (DFG): (JSC::DFG::BlockInsertionSet::BlockInsertionSet): (JSC::DFG::BlockInsertionSet::~BlockInsertionSet): (JSC::DFG::BlockInsertionSet::insert): (JSC::DFG::BlockInsertionSet::insertBefore): (JSC::DFG::BlockInsertionSet::execute): * dfg/DFGBlockInsertionSet.h: Added. (DFG): (BlockInsertionSet): * dfg/DFGCFAPhase.cpp: (JSC::DFG::CFAPhase::run): * dfg/DFGCFGSimplificationPhase.cpp: * dfg/DFGCPSRethreadingPhase.cpp: (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock): * dfg/DFGCommon.cpp: (WTF::printInternal): * dfg/DFGCommon.h: (JSC::DFG::doesKill): (DFG): (JSC::DFG::killStatusForDoesKill): * dfg/DFGConstantFoldingPhase.cpp: (JSC::DFG::ConstantFoldingPhase::foldConstants): (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter): * dfg/DFGCriticalEdgeBreakingPhase.cpp: Added. (DFG): (CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::run): (JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge): (JSC::DFG::performCriticalEdgeBreaking): * dfg/DFGCriticalEdgeBreakingPhase.h: Added. (DFG): * dfg/DFGDCEPhase.cpp: (JSC::DFG::DCEPhase::run): (JSC::DFG::DCEPhase::findTypeCheckRoot): (JSC::DFG::DCEPhase::countNode): (DCEPhase): (JSC::DFG::DCEPhase::countEdge): (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren): * dfg/DFGDriver.cpp: (JSC::DFG::compile): * dfg/DFGEdge.cpp: (JSC::DFG::Edge::dump): * dfg/DFGEdge.h: (JSC::DFG::Edge::Edge): (JSC::DFG::Edge::setNode): (JSC::DFG::Edge::useKindUnchecked): (JSC::DFG::Edge::setUseKind): (JSC::DFG::Edge::setProofStatus): (JSC::DFG::Edge::willNotHaveCheck): (JSC::DFG::Edge::willHaveCheck): (Edge): (JSC::DFG::Edge::killStatusUnchecked): (JSC::DFG::Edge::killStatus): (JSC::DFG::Edge::setKillStatus): (JSC::DFG::Edge::doesKill): (JSC::DFG::Edge::doesNotKill): (JSC::DFG::Edge::shift): (JSC::DFG::Edge::makeWord): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGFlushFormat.cpp: Added. (WTF): (WTF::printInternal): * dfg/DFGFlushFormat.h: Added. (DFG): (JSC::DFG::resultFor): (JSC::DFG::useKindFor): (WTF): * dfg/DFGFlushLivenessAnalysisPhase.cpp: Added. (DFG): (FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::run): (JSC::DFG::FlushLivenessAnalysisPhase::process): (JSC::DFG::FlushLivenessAnalysisPhase::setForNode): (JSC::DFG::FlushLivenessAnalysisPhase::flushFormat): (JSC::DFG::performFlushLivenessAnalysis): * dfg/DFGFlushLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): (JSC::DFG::Graph::dumpBlockHeader): (DFG): (JSC::DFG::Graph::addForDepthFirstSort): (JSC::DFG::Graph::getBlocksInDepthFirstOrder): * dfg/DFGGraph.h: (JSC::DFG::Graph::convertToConstant): (JSC::DFG::Graph::valueProfileFor): (Graph): * dfg/DFGInsertionSet.h: (DFG): (JSC::DFG::InsertionSet::execute): * dfg/DFGLivenessAnalysisPhase.cpp: Added. (DFG): (LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::run): (JSC::DFG::LivenessAnalysisPhase::process): (JSC::DFG::LivenessAnalysisPhase::addChildUse): (JSC::DFG::performLivenessAnalysis): * dfg/DFGLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGNode.cpp: (JSC::DFG::Node::hasVariableAccessData): (DFG): * dfg/DFGNode.h: (DFG): (Node): (JSC::DFG::Node::hasLocal): (JSC::DFG::Node::variableAccessData): (JSC::DFG::Node::hasPhi): (JSC::DFG::Node::phi): (JSC::DFG::Node::takenBlock): (JSC::DFG::Node::notTakenBlock): (JSC::DFG::Node::successor): (JSC::DFG::Node::successorForCondition): (JSC::DFG::nodeComparator): (JSC::DFG::nodeListDump): (JSC::DFG::nodeMapDump): * dfg/DFGNodeFlags.cpp: (JSC::DFG::dumpNodeFlags): * dfg/DFGNodeType.h: (DFG): * dfg/DFGOSRAvailabilityAnalysisPhase.cpp: Added. (DFG): (OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::run): (JSC::DFG::performOSRAvailabilityAnalysis): * dfg/DFGOSRAvailabilityAnalysisPhase.h: Added. (DFG): * dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): * dfg/DFGPredictionInjectionPhase.cpp: (JSC::DFG::PredictionInjectionPhase::run): * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSSAConversionPhase.cpp: Added. (DFG): (SSAConversionPhase): (JSC::DFG::SSAConversionPhase::SSAConversionPhase): (JSC::DFG::SSAConversionPhase::run): (JSC::DFG::SSAConversionPhase::forwardPhiChildren): (JSC::DFG::SSAConversionPhase::forwardPhi): (JSC::DFG::SSAConversionPhase::forwardPhiEdge): (JSC::DFG::SSAConversionPhase::deduplicateChildren): (JSC::DFG::SSAConversionPhase::addFlushedLocalOp): (JSC::DFG::SSAConversionPhase::addFlushedLocalEdge): (JSC::DFG::performSSAConversion): * dfg/DFGSSAConversionPhase.h: Added. (DFG): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (Validate): (JSC::DFG::Validate::validateCPS): * dfg/DFGVariableAccessData.h: (JSC::DFG::VariableAccessData::flushFormat): (VariableAccessData): * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToLLVM.cpp: (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::lower): (JSC::FTL::LowerDFGToLLVM::createPhiVariables): (JSC::FTL::LowerDFGToLLVM::compileBlock): (JSC::FTL::LowerDFGToLLVM::compileNode): (JSC::FTL::LowerDFGToLLVM::compileUpsilon): (LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::compilePhi): (JSC::FTL::LowerDFGToLLVM::compileJSConstant): (JSC::FTL::LowerDFGToLLVM::compileWeakJSConstant): (JSC::FTL::LowerDFGToLLVM::compileGetArgument): (JSC::FTL::LowerDFGToLLVM::compileGetLocal): (JSC::FTL::LowerDFGToLLVM::compileSetLocal): (JSC::FTL::LowerDFGToLLVM::compileAdd): (JSC::FTL::LowerDFGToLLVM::compileArithSub): (JSC::FTL::LowerDFGToLLVM::compileArithMul): (JSC::FTL::LowerDFGToLLVM::compileArithDiv): (JSC::FTL::LowerDFGToLLVM::compileArithMod): (JSC::FTL::LowerDFGToLLVM::compileArithMinOrMax): (JSC::FTL::LowerDFGToLLVM::compileArithAbs): (JSC::FTL::LowerDFGToLLVM::compileArithNegate): (JSC::FTL::LowerDFGToLLVM::compileBitAnd): (JSC::FTL::LowerDFGToLLVM::compileBitOr): (JSC::FTL::LowerDFGToLLVM::compileBitXor): (JSC::FTL::LowerDFGToLLVM::compileBitRShift): (JSC::FTL::LowerDFGToLLVM::compileBitLShift): (JSC::FTL::LowerDFGToLLVM::compileBitURShift): (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber): (JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble): (JSC::FTL::LowerDFGToLLVM::compileGetButterfly): (JSC::FTL::LowerDFGToLLVM::compileGetArrayLength): (JSC::FTL::LowerDFGToLLVM::compileGetByVal): (JSC::FTL::LowerDFGToLLVM::compileGetByOffset): (JSC::FTL::LowerDFGToLLVM::compileGetGlobalVar): (JSC::FTL::LowerDFGToLLVM::compileCompareEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareLess): (JSC::FTL::LowerDFGToLLVM::compileCompareLessEq): (JSC::FTL::LowerDFGToLLVM::compileCompareGreater): (JSC::FTL::LowerDFGToLLVM::compileCompareGreaterEq): (JSC::FTL::LowerDFGToLLVM::compileLogicalNot): (JSC::FTL::LowerDFGToLLVM::speculateBackward): (JSC::FTL::LowerDFGToLLVM::lowInt32): (JSC::FTL::LowerDFGToLLVM::lowCell): (JSC::FTL::LowerDFGToLLVM::lowBoolean): (JSC::FTL::LowerDFGToLLVM::lowDouble): (JSC::FTL::LowerDFGToLLVM::lowJSValue): (JSC::FTL::LowerDFGToLLVM::lowStorage): (JSC::FTL::LowerDFGToLLVM::speculate): (JSC::FTL::LowerDFGToLLVM::speculateBoolean): (JSC::FTL::LowerDFGToLLVM::isLive): (JSC::FTL::LowerDFGToLLVM::use): (JSC::FTL::LowerDFGToLLVM::initializeOSRExitStateForBlock): (JSC::FTL::LowerDFGToLLVM::appendOSRExit): (JSC::FTL::LowerDFGToLLVM::emitOSRExitCall): (JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode): (JSC::FTL::LowerDFGToLLVM::linkOSRExitsAndCompleteInitializationBlocks): (JSC::FTL::LowerDFGToLLVM::setInt32): (JSC::FTL::LowerDFGToLLVM::setJSValue): (JSC::FTL::LowerDFGToLLVM::setBoolean): (JSC::FTL::LowerDFGToLLVM::setStorage): (JSC::FTL::LowerDFGToLLVM::setDouble): (JSC::FTL::LowerDFGToLLVM::isValid): * ftl/FTLLoweredNodeValue.h: Added. (FTL): (LoweredNodeValue): (JSC::FTL::LoweredNodeValue::LoweredNodeValue): (JSC::FTL::LoweredNodeValue::isSet): (JSC::FTL::LoweredNodeValue::operator!): (JSC::FTL::LoweredNodeValue::value): (JSC::FTL::LoweredNodeValue::block): * ftl/FTLValueFromBlock.h: (JSC::FTL::ValueFromBlock::ValueFromBlock): (ValueFromBlock): * ftl/FTLValueSource.cpp: (JSC::FTL::ValueSource::dump): * ftl/FTLValueSource.h: Source/WTF: Reviewed by Mark Hahnenberg. - Extend variadicity of PrintStream and dataLog. - Give HashSet the ability to add a span of things. - Give HashSet the ability to == another HashSet. - Note FIXME's in HashTable concerning copying performance, that affects the way that the DFG now uses HashSets and HashMaps. - Factor out the bulk-insertion logic of JSC::DFG::InsertionSet into WTF::Insertion, so that it can be used in more places. - Create a dumper for lists and maps. * WTF.xcodeproj/project.pbxproj: * wtf/DataLog.h: (WTF): (WTF::dataLog): * wtf/HashSet.h: (HashSet): (WTF): (WTF::::add): (WTF::=): * wtf/HashTable.h: (WTF::::HashTable): (WTF::=): * wtf/Insertion.h: Added. (WTF): (Insertion): (WTF::Insertion::Insertion): (WTF::Insertion::index): (WTF::Insertion::element): (WTF::Insertion::operator<): (WTF::executeInsertions): * wtf/ListDump.h: Added. (WTF): (ListDump): (WTF::ListDump::ListDump): (WTF::ListDump::dump): (MapDump): (WTF::MapDump::MapDump): (WTF::MapDump::dump): (WTF::listDump): (WTF::sortedListDump): (WTF::lessThan): (WTF::mapDump): (WTF::sortedMapDump): * wtf/PrintStream.h: (PrintStream): (WTF::PrintStream::print): Conflicts: Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj Canonical link: https://commits.webkit.org/137058@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-07-25 04:04:45 +00:00
namespace WTF {
template<typename T>
class Insertion {
[WTF][JSC] Make JSC and WTF aggressively-fast-malloced https://bugs.webkit.org/show_bug.cgi?id=200611 Reviewed by Saam Barati. Source/JavaScriptCore: This patch aggressively puts many classes into FastMalloc. In JSC side, we grep `std::make_unique` etc. to find potentially system-malloc-allocated classes. After this patch, all the JSC related allocations in JetStream2 cli is done from bmalloc. In the future, it would be nice that we add `WTF::makeUnique<T>` helper function and throw a compile error if `T` is not FastMalloc annotated[1]. Putting WebKit classes in FastMalloc has many benefits. 1. Simply, it is fast. 2. vmmap can tell the amount of memory used for WebKit. 3. bmalloc can isolate WebKit memory allocation from the rest of the world. This is useful since we can know more about what component is corrupting the memory from the memory corruption crash. [1]: https://bugs.webkit.org/show_bug.cgi?id=200620 * API/ObjCCallbackFunction.mm: * assembler/AbstractMacroAssembler.h: * b3/B3PhiChildren.h: * b3/air/AirAllocateRegistersAndStackAndGenerateCode.h: * b3/air/AirDisassembler.h: * bytecode/AccessCaseSnippetParams.h: * bytecode/CallVariant.h: * bytecode/DeferredSourceDump.h: * bytecode/ExecutionCounter.h: * bytecode/GetByIdStatus.h: * bytecode/GetByIdVariant.h: * bytecode/InByIdStatus.h: * bytecode/InByIdVariant.h: * bytecode/InstanceOfStatus.h: * bytecode/InstanceOfVariant.h: * bytecode/PutByIdStatus.h: * bytecode/PutByIdVariant.h: * bytecode/ValueProfile.h: * dfg/DFGAbstractInterpreter.h: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::newVariableAccessData): * dfg/DFGFlowIndexing.h: * dfg/DFGFlowMap.h: * dfg/DFGLiveCatchVariablePreservationPhase.cpp: (JSC::DFG::LiveCatchVariablePreservationPhase::newVariableAccessData): * dfg/DFGMaximalFlushInsertionPhase.cpp: (JSC::DFG::MaximalFlushInsertionPhase::newVariableAccessData): * dfg/DFGOSRExit.h: * dfg/DFGSpeculativeJIT.h: * dfg/DFGVariableAccessData.h: * disassembler/ARM64/A64DOpcode.h: * inspector/remote/socket/RemoteInspectorMessageParser.h: * inspector/remote/socket/RemoteInspectorSocket.h: * inspector/remote/socket/RemoteInspectorSocketEndpoint.h: * jit/PCToCodeOriginMap.h: * runtime/BasicBlockLocation.h: * runtime/DoublePredictionFuzzerAgent.h: * runtime/JSRunLoopTimer.h: * runtime/PromiseDeferredTimer.h: (JSC::PromiseDeferredTimer::create): PromiseDeferredTimer should be allocated as `Ref<>` instead of `std::unique_ptr` since it is inheriting ThreadSafeRefCounted<>. Holding such a class with std::unique_ptr could lead to potentially dangerous operations (like, someone holds it with Ref<> while it is deleted by std::unique_ptr<>). * runtime/RandomizingFuzzerAgent.h: * runtime/SymbolTable.h: * runtime/VM.cpp: (JSC::VM::VM): * runtime/VM.h: * tools/JSDollarVM.cpp: * tools/SigillCrashAnalyzer.cpp: * wasm/WasmFormat.h: * wasm/WasmMemory.cpp: * wasm/WasmSignature.h: * yarr/YarrJIT.h: Source/WebCore: Changed the accessor since we changed std::unique_ptr to Ref for this field. No behavior change. * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::addTimerSetNotification): (WebCore::WorkerScriptController::removeTimerSetNotification): Source/WTF: WTF has many data structures, in particular, containers. And these containers can be allocated like `std::make_unique<Container>()`. Without WTF_MAKE_FAST_ALLOCATED, this container itself is allocated from the system malloc. This patch attaches WTF_MAKE_FAST_ALLOCATED more aggressively not to allocate them from the system malloc. And we add some `final` to containers and classes that would be never inherited. * wtf/Assertions.cpp: * wtf/Atomics.h: * wtf/AutodrainedPool.h: * wtf/Bag.h: (WTF::Bag::Bag): Deleted. (WTF::Bag::~Bag): Deleted. (WTF::Bag::clear): Deleted. (WTF::Bag::add): Deleted. (WTF::Bag::iterator::iterator): Deleted. (WTF::Bag::iterator::operator! const): Deleted. (WTF::Bag::iterator::operator* const): Deleted. (WTF::Bag::iterator::operator++): Deleted. (WTF::Bag::iterator::operator== const): Deleted. (WTF::Bag::iterator::operator!= const): Deleted. (WTF::Bag::begin): Deleted. (WTF::Bag::begin const): Deleted. (WTF::Bag::end const): Deleted. (WTF::Bag::isEmpty const): Deleted. (WTF::Bag::unwrappedHead const): Deleted. * wtf/BitVector.h: (WTF::BitVector::BitVector): Deleted. (WTF::BitVector::~BitVector): Deleted. (WTF::BitVector::operator=): Deleted. (WTF::BitVector::size const): Deleted. (WTF::BitVector::ensureSize): Deleted. (WTF::BitVector::quickGet const): Deleted. (WTF::BitVector::quickSet): Deleted. (WTF::BitVector::quickClear): Deleted. (WTF::BitVector::get const): Deleted. (WTF::BitVector::contains const): Deleted. (WTF::BitVector::set): Deleted. (WTF::BitVector::add): Deleted. (WTF::BitVector::ensureSizeAndSet): Deleted. (WTF::BitVector::clear): Deleted. (WTF::BitVector::remove): Deleted. (WTF::BitVector::merge): Deleted. (WTF::BitVector::filter): Deleted. (WTF::BitVector::exclude): Deleted. (WTF::BitVector::bitCount const): Deleted. (WTF::BitVector::isEmpty const): Deleted. (WTF::BitVector::findBit const): Deleted. (WTF::BitVector::isEmptyValue const): Deleted. (WTF::BitVector::isDeletedValue const): Deleted. (WTF::BitVector::isEmptyOrDeletedValue const): Deleted. (WTF::BitVector::operator== const): Deleted. (WTF::BitVector::hash const): Deleted. (WTF::BitVector::iterator::iterator): Deleted. (WTF::BitVector::iterator::operator* const): Deleted. (WTF::BitVector::iterator::operator++): Deleted. (WTF::BitVector::iterator::isAtEnd const): Deleted. (WTF::BitVector::iterator::operator== const): Deleted. (WTF::BitVector::iterator::operator!= const): Deleted. (WTF::BitVector::begin const): Deleted. (WTF::BitVector::end const): Deleted. (WTF::BitVector::bitsInPointer): Deleted. (WTF::BitVector::maxInlineBits): Deleted. (WTF::BitVector::byteCount): Deleted. (WTF::BitVector::makeInlineBits): Deleted. (WTF::BitVector::cleanseInlineBits): Deleted. (WTF::BitVector::bitCount): Deleted. (WTF::BitVector::findBitFast const): Deleted. (WTF::BitVector::findBitSimple const): Deleted. (WTF::BitVector::OutOfLineBits::numBits const): Deleted. (WTF::BitVector::OutOfLineBits::numWords const): Deleted. (WTF::BitVector::OutOfLineBits::bits): Deleted. (WTF::BitVector::OutOfLineBits::bits const): Deleted. (WTF::BitVector::OutOfLineBits::OutOfLineBits): Deleted. (WTF::BitVector::isInline const): Deleted. (WTF::BitVector::outOfLineBits const): Deleted. (WTF::BitVector::outOfLineBits): Deleted. (WTF::BitVector::bits): Deleted. (WTF::BitVector::bits const): Deleted. * wtf/Bitmap.h: (WTF::Bitmap::size): Deleted. (WTF::Bitmap::iterator::iterator): Deleted. (WTF::Bitmap::iterator::operator* const): Deleted. (WTF::Bitmap::iterator::operator++): Deleted. (WTF::Bitmap::iterator::operator== const): Deleted. (WTF::Bitmap::iterator::operator!= const): Deleted. (WTF::Bitmap::begin const): Deleted. (WTF::Bitmap::end const): Deleted. * wtf/Box.h: * wtf/BumpPointerAllocator.h: * wtf/CPUTime.h: * wtf/CheckedBoolean.h: * wtf/CommaPrinter.h: (WTF::CommaPrinter::CommaPrinter): Deleted. (WTF::CommaPrinter::dump const): Deleted. (WTF::CommaPrinter::didPrint const): Deleted. * wtf/CompactPointerTuple.h: (WTF::CompactPointerTuple::encodeType): Deleted. (WTF::CompactPointerTuple::decodeType): Deleted. (WTF::CompactPointerTuple::CompactPointerTuple): Deleted. (WTF::CompactPointerTuple::pointer const): Deleted. (WTF::CompactPointerTuple::setPointer): Deleted. (WTF::CompactPointerTuple::type const): Deleted. (WTF::CompactPointerTuple::setType): Deleted. * wtf/CompilationThread.h: (WTF::CompilationScope::CompilationScope): Deleted. (WTF::CompilationScope::~CompilationScope): Deleted. (WTF::CompilationScope::leaveEarly): Deleted. * wtf/CompletionHandler.h: (WTF::CompletionHandler<Out): (WTF::Detail::CallableWrapper<CompletionHandler<Out): (WTF::CompletionHandlerCallingScope::CompletionHandlerCallingScope): Deleted. (WTF::CompletionHandlerCallingScope::~CompletionHandlerCallingScope): Deleted. (WTF::CompletionHandlerCallingScope::CompletionHandler<void): Deleted. * wtf/ConcurrentBuffer.h: (WTF::ConcurrentBuffer::ConcurrentBuffer): Deleted. (WTF::ConcurrentBuffer::~ConcurrentBuffer): Deleted. (WTF::ConcurrentBuffer::growExact): Deleted. (WTF::ConcurrentBuffer::grow): Deleted. (WTF::ConcurrentBuffer::array const): Deleted. (WTF::ConcurrentBuffer::operator[]): Deleted. (WTF::ConcurrentBuffer::operator[] const): Deleted. (WTF::ConcurrentBuffer::createArray): Deleted. * wtf/ConcurrentPtrHashSet.h: (WTF::ConcurrentPtrHashSet::contains): Deleted. (WTF::ConcurrentPtrHashSet::add): Deleted. (WTF::ConcurrentPtrHashSet::size const): Deleted. (WTF::ConcurrentPtrHashSet::Table::maxLoad const): Deleted. (WTF::ConcurrentPtrHashSet::hash): Deleted. (WTF::ConcurrentPtrHashSet::cast): Deleted. (WTF::ConcurrentPtrHashSet::containsImpl const): Deleted. (WTF::ConcurrentPtrHashSet::addImpl): Deleted. * wtf/ConcurrentVector.h: (WTF::ConcurrentVector::~ConcurrentVector): Deleted. (WTF::ConcurrentVector::size const): Deleted. (WTF::ConcurrentVector::isEmpty const): Deleted. (WTF::ConcurrentVector::at): Deleted. (WTF::ConcurrentVector::at const): Deleted. (WTF::ConcurrentVector::operator[]): Deleted. (WTF::ConcurrentVector::operator[] const): Deleted. (WTF::ConcurrentVector::first): Deleted. (WTF::ConcurrentVector::first const): Deleted. (WTF::ConcurrentVector::last): Deleted. (WTF::ConcurrentVector::last const): Deleted. (WTF::ConcurrentVector::takeLast): Deleted. (WTF::ConcurrentVector::append): Deleted. (WTF::ConcurrentVector::alloc): Deleted. (WTF::ConcurrentVector::removeLast): Deleted. (WTF::ConcurrentVector::grow): Deleted. (WTF::ConcurrentVector::begin): Deleted. (WTF::ConcurrentVector::end): Deleted. (WTF::ConcurrentVector::segmentExistsFor): Deleted. (WTF::ConcurrentVector::segmentFor): Deleted. (WTF::ConcurrentVector::subscriptFor): Deleted. (WTF::ConcurrentVector::ensureSegmentsFor): Deleted. (WTF::ConcurrentVector::ensureSegment): Deleted. (WTF::ConcurrentVector::allocateSegment): Deleted. * wtf/Condition.h: (WTF::Condition::waitUntil): Deleted. (WTF::Condition::waitFor): Deleted. (WTF::Condition::wait): Deleted. (WTF::Condition::notifyOne): Deleted. (WTF::Condition::notifyAll): Deleted. * wtf/CountingLock.h: (WTF::CountingLock::LockHooks::lockHook): Deleted. (WTF::CountingLock::LockHooks::unlockHook): Deleted. (WTF::CountingLock::LockHooks::parkHook): Deleted. (WTF::CountingLock::LockHooks::handoffHook): Deleted. (WTF::CountingLock::tryLock): Deleted. (WTF::CountingLock::lock): Deleted. (WTF::CountingLock::unlock): Deleted. (WTF::CountingLock::isHeld const): Deleted. (WTF::CountingLock::isLocked const): Deleted. (WTF::CountingLock::Count::operator bool const): Deleted. (WTF::CountingLock::Count::operator== const): Deleted. (WTF::CountingLock::Count::operator!= const): Deleted. (WTF::CountingLock::tryOptimisticRead): Deleted. (WTF::CountingLock::validate): Deleted. (WTF::CountingLock::doOptimizedRead): Deleted. (WTF::CountingLock::tryOptimisticFencelessRead): Deleted. (WTF::CountingLock::fencelessValidate): Deleted. (WTF::CountingLock::doOptimizedFencelessRead): Deleted. (WTF::CountingLock::getCount): Deleted. * wtf/CrossThreadQueue.h: * wtf/CrossThreadTask.h: * wtf/CryptographicallyRandomNumber.cpp: * wtf/DataMutex.h: * wtf/DateMath.h: * wtf/Deque.h: (WTF::Deque::size const): Deleted. (WTF::Deque::isEmpty const): Deleted. (WTF::Deque::begin): Deleted. (WTF::Deque::end): Deleted. (WTF::Deque::begin const): Deleted. (WTF::Deque::end const): Deleted. (WTF::Deque::rbegin): Deleted. (WTF::Deque::rend): Deleted. (WTF::Deque::rbegin const): Deleted. (WTF::Deque::rend const): Deleted. (WTF::Deque::first): Deleted. (WTF::Deque::first const): Deleted. (WTF::Deque::last): Deleted. (WTF::Deque::last const): Deleted. (WTF::Deque::append): Deleted. * wtf/Dominators.h: * wtf/DoublyLinkedList.h: * wtf/Expected.h: * wtf/FastBitVector.h: * wtf/FileMetadata.h: * wtf/FileSystem.h: * wtf/GraphNodeWorklist.h: * wtf/GregorianDateTime.h: (WTF::GregorianDateTime::GregorianDateTime): Deleted. (WTF::GregorianDateTime::year const): Deleted. (WTF::GregorianDateTime::month const): Deleted. (WTF::GregorianDateTime::yearDay const): Deleted. (WTF::GregorianDateTime::monthDay const): Deleted. (WTF::GregorianDateTime::weekDay const): Deleted. (WTF::GregorianDateTime::hour const): Deleted. (WTF::GregorianDateTime::minute const): Deleted. (WTF::GregorianDateTime::second const): Deleted. (WTF::GregorianDateTime::utcOffset const): Deleted. (WTF::GregorianDateTime::isDST const): Deleted. (WTF::GregorianDateTime::setYear): Deleted. (WTF::GregorianDateTime::setMonth): Deleted. (WTF::GregorianDateTime::setYearDay): Deleted. (WTF::GregorianDateTime::setMonthDay): Deleted. (WTF::GregorianDateTime::setWeekDay): Deleted. (WTF::GregorianDateTime::setHour): Deleted. (WTF::GregorianDateTime::setMinute): Deleted. (WTF::GregorianDateTime::setSecond): Deleted. (WTF::GregorianDateTime::setUtcOffset): Deleted. (WTF::GregorianDateTime::setIsDST): Deleted. (WTF::GregorianDateTime::operator tm const): Deleted. (WTF::GregorianDateTime::copyFrom): Deleted. * wtf/HashTable.h: * wtf/Hasher.h: * wtf/HexNumber.h: * wtf/Indenter.h: * wtf/IndexMap.h: * wtf/IndexSet.h: * wtf/IndexSparseSet.h: * wtf/IndexedContainerIterator.h: * wtf/Insertion.h: * wtf/IteratorAdaptors.h: * wtf/IteratorRange.h: * wtf/KeyValuePair.h: * wtf/ListHashSet.h: (WTF::ListHashSet::begin): Deleted. (WTF::ListHashSet::end): Deleted. (WTF::ListHashSet::begin const): Deleted. (WTF::ListHashSet::end const): Deleted. (WTF::ListHashSet::random): Deleted. (WTF::ListHashSet::random const): Deleted. (WTF::ListHashSet::rbegin): Deleted. (WTF::ListHashSet::rend): Deleted. (WTF::ListHashSet::rbegin const): Deleted. (WTF::ListHashSet::rend const): Deleted. * wtf/Liveness.h: * wtf/LocklessBag.h: (WTF::LocklessBag::LocklessBag): Deleted. (WTF::LocklessBag::add): Deleted. (WTF::LocklessBag::iterate): Deleted. (WTF::LocklessBag::consumeAll): Deleted. (WTF::LocklessBag::consumeAllWithNode): Deleted. (WTF::LocklessBag::~LocklessBag): Deleted. * wtf/LoggingHashID.h: * wtf/MD5.h: * wtf/MachSendRight.h: * wtf/MainThreadData.h: * wtf/Markable.h: * wtf/MediaTime.h: * wtf/MemoryPressureHandler.h: * wtf/MessageQueue.h: (WTF::MessageQueue::MessageQueue): Deleted. * wtf/MetaAllocator.h: * wtf/MonotonicTime.h: (WTF::MonotonicTime::MonotonicTime): Deleted. (WTF::MonotonicTime::fromRawSeconds): Deleted. (WTF::MonotonicTime::infinity): Deleted. (WTF::MonotonicTime::nan): Deleted. (WTF::MonotonicTime::secondsSinceEpoch const): Deleted. (WTF::MonotonicTime::approximateMonotonicTime const): Deleted. (WTF::MonotonicTime::operator bool const): Deleted. (WTF::MonotonicTime::operator+ const): Deleted. (WTF::MonotonicTime::operator- const): Deleted. (WTF::MonotonicTime::operator% const): Deleted. (WTF::MonotonicTime::operator+=): Deleted. (WTF::MonotonicTime::operator-=): Deleted. (WTF::MonotonicTime::operator== const): Deleted. (WTF::MonotonicTime::operator!= const): Deleted. (WTF::MonotonicTime::operator< const): Deleted. (WTF::MonotonicTime::operator> const): Deleted. (WTF::MonotonicTime::operator<= const): Deleted. (WTF::MonotonicTime::operator>= const): Deleted. (WTF::MonotonicTime::isolatedCopy const): Deleted. (WTF::MonotonicTime::encode const): Deleted. (WTF::MonotonicTime::decode): Deleted. * wtf/NaturalLoops.h: * wtf/NoLock.h: * wtf/OSAllocator.h: * wtf/OptionSet.h: * wtf/Optional.h: * wtf/OrderMaker.h: * wtf/Packed.h: (WTF::alignof): * wtf/PackedIntVector.h: (WTF::PackedIntVector::PackedIntVector): Deleted. (WTF::PackedIntVector::operator=): Deleted. (WTF::PackedIntVector::size const): Deleted. (WTF::PackedIntVector::ensureSize): Deleted. (WTF::PackedIntVector::resize): Deleted. (WTF::PackedIntVector::clearAll): Deleted. (WTF::PackedIntVector::get const): Deleted. (WTF::PackedIntVector::set): Deleted. (WTF::PackedIntVector::mask): Deleted. * wtf/PageBlock.h: * wtf/ParallelJobsOpenMP.h: * wtf/ParkingLot.h: * wtf/PriorityQueue.h: (WTF::PriorityQueue::size const): Deleted. (WTF::PriorityQueue::isEmpty const): Deleted. (WTF::PriorityQueue::enqueue): Deleted. (WTF::PriorityQueue::peek const): Deleted. (WTF::PriorityQueue::dequeue): Deleted. (WTF::PriorityQueue::decreaseKey): Deleted. (WTF::PriorityQueue::increaseKey): Deleted. (WTF::PriorityQueue::begin const): Deleted. (WTF::PriorityQueue::end const): Deleted. (WTF::PriorityQueue::isValidHeap const): Deleted. (WTF::PriorityQueue::parentOf): Deleted. (WTF::PriorityQueue::leftChildOf): Deleted. (WTF::PriorityQueue::rightChildOf): Deleted. (WTF::PriorityQueue::siftUp): Deleted. (WTF::PriorityQueue::siftDown): Deleted. * wtf/RandomDevice.h: * wtf/Range.h: * wtf/RangeSet.h: (WTF::RangeSet::RangeSet): Deleted. (WTF::RangeSet::~RangeSet): Deleted. (WTF::RangeSet::add): Deleted. (WTF::RangeSet::contains const): Deleted. (WTF::RangeSet::overlaps const): Deleted. (WTF::RangeSet::clear): Deleted. (WTF::RangeSet::dump const): Deleted. (WTF::RangeSet::dumpRaw const): Deleted. (WTF::RangeSet::begin const): Deleted. (WTF::RangeSet::end const): Deleted. (WTF::RangeSet::addAll): Deleted. (WTF::RangeSet::compact): Deleted. (WTF::RangeSet::overlapsNonEmpty): Deleted. (WTF::RangeSet::subsumesNonEmpty): Deleted. (WTF::RangeSet::findRange const): Deleted. * wtf/RecursableLambda.h: * wtf/RedBlackTree.h: (WTF::RedBlackTree::Node::successor const): Deleted. (WTF::RedBlackTree::Node::predecessor const): Deleted. (WTF::RedBlackTree::Node::successor): Deleted. (WTF::RedBlackTree::Node::predecessor): Deleted. (WTF::RedBlackTree::Node::reset): Deleted. (WTF::RedBlackTree::Node::parent const): Deleted. (WTF::RedBlackTree::Node::setParent): Deleted. (WTF::RedBlackTree::Node::left const): Deleted. (WTF::RedBlackTree::Node::setLeft): Deleted. (WTF::RedBlackTree::Node::right const): Deleted. (WTF::RedBlackTree::Node::setRight): Deleted. (WTF::RedBlackTree::Node::color const): Deleted. (WTF::RedBlackTree::Node::setColor): Deleted. (WTF::RedBlackTree::RedBlackTree): Deleted. (WTF::RedBlackTree::insert): Deleted. (WTF::RedBlackTree::remove): Deleted. (WTF::RedBlackTree::findExact const): Deleted. (WTF::RedBlackTree::findLeastGreaterThanOrEqual const): Deleted. (WTF::RedBlackTree::findGreatestLessThanOrEqual const): Deleted. (WTF::RedBlackTree::first const): Deleted. (WTF::RedBlackTree::last const): Deleted. (WTF::RedBlackTree::size): Deleted. (WTF::RedBlackTree::isEmpty): Deleted. (WTF::RedBlackTree::treeMinimum): Deleted. (WTF::RedBlackTree::treeMaximum): Deleted. (WTF::RedBlackTree::treeInsert): Deleted. (WTF::RedBlackTree::leftRotate): Deleted. (WTF::RedBlackTree::rightRotate): Deleted. (WTF::RedBlackTree::removeFixup): Deleted. * wtf/ResourceUsage.h: * wtf/RunLoop.cpp: * wtf/RunLoopTimer.h: * wtf/SHA1.h: * wtf/Seconds.h: (WTF::Seconds::Seconds): Deleted. (WTF::Seconds::value const): Deleted. (WTF::Seconds::minutes const): Deleted. (WTF::Seconds::seconds const): Deleted. (WTF::Seconds::milliseconds const): Deleted. (WTF::Seconds::microseconds const): Deleted. (WTF::Seconds::nanoseconds const): Deleted. (WTF::Seconds::minutesAs const): Deleted. (WTF::Seconds::secondsAs const): Deleted. (WTF::Seconds::millisecondsAs const): Deleted. (WTF::Seconds::microsecondsAs const): Deleted. (WTF::Seconds::nanosecondsAs const): Deleted. (WTF::Seconds::fromMinutes): Deleted. (WTF::Seconds::fromHours): Deleted. (WTF::Seconds::fromMilliseconds): Deleted. (WTF::Seconds::fromMicroseconds): Deleted. (WTF::Seconds::fromNanoseconds): Deleted. (WTF::Seconds::infinity): Deleted. (WTF::Seconds::nan): Deleted. (WTF::Seconds::operator bool const): Deleted. (WTF::Seconds::operator+ const): Deleted. (WTF::Seconds::operator- const): Deleted. (WTF::Seconds::operator* const): Deleted. (WTF::Seconds::operator/ const): Deleted. (WTF::Seconds::operator% const): Deleted. (WTF::Seconds::operator+=): Deleted. (WTF::Seconds::operator-=): Deleted. (WTF::Seconds::operator*=): Deleted. (WTF::Seconds::operator/=): Deleted. (WTF::Seconds::operator%=): Deleted. (WTF::Seconds::operator== const): Deleted. (WTF::Seconds::operator!= const): Deleted. (WTF::Seconds::operator< const): Deleted. (WTF::Seconds::operator> const): Deleted. (WTF::Seconds::operator<= const): Deleted. (WTF::Seconds::operator>= const): Deleted. (WTF::Seconds::isolatedCopy const): Deleted. (WTF::Seconds::encode const): Deleted. (WTF::Seconds::decode): Deleted. * wtf/SegmentedVector.h: (WTF::SegmentedVector::~SegmentedVector): Deleted. (WTF::SegmentedVector::size const): Deleted. (WTF::SegmentedVector::isEmpty const): Deleted. (WTF::SegmentedVector::at): Deleted. (WTF::SegmentedVector::at const): Deleted. (WTF::SegmentedVector::operator[]): Deleted. (WTF::SegmentedVector::operator[] const): Deleted. (WTF::SegmentedVector::first): Deleted. (WTF::SegmentedVector::first const): Deleted. (WTF::SegmentedVector::last): Deleted. (WTF::SegmentedVector::last const): Deleted. (WTF::SegmentedVector::takeLast): Deleted. (WTF::SegmentedVector::append): Deleted. (WTF::SegmentedVector::alloc): Deleted. (WTF::SegmentedVector::removeLast): Deleted. (WTF::SegmentedVector::grow): Deleted. (WTF::SegmentedVector::clear): Deleted. (WTF::SegmentedVector::begin): Deleted. (WTF::SegmentedVector::end): Deleted. (WTF::SegmentedVector::shrinkToFit): Deleted. (WTF::SegmentedVector::deleteAllSegments): Deleted. (WTF::SegmentedVector::segmentExistsFor): Deleted. (WTF::SegmentedVector::segmentFor): Deleted. (WTF::SegmentedVector::subscriptFor): Deleted. (WTF::SegmentedVector::ensureSegmentsFor): Deleted. (WTF::SegmentedVector::ensureSegment): Deleted. (WTF::SegmentedVector::allocateSegment): Deleted. * wtf/SetForScope.h: * wtf/SingleRootGraph.h: * wtf/SinglyLinkedList.h: * wtf/SmallPtrSet.h: * wtf/SpanningTree.h: * wtf/Spectrum.h: * wtf/StackBounds.h: * wtf/StackShot.h: * wtf/StackShotProfiler.h: * wtf/StackStats.h: * wtf/StackTrace.h: * wtf/StreamBuffer.h: * wtf/SynchronizedFixedQueue.h: (WTF::SynchronizedFixedQueue::create): Deleted. (WTF::SynchronizedFixedQueue::open): Deleted. (WTF::SynchronizedFixedQueue::close): Deleted. (WTF::SynchronizedFixedQueue::isOpen): Deleted. (WTF::SynchronizedFixedQueue::enqueue): Deleted. (WTF::SynchronizedFixedQueue::dequeue): Deleted. (WTF::SynchronizedFixedQueue::SynchronizedFixedQueue): Deleted. * wtf/SystemTracing.h: * wtf/ThreadGroup.h: (WTF::ThreadGroup::create): Deleted. (WTF::ThreadGroup::threads const): Deleted. (WTF::ThreadGroup::getLock): Deleted. (WTF::ThreadGroup::weakFromThis): Deleted. * wtf/ThreadSpecific.h: * wtf/ThreadingPrimitives.h: (WTF::Mutex::impl): Deleted. * wtf/TimeWithDynamicClockType.h: (WTF::TimeWithDynamicClockType::TimeWithDynamicClockType): Deleted. (WTF::TimeWithDynamicClockType::fromRawSeconds): Deleted. (WTF::TimeWithDynamicClockType::secondsSinceEpoch const): Deleted. (WTF::TimeWithDynamicClockType::clockType const): Deleted. (WTF::TimeWithDynamicClockType::withSameClockAndRawSeconds const): Deleted. (WTF::TimeWithDynamicClockType::operator bool const): Deleted. (WTF::TimeWithDynamicClockType::operator+ const): Deleted. (WTF::TimeWithDynamicClockType::operator- const): Deleted. (WTF::TimeWithDynamicClockType::operator+=): Deleted. (WTF::TimeWithDynamicClockType::operator-=): Deleted. (WTF::TimeWithDynamicClockType::operator== const): Deleted. (WTF::TimeWithDynamicClockType::operator!= const): Deleted. * wtf/TimingScope.h: * wtf/TinyLRUCache.h: * wtf/TinyPtrSet.h: * wtf/URLParser.cpp: * wtf/URLParser.h: * wtf/Unexpected.h: * wtf/Variant.h: * wtf/WTFSemaphore.h: (WTF::Semaphore::Semaphore): Deleted. (WTF::Semaphore::signal): Deleted. (WTF::Semaphore::waitUntil): Deleted. (WTF::Semaphore::waitFor): Deleted. (WTF::Semaphore::wait): Deleted. * wtf/WallTime.h: (WTF::WallTime::WallTime): Deleted. (WTF::WallTime::fromRawSeconds): Deleted. (WTF::WallTime::infinity): Deleted. (WTF::WallTime::nan): Deleted. (WTF::WallTime::secondsSinceEpoch const): Deleted. (WTF::WallTime::approximateWallTime const): Deleted. (WTF::WallTime::operator bool const): Deleted. (WTF::WallTime::operator+ const): Deleted. (WTF::WallTime::operator- const): Deleted. (WTF::WallTime::operator+=): Deleted. (WTF::WallTime::operator-=): Deleted. (WTF::WallTime::operator== const): Deleted. (WTF::WallTime::operator!= const): Deleted. (WTF::WallTime::operator< const): Deleted. (WTF::WallTime::operator> const): Deleted. (WTF::WallTime::operator<= const): Deleted. (WTF::WallTime::operator>= const): Deleted. (WTF::WallTime::isolatedCopy const): Deleted. * wtf/WeakHashSet.h: (WTF::WeakHashSet::WeakHashSetConstIterator::WeakHashSetConstIterator): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::get const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator* const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator-> const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator++): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::skipEmptyBuckets): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator== const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator!= const): Deleted. (WTF::WeakHashSet::WeakHashSet): Deleted. (WTF::WeakHashSet::begin const): Deleted. (WTF::WeakHashSet::end const): Deleted. (WTF::WeakHashSet::add): Deleted. (WTF::WeakHashSet::remove): Deleted. (WTF::WeakHashSet::contains const): Deleted. (WTF::WeakHashSet::capacity const): Deleted. (WTF::WeakHashSet::computesEmpty const): Deleted. (WTF::WeakHashSet::hasNullReferences const): Deleted. (WTF::WeakHashSet::computeSize const): Deleted. (WTF::WeakHashSet::checkConsistency const): Deleted. * wtf/WeakRandom.h: (WTF::WeakRandom::WeakRandom): Deleted. (WTF::WeakRandom::setSeed): Deleted. (WTF::WeakRandom::seed const): Deleted. (WTF::WeakRandom::get): Deleted. (WTF::WeakRandom::getUint32): Deleted. (WTF::WeakRandom::lowOffset): Deleted. (WTF::WeakRandom::highOffset): Deleted. (WTF::WeakRandom::nextState): Deleted. (WTF::WeakRandom::generate): Deleted. (WTF::WeakRandom::advance): Deleted. * wtf/WordLock.h: (WTF::WordLock::lock): Deleted. (WTF::WordLock::unlock): Deleted. (WTF::WordLock::isHeld const): Deleted. (WTF::WordLock::isLocked const): Deleted. (WTF::WordLock::isFullyReset const): Deleted. * wtf/generic/MainThreadGeneric.cpp: * wtf/glib/GMutexLocker.h: * wtf/linux/CurrentProcessMemoryStatus.h: * wtf/posix/ThreadingPOSIX.cpp: (WTF::Semaphore::Semaphore): Deleted. (WTF::Semaphore::~Semaphore): Deleted. (WTF::Semaphore::wait): Deleted. (WTF::Semaphore::post): Deleted. * wtf/text/ASCIILiteral.h: (WTF::ASCIILiteral::operator const char* const): Deleted. (WTF::ASCIILiteral::fromLiteralUnsafe): Deleted. (WTF::ASCIILiteral::null): Deleted. (WTF::ASCIILiteral::characters const): Deleted. (WTF::ASCIILiteral::ASCIILiteral): Deleted. * wtf/text/AtomString.h: (WTF::AtomString::operator=): Deleted. (WTF::AtomString::isHashTableDeletedValue const): Deleted. (WTF::AtomString::existingHash const): Deleted. (WTF::AtomString::operator const String& const): Deleted. (WTF::AtomString::string const): Deleted. (WTF::AtomString::impl const): Deleted. (WTF::AtomString::is8Bit const): Deleted. (WTF::AtomString::characters8 const): Deleted. (WTF::AtomString::characters16 const): Deleted. (WTF::AtomString::length const): Deleted. (WTF::AtomString::operator[] const): Deleted. (WTF::AtomString::contains const): Deleted. (WTF::AtomString::containsIgnoringASCIICase const): Deleted. (WTF::AtomString::find const): Deleted. (WTF::AtomString::findIgnoringASCIICase const): Deleted. (WTF::AtomString::startsWith const): Deleted. (WTF::AtomString::startsWithIgnoringASCIICase const): Deleted. (WTF::AtomString::endsWith const): Deleted. (WTF::AtomString::endsWithIgnoringASCIICase const): Deleted. (WTF::AtomString::toInt const): Deleted. (WTF::AtomString::toDouble const): Deleted. (WTF::AtomString::toFloat const): Deleted. (WTF::AtomString::percentage const): Deleted. (WTF::AtomString::isNull const): Deleted. (WTF::AtomString::isEmpty const): Deleted. (WTF::AtomString::operator NSString * const): Deleted. * wtf/text/AtomStringImpl.h: (WTF::AtomStringImpl::lookUp): Deleted. (WTF::AtomStringImpl::add): Deleted. (WTF::AtomStringImpl::addWithStringTableProvider): Deleted. * wtf/text/CString.h: (WTF::CStringBuffer::data): Deleted. (WTF::CStringBuffer::length const): Deleted. (WTF::CStringBuffer::CStringBuffer): Deleted. (WTF::CStringBuffer::mutableData): Deleted. (WTF::CString::CString): Deleted. (WTF::CString::data const): Deleted. (WTF::CString::length const): Deleted. (WTF::CString::isNull const): Deleted. (WTF::CString::buffer const): Deleted. (WTF::CString::isHashTableDeletedValue const): Deleted. * wtf/text/ExternalStringImpl.h: (WTF::ExternalStringImpl::freeExternalBuffer): Deleted. * wtf/text/LineBreakIteratorPoolICU.h: * wtf/text/NullTextBreakIterator.h: * wtf/text/OrdinalNumber.h: * wtf/text/StringBuffer.h: * wtf/text/StringBuilder.h: * wtf/text/StringConcatenateNumbers.h: * wtf/text/StringHasher.h: * wtf/text/StringImpl.h: * wtf/text/StringView.cpp: * wtf/text/StringView.h: (WTF::StringView::left const): Deleted. (WTF::StringView::right const): Deleted. (WTF::StringView::underlyingStringIsValid const): Deleted. (WTF::StringView::setUnderlyingString): Deleted. * wtf/text/SymbolImpl.h: (WTF::SymbolImpl::StaticSymbolImpl::StaticSymbolImpl): Deleted. (WTF::SymbolImpl::StaticSymbolImpl::operator SymbolImpl&): Deleted. (WTF::PrivateSymbolImpl::PrivateSymbolImpl): Deleted. (WTF::RegisteredSymbolImpl::symbolRegistry const): Deleted. (WTF::RegisteredSymbolImpl::clearSymbolRegistry): Deleted. (WTF::RegisteredSymbolImpl::RegisteredSymbolImpl): Deleted. * wtf/text/SymbolRegistry.h: * wtf/text/TextBreakIterator.h: * wtf/text/TextPosition.h: * wtf/text/TextStream.h: * wtf/text/WTFString.h: (WTF::String::swap): Deleted. (WTF::String::adopt): Deleted. (WTF::String::isNull const): Deleted. (WTF::String::isEmpty const): Deleted. (WTF::String::impl const): Deleted. (WTF::String::releaseImpl): Deleted. (WTF::String::length const): Deleted. (WTF::String::characters8 const): Deleted. (WTF::String::characters16 const): Deleted. (WTF::String::is8Bit const): Deleted. (WTF::String::sizeInBytes const): Deleted. (WTF::String::operator[] const): Deleted. (WTF::String::find const): Deleted. (WTF::String::findIgnoringASCIICase const): Deleted. (WTF::String::reverseFind const): Deleted. (WTF::String::contains const): Deleted. (WTF::String::containsIgnoringASCIICase const): Deleted. (WTF::String::startsWith const): Deleted. (WTF::String::startsWithIgnoringASCIICase const): Deleted. (WTF::String::hasInfixStartingAt const): Deleted. (WTF::String::endsWith const): Deleted. (WTF::String::endsWithIgnoringASCIICase const): Deleted. (WTF::String::hasInfixEndingAt const): Deleted. (WTF::String::append): Deleted. (WTF::String::left const): Deleted. (WTF::String::right const): Deleted. (WTF::String::createUninitialized): Deleted. (WTF::String::fromUTF8WithLatin1Fallback): Deleted. (WTF::String::isAllASCII const): Deleted. (WTF::String::isAllLatin1 const): Deleted. (WTF::String::isSpecialCharacter const): Deleted. (WTF::String::isHashTableDeletedValue const): Deleted. (WTF::String::hash const): Deleted. (WTF::String::existingHash const): Deleted. * wtf/text/cf/TextBreakIteratorCF.h: * wtf/text/icu/TextBreakIteratorICU.h: * wtf/text/icu/UTextProviderLatin1.h: * wtf/threads/BinarySemaphore.h: (WTF::BinarySemaphore::waitFor): Deleted. (WTF::BinarySemaphore::wait): Deleted. * wtf/unicode/Collator.h: * wtf/win/GDIObject.h: * wtf/win/PathWalker.h: * wtf/win/Win32Handle.h: Canonical link: https://commits.webkit.org/214396@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-12 20:57:15 +00:00
WTF_MAKE_FAST_ALLOCATED;
fourthTier: DFG should have an SSA form for use by FTL https://bugs.webkit.org/show_bug.cgi?id=118338 Source/JavaScriptCore: Reviewed by Mark Hahnenberg. Adds an SSA form to the DFG. We can convert ThreadedCPS form into SSA form after breaking critical edges. The conversion algorithm follows Aycock and Horspool, and the SSA form itself follows something I've done before, where instead of having Phi functions specify input nodes corresponding to block predecessors, we instead have Upsilon functions in the predecessors that specify which value in that block goes into which subsequent Phi. Upsilons don't have to dominate Phis (usually they don't) and they correspond to a non-SSA "mov" into the Phi's "variable". This gives all of the good properties of SSA, while ensuring that a bunch of CFG transformations don't have to be SSA-aware. So far the only DFG phases that are SSA-aware are DCE and CFA. CFG simplification is probably SSA-aware by default, though I haven't tried it. Constant folding probably needs a few tweaks, but is likely ready. Ditto for CSE, though it's not clear that we'd want to use block-local CSE when we could be doing GVN. Currently only the FTL can generate code from the SSA form, and there is no way to convert from SSA to ThreadedCPS or LoadStore. There probably will never be such a capability. In order to handle OSR exit state in the SSA, we place MovHints at Phi points. Other than that, you can reconstruct state-at-exit by forward propagating MovHints. Note that MovHint is the new SetLocal in SSA. SetLocal and GetLocal only survive into SSA if they are on captured variables, or in the case of flushes. A "live SetLocal" will be NodeMustGenerate and will always correspond to a flush. Computing the state-at-exit requires running SSA liveness analysis, OSR availability analysis, and flush liveness analysis. The FTL runs all of these prior to generating code. While OSR exit continues to be tricky, much of the logic is now factored into separate phases and the backend has to do less work to reason about what happened outside of the basic block that is being lowered. Conversion from DFG SSA to LLVM SSA is done by ensuring that we generate code in depth-first order, thus guaranteeing that a node will always be lowered (and hence have a LValue) before any of the blocks dominated by that node's block have code generated. For Upsilon/Phi, we just use alloca's. We could do something more clever there, but it's probably not worth it, at least not now. Finally, while the SSA form is currently only being converted to LLVM IR, there is nothing that prevents us from considering other backends in the future - with the caveat that this form is designed to be first lowered to a lower-level SSA before actual machine code generation commences. So we ought to either use LLVM (the intended path) or we will have to write our own SSA low-level backend. This runs all of the code that the FTL was known to run previously. No change in performance for now. But it does open some exciting possibilities! * JavaScriptCore.xcodeproj/project.pbxproj: * bytecode/Operands.h: (JSC::OperandValueTraits::dump): (JSC::Operands::fill): (Operands): (JSC::Operands::clear): (JSC::Operands::operator==): * dfg/DFGAbstractState.cpp: (JSC::DFG::AbstractState::beginBasicBlock): (JSC::DFG::setLiveValues): (DFG): (JSC::DFG::AbstractState::initialize): (JSC::DFG::AbstractState::endBasicBlock): (JSC::DFG::AbstractState::executeEffects): (JSC::DFG::AbstractState::mergeStateAtTail): (JSC::DFG::AbstractState::merge): * dfg/DFGAbstractState.h: (AbstractState): * dfg/DFGAdjacencyList.h: (JSC::DFG::AdjacencyList::justOneChild): (AdjacencyList): * dfg/DFGBasicBlock.cpp: Added. (DFG): (JSC::DFG::BasicBlock::BasicBlock): (JSC::DFG::BasicBlock::~BasicBlock): (JSC::DFG::BasicBlock::ensureLocals): (JSC::DFG::BasicBlock::isInPhis): (JSC::DFG::BasicBlock::isInBlock): (JSC::DFG::BasicBlock::removePredecessor): (JSC::DFG::BasicBlock::replacePredecessor): (JSC::DFG::BasicBlock::dump): (JSC::DFG::BasicBlock::SSAData::SSAData): (JSC::DFG::BasicBlock::SSAData::~SSAData): * dfg/DFGBasicBlock.h: (BasicBlock): (JSC::DFG::BasicBlock::operator[]): (JSC::DFG::BasicBlock::successor): (JSC::DFG::BasicBlock::successorForCondition): (SSAData): * dfg/DFGBasicBlockInlines.h: (DFG): * dfg/DFGBlockInsertionSet.cpp: Added. (DFG): (JSC::DFG::BlockInsertionSet::BlockInsertionSet): (JSC::DFG::BlockInsertionSet::~BlockInsertionSet): (JSC::DFG::BlockInsertionSet::insert): (JSC::DFG::BlockInsertionSet::insertBefore): (JSC::DFG::BlockInsertionSet::execute): * dfg/DFGBlockInsertionSet.h: Added. (DFG): (BlockInsertionSet): * dfg/DFGCFAPhase.cpp: (JSC::DFG::CFAPhase::run): * dfg/DFGCFGSimplificationPhase.cpp: * dfg/DFGCPSRethreadingPhase.cpp: (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock): * dfg/DFGCommon.cpp: (WTF::printInternal): * dfg/DFGCommon.h: (JSC::DFG::doesKill): (DFG): (JSC::DFG::killStatusForDoesKill): * dfg/DFGConstantFoldingPhase.cpp: (JSC::DFG::ConstantFoldingPhase::foldConstants): (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter): * dfg/DFGCriticalEdgeBreakingPhase.cpp: Added. (DFG): (CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::run): (JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge): (JSC::DFG::performCriticalEdgeBreaking): * dfg/DFGCriticalEdgeBreakingPhase.h: Added. (DFG): * dfg/DFGDCEPhase.cpp: (JSC::DFG::DCEPhase::run): (JSC::DFG::DCEPhase::findTypeCheckRoot): (JSC::DFG::DCEPhase::countNode): (DCEPhase): (JSC::DFG::DCEPhase::countEdge): (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren): * dfg/DFGDriver.cpp: (JSC::DFG::compile): * dfg/DFGEdge.cpp: (JSC::DFG::Edge::dump): * dfg/DFGEdge.h: (JSC::DFG::Edge::Edge): (JSC::DFG::Edge::setNode): (JSC::DFG::Edge::useKindUnchecked): (JSC::DFG::Edge::setUseKind): (JSC::DFG::Edge::setProofStatus): (JSC::DFG::Edge::willNotHaveCheck): (JSC::DFG::Edge::willHaveCheck): (Edge): (JSC::DFG::Edge::killStatusUnchecked): (JSC::DFG::Edge::killStatus): (JSC::DFG::Edge::setKillStatus): (JSC::DFG::Edge::doesKill): (JSC::DFG::Edge::doesNotKill): (JSC::DFG::Edge::shift): (JSC::DFG::Edge::makeWord): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGFlushFormat.cpp: Added. (WTF): (WTF::printInternal): * dfg/DFGFlushFormat.h: Added. (DFG): (JSC::DFG::resultFor): (JSC::DFG::useKindFor): (WTF): * dfg/DFGFlushLivenessAnalysisPhase.cpp: Added. (DFG): (FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::run): (JSC::DFG::FlushLivenessAnalysisPhase::process): (JSC::DFG::FlushLivenessAnalysisPhase::setForNode): (JSC::DFG::FlushLivenessAnalysisPhase::flushFormat): (JSC::DFG::performFlushLivenessAnalysis): * dfg/DFGFlushLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): (JSC::DFG::Graph::dumpBlockHeader): (DFG): (JSC::DFG::Graph::addForDepthFirstSort): (JSC::DFG::Graph::getBlocksInDepthFirstOrder): * dfg/DFGGraph.h: (JSC::DFG::Graph::convertToConstant): (JSC::DFG::Graph::valueProfileFor): (Graph): * dfg/DFGInsertionSet.h: (DFG): (JSC::DFG::InsertionSet::execute): * dfg/DFGLivenessAnalysisPhase.cpp: Added. (DFG): (LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::run): (JSC::DFG::LivenessAnalysisPhase::process): (JSC::DFG::LivenessAnalysisPhase::addChildUse): (JSC::DFG::performLivenessAnalysis): * dfg/DFGLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGNode.cpp: (JSC::DFG::Node::hasVariableAccessData): (DFG): * dfg/DFGNode.h: (DFG): (Node): (JSC::DFG::Node::hasLocal): (JSC::DFG::Node::variableAccessData): (JSC::DFG::Node::hasPhi): (JSC::DFG::Node::phi): (JSC::DFG::Node::takenBlock): (JSC::DFG::Node::notTakenBlock): (JSC::DFG::Node::successor): (JSC::DFG::Node::successorForCondition): (JSC::DFG::nodeComparator): (JSC::DFG::nodeListDump): (JSC::DFG::nodeMapDump): * dfg/DFGNodeFlags.cpp: (JSC::DFG::dumpNodeFlags): * dfg/DFGNodeType.h: (DFG): * dfg/DFGOSRAvailabilityAnalysisPhase.cpp: Added. (DFG): (OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::run): (JSC::DFG::performOSRAvailabilityAnalysis): * dfg/DFGOSRAvailabilityAnalysisPhase.h: Added. (DFG): * dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): * dfg/DFGPredictionInjectionPhase.cpp: (JSC::DFG::PredictionInjectionPhase::run): * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSSAConversionPhase.cpp: Added. (DFG): (SSAConversionPhase): (JSC::DFG::SSAConversionPhase::SSAConversionPhase): (JSC::DFG::SSAConversionPhase::run): (JSC::DFG::SSAConversionPhase::forwardPhiChildren): (JSC::DFG::SSAConversionPhase::forwardPhi): (JSC::DFG::SSAConversionPhase::forwardPhiEdge): (JSC::DFG::SSAConversionPhase::deduplicateChildren): (JSC::DFG::SSAConversionPhase::addFlushedLocalOp): (JSC::DFG::SSAConversionPhase::addFlushedLocalEdge): (JSC::DFG::performSSAConversion): * dfg/DFGSSAConversionPhase.h: Added. (DFG): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (Validate): (JSC::DFG::Validate::validateCPS): * dfg/DFGVariableAccessData.h: (JSC::DFG::VariableAccessData::flushFormat): (VariableAccessData): * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToLLVM.cpp: (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::lower): (JSC::FTL::LowerDFGToLLVM::createPhiVariables): (JSC::FTL::LowerDFGToLLVM::compileBlock): (JSC::FTL::LowerDFGToLLVM::compileNode): (JSC::FTL::LowerDFGToLLVM::compileUpsilon): (LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::compilePhi): (JSC::FTL::LowerDFGToLLVM::compileJSConstant): (JSC::FTL::LowerDFGToLLVM::compileWeakJSConstant): (JSC::FTL::LowerDFGToLLVM::compileGetArgument): (JSC::FTL::LowerDFGToLLVM::compileGetLocal): (JSC::FTL::LowerDFGToLLVM::compileSetLocal): (JSC::FTL::LowerDFGToLLVM::compileAdd): (JSC::FTL::LowerDFGToLLVM::compileArithSub): (JSC::FTL::LowerDFGToLLVM::compileArithMul): (JSC::FTL::LowerDFGToLLVM::compileArithDiv): (JSC::FTL::LowerDFGToLLVM::compileArithMod): (JSC::FTL::LowerDFGToLLVM::compileArithMinOrMax): (JSC::FTL::LowerDFGToLLVM::compileArithAbs): (JSC::FTL::LowerDFGToLLVM::compileArithNegate): (JSC::FTL::LowerDFGToLLVM::compileBitAnd): (JSC::FTL::LowerDFGToLLVM::compileBitOr): (JSC::FTL::LowerDFGToLLVM::compileBitXor): (JSC::FTL::LowerDFGToLLVM::compileBitRShift): (JSC::FTL::LowerDFGToLLVM::compileBitLShift): (JSC::FTL::LowerDFGToLLVM::compileBitURShift): (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber): (JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble): (JSC::FTL::LowerDFGToLLVM::compileGetButterfly): (JSC::FTL::LowerDFGToLLVM::compileGetArrayLength): (JSC::FTL::LowerDFGToLLVM::compileGetByVal): (JSC::FTL::LowerDFGToLLVM::compileGetByOffset): (JSC::FTL::LowerDFGToLLVM::compileGetGlobalVar): (JSC::FTL::LowerDFGToLLVM::compileCompareEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareLess): (JSC::FTL::LowerDFGToLLVM::compileCompareLessEq): (JSC::FTL::LowerDFGToLLVM::compileCompareGreater): (JSC::FTL::LowerDFGToLLVM::compileCompareGreaterEq): (JSC::FTL::LowerDFGToLLVM::compileLogicalNot): (JSC::FTL::LowerDFGToLLVM::speculateBackward): (JSC::FTL::LowerDFGToLLVM::lowInt32): (JSC::FTL::LowerDFGToLLVM::lowCell): (JSC::FTL::LowerDFGToLLVM::lowBoolean): (JSC::FTL::LowerDFGToLLVM::lowDouble): (JSC::FTL::LowerDFGToLLVM::lowJSValue): (JSC::FTL::LowerDFGToLLVM::lowStorage): (JSC::FTL::LowerDFGToLLVM::speculate): (JSC::FTL::LowerDFGToLLVM::speculateBoolean): (JSC::FTL::LowerDFGToLLVM::isLive): (JSC::FTL::LowerDFGToLLVM::use): (JSC::FTL::LowerDFGToLLVM::initializeOSRExitStateForBlock): (JSC::FTL::LowerDFGToLLVM::appendOSRExit): (JSC::FTL::LowerDFGToLLVM::emitOSRExitCall): (JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode): (JSC::FTL::LowerDFGToLLVM::linkOSRExitsAndCompleteInitializationBlocks): (JSC::FTL::LowerDFGToLLVM::setInt32): (JSC::FTL::LowerDFGToLLVM::setJSValue): (JSC::FTL::LowerDFGToLLVM::setBoolean): (JSC::FTL::LowerDFGToLLVM::setStorage): (JSC::FTL::LowerDFGToLLVM::setDouble): (JSC::FTL::LowerDFGToLLVM::isValid): * ftl/FTLLoweredNodeValue.h: Added. (FTL): (LoweredNodeValue): (JSC::FTL::LoweredNodeValue::LoweredNodeValue): (JSC::FTL::LoweredNodeValue::isSet): (JSC::FTL::LoweredNodeValue::operator!): (JSC::FTL::LoweredNodeValue::value): (JSC::FTL::LoweredNodeValue::block): * ftl/FTLValueFromBlock.h: (JSC::FTL::ValueFromBlock::ValueFromBlock): (ValueFromBlock): * ftl/FTLValueSource.cpp: (JSC::FTL::ValueSource::dump): * ftl/FTLValueSource.h: Source/WTF: Reviewed by Mark Hahnenberg. - Extend variadicity of PrintStream and dataLog. - Give HashSet the ability to add a span of things. - Give HashSet the ability to == another HashSet. - Note FIXME's in HashTable concerning copying performance, that affects the way that the DFG now uses HashSets and HashMaps. - Factor out the bulk-insertion logic of JSC::DFG::InsertionSet into WTF::Insertion, so that it can be used in more places. - Create a dumper for lists and maps. * WTF.xcodeproj/project.pbxproj: * wtf/DataLog.h: (WTF): (WTF::dataLog): * wtf/HashSet.h: (HashSet): (WTF): (WTF::::add): (WTF::=): * wtf/HashTable.h: (WTF::::HashTable): (WTF::=): * wtf/Insertion.h: Added. (WTF): (Insertion): (WTF::Insertion::Insertion): (WTF::Insertion::index): (WTF::Insertion::element): (WTF::Insertion::operator<): (WTF::executeInsertions): * wtf/ListDump.h: Added. (WTF): (ListDump): (WTF::ListDump::ListDump): (WTF::ListDump::dump): (MapDump): (WTF::MapDump::MapDump): (WTF::MapDump::dump): (WTF::listDump): (WTF::sortedListDump): (WTF::lessThan): (WTF::mapDump): (WTF::sortedMapDump): * wtf/PrintStream.h: (PrintStream): (WTF::PrintStream::print): Conflicts: Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj Canonical link: https://commits.webkit.org/137058@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-07-25 04:04:45 +00:00
public:
Insertion() { }
B3 should be able to compile a program with ChillDiv https://bugs.webkit.org/show_bug.cgi?id=151114 Reviewed by Benjamin Poulain. Source/JavaScriptCore: This change is about a lot more than ChillDiv. I picked that as the next thing to lower because I knew that it would force me to come up with a sensible idiom for doing stepwise lowerings that require breaking basic blocks. The idea is that you want to write a loop that iterates forward over the program, which turns some operations that currently are just single Values into an entire little sub-CFGs. That requires splitting the block that contained the original Value. That's tricky if you then want to keep iterating: the index of the Value you were last looking at has now changed and your InsertionSets are now invalid. This introduces an idiom that handles this. It's BlockInsertionSet::splitBefore(). The idea is that it uses the current block before the split as the continuation after the split. When you call splitBefore(), you pass it your loop index and your InsertionSet (if applicable). It makes sure that it changes those auxiliary things in such a way that you can keep looping. This uncovered some bugs, since this is the first time that we're compiling cross edges. Because ChillDiv is really a division, I also had to write a bunch of code to support the ordinary B3 Div. While doing that, I realized that there was asymmetry to that constness of the Value constant folding methods, so I fixed that as well. * JavaScriptCore.xcodeproj/project.pbxproj: * assembler/MacroAssemblerX86Common.h: (JSC::MacroAssemblerX86Common::mul32): (JSC::MacroAssemblerX86Common::x86ConvertToDoubleWord32): (JSC::MacroAssemblerX86Common::x86Div32): (JSC::MacroAssemblerX86Common::neg32): * assembler/MacroAssemblerX86_64.h: (JSC::MacroAssemblerX86_64::mul64): (JSC::MacroAssemblerX86_64::x86ConvertToQuadWord64): (JSC::MacroAssemblerX86_64::x86Div64): (JSC::MacroAssemblerX86_64::neg64): * assembler/X86Assembler.h: (JSC::X86Assembler::idivl_r): (JSC::X86Assembler::idivq_r): (JSC::X86Assembler::cmpl_rr): (JSC::X86Assembler::cdq): (JSC::X86Assembler::cdqq): (JSC::X86Assembler::fstps): * b3/B3BasicBlock.cpp: (JSC::B3::BasicBlock::append): (JSC::B3::BasicBlock::replaceLast): (JSC::B3::BasicBlock::appendIntConstant): (JSC::B3::BasicBlock::replaceSuccessor): (JSC::B3::BasicBlock::addPredecessor): (JSC::B3::BasicBlock::replacePredecessor): (JSC::B3::BasicBlock::updatePredecessors): (JSC::B3::BasicBlock::dump): * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::values): (JSC::B3::BasicBlock::numPredecessors): (JSC::B3::BasicBlock::predecessor): (JSC::B3::BasicBlock::frequency): * b3/B3BasicBlockInlines.h: (JSC::B3::BasicBlock::appendNew): (JSC::B3::BasicBlock::replaceLastWithNew): (JSC::B3::BasicBlock::numSuccessors): * b3/B3BasicBlockUtils.h: (JSC::B3::replacePredecessor): (JSC::B3::updatePredecessors): (JSC::B3::resetReachability): * b3/B3BlockInsertionSet.cpp: Added. (JSC::B3::BlockInsertionSet::BlockInsertionSet): (JSC::B3::BlockInsertionSet::~BlockInsertionSet): (JSC::B3::BlockInsertionSet::insert): (JSC::B3::BlockInsertionSet::insertBefore): (JSC::B3::BlockInsertionSet::splitForward): (JSC::B3::BlockInsertionSet::execute): * b3/B3BlockInsertionSet.h: Added. * b3/B3Common.h: (JSC::B3::isRepresentableAs): (JSC::B3::chillDiv): * b3/B3Const32Value.cpp: (JSC::B3::Const32Value::addConstant): (JSC::B3::Const32Value::subConstant): (JSC::B3::Const32Value::divConstant): (JSC::B3::Const32Value::bitAndConstant): (JSC::B3::Const32Value::bitOrConstant): (JSC::B3::Const32Value::bitXorConstant): (JSC::B3::Const32Value::shlConstant): (JSC::B3::Const32Value::sShrConstant): (JSC::B3::Const32Value::zShrConstant): (JSC::B3::Const32Value::equalConstant): (JSC::B3::Const32Value::notEqualConstant): (JSC::B3::Const32Value::lessThanConstant): (JSC::B3::Const32Value::greaterThanConstant): (JSC::B3::Const32Value::lessEqualConstant): (JSC::B3::Const32Value::greaterEqualConstant): (JSC::B3::Const32Value::aboveConstant): (JSC::B3::Const32Value::belowConstant): (JSC::B3::Const32Value::aboveEqualConstant): (JSC::B3::Const32Value::belowEqualConstant): * b3/B3Const32Value.h: * b3/B3Const64Value.cpp: (JSC::B3::Const64Value::addConstant): (JSC::B3::Const64Value::subConstant): (JSC::B3::Const64Value::divConstant): (JSC::B3::Const64Value::bitAndConstant): (JSC::B3::Const64Value::bitOrConstant): (JSC::B3::Const64Value::bitXorConstant): (JSC::B3::Const64Value::shlConstant): (JSC::B3::Const64Value::sShrConstant): (JSC::B3::Const64Value::zShrConstant): (JSC::B3::Const64Value::equalConstant): (JSC::B3::Const64Value::notEqualConstant): (JSC::B3::Const64Value::lessThanConstant): (JSC::B3::Const64Value::greaterThanConstant): (JSC::B3::Const64Value::lessEqualConstant): (JSC::B3::Const64Value::greaterEqualConstant): (JSC::B3::Const64Value::aboveConstant): (JSC::B3::Const64Value::belowConstant): (JSC::B3::Const64Value::aboveEqualConstant): (JSC::B3::Const64Value::belowEqualConstant): * b3/B3Const64Value.h: * b3/B3ConstDoubleValue.cpp: (JSC::B3::ConstDoubleValue::addConstant): (JSC::B3::ConstDoubleValue::subConstant): (JSC::B3::ConstDoubleValue::divConstant): (JSC::B3::ConstDoubleValue::equalConstant): (JSC::B3::ConstDoubleValue::notEqualConstant): (JSC::B3::ConstDoubleValue::lessThanConstant): (JSC::B3::ConstDoubleValue::greaterThanConstant): (JSC::B3::ConstDoubleValue::lessEqualConstant): (JSC::B3::ConstDoubleValue::greaterEqualConstant): * b3/B3ConstDoubleValue.h: * b3/B3ControlValue.cpp: (JSC::B3::ControlValue::~ControlValue): (JSC::B3::ControlValue::replaceSuccessor): (JSC::B3::ControlValue::convertToJump): * b3/B3ControlValue.h: * b3/B3Generate.cpp: (JSC::B3::generateToAir): * b3/B3GenericFrequentedBlock.h: (JSC::B3::GenericFrequentedBlock::block): (JSC::B3::GenericFrequentedBlock::frequency): (JSC::B3::GenericFrequentedBlock::dump): * b3/B3InsertionSet.cpp: (JSC::B3::InsertionSet::insertIntConstant): (JSC::B3::InsertionSet::execute): * b3/B3InsertionSet.h: * b3/B3LowerMacros.cpp: Added. (JSC::B3::lowerMacros): * b3/B3LowerMacros.h: Added. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::lower): * b3/B3Opcode.h: * b3/B3Procedure.cpp: (JSC::B3::Procedure::addBlock): (JSC::B3::Procedure::addIntConstant): (JSC::B3::Procedure::addBoolConstant): (JSC::B3::Procedure::resetValueOwners): * b3/B3Procedure.h: (JSC::B3::Procedure::takeByproducts): * b3/B3ReduceStrength.cpp: * b3/B3Validate.cpp: * b3/B3Value.cpp: (JSC::B3::Value::addConstant): (JSC::B3::Value::subConstant): (JSC::B3::Value::divConstant): (JSC::B3::Value::bitAndConstant): (JSC::B3::Value::bitOrConstant): (JSC::B3::Value::bitXorConstant): (JSC::B3::Value::shlConstant): (JSC::B3::Value::sShrConstant): (JSC::B3::Value::zShrConstant): (JSC::B3::Value::equalConstant): (JSC::B3::Value::notEqualConstant): (JSC::B3::Value::lessThanConstant): (JSC::B3::Value::greaterThanConstant): (JSC::B3::Value::lessEqualConstant): (JSC::B3::Value::greaterEqualConstant): (JSC::B3::Value::aboveConstant): (JSC::B3::Value::belowConstant): (JSC::B3::Value::aboveEqualConstant): (JSC::B3::Value::belowEqualConstant): * b3/B3Value.h: * b3/air/AirGenerate.cpp: (JSC::B3::Air::generate): * b3/air/AirInstInlines.h: (JSC::B3::Air::isUrshift64Valid): (JSC::B3::Air::isX86DivHelperValid): (JSC::B3::Air::isX86ConvertToDoubleWord32Valid): (JSC::B3::Air::isX86ConvertToDoubleWord64Valid): (JSC::B3::Air::isX86Div32Valid): (JSC::B3::Air::isX86Div64Valid): * b3/air/AirOpcode.opcodes: * b3/air/AirSimplifyCFG.cpp: (JSC::B3::Air::simplifyCFG): * b3/testb3.cpp: (JSC::B3::testCallFunctionWithHellaDoubleArguments): (JSC::B3::testChillDiv): (JSC::B3::testChillDivTwice): (JSC::B3::testChillDiv64): (JSC::B3::run): * dfg/DFGBlockInsertionSet.h: * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileArithDiv): (JSC::DFG::SpeculativeJIT::compileArithMod): * jit/JITArithmetic.cpp: (JSC::JIT::emit_op_mod): * jit/JITArithmetic32_64.cpp: (JSC::JIT::emit_op_mod): * wasm/WASMFunctionCompiler.h: (JSC::WASMFunctionCompiler::buildBinaryI32): Source/WTF: Needed to beef up some compiler algorithms. All of the hardening was about making them work with objects that have move semantics but not copy semantics. This arises in B3 basic block insertion sets. * wtf/BubbleSort.h: (WTF::bubbleSort): * wtf/Insertion.h: (WTF::Insertion::Insertion): (WTF::Insertion::index): (WTF::Insertion::element): (WTF::Insertion::operator<): (WTF::executeInsertions): Canonical link: https://commits.webkit.org/169327@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-11-11 07:21:23 +00:00
template<typename U>
Insertion(size_t index, U&& element)
fourthTier: DFG should have an SSA form for use by FTL https://bugs.webkit.org/show_bug.cgi?id=118338 Source/JavaScriptCore: Reviewed by Mark Hahnenberg. Adds an SSA form to the DFG. We can convert ThreadedCPS form into SSA form after breaking critical edges. The conversion algorithm follows Aycock and Horspool, and the SSA form itself follows something I've done before, where instead of having Phi functions specify input nodes corresponding to block predecessors, we instead have Upsilon functions in the predecessors that specify which value in that block goes into which subsequent Phi. Upsilons don't have to dominate Phis (usually they don't) and they correspond to a non-SSA "mov" into the Phi's "variable". This gives all of the good properties of SSA, while ensuring that a bunch of CFG transformations don't have to be SSA-aware. So far the only DFG phases that are SSA-aware are DCE and CFA. CFG simplification is probably SSA-aware by default, though I haven't tried it. Constant folding probably needs a few tweaks, but is likely ready. Ditto for CSE, though it's not clear that we'd want to use block-local CSE when we could be doing GVN. Currently only the FTL can generate code from the SSA form, and there is no way to convert from SSA to ThreadedCPS or LoadStore. There probably will never be such a capability. In order to handle OSR exit state in the SSA, we place MovHints at Phi points. Other than that, you can reconstruct state-at-exit by forward propagating MovHints. Note that MovHint is the new SetLocal in SSA. SetLocal and GetLocal only survive into SSA if they are on captured variables, or in the case of flushes. A "live SetLocal" will be NodeMustGenerate and will always correspond to a flush. Computing the state-at-exit requires running SSA liveness analysis, OSR availability analysis, and flush liveness analysis. The FTL runs all of these prior to generating code. While OSR exit continues to be tricky, much of the logic is now factored into separate phases and the backend has to do less work to reason about what happened outside of the basic block that is being lowered. Conversion from DFG SSA to LLVM SSA is done by ensuring that we generate code in depth-first order, thus guaranteeing that a node will always be lowered (and hence have a LValue) before any of the blocks dominated by that node's block have code generated. For Upsilon/Phi, we just use alloca's. We could do something more clever there, but it's probably not worth it, at least not now. Finally, while the SSA form is currently only being converted to LLVM IR, there is nothing that prevents us from considering other backends in the future - with the caveat that this form is designed to be first lowered to a lower-level SSA before actual machine code generation commences. So we ought to either use LLVM (the intended path) or we will have to write our own SSA low-level backend. This runs all of the code that the FTL was known to run previously. No change in performance for now. But it does open some exciting possibilities! * JavaScriptCore.xcodeproj/project.pbxproj: * bytecode/Operands.h: (JSC::OperandValueTraits::dump): (JSC::Operands::fill): (Operands): (JSC::Operands::clear): (JSC::Operands::operator==): * dfg/DFGAbstractState.cpp: (JSC::DFG::AbstractState::beginBasicBlock): (JSC::DFG::setLiveValues): (DFG): (JSC::DFG::AbstractState::initialize): (JSC::DFG::AbstractState::endBasicBlock): (JSC::DFG::AbstractState::executeEffects): (JSC::DFG::AbstractState::mergeStateAtTail): (JSC::DFG::AbstractState::merge): * dfg/DFGAbstractState.h: (AbstractState): * dfg/DFGAdjacencyList.h: (JSC::DFG::AdjacencyList::justOneChild): (AdjacencyList): * dfg/DFGBasicBlock.cpp: Added. (DFG): (JSC::DFG::BasicBlock::BasicBlock): (JSC::DFG::BasicBlock::~BasicBlock): (JSC::DFG::BasicBlock::ensureLocals): (JSC::DFG::BasicBlock::isInPhis): (JSC::DFG::BasicBlock::isInBlock): (JSC::DFG::BasicBlock::removePredecessor): (JSC::DFG::BasicBlock::replacePredecessor): (JSC::DFG::BasicBlock::dump): (JSC::DFG::BasicBlock::SSAData::SSAData): (JSC::DFG::BasicBlock::SSAData::~SSAData): * dfg/DFGBasicBlock.h: (BasicBlock): (JSC::DFG::BasicBlock::operator[]): (JSC::DFG::BasicBlock::successor): (JSC::DFG::BasicBlock::successorForCondition): (SSAData): * dfg/DFGBasicBlockInlines.h: (DFG): * dfg/DFGBlockInsertionSet.cpp: Added. (DFG): (JSC::DFG::BlockInsertionSet::BlockInsertionSet): (JSC::DFG::BlockInsertionSet::~BlockInsertionSet): (JSC::DFG::BlockInsertionSet::insert): (JSC::DFG::BlockInsertionSet::insertBefore): (JSC::DFG::BlockInsertionSet::execute): * dfg/DFGBlockInsertionSet.h: Added. (DFG): (BlockInsertionSet): * dfg/DFGCFAPhase.cpp: (JSC::DFG::CFAPhase::run): * dfg/DFGCFGSimplificationPhase.cpp: * dfg/DFGCPSRethreadingPhase.cpp: (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock): * dfg/DFGCommon.cpp: (WTF::printInternal): * dfg/DFGCommon.h: (JSC::DFG::doesKill): (DFG): (JSC::DFG::killStatusForDoesKill): * dfg/DFGConstantFoldingPhase.cpp: (JSC::DFG::ConstantFoldingPhase::foldConstants): (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter): * dfg/DFGCriticalEdgeBreakingPhase.cpp: Added. (DFG): (CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::run): (JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge): (JSC::DFG::performCriticalEdgeBreaking): * dfg/DFGCriticalEdgeBreakingPhase.h: Added. (DFG): * dfg/DFGDCEPhase.cpp: (JSC::DFG::DCEPhase::run): (JSC::DFG::DCEPhase::findTypeCheckRoot): (JSC::DFG::DCEPhase::countNode): (DCEPhase): (JSC::DFG::DCEPhase::countEdge): (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren): * dfg/DFGDriver.cpp: (JSC::DFG::compile): * dfg/DFGEdge.cpp: (JSC::DFG::Edge::dump): * dfg/DFGEdge.h: (JSC::DFG::Edge::Edge): (JSC::DFG::Edge::setNode): (JSC::DFG::Edge::useKindUnchecked): (JSC::DFG::Edge::setUseKind): (JSC::DFG::Edge::setProofStatus): (JSC::DFG::Edge::willNotHaveCheck): (JSC::DFG::Edge::willHaveCheck): (Edge): (JSC::DFG::Edge::killStatusUnchecked): (JSC::DFG::Edge::killStatus): (JSC::DFG::Edge::setKillStatus): (JSC::DFG::Edge::doesKill): (JSC::DFG::Edge::doesNotKill): (JSC::DFG::Edge::shift): (JSC::DFG::Edge::makeWord): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGFlushFormat.cpp: Added. (WTF): (WTF::printInternal): * dfg/DFGFlushFormat.h: Added. (DFG): (JSC::DFG::resultFor): (JSC::DFG::useKindFor): (WTF): * dfg/DFGFlushLivenessAnalysisPhase.cpp: Added. (DFG): (FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::run): (JSC::DFG::FlushLivenessAnalysisPhase::process): (JSC::DFG::FlushLivenessAnalysisPhase::setForNode): (JSC::DFG::FlushLivenessAnalysisPhase::flushFormat): (JSC::DFG::performFlushLivenessAnalysis): * dfg/DFGFlushLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): (JSC::DFG::Graph::dumpBlockHeader): (DFG): (JSC::DFG::Graph::addForDepthFirstSort): (JSC::DFG::Graph::getBlocksInDepthFirstOrder): * dfg/DFGGraph.h: (JSC::DFG::Graph::convertToConstant): (JSC::DFG::Graph::valueProfileFor): (Graph): * dfg/DFGInsertionSet.h: (DFG): (JSC::DFG::InsertionSet::execute): * dfg/DFGLivenessAnalysisPhase.cpp: Added. (DFG): (LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::run): (JSC::DFG::LivenessAnalysisPhase::process): (JSC::DFG::LivenessAnalysisPhase::addChildUse): (JSC::DFG::performLivenessAnalysis): * dfg/DFGLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGNode.cpp: (JSC::DFG::Node::hasVariableAccessData): (DFG): * dfg/DFGNode.h: (DFG): (Node): (JSC::DFG::Node::hasLocal): (JSC::DFG::Node::variableAccessData): (JSC::DFG::Node::hasPhi): (JSC::DFG::Node::phi): (JSC::DFG::Node::takenBlock): (JSC::DFG::Node::notTakenBlock): (JSC::DFG::Node::successor): (JSC::DFG::Node::successorForCondition): (JSC::DFG::nodeComparator): (JSC::DFG::nodeListDump): (JSC::DFG::nodeMapDump): * dfg/DFGNodeFlags.cpp: (JSC::DFG::dumpNodeFlags): * dfg/DFGNodeType.h: (DFG): * dfg/DFGOSRAvailabilityAnalysisPhase.cpp: Added. (DFG): (OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::run): (JSC::DFG::performOSRAvailabilityAnalysis): * dfg/DFGOSRAvailabilityAnalysisPhase.h: Added. (DFG): * dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): * dfg/DFGPredictionInjectionPhase.cpp: (JSC::DFG::PredictionInjectionPhase::run): * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSSAConversionPhase.cpp: Added. (DFG): (SSAConversionPhase): (JSC::DFG::SSAConversionPhase::SSAConversionPhase): (JSC::DFG::SSAConversionPhase::run): (JSC::DFG::SSAConversionPhase::forwardPhiChildren): (JSC::DFG::SSAConversionPhase::forwardPhi): (JSC::DFG::SSAConversionPhase::forwardPhiEdge): (JSC::DFG::SSAConversionPhase::deduplicateChildren): (JSC::DFG::SSAConversionPhase::addFlushedLocalOp): (JSC::DFG::SSAConversionPhase::addFlushedLocalEdge): (JSC::DFG::performSSAConversion): * dfg/DFGSSAConversionPhase.h: Added. (DFG): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (Validate): (JSC::DFG::Validate::validateCPS): * dfg/DFGVariableAccessData.h: (JSC::DFG::VariableAccessData::flushFormat): (VariableAccessData): * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToLLVM.cpp: (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::lower): (JSC::FTL::LowerDFGToLLVM::createPhiVariables): (JSC::FTL::LowerDFGToLLVM::compileBlock): (JSC::FTL::LowerDFGToLLVM::compileNode): (JSC::FTL::LowerDFGToLLVM::compileUpsilon): (LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::compilePhi): (JSC::FTL::LowerDFGToLLVM::compileJSConstant): (JSC::FTL::LowerDFGToLLVM::compileWeakJSConstant): (JSC::FTL::LowerDFGToLLVM::compileGetArgument): (JSC::FTL::LowerDFGToLLVM::compileGetLocal): (JSC::FTL::LowerDFGToLLVM::compileSetLocal): (JSC::FTL::LowerDFGToLLVM::compileAdd): (JSC::FTL::LowerDFGToLLVM::compileArithSub): (JSC::FTL::LowerDFGToLLVM::compileArithMul): (JSC::FTL::LowerDFGToLLVM::compileArithDiv): (JSC::FTL::LowerDFGToLLVM::compileArithMod): (JSC::FTL::LowerDFGToLLVM::compileArithMinOrMax): (JSC::FTL::LowerDFGToLLVM::compileArithAbs): (JSC::FTL::LowerDFGToLLVM::compileArithNegate): (JSC::FTL::LowerDFGToLLVM::compileBitAnd): (JSC::FTL::LowerDFGToLLVM::compileBitOr): (JSC::FTL::LowerDFGToLLVM::compileBitXor): (JSC::FTL::LowerDFGToLLVM::compileBitRShift): (JSC::FTL::LowerDFGToLLVM::compileBitLShift): (JSC::FTL::LowerDFGToLLVM::compileBitURShift): (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber): (JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble): (JSC::FTL::LowerDFGToLLVM::compileGetButterfly): (JSC::FTL::LowerDFGToLLVM::compileGetArrayLength): (JSC::FTL::LowerDFGToLLVM::compileGetByVal): (JSC::FTL::LowerDFGToLLVM::compileGetByOffset): (JSC::FTL::LowerDFGToLLVM::compileGetGlobalVar): (JSC::FTL::LowerDFGToLLVM::compileCompareEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareLess): (JSC::FTL::LowerDFGToLLVM::compileCompareLessEq): (JSC::FTL::LowerDFGToLLVM::compileCompareGreater): (JSC::FTL::LowerDFGToLLVM::compileCompareGreaterEq): (JSC::FTL::LowerDFGToLLVM::compileLogicalNot): (JSC::FTL::LowerDFGToLLVM::speculateBackward): (JSC::FTL::LowerDFGToLLVM::lowInt32): (JSC::FTL::LowerDFGToLLVM::lowCell): (JSC::FTL::LowerDFGToLLVM::lowBoolean): (JSC::FTL::LowerDFGToLLVM::lowDouble): (JSC::FTL::LowerDFGToLLVM::lowJSValue): (JSC::FTL::LowerDFGToLLVM::lowStorage): (JSC::FTL::LowerDFGToLLVM::speculate): (JSC::FTL::LowerDFGToLLVM::speculateBoolean): (JSC::FTL::LowerDFGToLLVM::isLive): (JSC::FTL::LowerDFGToLLVM::use): (JSC::FTL::LowerDFGToLLVM::initializeOSRExitStateForBlock): (JSC::FTL::LowerDFGToLLVM::appendOSRExit): (JSC::FTL::LowerDFGToLLVM::emitOSRExitCall): (JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode): (JSC::FTL::LowerDFGToLLVM::linkOSRExitsAndCompleteInitializationBlocks): (JSC::FTL::LowerDFGToLLVM::setInt32): (JSC::FTL::LowerDFGToLLVM::setJSValue): (JSC::FTL::LowerDFGToLLVM::setBoolean): (JSC::FTL::LowerDFGToLLVM::setStorage): (JSC::FTL::LowerDFGToLLVM::setDouble): (JSC::FTL::LowerDFGToLLVM::isValid): * ftl/FTLLoweredNodeValue.h: Added. (FTL): (LoweredNodeValue): (JSC::FTL::LoweredNodeValue::LoweredNodeValue): (JSC::FTL::LoweredNodeValue::isSet): (JSC::FTL::LoweredNodeValue::operator!): (JSC::FTL::LoweredNodeValue::value): (JSC::FTL::LoweredNodeValue::block): * ftl/FTLValueFromBlock.h: (JSC::FTL::ValueFromBlock::ValueFromBlock): (ValueFromBlock): * ftl/FTLValueSource.cpp: (JSC::FTL::ValueSource::dump): * ftl/FTLValueSource.h: Source/WTF: Reviewed by Mark Hahnenberg. - Extend variadicity of PrintStream and dataLog. - Give HashSet the ability to add a span of things. - Give HashSet the ability to == another HashSet. - Note FIXME's in HashTable concerning copying performance, that affects the way that the DFG now uses HashSets and HashMaps. - Factor out the bulk-insertion logic of JSC::DFG::InsertionSet into WTF::Insertion, so that it can be used in more places. - Create a dumper for lists and maps. * WTF.xcodeproj/project.pbxproj: * wtf/DataLog.h: (WTF): (WTF::dataLog): * wtf/HashSet.h: (HashSet): (WTF): (WTF::::add): (WTF::=): * wtf/HashTable.h: (WTF::::HashTable): (WTF::=): * wtf/Insertion.h: Added. (WTF): (Insertion): (WTF::Insertion::Insertion): (WTF::Insertion::index): (WTF::Insertion::element): (WTF::Insertion::operator<): (WTF::executeInsertions): * wtf/ListDump.h: Added. (WTF): (ListDump): (WTF::ListDump::ListDump): (WTF::ListDump::dump): (MapDump): (WTF::MapDump::MapDump): (WTF::MapDump::dump): (WTF::listDump): (WTF::sortedListDump): (WTF::lessThan): (WTF::mapDump): (WTF::sortedMapDump): * wtf/PrintStream.h: (PrintStream): (WTF::PrintStream::print): Conflicts: Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj Canonical link: https://commits.webkit.org/137058@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-07-25 04:04:45 +00:00
: m_index(index)
B3 should be able to compile a program with ChillDiv https://bugs.webkit.org/show_bug.cgi?id=151114 Reviewed by Benjamin Poulain. Source/JavaScriptCore: This change is about a lot more than ChillDiv. I picked that as the next thing to lower because I knew that it would force me to come up with a sensible idiom for doing stepwise lowerings that require breaking basic blocks. The idea is that you want to write a loop that iterates forward over the program, which turns some operations that currently are just single Values into an entire little sub-CFGs. That requires splitting the block that contained the original Value. That's tricky if you then want to keep iterating: the index of the Value you were last looking at has now changed and your InsertionSets are now invalid. This introduces an idiom that handles this. It's BlockInsertionSet::splitBefore(). The idea is that it uses the current block before the split as the continuation after the split. When you call splitBefore(), you pass it your loop index and your InsertionSet (if applicable). It makes sure that it changes those auxiliary things in such a way that you can keep looping. This uncovered some bugs, since this is the first time that we're compiling cross edges. Because ChillDiv is really a division, I also had to write a bunch of code to support the ordinary B3 Div. While doing that, I realized that there was asymmetry to that constness of the Value constant folding methods, so I fixed that as well. * JavaScriptCore.xcodeproj/project.pbxproj: * assembler/MacroAssemblerX86Common.h: (JSC::MacroAssemblerX86Common::mul32): (JSC::MacroAssemblerX86Common::x86ConvertToDoubleWord32): (JSC::MacroAssemblerX86Common::x86Div32): (JSC::MacroAssemblerX86Common::neg32): * assembler/MacroAssemblerX86_64.h: (JSC::MacroAssemblerX86_64::mul64): (JSC::MacroAssemblerX86_64::x86ConvertToQuadWord64): (JSC::MacroAssemblerX86_64::x86Div64): (JSC::MacroAssemblerX86_64::neg64): * assembler/X86Assembler.h: (JSC::X86Assembler::idivl_r): (JSC::X86Assembler::idivq_r): (JSC::X86Assembler::cmpl_rr): (JSC::X86Assembler::cdq): (JSC::X86Assembler::cdqq): (JSC::X86Assembler::fstps): * b3/B3BasicBlock.cpp: (JSC::B3::BasicBlock::append): (JSC::B3::BasicBlock::replaceLast): (JSC::B3::BasicBlock::appendIntConstant): (JSC::B3::BasicBlock::replaceSuccessor): (JSC::B3::BasicBlock::addPredecessor): (JSC::B3::BasicBlock::replacePredecessor): (JSC::B3::BasicBlock::updatePredecessors): (JSC::B3::BasicBlock::dump): * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::values): (JSC::B3::BasicBlock::numPredecessors): (JSC::B3::BasicBlock::predecessor): (JSC::B3::BasicBlock::frequency): * b3/B3BasicBlockInlines.h: (JSC::B3::BasicBlock::appendNew): (JSC::B3::BasicBlock::replaceLastWithNew): (JSC::B3::BasicBlock::numSuccessors): * b3/B3BasicBlockUtils.h: (JSC::B3::replacePredecessor): (JSC::B3::updatePredecessors): (JSC::B3::resetReachability): * b3/B3BlockInsertionSet.cpp: Added. (JSC::B3::BlockInsertionSet::BlockInsertionSet): (JSC::B3::BlockInsertionSet::~BlockInsertionSet): (JSC::B3::BlockInsertionSet::insert): (JSC::B3::BlockInsertionSet::insertBefore): (JSC::B3::BlockInsertionSet::splitForward): (JSC::B3::BlockInsertionSet::execute): * b3/B3BlockInsertionSet.h: Added. * b3/B3Common.h: (JSC::B3::isRepresentableAs): (JSC::B3::chillDiv): * b3/B3Const32Value.cpp: (JSC::B3::Const32Value::addConstant): (JSC::B3::Const32Value::subConstant): (JSC::B3::Const32Value::divConstant): (JSC::B3::Const32Value::bitAndConstant): (JSC::B3::Const32Value::bitOrConstant): (JSC::B3::Const32Value::bitXorConstant): (JSC::B3::Const32Value::shlConstant): (JSC::B3::Const32Value::sShrConstant): (JSC::B3::Const32Value::zShrConstant): (JSC::B3::Const32Value::equalConstant): (JSC::B3::Const32Value::notEqualConstant): (JSC::B3::Const32Value::lessThanConstant): (JSC::B3::Const32Value::greaterThanConstant): (JSC::B3::Const32Value::lessEqualConstant): (JSC::B3::Const32Value::greaterEqualConstant): (JSC::B3::Const32Value::aboveConstant): (JSC::B3::Const32Value::belowConstant): (JSC::B3::Const32Value::aboveEqualConstant): (JSC::B3::Const32Value::belowEqualConstant): * b3/B3Const32Value.h: * b3/B3Const64Value.cpp: (JSC::B3::Const64Value::addConstant): (JSC::B3::Const64Value::subConstant): (JSC::B3::Const64Value::divConstant): (JSC::B3::Const64Value::bitAndConstant): (JSC::B3::Const64Value::bitOrConstant): (JSC::B3::Const64Value::bitXorConstant): (JSC::B3::Const64Value::shlConstant): (JSC::B3::Const64Value::sShrConstant): (JSC::B3::Const64Value::zShrConstant): (JSC::B3::Const64Value::equalConstant): (JSC::B3::Const64Value::notEqualConstant): (JSC::B3::Const64Value::lessThanConstant): (JSC::B3::Const64Value::greaterThanConstant): (JSC::B3::Const64Value::lessEqualConstant): (JSC::B3::Const64Value::greaterEqualConstant): (JSC::B3::Const64Value::aboveConstant): (JSC::B3::Const64Value::belowConstant): (JSC::B3::Const64Value::aboveEqualConstant): (JSC::B3::Const64Value::belowEqualConstant): * b3/B3Const64Value.h: * b3/B3ConstDoubleValue.cpp: (JSC::B3::ConstDoubleValue::addConstant): (JSC::B3::ConstDoubleValue::subConstant): (JSC::B3::ConstDoubleValue::divConstant): (JSC::B3::ConstDoubleValue::equalConstant): (JSC::B3::ConstDoubleValue::notEqualConstant): (JSC::B3::ConstDoubleValue::lessThanConstant): (JSC::B3::ConstDoubleValue::greaterThanConstant): (JSC::B3::ConstDoubleValue::lessEqualConstant): (JSC::B3::ConstDoubleValue::greaterEqualConstant): * b3/B3ConstDoubleValue.h: * b3/B3ControlValue.cpp: (JSC::B3::ControlValue::~ControlValue): (JSC::B3::ControlValue::replaceSuccessor): (JSC::B3::ControlValue::convertToJump): * b3/B3ControlValue.h: * b3/B3Generate.cpp: (JSC::B3::generateToAir): * b3/B3GenericFrequentedBlock.h: (JSC::B3::GenericFrequentedBlock::block): (JSC::B3::GenericFrequentedBlock::frequency): (JSC::B3::GenericFrequentedBlock::dump): * b3/B3InsertionSet.cpp: (JSC::B3::InsertionSet::insertIntConstant): (JSC::B3::InsertionSet::execute): * b3/B3InsertionSet.h: * b3/B3LowerMacros.cpp: Added. (JSC::B3::lowerMacros): * b3/B3LowerMacros.h: Added. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::lower): * b3/B3Opcode.h: * b3/B3Procedure.cpp: (JSC::B3::Procedure::addBlock): (JSC::B3::Procedure::addIntConstant): (JSC::B3::Procedure::addBoolConstant): (JSC::B3::Procedure::resetValueOwners): * b3/B3Procedure.h: (JSC::B3::Procedure::takeByproducts): * b3/B3ReduceStrength.cpp: * b3/B3Validate.cpp: * b3/B3Value.cpp: (JSC::B3::Value::addConstant): (JSC::B3::Value::subConstant): (JSC::B3::Value::divConstant): (JSC::B3::Value::bitAndConstant): (JSC::B3::Value::bitOrConstant): (JSC::B3::Value::bitXorConstant): (JSC::B3::Value::shlConstant): (JSC::B3::Value::sShrConstant): (JSC::B3::Value::zShrConstant): (JSC::B3::Value::equalConstant): (JSC::B3::Value::notEqualConstant): (JSC::B3::Value::lessThanConstant): (JSC::B3::Value::greaterThanConstant): (JSC::B3::Value::lessEqualConstant): (JSC::B3::Value::greaterEqualConstant): (JSC::B3::Value::aboveConstant): (JSC::B3::Value::belowConstant): (JSC::B3::Value::aboveEqualConstant): (JSC::B3::Value::belowEqualConstant): * b3/B3Value.h: * b3/air/AirGenerate.cpp: (JSC::B3::Air::generate): * b3/air/AirInstInlines.h: (JSC::B3::Air::isUrshift64Valid): (JSC::B3::Air::isX86DivHelperValid): (JSC::B3::Air::isX86ConvertToDoubleWord32Valid): (JSC::B3::Air::isX86ConvertToDoubleWord64Valid): (JSC::B3::Air::isX86Div32Valid): (JSC::B3::Air::isX86Div64Valid): * b3/air/AirOpcode.opcodes: * b3/air/AirSimplifyCFG.cpp: (JSC::B3::Air::simplifyCFG): * b3/testb3.cpp: (JSC::B3::testCallFunctionWithHellaDoubleArguments): (JSC::B3::testChillDiv): (JSC::B3::testChillDivTwice): (JSC::B3::testChillDiv64): (JSC::B3::run): * dfg/DFGBlockInsertionSet.h: * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileArithDiv): (JSC::DFG::SpeculativeJIT::compileArithMod): * jit/JITArithmetic.cpp: (JSC::JIT::emit_op_mod): * jit/JITArithmetic32_64.cpp: (JSC::JIT::emit_op_mod): * wasm/WASMFunctionCompiler.h: (JSC::WASMFunctionCompiler::buildBinaryI32): Source/WTF: Needed to beef up some compiler algorithms. All of the hardening was about making them work with objects that have move semantics but not copy semantics. This arises in B3 basic block insertion sets. * wtf/BubbleSort.h: (WTF::bubbleSort): * wtf/Insertion.h: (WTF::Insertion::Insertion): (WTF::Insertion::index): (WTF::Insertion::element): (WTF::Insertion::operator<): (WTF::executeInsertions): Canonical link: https://commits.webkit.org/169327@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-11-11 07:21:23 +00:00
, m_element(std::forward<U>(element))
fourthTier: DFG should have an SSA form for use by FTL https://bugs.webkit.org/show_bug.cgi?id=118338 Source/JavaScriptCore: Reviewed by Mark Hahnenberg. Adds an SSA form to the DFG. We can convert ThreadedCPS form into SSA form after breaking critical edges. The conversion algorithm follows Aycock and Horspool, and the SSA form itself follows something I've done before, where instead of having Phi functions specify input nodes corresponding to block predecessors, we instead have Upsilon functions in the predecessors that specify which value in that block goes into which subsequent Phi. Upsilons don't have to dominate Phis (usually they don't) and they correspond to a non-SSA "mov" into the Phi's "variable". This gives all of the good properties of SSA, while ensuring that a bunch of CFG transformations don't have to be SSA-aware. So far the only DFG phases that are SSA-aware are DCE and CFA. CFG simplification is probably SSA-aware by default, though I haven't tried it. Constant folding probably needs a few tweaks, but is likely ready. Ditto for CSE, though it's not clear that we'd want to use block-local CSE when we could be doing GVN. Currently only the FTL can generate code from the SSA form, and there is no way to convert from SSA to ThreadedCPS or LoadStore. There probably will never be such a capability. In order to handle OSR exit state in the SSA, we place MovHints at Phi points. Other than that, you can reconstruct state-at-exit by forward propagating MovHints. Note that MovHint is the new SetLocal in SSA. SetLocal and GetLocal only survive into SSA if they are on captured variables, or in the case of flushes. A "live SetLocal" will be NodeMustGenerate and will always correspond to a flush. Computing the state-at-exit requires running SSA liveness analysis, OSR availability analysis, and flush liveness analysis. The FTL runs all of these prior to generating code. While OSR exit continues to be tricky, much of the logic is now factored into separate phases and the backend has to do less work to reason about what happened outside of the basic block that is being lowered. Conversion from DFG SSA to LLVM SSA is done by ensuring that we generate code in depth-first order, thus guaranteeing that a node will always be lowered (and hence have a LValue) before any of the blocks dominated by that node's block have code generated. For Upsilon/Phi, we just use alloca's. We could do something more clever there, but it's probably not worth it, at least not now. Finally, while the SSA form is currently only being converted to LLVM IR, there is nothing that prevents us from considering other backends in the future - with the caveat that this form is designed to be first lowered to a lower-level SSA before actual machine code generation commences. So we ought to either use LLVM (the intended path) or we will have to write our own SSA low-level backend. This runs all of the code that the FTL was known to run previously. No change in performance for now. But it does open some exciting possibilities! * JavaScriptCore.xcodeproj/project.pbxproj: * bytecode/Operands.h: (JSC::OperandValueTraits::dump): (JSC::Operands::fill): (Operands): (JSC::Operands::clear): (JSC::Operands::operator==): * dfg/DFGAbstractState.cpp: (JSC::DFG::AbstractState::beginBasicBlock): (JSC::DFG::setLiveValues): (DFG): (JSC::DFG::AbstractState::initialize): (JSC::DFG::AbstractState::endBasicBlock): (JSC::DFG::AbstractState::executeEffects): (JSC::DFG::AbstractState::mergeStateAtTail): (JSC::DFG::AbstractState::merge): * dfg/DFGAbstractState.h: (AbstractState): * dfg/DFGAdjacencyList.h: (JSC::DFG::AdjacencyList::justOneChild): (AdjacencyList): * dfg/DFGBasicBlock.cpp: Added. (DFG): (JSC::DFG::BasicBlock::BasicBlock): (JSC::DFG::BasicBlock::~BasicBlock): (JSC::DFG::BasicBlock::ensureLocals): (JSC::DFG::BasicBlock::isInPhis): (JSC::DFG::BasicBlock::isInBlock): (JSC::DFG::BasicBlock::removePredecessor): (JSC::DFG::BasicBlock::replacePredecessor): (JSC::DFG::BasicBlock::dump): (JSC::DFG::BasicBlock::SSAData::SSAData): (JSC::DFG::BasicBlock::SSAData::~SSAData): * dfg/DFGBasicBlock.h: (BasicBlock): (JSC::DFG::BasicBlock::operator[]): (JSC::DFG::BasicBlock::successor): (JSC::DFG::BasicBlock::successorForCondition): (SSAData): * dfg/DFGBasicBlockInlines.h: (DFG): * dfg/DFGBlockInsertionSet.cpp: Added. (DFG): (JSC::DFG::BlockInsertionSet::BlockInsertionSet): (JSC::DFG::BlockInsertionSet::~BlockInsertionSet): (JSC::DFG::BlockInsertionSet::insert): (JSC::DFG::BlockInsertionSet::insertBefore): (JSC::DFG::BlockInsertionSet::execute): * dfg/DFGBlockInsertionSet.h: Added. (DFG): (BlockInsertionSet): * dfg/DFGCFAPhase.cpp: (JSC::DFG::CFAPhase::run): * dfg/DFGCFGSimplificationPhase.cpp: * dfg/DFGCPSRethreadingPhase.cpp: (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock): * dfg/DFGCommon.cpp: (WTF::printInternal): * dfg/DFGCommon.h: (JSC::DFG::doesKill): (DFG): (JSC::DFG::killStatusForDoesKill): * dfg/DFGConstantFoldingPhase.cpp: (JSC::DFG::ConstantFoldingPhase::foldConstants): (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter): * dfg/DFGCriticalEdgeBreakingPhase.cpp: Added. (DFG): (CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::run): (JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge): (JSC::DFG::performCriticalEdgeBreaking): * dfg/DFGCriticalEdgeBreakingPhase.h: Added. (DFG): * dfg/DFGDCEPhase.cpp: (JSC::DFG::DCEPhase::run): (JSC::DFG::DCEPhase::findTypeCheckRoot): (JSC::DFG::DCEPhase::countNode): (DCEPhase): (JSC::DFG::DCEPhase::countEdge): (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren): * dfg/DFGDriver.cpp: (JSC::DFG::compile): * dfg/DFGEdge.cpp: (JSC::DFG::Edge::dump): * dfg/DFGEdge.h: (JSC::DFG::Edge::Edge): (JSC::DFG::Edge::setNode): (JSC::DFG::Edge::useKindUnchecked): (JSC::DFG::Edge::setUseKind): (JSC::DFG::Edge::setProofStatus): (JSC::DFG::Edge::willNotHaveCheck): (JSC::DFG::Edge::willHaveCheck): (Edge): (JSC::DFG::Edge::killStatusUnchecked): (JSC::DFG::Edge::killStatus): (JSC::DFG::Edge::setKillStatus): (JSC::DFG::Edge::doesKill): (JSC::DFG::Edge::doesNotKill): (JSC::DFG::Edge::shift): (JSC::DFG::Edge::makeWord): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGFlushFormat.cpp: Added. (WTF): (WTF::printInternal): * dfg/DFGFlushFormat.h: Added. (DFG): (JSC::DFG::resultFor): (JSC::DFG::useKindFor): (WTF): * dfg/DFGFlushLivenessAnalysisPhase.cpp: Added. (DFG): (FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::run): (JSC::DFG::FlushLivenessAnalysisPhase::process): (JSC::DFG::FlushLivenessAnalysisPhase::setForNode): (JSC::DFG::FlushLivenessAnalysisPhase::flushFormat): (JSC::DFG::performFlushLivenessAnalysis): * dfg/DFGFlushLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): (JSC::DFG::Graph::dumpBlockHeader): (DFG): (JSC::DFG::Graph::addForDepthFirstSort): (JSC::DFG::Graph::getBlocksInDepthFirstOrder): * dfg/DFGGraph.h: (JSC::DFG::Graph::convertToConstant): (JSC::DFG::Graph::valueProfileFor): (Graph): * dfg/DFGInsertionSet.h: (DFG): (JSC::DFG::InsertionSet::execute): * dfg/DFGLivenessAnalysisPhase.cpp: Added. (DFG): (LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::run): (JSC::DFG::LivenessAnalysisPhase::process): (JSC::DFG::LivenessAnalysisPhase::addChildUse): (JSC::DFG::performLivenessAnalysis): * dfg/DFGLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGNode.cpp: (JSC::DFG::Node::hasVariableAccessData): (DFG): * dfg/DFGNode.h: (DFG): (Node): (JSC::DFG::Node::hasLocal): (JSC::DFG::Node::variableAccessData): (JSC::DFG::Node::hasPhi): (JSC::DFG::Node::phi): (JSC::DFG::Node::takenBlock): (JSC::DFG::Node::notTakenBlock): (JSC::DFG::Node::successor): (JSC::DFG::Node::successorForCondition): (JSC::DFG::nodeComparator): (JSC::DFG::nodeListDump): (JSC::DFG::nodeMapDump): * dfg/DFGNodeFlags.cpp: (JSC::DFG::dumpNodeFlags): * dfg/DFGNodeType.h: (DFG): * dfg/DFGOSRAvailabilityAnalysisPhase.cpp: Added. (DFG): (OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::run): (JSC::DFG::performOSRAvailabilityAnalysis): * dfg/DFGOSRAvailabilityAnalysisPhase.h: Added. (DFG): * dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): * dfg/DFGPredictionInjectionPhase.cpp: (JSC::DFG::PredictionInjectionPhase::run): * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSSAConversionPhase.cpp: Added. (DFG): (SSAConversionPhase): (JSC::DFG::SSAConversionPhase::SSAConversionPhase): (JSC::DFG::SSAConversionPhase::run): (JSC::DFG::SSAConversionPhase::forwardPhiChildren): (JSC::DFG::SSAConversionPhase::forwardPhi): (JSC::DFG::SSAConversionPhase::forwardPhiEdge): (JSC::DFG::SSAConversionPhase::deduplicateChildren): (JSC::DFG::SSAConversionPhase::addFlushedLocalOp): (JSC::DFG::SSAConversionPhase::addFlushedLocalEdge): (JSC::DFG::performSSAConversion): * dfg/DFGSSAConversionPhase.h: Added. (DFG): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (Validate): (JSC::DFG::Validate::validateCPS): * dfg/DFGVariableAccessData.h: (JSC::DFG::VariableAccessData::flushFormat): (VariableAccessData): * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToLLVM.cpp: (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::lower): (JSC::FTL::LowerDFGToLLVM::createPhiVariables): (JSC::FTL::LowerDFGToLLVM::compileBlock): (JSC::FTL::LowerDFGToLLVM::compileNode): (JSC::FTL::LowerDFGToLLVM::compileUpsilon): (LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::compilePhi): (JSC::FTL::LowerDFGToLLVM::compileJSConstant): (JSC::FTL::LowerDFGToLLVM::compileWeakJSConstant): (JSC::FTL::LowerDFGToLLVM::compileGetArgument): (JSC::FTL::LowerDFGToLLVM::compileGetLocal): (JSC::FTL::LowerDFGToLLVM::compileSetLocal): (JSC::FTL::LowerDFGToLLVM::compileAdd): (JSC::FTL::LowerDFGToLLVM::compileArithSub): (JSC::FTL::LowerDFGToLLVM::compileArithMul): (JSC::FTL::LowerDFGToLLVM::compileArithDiv): (JSC::FTL::LowerDFGToLLVM::compileArithMod): (JSC::FTL::LowerDFGToLLVM::compileArithMinOrMax): (JSC::FTL::LowerDFGToLLVM::compileArithAbs): (JSC::FTL::LowerDFGToLLVM::compileArithNegate): (JSC::FTL::LowerDFGToLLVM::compileBitAnd): (JSC::FTL::LowerDFGToLLVM::compileBitOr): (JSC::FTL::LowerDFGToLLVM::compileBitXor): (JSC::FTL::LowerDFGToLLVM::compileBitRShift): (JSC::FTL::LowerDFGToLLVM::compileBitLShift): (JSC::FTL::LowerDFGToLLVM::compileBitURShift): (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber): (JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble): (JSC::FTL::LowerDFGToLLVM::compileGetButterfly): (JSC::FTL::LowerDFGToLLVM::compileGetArrayLength): (JSC::FTL::LowerDFGToLLVM::compileGetByVal): (JSC::FTL::LowerDFGToLLVM::compileGetByOffset): (JSC::FTL::LowerDFGToLLVM::compileGetGlobalVar): (JSC::FTL::LowerDFGToLLVM::compileCompareEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareLess): (JSC::FTL::LowerDFGToLLVM::compileCompareLessEq): (JSC::FTL::LowerDFGToLLVM::compileCompareGreater): (JSC::FTL::LowerDFGToLLVM::compileCompareGreaterEq): (JSC::FTL::LowerDFGToLLVM::compileLogicalNot): (JSC::FTL::LowerDFGToLLVM::speculateBackward): (JSC::FTL::LowerDFGToLLVM::lowInt32): (JSC::FTL::LowerDFGToLLVM::lowCell): (JSC::FTL::LowerDFGToLLVM::lowBoolean): (JSC::FTL::LowerDFGToLLVM::lowDouble): (JSC::FTL::LowerDFGToLLVM::lowJSValue): (JSC::FTL::LowerDFGToLLVM::lowStorage): (JSC::FTL::LowerDFGToLLVM::speculate): (JSC::FTL::LowerDFGToLLVM::speculateBoolean): (JSC::FTL::LowerDFGToLLVM::isLive): (JSC::FTL::LowerDFGToLLVM::use): (JSC::FTL::LowerDFGToLLVM::initializeOSRExitStateForBlock): (JSC::FTL::LowerDFGToLLVM::appendOSRExit): (JSC::FTL::LowerDFGToLLVM::emitOSRExitCall): (JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode): (JSC::FTL::LowerDFGToLLVM::linkOSRExitsAndCompleteInitializationBlocks): (JSC::FTL::LowerDFGToLLVM::setInt32): (JSC::FTL::LowerDFGToLLVM::setJSValue): (JSC::FTL::LowerDFGToLLVM::setBoolean): (JSC::FTL::LowerDFGToLLVM::setStorage): (JSC::FTL::LowerDFGToLLVM::setDouble): (JSC::FTL::LowerDFGToLLVM::isValid): * ftl/FTLLoweredNodeValue.h: Added. (FTL): (LoweredNodeValue): (JSC::FTL::LoweredNodeValue::LoweredNodeValue): (JSC::FTL::LoweredNodeValue::isSet): (JSC::FTL::LoweredNodeValue::operator!): (JSC::FTL::LoweredNodeValue::value): (JSC::FTL::LoweredNodeValue::block): * ftl/FTLValueFromBlock.h: (JSC::FTL::ValueFromBlock::ValueFromBlock): (ValueFromBlock): * ftl/FTLValueSource.cpp: (JSC::FTL::ValueSource::dump): * ftl/FTLValueSource.h: Source/WTF: Reviewed by Mark Hahnenberg. - Extend variadicity of PrintStream and dataLog. - Give HashSet the ability to add a span of things. - Give HashSet the ability to == another HashSet. - Note FIXME's in HashTable concerning copying performance, that affects the way that the DFG now uses HashSets and HashMaps. - Factor out the bulk-insertion logic of JSC::DFG::InsertionSet into WTF::Insertion, so that it can be used in more places. - Create a dumper for lists and maps. * WTF.xcodeproj/project.pbxproj: * wtf/DataLog.h: (WTF): (WTF::dataLog): * wtf/HashSet.h: (HashSet): (WTF): (WTF::::add): (WTF::=): * wtf/HashTable.h: (WTF::::HashTable): (WTF::=): * wtf/Insertion.h: Added. (WTF): (Insertion): (WTF::Insertion::Insertion): (WTF::Insertion::index): (WTF::Insertion::element): (WTF::Insertion::operator<): (WTF::executeInsertions): * wtf/ListDump.h: Added. (WTF): (ListDump): (WTF::ListDump::ListDump): (WTF::ListDump::dump): (MapDump): (WTF::MapDump::MapDump): (WTF::MapDump::dump): (WTF::listDump): (WTF::sortedListDump): (WTF::lessThan): (WTF::mapDump): (WTF::sortedMapDump): * wtf/PrintStream.h: (PrintStream): (WTF::PrintStream::print): Conflicts: Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj Canonical link: https://commits.webkit.org/137058@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-07-25 04:04:45 +00:00
{
}
size_t index() const { return m_index; }
B3 should be able to compile a program with ChillDiv https://bugs.webkit.org/show_bug.cgi?id=151114 Reviewed by Benjamin Poulain. Source/JavaScriptCore: This change is about a lot more than ChillDiv. I picked that as the next thing to lower because I knew that it would force me to come up with a sensible idiom for doing stepwise lowerings that require breaking basic blocks. The idea is that you want to write a loop that iterates forward over the program, which turns some operations that currently are just single Values into an entire little sub-CFGs. That requires splitting the block that contained the original Value. That's tricky if you then want to keep iterating: the index of the Value you were last looking at has now changed and your InsertionSets are now invalid. This introduces an idiom that handles this. It's BlockInsertionSet::splitBefore(). The idea is that it uses the current block before the split as the continuation after the split. When you call splitBefore(), you pass it your loop index and your InsertionSet (if applicable). It makes sure that it changes those auxiliary things in such a way that you can keep looping. This uncovered some bugs, since this is the first time that we're compiling cross edges. Because ChillDiv is really a division, I also had to write a bunch of code to support the ordinary B3 Div. While doing that, I realized that there was asymmetry to that constness of the Value constant folding methods, so I fixed that as well. * JavaScriptCore.xcodeproj/project.pbxproj: * assembler/MacroAssemblerX86Common.h: (JSC::MacroAssemblerX86Common::mul32): (JSC::MacroAssemblerX86Common::x86ConvertToDoubleWord32): (JSC::MacroAssemblerX86Common::x86Div32): (JSC::MacroAssemblerX86Common::neg32): * assembler/MacroAssemblerX86_64.h: (JSC::MacroAssemblerX86_64::mul64): (JSC::MacroAssemblerX86_64::x86ConvertToQuadWord64): (JSC::MacroAssemblerX86_64::x86Div64): (JSC::MacroAssemblerX86_64::neg64): * assembler/X86Assembler.h: (JSC::X86Assembler::idivl_r): (JSC::X86Assembler::idivq_r): (JSC::X86Assembler::cmpl_rr): (JSC::X86Assembler::cdq): (JSC::X86Assembler::cdqq): (JSC::X86Assembler::fstps): * b3/B3BasicBlock.cpp: (JSC::B3::BasicBlock::append): (JSC::B3::BasicBlock::replaceLast): (JSC::B3::BasicBlock::appendIntConstant): (JSC::B3::BasicBlock::replaceSuccessor): (JSC::B3::BasicBlock::addPredecessor): (JSC::B3::BasicBlock::replacePredecessor): (JSC::B3::BasicBlock::updatePredecessors): (JSC::B3::BasicBlock::dump): * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::values): (JSC::B3::BasicBlock::numPredecessors): (JSC::B3::BasicBlock::predecessor): (JSC::B3::BasicBlock::frequency): * b3/B3BasicBlockInlines.h: (JSC::B3::BasicBlock::appendNew): (JSC::B3::BasicBlock::replaceLastWithNew): (JSC::B3::BasicBlock::numSuccessors): * b3/B3BasicBlockUtils.h: (JSC::B3::replacePredecessor): (JSC::B3::updatePredecessors): (JSC::B3::resetReachability): * b3/B3BlockInsertionSet.cpp: Added. (JSC::B3::BlockInsertionSet::BlockInsertionSet): (JSC::B3::BlockInsertionSet::~BlockInsertionSet): (JSC::B3::BlockInsertionSet::insert): (JSC::B3::BlockInsertionSet::insertBefore): (JSC::B3::BlockInsertionSet::splitForward): (JSC::B3::BlockInsertionSet::execute): * b3/B3BlockInsertionSet.h: Added. * b3/B3Common.h: (JSC::B3::isRepresentableAs): (JSC::B3::chillDiv): * b3/B3Const32Value.cpp: (JSC::B3::Const32Value::addConstant): (JSC::B3::Const32Value::subConstant): (JSC::B3::Const32Value::divConstant): (JSC::B3::Const32Value::bitAndConstant): (JSC::B3::Const32Value::bitOrConstant): (JSC::B3::Const32Value::bitXorConstant): (JSC::B3::Const32Value::shlConstant): (JSC::B3::Const32Value::sShrConstant): (JSC::B3::Const32Value::zShrConstant): (JSC::B3::Const32Value::equalConstant): (JSC::B3::Const32Value::notEqualConstant): (JSC::B3::Const32Value::lessThanConstant): (JSC::B3::Const32Value::greaterThanConstant): (JSC::B3::Const32Value::lessEqualConstant): (JSC::B3::Const32Value::greaterEqualConstant): (JSC::B3::Const32Value::aboveConstant): (JSC::B3::Const32Value::belowConstant): (JSC::B3::Const32Value::aboveEqualConstant): (JSC::B3::Const32Value::belowEqualConstant): * b3/B3Const32Value.h: * b3/B3Const64Value.cpp: (JSC::B3::Const64Value::addConstant): (JSC::B3::Const64Value::subConstant): (JSC::B3::Const64Value::divConstant): (JSC::B3::Const64Value::bitAndConstant): (JSC::B3::Const64Value::bitOrConstant): (JSC::B3::Const64Value::bitXorConstant): (JSC::B3::Const64Value::shlConstant): (JSC::B3::Const64Value::sShrConstant): (JSC::B3::Const64Value::zShrConstant): (JSC::B3::Const64Value::equalConstant): (JSC::B3::Const64Value::notEqualConstant): (JSC::B3::Const64Value::lessThanConstant): (JSC::B3::Const64Value::greaterThanConstant): (JSC::B3::Const64Value::lessEqualConstant): (JSC::B3::Const64Value::greaterEqualConstant): (JSC::B3::Const64Value::aboveConstant): (JSC::B3::Const64Value::belowConstant): (JSC::B3::Const64Value::aboveEqualConstant): (JSC::B3::Const64Value::belowEqualConstant): * b3/B3Const64Value.h: * b3/B3ConstDoubleValue.cpp: (JSC::B3::ConstDoubleValue::addConstant): (JSC::B3::ConstDoubleValue::subConstant): (JSC::B3::ConstDoubleValue::divConstant): (JSC::B3::ConstDoubleValue::equalConstant): (JSC::B3::ConstDoubleValue::notEqualConstant): (JSC::B3::ConstDoubleValue::lessThanConstant): (JSC::B3::ConstDoubleValue::greaterThanConstant): (JSC::B3::ConstDoubleValue::lessEqualConstant): (JSC::B3::ConstDoubleValue::greaterEqualConstant): * b3/B3ConstDoubleValue.h: * b3/B3ControlValue.cpp: (JSC::B3::ControlValue::~ControlValue): (JSC::B3::ControlValue::replaceSuccessor): (JSC::B3::ControlValue::convertToJump): * b3/B3ControlValue.h: * b3/B3Generate.cpp: (JSC::B3::generateToAir): * b3/B3GenericFrequentedBlock.h: (JSC::B3::GenericFrequentedBlock::block): (JSC::B3::GenericFrequentedBlock::frequency): (JSC::B3::GenericFrequentedBlock::dump): * b3/B3InsertionSet.cpp: (JSC::B3::InsertionSet::insertIntConstant): (JSC::B3::InsertionSet::execute): * b3/B3InsertionSet.h: * b3/B3LowerMacros.cpp: Added. (JSC::B3::lowerMacros): * b3/B3LowerMacros.h: Added. * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::lower): * b3/B3Opcode.h: * b3/B3Procedure.cpp: (JSC::B3::Procedure::addBlock): (JSC::B3::Procedure::addIntConstant): (JSC::B3::Procedure::addBoolConstant): (JSC::B3::Procedure::resetValueOwners): * b3/B3Procedure.h: (JSC::B3::Procedure::takeByproducts): * b3/B3ReduceStrength.cpp: * b3/B3Validate.cpp: * b3/B3Value.cpp: (JSC::B3::Value::addConstant): (JSC::B3::Value::subConstant): (JSC::B3::Value::divConstant): (JSC::B3::Value::bitAndConstant): (JSC::B3::Value::bitOrConstant): (JSC::B3::Value::bitXorConstant): (JSC::B3::Value::shlConstant): (JSC::B3::Value::sShrConstant): (JSC::B3::Value::zShrConstant): (JSC::B3::Value::equalConstant): (JSC::B3::Value::notEqualConstant): (JSC::B3::Value::lessThanConstant): (JSC::B3::Value::greaterThanConstant): (JSC::B3::Value::lessEqualConstant): (JSC::B3::Value::greaterEqualConstant): (JSC::B3::Value::aboveConstant): (JSC::B3::Value::belowConstant): (JSC::B3::Value::aboveEqualConstant): (JSC::B3::Value::belowEqualConstant): * b3/B3Value.h: * b3/air/AirGenerate.cpp: (JSC::B3::Air::generate): * b3/air/AirInstInlines.h: (JSC::B3::Air::isUrshift64Valid): (JSC::B3::Air::isX86DivHelperValid): (JSC::B3::Air::isX86ConvertToDoubleWord32Valid): (JSC::B3::Air::isX86ConvertToDoubleWord64Valid): (JSC::B3::Air::isX86Div32Valid): (JSC::B3::Air::isX86Div64Valid): * b3/air/AirOpcode.opcodes: * b3/air/AirSimplifyCFG.cpp: (JSC::B3::Air::simplifyCFG): * b3/testb3.cpp: (JSC::B3::testCallFunctionWithHellaDoubleArguments): (JSC::B3::testChillDiv): (JSC::B3::testChillDivTwice): (JSC::B3::testChillDiv64): (JSC::B3::run): * dfg/DFGBlockInsertionSet.h: * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileArithDiv): (JSC::DFG::SpeculativeJIT::compileArithMod): * jit/JITArithmetic.cpp: (JSC::JIT::emit_op_mod): * jit/JITArithmetic32_64.cpp: (JSC::JIT::emit_op_mod): * wasm/WASMFunctionCompiler.h: (JSC::WASMFunctionCompiler::buildBinaryI32): Source/WTF: Needed to beef up some compiler algorithms. All of the hardening was about making them work with objects that have move semantics but not copy semantics. This arises in B3 basic block insertion sets. * wtf/BubbleSort.h: (WTF::bubbleSort): * wtf/Insertion.h: (WTF::Insertion::Insertion): (WTF::Insertion::index): (WTF::Insertion::element): (WTF::Insertion::operator<): (WTF::executeInsertions): Canonical link: https://commits.webkit.org/169327@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-11-11 07:21:23 +00:00
const T& element() const { return m_element; }
T& element() { return m_element; }
fourthTier: DFG should have an SSA form for use by FTL https://bugs.webkit.org/show_bug.cgi?id=118338 Source/JavaScriptCore: Reviewed by Mark Hahnenberg. Adds an SSA form to the DFG. We can convert ThreadedCPS form into SSA form after breaking critical edges. The conversion algorithm follows Aycock and Horspool, and the SSA form itself follows something I've done before, where instead of having Phi functions specify input nodes corresponding to block predecessors, we instead have Upsilon functions in the predecessors that specify which value in that block goes into which subsequent Phi. Upsilons don't have to dominate Phis (usually they don't) and they correspond to a non-SSA "mov" into the Phi's "variable". This gives all of the good properties of SSA, while ensuring that a bunch of CFG transformations don't have to be SSA-aware. So far the only DFG phases that are SSA-aware are DCE and CFA. CFG simplification is probably SSA-aware by default, though I haven't tried it. Constant folding probably needs a few tweaks, but is likely ready. Ditto for CSE, though it's not clear that we'd want to use block-local CSE when we could be doing GVN. Currently only the FTL can generate code from the SSA form, and there is no way to convert from SSA to ThreadedCPS or LoadStore. There probably will never be such a capability. In order to handle OSR exit state in the SSA, we place MovHints at Phi points. Other than that, you can reconstruct state-at-exit by forward propagating MovHints. Note that MovHint is the new SetLocal in SSA. SetLocal and GetLocal only survive into SSA if they are on captured variables, or in the case of flushes. A "live SetLocal" will be NodeMustGenerate and will always correspond to a flush. Computing the state-at-exit requires running SSA liveness analysis, OSR availability analysis, and flush liveness analysis. The FTL runs all of these prior to generating code. While OSR exit continues to be tricky, much of the logic is now factored into separate phases and the backend has to do less work to reason about what happened outside of the basic block that is being lowered. Conversion from DFG SSA to LLVM SSA is done by ensuring that we generate code in depth-first order, thus guaranteeing that a node will always be lowered (and hence have a LValue) before any of the blocks dominated by that node's block have code generated. For Upsilon/Phi, we just use alloca's. We could do something more clever there, but it's probably not worth it, at least not now. Finally, while the SSA form is currently only being converted to LLVM IR, there is nothing that prevents us from considering other backends in the future - with the caveat that this form is designed to be first lowered to a lower-level SSA before actual machine code generation commences. So we ought to either use LLVM (the intended path) or we will have to write our own SSA low-level backend. This runs all of the code that the FTL was known to run previously. No change in performance for now. But it does open some exciting possibilities! * JavaScriptCore.xcodeproj/project.pbxproj: * bytecode/Operands.h: (JSC::OperandValueTraits::dump): (JSC::Operands::fill): (Operands): (JSC::Operands::clear): (JSC::Operands::operator==): * dfg/DFGAbstractState.cpp: (JSC::DFG::AbstractState::beginBasicBlock): (JSC::DFG::setLiveValues): (DFG): (JSC::DFG::AbstractState::initialize): (JSC::DFG::AbstractState::endBasicBlock): (JSC::DFG::AbstractState::executeEffects): (JSC::DFG::AbstractState::mergeStateAtTail): (JSC::DFG::AbstractState::merge): * dfg/DFGAbstractState.h: (AbstractState): * dfg/DFGAdjacencyList.h: (JSC::DFG::AdjacencyList::justOneChild): (AdjacencyList): * dfg/DFGBasicBlock.cpp: Added. (DFG): (JSC::DFG::BasicBlock::BasicBlock): (JSC::DFG::BasicBlock::~BasicBlock): (JSC::DFG::BasicBlock::ensureLocals): (JSC::DFG::BasicBlock::isInPhis): (JSC::DFG::BasicBlock::isInBlock): (JSC::DFG::BasicBlock::removePredecessor): (JSC::DFG::BasicBlock::replacePredecessor): (JSC::DFG::BasicBlock::dump): (JSC::DFG::BasicBlock::SSAData::SSAData): (JSC::DFG::BasicBlock::SSAData::~SSAData): * dfg/DFGBasicBlock.h: (BasicBlock): (JSC::DFG::BasicBlock::operator[]): (JSC::DFG::BasicBlock::successor): (JSC::DFG::BasicBlock::successorForCondition): (SSAData): * dfg/DFGBasicBlockInlines.h: (DFG): * dfg/DFGBlockInsertionSet.cpp: Added. (DFG): (JSC::DFG::BlockInsertionSet::BlockInsertionSet): (JSC::DFG::BlockInsertionSet::~BlockInsertionSet): (JSC::DFG::BlockInsertionSet::insert): (JSC::DFG::BlockInsertionSet::insertBefore): (JSC::DFG::BlockInsertionSet::execute): * dfg/DFGBlockInsertionSet.h: Added. (DFG): (BlockInsertionSet): * dfg/DFGCFAPhase.cpp: (JSC::DFG::CFAPhase::run): * dfg/DFGCFGSimplificationPhase.cpp: * dfg/DFGCPSRethreadingPhase.cpp: (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock): * dfg/DFGCommon.cpp: (WTF::printInternal): * dfg/DFGCommon.h: (JSC::DFG::doesKill): (DFG): (JSC::DFG::killStatusForDoesKill): * dfg/DFGConstantFoldingPhase.cpp: (JSC::DFG::ConstantFoldingPhase::foldConstants): (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter): * dfg/DFGCriticalEdgeBreakingPhase.cpp: Added. (DFG): (CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::run): (JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge): (JSC::DFG::performCriticalEdgeBreaking): * dfg/DFGCriticalEdgeBreakingPhase.h: Added. (DFG): * dfg/DFGDCEPhase.cpp: (JSC::DFG::DCEPhase::run): (JSC::DFG::DCEPhase::findTypeCheckRoot): (JSC::DFG::DCEPhase::countNode): (DCEPhase): (JSC::DFG::DCEPhase::countEdge): (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren): * dfg/DFGDriver.cpp: (JSC::DFG::compile): * dfg/DFGEdge.cpp: (JSC::DFG::Edge::dump): * dfg/DFGEdge.h: (JSC::DFG::Edge::Edge): (JSC::DFG::Edge::setNode): (JSC::DFG::Edge::useKindUnchecked): (JSC::DFG::Edge::setUseKind): (JSC::DFG::Edge::setProofStatus): (JSC::DFG::Edge::willNotHaveCheck): (JSC::DFG::Edge::willHaveCheck): (Edge): (JSC::DFG::Edge::killStatusUnchecked): (JSC::DFG::Edge::killStatus): (JSC::DFG::Edge::setKillStatus): (JSC::DFG::Edge::doesKill): (JSC::DFG::Edge::doesNotKill): (JSC::DFG::Edge::shift): (JSC::DFG::Edge::makeWord): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGFlushFormat.cpp: Added. (WTF): (WTF::printInternal): * dfg/DFGFlushFormat.h: Added. (DFG): (JSC::DFG::resultFor): (JSC::DFG::useKindFor): (WTF): * dfg/DFGFlushLivenessAnalysisPhase.cpp: Added. (DFG): (FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::run): (JSC::DFG::FlushLivenessAnalysisPhase::process): (JSC::DFG::FlushLivenessAnalysisPhase::setForNode): (JSC::DFG::FlushLivenessAnalysisPhase::flushFormat): (JSC::DFG::performFlushLivenessAnalysis): * dfg/DFGFlushLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): (JSC::DFG::Graph::dumpBlockHeader): (DFG): (JSC::DFG::Graph::addForDepthFirstSort): (JSC::DFG::Graph::getBlocksInDepthFirstOrder): * dfg/DFGGraph.h: (JSC::DFG::Graph::convertToConstant): (JSC::DFG::Graph::valueProfileFor): (Graph): * dfg/DFGInsertionSet.h: (DFG): (JSC::DFG::InsertionSet::execute): * dfg/DFGLivenessAnalysisPhase.cpp: Added. (DFG): (LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::run): (JSC::DFG::LivenessAnalysisPhase::process): (JSC::DFG::LivenessAnalysisPhase::addChildUse): (JSC::DFG::performLivenessAnalysis): * dfg/DFGLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGNode.cpp: (JSC::DFG::Node::hasVariableAccessData): (DFG): * dfg/DFGNode.h: (DFG): (Node): (JSC::DFG::Node::hasLocal): (JSC::DFG::Node::variableAccessData): (JSC::DFG::Node::hasPhi): (JSC::DFG::Node::phi): (JSC::DFG::Node::takenBlock): (JSC::DFG::Node::notTakenBlock): (JSC::DFG::Node::successor): (JSC::DFG::Node::successorForCondition): (JSC::DFG::nodeComparator): (JSC::DFG::nodeListDump): (JSC::DFG::nodeMapDump): * dfg/DFGNodeFlags.cpp: (JSC::DFG::dumpNodeFlags): * dfg/DFGNodeType.h: (DFG): * dfg/DFGOSRAvailabilityAnalysisPhase.cpp: Added. (DFG): (OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::run): (JSC::DFG::performOSRAvailabilityAnalysis): * dfg/DFGOSRAvailabilityAnalysisPhase.h: Added. (DFG): * dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): * dfg/DFGPredictionInjectionPhase.cpp: (JSC::DFG::PredictionInjectionPhase::run): * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSSAConversionPhase.cpp: Added. (DFG): (SSAConversionPhase): (JSC::DFG::SSAConversionPhase::SSAConversionPhase): (JSC::DFG::SSAConversionPhase::run): (JSC::DFG::SSAConversionPhase::forwardPhiChildren): (JSC::DFG::SSAConversionPhase::forwardPhi): (JSC::DFG::SSAConversionPhase::forwardPhiEdge): (JSC::DFG::SSAConversionPhase::deduplicateChildren): (JSC::DFG::SSAConversionPhase::addFlushedLocalOp): (JSC::DFG::SSAConversionPhase::addFlushedLocalEdge): (JSC::DFG::performSSAConversion): * dfg/DFGSSAConversionPhase.h: Added. (DFG): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (Validate): (JSC::DFG::Validate::validateCPS): * dfg/DFGVariableAccessData.h: (JSC::DFG::VariableAccessData::flushFormat): (VariableAccessData): * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToLLVM.cpp: (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::lower): (JSC::FTL::LowerDFGToLLVM::createPhiVariables): (JSC::FTL::LowerDFGToLLVM::compileBlock): (JSC::FTL::LowerDFGToLLVM::compileNode): (JSC::FTL::LowerDFGToLLVM::compileUpsilon): (LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::compilePhi): (JSC::FTL::LowerDFGToLLVM::compileJSConstant): (JSC::FTL::LowerDFGToLLVM::compileWeakJSConstant): (JSC::FTL::LowerDFGToLLVM::compileGetArgument): (JSC::FTL::LowerDFGToLLVM::compileGetLocal): (JSC::FTL::LowerDFGToLLVM::compileSetLocal): (JSC::FTL::LowerDFGToLLVM::compileAdd): (JSC::FTL::LowerDFGToLLVM::compileArithSub): (JSC::FTL::LowerDFGToLLVM::compileArithMul): (JSC::FTL::LowerDFGToLLVM::compileArithDiv): (JSC::FTL::LowerDFGToLLVM::compileArithMod): (JSC::FTL::LowerDFGToLLVM::compileArithMinOrMax): (JSC::FTL::LowerDFGToLLVM::compileArithAbs): (JSC::FTL::LowerDFGToLLVM::compileArithNegate): (JSC::FTL::LowerDFGToLLVM::compileBitAnd): (JSC::FTL::LowerDFGToLLVM::compileBitOr): (JSC::FTL::LowerDFGToLLVM::compileBitXor): (JSC::FTL::LowerDFGToLLVM::compileBitRShift): (JSC::FTL::LowerDFGToLLVM::compileBitLShift): (JSC::FTL::LowerDFGToLLVM::compileBitURShift): (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber): (JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble): (JSC::FTL::LowerDFGToLLVM::compileGetButterfly): (JSC::FTL::LowerDFGToLLVM::compileGetArrayLength): (JSC::FTL::LowerDFGToLLVM::compileGetByVal): (JSC::FTL::LowerDFGToLLVM::compileGetByOffset): (JSC::FTL::LowerDFGToLLVM::compileGetGlobalVar): (JSC::FTL::LowerDFGToLLVM::compileCompareEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareLess): (JSC::FTL::LowerDFGToLLVM::compileCompareLessEq): (JSC::FTL::LowerDFGToLLVM::compileCompareGreater): (JSC::FTL::LowerDFGToLLVM::compileCompareGreaterEq): (JSC::FTL::LowerDFGToLLVM::compileLogicalNot): (JSC::FTL::LowerDFGToLLVM::speculateBackward): (JSC::FTL::LowerDFGToLLVM::lowInt32): (JSC::FTL::LowerDFGToLLVM::lowCell): (JSC::FTL::LowerDFGToLLVM::lowBoolean): (JSC::FTL::LowerDFGToLLVM::lowDouble): (JSC::FTL::LowerDFGToLLVM::lowJSValue): (JSC::FTL::LowerDFGToLLVM::lowStorage): (JSC::FTL::LowerDFGToLLVM::speculate): (JSC::FTL::LowerDFGToLLVM::speculateBoolean): (JSC::FTL::LowerDFGToLLVM::isLive): (JSC::FTL::LowerDFGToLLVM::use): (JSC::FTL::LowerDFGToLLVM::initializeOSRExitStateForBlock): (JSC::FTL::LowerDFGToLLVM::appendOSRExit): (JSC::FTL::LowerDFGToLLVM::emitOSRExitCall): (JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode): (JSC::FTL::LowerDFGToLLVM::linkOSRExitsAndCompleteInitializationBlocks): (JSC::FTL::LowerDFGToLLVM::setInt32): (JSC::FTL::LowerDFGToLLVM::setJSValue): (JSC::FTL::LowerDFGToLLVM::setBoolean): (JSC::FTL::LowerDFGToLLVM::setStorage): (JSC::FTL::LowerDFGToLLVM::setDouble): (JSC::FTL::LowerDFGToLLVM::isValid): * ftl/FTLLoweredNodeValue.h: Added. (FTL): (LoweredNodeValue): (JSC::FTL::LoweredNodeValue::LoweredNodeValue): (JSC::FTL::LoweredNodeValue::isSet): (JSC::FTL::LoweredNodeValue::operator!): (JSC::FTL::LoweredNodeValue::value): (JSC::FTL::LoweredNodeValue::block): * ftl/FTLValueFromBlock.h: (JSC::FTL::ValueFromBlock::ValueFromBlock): (ValueFromBlock): * ftl/FTLValueSource.cpp: (JSC::FTL::ValueSource::dump): * ftl/FTLValueSource.h: Source/WTF: Reviewed by Mark Hahnenberg. - Extend variadicity of PrintStream and dataLog. - Give HashSet the ability to add a span of things. - Give HashSet the ability to == another HashSet. - Note FIXME's in HashTable concerning copying performance, that affects the way that the DFG now uses HashSets and HashMaps. - Factor out the bulk-insertion logic of JSC::DFG::InsertionSet into WTF::Insertion, so that it can be used in more places. - Create a dumper for lists and maps. * WTF.xcodeproj/project.pbxproj: * wtf/DataLog.h: (WTF): (WTF::dataLog): * wtf/HashSet.h: (HashSet): (WTF): (WTF::::add): (WTF::=): * wtf/HashTable.h: (WTF::::HashTable): (WTF::=): * wtf/Insertion.h: Added. (WTF): (Insertion): (WTF::Insertion::Insertion): (WTF::Insertion::index): (WTF::Insertion::element): (WTF::Insertion::operator<): (WTF::executeInsertions): * wtf/ListDump.h: Added. (WTF): (ListDump): (WTF::ListDump::ListDump): (WTF::ListDump::dump): (MapDump): (WTF::MapDump::MapDump): (WTF::MapDump::dump): (WTF::listDump): (WTF::sortedListDump): (WTF::lessThan): (WTF::mapDump): (WTF::sortedMapDump): * wtf/PrintStream.h: (PrintStream): (WTF::PrintStream::print): Conflicts: Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj Canonical link: https://commits.webkit.org/137058@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-07-25 04:04:45 +00:00
bool operator<(const Insertion& other) const
{
return m_index < other.m_index;
}
private:
size_t m_index { 0 };
T m_element { };
fourthTier: DFG should have an SSA form for use by FTL https://bugs.webkit.org/show_bug.cgi?id=118338 Source/JavaScriptCore: Reviewed by Mark Hahnenberg. Adds an SSA form to the DFG. We can convert ThreadedCPS form into SSA form after breaking critical edges. The conversion algorithm follows Aycock and Horspool, and the SSA form itself follows something I've done before, where instead of having Phi functions specify input nodes corresponding to block predecessors, we instead have Upsilon functions in the predecessors that specify which value in that block goes into which subsequent Phi. Upsilons don't have to dominate Phis (usually they don't) and they correspond to a non-SSA "mov" into the Phi's "variable". This gives all of the good properties of SSA, while ensuring that a bunch of CFG transformations don't have to be SSA-aware. So far the only DFG phases that are SSA-aware are DCE and CFA. CFG simplification is probably SSA-aware by default, though I haven't tried it. Constant folding probably needs a few tweaks, but is likely ready. Ditto for CSE, though it's not clear that we'd want to use block-local CSE when we could be doing GVN. Currently only the FTL can generate code from the SSA form, and there is no way to convert from SSA to ThreadedCPS or LoadStore. There probably will never be such a capability. In order to handle OSR exit state in the SSA, we place MovHints at Phi points. Other than that, you can reconstruct state-at-exit by forward propagating MovHints. Note that MovHint is the new SetLocal in SSA. SetLocal and GetLocal only survive into SSA if they are on captured variables, or in the case of flushes. A "live SetLocal" will be NodeMustGenerate and will always correspond to a flush. Computing the state-at-exit requires running SSA liveness analysis, OSR availability analysis, and flush liveness analysis. The FTL runs all of these prior to generating code. While OSR exit continues to be tricky, much of the logic is now factored into separate phases and the backend has to do less work to reason about what happened outside of the basic block that is being lowered. Conversion from DFG SSA to LLVM SSA is done by ensuring that we generate code in depth-first order, thus guaranteeing that a node will always be lowered (and hence have a LValue) before any of the blocks dominated by that node's block have code generated. For Upsilon/Phi, we just use alloca's. We could do something more clever there, but it's probably not worth it, at least not now. Finally, while the SSA form is currently only being converted to LLVM IR, there is nothing that prevents us from considering other backends in the future - with the caveat that this form is designed to be first lowered to a lower-level SSA before actual machine code generation commences. So we ought to either use LLVM (the intended path) or we will have to write our own SSA low-level backend. This runs all of the code that the FTL was known to run previously. No change in performance for now. But it does open some exciting possibilities! * JavaScriptCore.xcodeproj/project.pbxproj: * bytecode/Operands.h: (JSC::OperandValueTraits::dump): (JSC::Operands::fill): (Operands): (JSC::Operands::clear): (JSC::Operands::operator==): * dfg/DFGAbstractState.cpp: (JSC::DFG::AbstractState::beginBasicBlock): (JSC::DFG::setLiveValues): (DFG): (JSC::DFG::AbstractState::initialize): (JSC::DFG::AbstractState::endBasicBlock): (JSC::DFG::AbstractState::executeEffects): (JSC::DFG::AbstractState::mergeStateAtTail): (JSC::DFG::AbstractState::merge): * dfg/DFGAbstractState.h: (AbstractState): * dfg/DFGAdjacencyList.h: (JSC::DFG::AdjacencyList::justOneChild): (AdjacencyList): * dfg/DFGBasicBlock.cpp: Added. (DFG): (JSC::DFG::BasicBlock::BasicBlock): (JSC::DFG::BasicBlock::~BasicBlock): (JSC::DFG::BasicBlock::ensureLocals): (JSC::DFG::BasicBlock::isInPhis): (JSC::DFG::BasicBlock::isInBlock): (JSC::DFG::BasicBlock::removePredecessor): (JSC::DFG::BasicBlock::replacePredecessor): (JSC::DFG::BasicBlock::dump): (JSC::DFG::BasicBlock::SSAData::SSAData): (JSC::DFG::BasicBlock::SSAData::~SSAData): * dfg/DFGBasicBlock.h: (BasicBlock): (JSC::DFG::BasicBlock::operator[]): (JSC::DFG::BasicBlock::successor): (JSC::DFG::BasicBlock::successorForCondition): (SSAData): * dfg/DFGBasicBlockInlines.h: (DFG): * dfg/DFGBlockInsertionSet.cpp: Added. (DFG): (JSC::DFG::BlockInsertionSet::BlockInsertionSet): (JSC::DFG::BlockInsertionSet::~BlockInsertionSet): (JSC::DFG::BlockInsertionSet::insert): (JSC::DFG::BlockInsertionSet::insertBefore): (JSC::DFG::BlockInsertionSet::execute): * dfg/DFGBlockInsertionSet.h: Added. (DFG): (BlockInsertionSet): * dfg/DFGCFAPhase.cpp: (JSC::DFG::CFAPhase::run): * dfg/DFGCFGSimplificationPhase.cpp: * dfg/DFGCPSRethreadingPhase.cpp: (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock): * dfg/DFGCommon.cpp: (WTF::printInternal): * dfg/DFGCommon.h: (JSC::DFG::doesKill): (DFG): (JSC::DFG::killStatusForDoesKill): * dfg/DFGConstantFoldingPhase.cpp: (JSC::DFG::ConstantFoldingPhase::foldConstants): (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter): * dfg/DFGCriticalEdgeBreakingPhase.cpp: Added. (DFG): (CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::run): (JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge): (JSC::DFG::performCriticalEdgeBreaking): * dfg/DFGCriticalEdgeBreakingPhase.h: Added. (DFG): * dfg/DFGDCEPhase.cpp: (JSC::DFG::DCEPhase::run): (JSC::DFG::DCEPhase::findTypeCheckRoot): (JSC::DFG::DCEPhase::countNode): (DCEPhase): (JSC::DFG::DCEPhase::countEdge): (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren): * dfg/DFGDriver.cpp: (JSC::DFG::compile): * dfg/DFGEdge.cpp: (JSC::DFG::Edge::dump): * dfg/DFGEdge.h: (JSC::DFG::Edge::Edge): (JSC::DFG::Edge::setNode): (JSC::DFG::Edge::useKindUnchecked): (JSC::DFG::Edge::setUseKind): (JSC::DFG::Edge::setProofStatus): (JSC::DFG::Edge::willNotHaveCheck): (JSC::DFG::Edge::willHaveCheck): (Edge): (JSC::DFG::Edge::killStatusUnchecked): (JSC::DFG::Edge::killStatus): (JSC::DFG::Edge::setKillStatus): (JSC::DFG::Edge::doesKill): (JSC::DFG::Edge::doesNotKill): (JSC::DFG::Edge::shift): (JSC::DFG::Edge::makeWord): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGFlushFormat.cpp: Added. (WTF): (WTF::printInternal): * dfg/DFGFlushFormat.h: Added. (DFG): (JSC::DFG::resultFor): (JSC::DFG::useKindFor): (WTF): * dfg/DFGFlushLivenessAnalysisPhase.cpp: Added. (DFG): (FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::run): (JSC::DFG::FlushLivenessAnalysisPhase::process): (JSC::DFG::FlushLivenessAnalysisPhase::setForNode): (JSC::DFG::FlushLivenessAnalysisPhase::flushFormat): (JSC::DFG::performFlushLivenessAnalysis): * dfg/DFGFlushLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): (JSC::DFG::Graph::dumpBlockHeader): (DFG): (JSC::DFG::Graph::addForDepthFirstSort): (JSC::DFG::Graph::getBlocksInDepthFirstOrder): * dfg/DFGGraph.h: (JSC::DFG::Graph::convertToConstant): (JSC::DFG::Graph::valueProfileFor): (Graph): * dfg/DFGInsertionSet.h: (DFG): (JSC::DFG::InsertionSet::execute): * dfg/DFGLivenessAnalysisPhase.cpp: Added. (DFG): (LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::run): (JSC::DFG::LivenessAnalysisPhase::process): (JSC::DFG::LivenessAnalysisPhase::addChildUse): (JSC::DFG::performLivenessAnalysis): * dfg/DFGLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGNode.cpp: (JSC::DFG::Node::hasVariableAccessData): (DFG): * dfg/DFGNode.h: (DFG): (Node): (JSC::DFG::Node::hasLocal): (JSC::DFG::Node::variableAccessData): (JSC::DFG::Node::hasPhi): (JSC::DFG::Node::phi): (JSC::DFG::Node::takenBlock): (JSC::DFG::Node::notTakenBlock): (JSC::DFG::Node::successor): (JSC::DFG::Node::successorForCondition): (JSC::DFG::nodeComparator): (JSC::DFG::nodeListDump): (JSC::DFG::nodeMapDump): * dfg/DFGNodeFlags.cpp: (JSC::DFG::dumpNodeFlags): * dfg/DFGNodeType.h: (DFG): * dfg/DFGOSRAvailabilityAnalysisPhase.cpp: Added. (DFG): (OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::run): (JSC::DFG::performOSRAvailabilityAnalysis): * dfg/DFGOSRAvailabilityAnalysisPhase.h: Added. (DFG): * dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): * dfg/DFGPredictionInjectionPhase.cpp: (JSC::DFG::PredictionInjectionPhase::run): * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSSAConversionPhase.cpp: Added. (DFG): (SSAConversionPhase): (JSC::DFG::SSAConversionPhase::SSAConversionPhase): (JSC::DFG::SSAConversionPhase::run): (JSC::DFG::SSAConversionPhase::forwardPhiChildren): (JSC::DFG::SSAConversionPhase::forwardPhi): (JSC::DFG::SSAConversionPhase::forwardPhiEdge): (JSC::DFG::SSAConversionPhase::deduplicateChildren): (JSC::DFG::SSAConversionPhase::addFlushedLocalOp): (JSC::DFG::SSAConversionPhase::addFlushedLocalEdge): (JSC::DFG::performSSAConversion): * dfg/DFGSSAConversionPhase.h: Added. (DFG): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (Validate): (JSC::DFG::Validate::validateCPS): * dfg/DFGVariableAccessData.h: (JSC::DFG::VariableAccessData::flushFormat): (VariableAccessData): * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToLLVM.cpp: (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::lower): (JSC::FTL::LowerDFGToLLVM::createPhiVariables): (JSC::FTL::LowerDFGToLLVM::compileBlock): (JSC::FTL::LowerDFGToLLVM::compileNode): (JSC::FTL::LowerDFGToLLVM::compileUpsilon): (LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::compilePhi): (JSC::FTL::LowerDFGToLLVM::compileJSConstant): (JSC::FTL::LowerDFGToLLVM::compileWeakJSConstant): (JSC::FTL::LowerDFGToLLVM::compileGetArgument): (JSC::FTL::LowerDFGToLLVM::compileGetLocal): (JSC::FTL::LowerDFGToLLVM::compileSetLocal): (JSC::FTL::LowerDFGToLLVM::compileAdd): (JSC::FTL::LowerDFGToLLVM::compileArithSub): (JSC::FTL::LowerDFGToLLVM::compileArithMul): (JSC::FTL::LowerDFGToLLVM::compileArithDiv): (JSC::FTL::LowerDFGToLLVM::compileArithMod): (JSC::FTL::LowerDFGToLLVM::compileArithMinOrMax): (JSC::FTL::LowerDFGToLLVM::compileArithAbs): (JSC::FTL::LowerDFGToLLVM::compileArithNegate): (JSC::FTL::LowerDFGToLLVM::compileBitAnd): (JSC::FTL::LowerDFGToLLVM::compileBitOr): (JSC::FTL::LowerDFGToLLVM::compileBitXor): (JSC::FTL::LowerDFGToLLVM::compileBitRShift): (JSC::FTL::LowerDFGToLLVM::compileBitLShift): (JSC::FTL::LowerDFGToLLVM::compileBitURShift): (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber): (JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble): (JSC::FTL::LowerDFGToLLVM::compileGetButterfly): (JSC::FTL::LowerDFGToLLVM::compileGetArrayLength): (JSC::FTL::LowerDFGToLLVM::compileGetByVal): (JSC::FTL::LowerDFGToLLVM::compileGetByOffset): (JSC::FTL::LowerDFGToLLVM::compileGetGlobalVar): (JSC::FTL::LowerDFGToLLVM::compileCompareEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareLess): (JSC::FTL::LowerDFGToLLVM::compileCompareLessEq): (JSC::FTL::LowerDFGToLLVM::compileCompareGreater): (JSC::FTL::LowerDFGToLLVM::compileCompareGreaterEq): (JSC::FTL::LowerDFGToLLVM::compileLogicalNot): (JSC::FTL::LowerDFGToLLVM::speculateBackward): (JSC::FTL::LowerDFGToLLVM::lowInt32): (JSC::FTL::LowerDFGToLLVM::lowCell): (JSC::FTL::LowerDFGToLLVM::lowBoolean): (JSC::FTL::LowerDFGToLLVM::lowDouble): (JSC::FTL::LowerDFGToLLVM::lowJSValue): (JSC::FTL::LowerDFGToLLVM::lowStorage): (JSC::FTL::LowerDFGToLLVM::speculate): (JSC::FTL::LowerDFGToLLVM::speculateBoolean): (JSC::FTL::LowerDFGToLLVM::isLive): (JSC::FTL::LowerDFGToLLVM::use): (JSC::FTL::LowerDFGToLLVM::initializeOSRExitStateForBlock): (JSC::FTL::LowerDFGToLLVM::appendOSRExit): (JSC::FTL::LowerDFGToLLVM::emitOSRExitCall): (JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode): (JSC::FTL::LowerDFGToLLVM::linkOSRExitsAndCompleteInitializationBlocks): (JSC::FTL::LowerDFGToLLVM::setInt32): (JSC::FTL::LowerDFGToLLVM::setJSValue): (JSC::FTL::LowerDFGToLLVM::setBoolean): (JSC::FTL::LowerDFGToLLVM::setStorage): (JSC::FTL::LowerDFGToLLVM::setDouble): (JSC::FTL::LowerDFGToLLVM::isValid): * ftl/FTLLoweredNodeValue.h: Added. (FTL): (LoweredNodeValue): (JSC::FTL::LoweredNodeValue::LoweredNodeValue): (JSC::FTL::LoweredNodeValue::isSet): (JSC::FTL::LoweredNodeValue::operator!): (JSC::FTL::LoweredNodeValue::value): (JSC::FTL::LoweredNodeValue::block): * ftl/FTLValueFromBlock.h: (JSC::FTL::ValueFromBlock::ValueFromBlock): (ValueFromBlock): * ftl/FTLValueSource.cpp: (JSC::FTL::ValueSource::dump): * ftl/FTLValueSource.h: Source/WTF: Reviewed by Mark Hahnenberg. - Extend variadicity of PrintStream and dataLog. - Give HashSet the ability to add a span of things. - Give HashSet the ability to == another HashSet. - Note FIXME's in HashTable concerning copying performance, that affects the way that the DFG now uses HashSets and HashMaps. - Factor out the bulk-insertion logic of JSC::DFG::InsertionSet into WTF::Insertion, so that it can be used in more places. - Create a dumper for lists and maps. * WTF.xcodeproj/project.pbxproj: * wtf/DataLog.h: (WTF): (WTF::dataLog): * wtf/HashSet.h: (HashSet): (WTF): (WTF::::add): (WTF::=): * wtf/HashTable.h: (WTF::::HashTable): (WTF::=): * wtf/Insertion.h: Added. (WTF): (Insertion): (WTF::Insertion::Insertion): (WTF::Insertion::index): (WTF::Insertion::element): (WTF::Insertion::operator<): (WTF::executeInsertions): * wtf/ListDump.h: Added. (WTF): (ListDump): (WTF::ListDump::ListDump): (WTF::ListDump::dump): (MapDump): (WTF::MapDump::MapDump): (WTF::MapDump::dump): (WTF::listDump): (WTF::sortedListDump): (WTF::lessThan): (WTF::mapDump): (WTF::sortedMapDump): * wtf/PrintStream.h: (PrintStream): (WTF::PrintStream::print): Conflicts: Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj Canonical link: https://commits.webkit.org/137058@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-07-25 04:04:45 +00:00
};
template<typename TargetVectorType, typename InsertionVectorType>
Source/JavaScriptCore: DFG and FTL should constant-fold RegExpExec, RegExpTest, and StringReplace https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. This enables constant-folding of RegExpExec, RegExpTest, and StringReplace. It's now possible to run Yarr on the JIT threads. Since previous work on constant-folding strings gave the DFG an API for reasoning about JSString constants in terms of JIT-thread-local WTF::Strings, it's now super easy to just pass strings to Yarr and build IR based on the results. But RegExpExec is hard: the folded version still must allocate a RegExpMatchesArray. We must use the same Structure that the code would have used or else we'll pollute the program's inline caches. Also, RegExpMatchesArray.h|cpp will allocate the array and its named properties in one go - we don't want to lose that optimization. So, this patch enables MaterializeNewObject to allocate objects or arrays with any number of indexed or named properties. Previously it could only handle objects (but not arrays) and named properties (but not indexed ones). This also adds a few minor things for setting the RegExpConstructor cached result. This is about a 2x speed-up on microbenchmarks when we fold a match success and about a 8x speed-up when we fold a match failure. It's a 10% speed-up on Octane/regexp. * JavaScriptCore.xcodeproj/project.pbxproj: * dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): * dfg/DFGClobberize.h: (JSC::DFG::clobberize): * dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): * dfg/DFGInsertionSet.cpp: (JSC::DFG::InsertionSet::insertSlow): (JSC::DFG::InsertionSet::execute): * dfg/DFGInsertionSet.h: (JSC::DFG::InsertionSet::insertCheck): * dfg/DFGLazyJSValue.cpp: (JSC::DFG::LazyJSValue::tryGetString): * dfg/DFGMayExit.cpp: (JSC::DFG::mayExit): * dfg/DFGNode.h: (JSC::DFG::StackAccessData::flushedAt): (JSC::DFG::OpInfo::OpInfo): Deleted. * dfg/DFGNodeType.h: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGObjectMaterializationData.cpp: (JSC::DFG::ObjectMaterializationData::dump): (JSC::DFG::PhantomPropertyValue::dump): Deleted. (JSC::DFG::ObjectMaterializationData::oneWaySimilarityScore): Deleted. (JSC::DFG::ObjectMaterializationData::similarityScore): Deleted. * dfg/DFGObjectMaterializationData.h: (JSC::DFG::PhantomPropertyValue::PhantomPropertyValue): Deleted. (JSC::DFG::PhantomPropertyValue::operator==): Deleted. * dfg/DFGOpInfo.h: Added. (JSC::DFG::OpInfo::OpInfo): * dfg/DFGOperations.cpp: * dfg/DFGOperations.h: * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGPromotedHeapLocation.cpp: (WTF::printInternal): * dfg/DFGPromotedHeapLocation.h: * dfg/DFGSafeToExecute.h: (JSC::DFG::safeToExecute): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::~SpeculativeJIT): (JSC::DFG::SpeculativeJIT::emitAllocateRawObject): (JSC::DFG::SpeculativeJIT::emitGetLength): (JSC::DFG::SpeculativeJIT::compileLazyJSConstant): (JSC::DFG::SpeculativeJIT::compileMaterializeNewObject): (JSC::DFG::SpeculativeJIT::compileRecordRegExpCachedResult): (JSC::DFG::SpeculativeJIT::emitAllocateJSArray): Deleted. * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::emitAllocateDestructibleObject): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGStrengthReductionPhase.cpp: (JSC::DFG::StrengthReductionPhase::StrengthReductionPhase): (JSC::DFG::StrengthReductionPhase::handleNode): (JSC::DFG::StrengthReductionPhase::handleCommutativity): (JSC::DFG::StrengthReductionPhase::executeInsertionSet): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (JSC::DFG::Validate::validateCPS): * ftl/FTLAbstractHeapRepository.cpp: * ftl/FTLAbstractHeapRepository.h: * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileNode): (JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSize): (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject): (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeCreateActivation): (JSC::FTL::DFG::LowerDFGToB3::compileSetRegExpObjectLastIndex): (JSC::FTL::DFG::LowerDFGToB3::compileRecordRegExpCachedResult): (JSC::FTL::DFG::LowerDFGToB3::didOverflowStack): (JSC::FTL::DFG::LowerDFGToB3::storageForTransition): (JSC::FTL::DFG::LowerDFGToB3::initializeArrayElements): (JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorage): (JSC::FTL::DFG::LowerDFGToB3::isNotCellOrMisc): (JSC::FTL::DFG::LowerDFGToB3::unboxDouble): * ftl/FTLOperations.cpp: (JSC::FTL::operationPopulateObjectInOSR): (JSC::FTL::operationNewObjectWithButterfly): Deleted. * ftl/FTLOperations.h: * inspector/ContentSearchUtilities.cpp: * runtime/JSObject.h: (JSC::JSObject::createRawObject): (JSC::JSFinalObject::create): * runtime/RegExp.cpp: (JSC::RegExp::compile): (JSC::RegExp::match): (JSC::RegExp::matchConcurrently): (JSC::RegExp::compileMatchOnly): (JSC::RegExp::deleteCode): * runtime/RegExp.h: * runtime/RegExpCachedResult.h: (JSC::RegExpCachedResult::offsetOfLastRegExp): (JSC::RegExpCachedResult::offsetOfLastInput): (JSC::RegExpCachedResult::offsetOfResult): (JSC::RegExpCachedResult::offsetOfReified): * runtime/RegExpConstructor.h: (JSC::RegExpConstructor::offsetOfCachedResult): * runtime/RegExpInlines.h: (JSC::RegExp::hasCodeFor): (JSC::RegExp::compileIfNecessary): (JSC::RegExp::matchInline): (JSC::RegExp::hasMatchOnlyCodeFor): (JSC::RegExp::compileIfNecessaryMatchOnly): * runtime/RegExpObjectInlines.h: (JSC::RegExpObject::execInline): * runtime/StringPrototype.cpp: (JSC::substituteBackreferencesSlow): (JSC::substituteBackreferencesInline): (JSC::substituteBackreferences): (JSC::StringRange::StringRange): * runtime/StringPrototype.h: * runtime/VM.h: * tests/stress/simple-regexp-exec-folding-fail.js: Added. (foo): * tests/stress/simple-regexp-exec-folding.js: Added. (foo): * tests/stress/simple-regexp-test-folding-fail.js: Added. (foo): * tests/stress/simple-regexp-test-folding.js: Added. (foo): * yarr/RegularExpression.cpp: * yarr/Yarr.h: * yarr/YarrInterpreter.cpp: (JSC::Yarr::Interpreter::interpret): (JSC::Yarr::ByteCompiler::ByteCompiler): (JSC::Yarr::ByteCompiler::compile): (JSC::Yarr::ByteCompiler::checkInput): (JSC::Yarr::byteCompile): (JSC::Yarr::interpret): * yarr/YarrInterpreter.h: (JSC::Yarr::BytecodePattern::BytecodePattern): Source/WTF: DFG and FTL should constant-fold RegExpExec https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. Make executeInsertions() return the amount by which the vector increased in size. This is a convenient feature that I use in DFG::InsertionSet. * wtf/Insertion.h: (WTF::executeInsertions): LayoutTests: DFG and FTL should constant-fold RegExpExec https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. * js/regress/script-tests/simple-regexp-exec-folding-fail.js: Added. * js/regress/script-tests/simple-regexp-exec-folding.js: Added. * js/regress/script-tests/simple-regexp-test-folding-fail.js: Added. * js/regress/script-tests/simple-regexp-test-folding.js: Added. * js/regress/simple-regexp-exec-folding-expected.txt: Added. * js/regress/simple-regexp-exec-folding-fail-expected.txt: Added. * js/regress/simple-regexp-exec-folding-fail.html: Added. * js/regress/simple-regexp-exec-folding.html: Added. * js/regress/simple-regexp-test-folding-expected.txt: Added. * js/regress/simple-regexp-test-folding-fail-expected.txt: Added. * js/regress/simple-regexp-test-folding-fail.html: Added. * js/regress/simple-regexp-test-folding.html: Added. Canonical link: https://commits.webkit.org/174348@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-05 22:13:16 +00:00
size_t executeInsertions(TargetVectorType& target, InsertionVectorType& insertions)
fourthTier: DFG should have an SSA form for use by FTL https://bugs.webkit.org/show_bug.cgi?id=118338 Source/JavaScriptCore: Reviewed by Mark Hahnenberg. Adds an SSA form to the DFG. We can convert ThreadedCPS form into SSA form after breaking critical edges. The conversion algorithm follows Aycock and Horspool, and the SSA form itself follows something I've done before, where instead of having Phi functions specify input nodes corresponding to block predecessors, we instead have Upsilon functions in the predecessors that specify which value in that block goes into which subsequent Phi. Upsilons don't have to dominate Phis (usually they don't) and they correspond to a non-SSA "mov" into the Phi's "variable". This gives all of the good properties of SSA, while ensuring that a bunch of CFG transformations don't have to be SSA-aware. So far the only DFG phases that are SSA-aware are DCE and CFA. CFG simplification is probably SSA-aware by default, though I haven't tried it. Constant folding probably needs a few tweaks, but is likely ready. Ditto for CSE, though it's not clear that we'd want to use block-local CSE when we could be doing GVN. Currently only the FTL can generate code from the SSA form, and there is no way to convert from SSA to ThreadedCPS or LoadStore. There probably will never be such a capability. In order to handle OSR exit state in the SSA, we place MovHints at Phi points. Other than that, you can reconstruct state-at-exit by forward propagating MovHints. Note that MovHint is the new SetLocal in SSA. SetLocal and GetLocal only survive into SSA if they are on captured variables, or in the case of flushes. A "live SetLocal" will be NodeMustGenerate and will always correspond to a flush. Computing the state-at-exit requires running SSA liveness analysis, OSR availability analysis, and flush liveness analysis. The FTL runs all of these prior to generating code. While OSR exit continues to be tricky, much of the logic is now factored into separate phases and the backend has to do less work to reason about what happened outside of the basic block that is being lowered. Conversion from DFG SSA to LLVM SSA is done by ensuring that we generate code in depth-first order, thus guaranteeing that a node will always be lowered (and hence have a LValue) before any of the blocks dominated by that node's block have code generated. For Upsilon/Phi, we just use alloca's. We could do something more clever there, but it's probably not worth it, at least not now. Finally, while the SSA form is currently only being converted to LLVM IR, there is nothing that prevents us from considering other backends in the future - with the caveat that this form is designed to be first lowered to a lower-level SSA before actual machine code generation commences. So we ought to either use LLVM (the intended path) or we will have to write our own SSA low-level backend. This runs all of the code that the FTL was known to run previously. No change in performance for now. But it does open some exciting possibilities! * JavaScriptCore.xcodeproj/project.pbxproj: * bytecode/Operands.h: (JSC::OperandValueTraits::dump): (JSC::Operands::fill): (Operands): (JSC::Operands::clear): (JSC::Operands::operator==): * dfg/DFGAbstractState.cpp: (JSC::DFG::AbstractState::beginBasicBlock): (JSC::DFG::setLiveValues): (DFG): (JSC::DFG::AbstractState::initialize): (JSC::DFG::AbstractState::endBasicBlock): (JSC::DFG::AbstractState::executeEffects): (JSC::DFG::AbstractState::mergeStateAtTail): (JSC::DFG::AbstractState::merge): * dfg/DFGAbstractState.h: (AbstractState): * dfg/DFGAdjacencyList.h: (JSC::DFG::AdjacencyList::justOneChild): (AdjacencyList): * dfg/DFGBasicBlock.cpp: Added. (DFG): (JSC::DFG::BasicBlock::BasicBlock): (JSC::DFG::BasicBlock::~BasicBlock): (JSC::DFG::BasicBlock::ensureLocals): (JSC::DFG::BasicBlock::isInPhis): (JSC::DFG::BasicBlock::isInBlock): (JSC::DFG::BasicBlock::removePredecessor): (JSC::DFG::BasicBlock::replacePredecessor): (JSC::DFG::BasicBlock::dump): (JSC::DFG::BasicBlock::SSAData::SSAData): (JSC::DFG::BasicBlock::SSAData::~SSAData): * dfg/DFGBasicBlock.h: (BasicBlock): (JSC::DFG::BasicBlock::operator[]): (JSC::DFG::BasicBlock::successor): (JSC::DFG::BasicBlock::successorForCondition): (SSAData): * dfg/DFGBasicBlockInlines.h: (DFG): * dfg/DFGBlockInsertionSet.cpp: Added. (DFG): (JSC::DFG::BlockInsertionSet::BlockInsertionSet): (JSC::DFG::BlockInsertionSet::~BlockInsertionSet): (JSC::DFG::BlockInsertionSet::insert): (JSC::DFG::BlockInsertionSet::insertBefore): (JSC::DFG::BlockInsertionSet::execute): * dfg/DFGBlockInsertionSet.h: Added. (DFG): (BlockInsertionSet): * dfg/DFGCFAPhase.cpp: (JSC::DFG::CFAPhase::run): * dfg/DFGCFGSimplificationPhase.cpp: * dfg/DFGCPSRethreadingPhase.cpp: (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock): * dfg/DFGCommon.cpp: (WTF::printInternal): * dfg/DFGCommon.h: (JSC::DFG::doesKill): (DFG): (JSC::DFG::killStatusForDoesKill): * dfg/DFGConstantFoldingPhase.cpp: (JSC::DFG::ConstantFoldingPhase::foldConstants): (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter): * dfg/DFGCriticalEdgeBreakingPhase.cpp: Added. (DFG): (CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::run): (JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge): (JSC::DFG::performCriticalEdgeBreaking): * dfg/DFGCriticalEdgeBreakingPhase.h: Added. (DFG): * dfg/DFGDCEPhase.cpp: (JSC::DFG::DCEPhase::run): (JSC::DFG::DCEPhase::findTypeCheckRoot): (JSC::DFG::DCEPhase::countNode): (DCEPhase): (JSC::DFG::DCEPhase::countEdge): (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren): * dfg/DFGDriver.cpp: (JSC::DFG::compile): * dfg/DFGEdge.cpp: (JSC::DFG::Edge::dump): * dfg/DFGEdge.h: (JSC::DFG::Edge::Edge): (JSC::DFG::Edge::setNode): (JSC::DFG::Edge::useKindUnchecked): (JSC::DFG::Edge::setUseKind): (JSC::DFG::Edge::setProofStatus): (JSC::DFG::Edge::willNotHaveCheck): (JSC::DFG::Edge::willHaveCheck): (Edge): (JSC::DFG::Edge::killStatusUnchecked): (JSC::DFG::Edge::killStatus): (JSC::DFG::Edge::setKillStatus): (JSC::DFG::Edge::doesKill): (JSC::DFG::Edge::doesNotKill): (JSC::DFG::Edge::shift): (JSC::DFG::Edge::makeWord): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGFlushFormat.cpp: Added. (WTF): (WTF::printInternal): * dfg/DFGFlushFormat.h: Added. (DFG): (JSC::DFG::resultFor): (JSC::DFG::useKindFor): (WTF): * dfg/DFGFlushLivenessAnalysisPhase.cpp: Added. (DFG): (FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::run): (JSC::DFG::FlushLivenessAnalysisPhase::process): (JSC::DFG::FlushLivenessAnalysisPhase::setForNode): (JSC::DFG::FlushLivenessAnalysisPhase::flushFormat): (JSC::DFG::performFlushLivenessAnalysis): * dfg/DFGFlushLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): (JSC::DFG::Graph::dumpBlockHeader): (DFG): (JSC::DFG::Graph::addForDepthFirstSort): (JSC::DFG::Graph::getBlocksInDepthFirstOrder): * dfg/DFGGraph.h: (JSC::DFG::Graph::convertToConstant): (JSC::DFG::Graph::valueProfileFor): (Graph): * dfg/DFGInsertionSet.h: (DFG): (JSC::DFG::InsertionSet::execute): * dfg/DFGLivenessAnalysisPhase.cpp: Added. (DFG): (LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::run): (JSC::DFG::LivenessAnalysisPhase::process): (JSC::DFG::LivenessAnalysisPhase::addChildUse): (JSC::DFG::performLivenessAnalysis): * dfg/DFGLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGNode.cpp: (JSC::DFG::Node::hasVariableAccessData): (DFG): * dfg/DFGNode.h: (DFG): (Node): (JSC::DFG::Node::hasLocal): (JSC::DFG::Node::variableAccessData): (JSC::DFG::Node::hasPhi): (JSC::DFG::Node::phi): (JSC::DFG::Node::takenBlock): (JSC::DFG::Node::notTakenBlock): (JSC::DFG::Node::successor): (JSC::DFG::Node::successorForCondition): (JSC::DFG::nodeComparator): (JSC::DFG::nodeListDump): (JSC::DFG::nodeMapDump): * dfg/DFGNodeFlags.cpp: (JSC::DFG::dumpNodeFlags): * dfg/DFGNodeType.h: (DFG): * dfg/DFGOSRAvailabilityAnalysisPhase.cpp: Added. (DFG): (OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::run): (JSC::DFG::performOSRAvailabilityAnalysis): * dfg/DFGOSRAvailabilityAnalysisPhase.h: Added. (DFG): * dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): * dfg/DFGPredictionInjectionPhase.cpp: (JSC::DFG::PredictionInjectionPhase::run): * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSSAConversionPhase.cpp: Added. (DFG): (SSAConversionPhase): (JSC::DFG::SSAConversionPhase::SSAConversionPhase): (JSC::DFG::SSAConversionPhase::run): (JSC::DFG::SSAConversionPhase::forwardPhiChildren): (JSC::DFG::SSAConversionPhase::forwardPhi): (JSC::DFG::SSAConversionPhase::forwardPhiEdge): (JSC::DFG::SSAConversionPhase::deduplicateChildren): (JSC::DFG::SSAConversionPhase::addFlushedLocalOp): (JSC::DFG::SSAConversionPhase::addFlushedLocalEdge): (JSC::DFG::performSSAConversion): * dfg/DFGSSAConversionPhase.h: Added. (DFG): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (Validate): (JSC::DFG::Validate::validateCPS): * dfg/DFGVariableAccessData.h: (JSC::DFG::VariableAccessData::flushFormat): (VariableAccessData): * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToLLVM.cpp: (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::lower): (JSC::FTL::LowerDFGToLLVM::createPhiVariables): (JSC::FTL::LowerDFGToLLVM::compileBlock): (JSC::FTL::LowerDFGToLLVM::compileNode): (JSC::FTL::LowerDFGToLLVM::compileUpsilon): (LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::compilePhi): (JSC::FTL::LowerDFGToLLVM::compileJSConstant): (JSC::FTL::LowerDFGToLLVM::compileWeakJSConstant): (JSC::FTL::LowerDFGToLLVM::compileGetArgument): (JSC::FTL::LowerDFGToLLVM::compileGetLocal): (JSC::FTL::LowerDFGToLLVM::compileSetLocal): (JSC::FTL::LowerDFGToLLVM::compileAdd): (JSC::FTL::LowerDFGToLLVM::compileArithSub): (JSC::FTL::LowerDFGToLLVM::compileArithMul): (JSC::FTL::LowerDFGToLLVM::compileArithDiv): (JSC::FTL::LowerDFGToLLVM::compileArithMod): (JSC::FTL::LowerDFGToLLVM::compileArithMinOrMax): (JSC::FTL::LowerDFGToLLVM::compileArithAbs): (JSC::FTL::LowerDFGToLLVM::compileArithNegate): (JSC::FTL::LowerDFGToLLVM::compileBitAnd): (JSC::FTL::LowerDFGToLLVM::compileBitOr): (JSC::FTL::LowerDFGToLLVM::compileBitXor): (JSC::FTL::LowerDFGToLLVM::compileBitRShift): (JSC::FTL::LowerDFGToLLVM::compileBitLShift): (JSC::FTL::LowerDFGToLLVM::compileBitURShift): (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber): (JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble): (JSC::FTL::LowerDFGToLLVM::compileGetButterfly): (JSC::FTL::LowerDFGToLLVM::compileGetArrayLength): (JSC::FTL::LowerDFGToLLVM::compileGetByVal): (JSC::FTL::LowerDFGToLLVM::compileGetByOffset): (JSC::FTL::LowerDFGToLLVM::compileGetGlobalVar): (JSC::FTL::LowerDFGToLLVM::compileCompareEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareLess): (JSC::FTL::LowerDFGToLLVM::compileCompareLessEq): (JSC::FTL::LowerDFGToLLVM::compileCompareGreater): (JSC::FTL::LowerDFGToLLVM::compileCompareGreaterEq): (JSC::FTL::LowerDFGToLLVM::compileLogicalNot): (JSC::FTL::LowerDFGToLLVM::speculateBackward): (JSC::FTL::LowerDFGToLLVM::lowInt32): (JSC::FTL::LowerDFGToLLVM::lowCell): (JSC::FTL::LowerDFGToLLVM::lowBoolean): (JSC::FTL::LowerDFGToLLVM::lowDouble): (JSC::FTL::LowerDFGToLLVM::lowJSValue): (JSC::FTL::LowerDFGToLLVM::lowStorage): (JSC::FTL::LowerDFGToLLVM::speculate): (JSC::FTL::LowerDFGToLLVM::speculateBoolean): (JSC::FTL::LowerDFGToLLVM::isLive): (JSC::FTL::LowerDFGToLLVM::use): (JSC::FTL::LowerDFGToLLVM::initializeOSRExitStateForBlock): (JSC::FTL::LowerDFGToLLVM::appendOSRExit): (JSC::FTL::LowerDFGToLLVM::emitOSRExitCall): (JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode): (JSC::FTL::LowerDFGToLLVM::linkOSRExitsAndCompleteInitializationBlocks): (JSC::FTL::LowerDFGToLLVM::setInt32): (JSC::FTL::LowerDFGToLLVM::setJSValue): (JSC::FTL::LowerDFGToLLVM::setBoolean): (JSC::FTL::LowerDFGToLLVM::setStorage): (JSC::FTL::LowerDFGToLLVM::setDouble): (JSC::FTL::LowerDFGToLLVM::isValid): * ftl/FTLLoweredNodeValue.h: Added. (FTL): (LoweredNodeValue): (JSC::FTL::LoweredNodeValue::LoweredNodeValue): (JSC::FTL::LoweredNodeValue::isSet): (JSC::FTL::LoweredNodeValue::operator!): (JSC::FTL::LoweredNodeValue::value): (JSC::FTL::LoweredNodeValue::block): * ftl/FTLValueFromBlock.h: (JSC::FTL::ValueFromBlock::ValueFromBlock): (ValueFromBlock): * ftl/FTLValueSource.cpp: (JSC::FTL::ValueSource::dump): * ftl/FTLValueSource.h: Source/WTF: Reviewed by Mark Hahnenberg. - Extend variadicity of PrintStream and dataLog. - Give HashSet the ability to add a span of things. - Give HashSet the ability to == another HashSet. - Note FIXME's in HashTable concerning copying performance, that affects the way that the DFG now uses HashSets and HashMaps. - Factor out the bulk-insertion logic of JSC::DFG::InsertionSet into WTF::Insertion, so that it can be used in more places. - Create a dumper for lists and maps. * WTF.xcodeproj/project.pbxproj: * wtf/DataLog.h: (WTF): (WTF::dataLog): * wtf/HashSet.h: (HashSet): (WTF): (WTF::::add): (WTF::=): * wtf/HashTable.h: (WTF::::HashTable): (WTF::=): * wtf/Insertion.h: Added. (WTF): (Insertion): (WTF::Insertion::Insertion): (WTF::Insertion::index): (WTF::Insertion::element): (WTF::Insertion::operator<): (WTF::executeInsertions): * wtf/ListDump.h: Added. (WTF): (ListDump): (WTF::ListDump::ListDump): (WTF::ListDump::dump): (MapDump): (WTF::MapDump::MapDump): (WTF::MapDump::dump): (WTF::listDump): (WTF::sortedListDump): (WTF::lessThan): (WTF::mapDump): (WTF::sortedMapDump): * wtf/PrintStream.h: (PrintStream): (WTF::PrintStream::print): Conflicts: Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj Canonical link: https://commits.webkit.org/137058@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-07-25 04:04:45 +00:00
{
Source/JavaScriptCore: DFG and FTL should constant-fold RegExpExec, RegExpTest, and StringReplace https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. This enables constant-folding of RegExpExec, RegExpTest, and StringReplace. It's now possible to run Yarr on the JIT threads. Since previous work on constant-folding strings gave the DFG an API for reasoning about JSString constants in terms of JIT-thread-local WTF::Strings, it's now super easy to just pass strings to Yarr and build IR based on the results. But RegExpExec is hard: the folded version still must allocate a RegExpMatchesArray. We must use the same Structure that the code would have used or else we'll pollute the program's inline caches. Also, RegExpMatchesArray.h|cpp will allocate the array and its named properties in one go - we don't want to lose that optimization. So, this patch enables MaterializeNewObject to allocate objects or arrays with any number of indexed or named properties. Previously it could only handle objects (but not arrays) and named properties (but not indexed ones). This also adds a few minor things for setting the RegExpConstructor cached result. This is about a 2x speed-up on microbenchmarks when we fold a match success and about a 8x speed-up when we fold a match failure. It's a 10% speed-up on Octane/regexp. * JavaScriptCore.xcodeproj/project.pbxproj: * dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): * dfg/DFGClobberize.h: (JSC::DFG::clobberize): * dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): * dfg/DFGInsertionSet.cpp: (JSC::DFG::InsertionSet::insertSlow): (JSC::DFG::InsertionSet::execute): * dfg/DFGInsertionSet.h: (JSC::DFG::InsertionSet::insertCheck): * dfg/DFGLazyJSValue.cpp: (JSC::DFG::LazyJSValue::tryGetString): * dfg/DFGMayExit.cpp: (JSC::DFG::mayExit): * dfg/DFGNode.h: (JSC::DFG::StackAccessData::flushedAt): (JSC::DFG::OpInfo::OpInfo): Deleted. * dfg/DFGNodeType.h: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGObjectMaterializationData.cpp: (JSC::DFG::ObjectMaterializationData::dump): (JSC::DFG::PhantomPropertyValue::dump): Deleted. (JSC::DFG::ObjectMaterializationData::oneWaySimilarityScore): Deleted. (JSC::DFG::ObjectMaterializationData::similarityScore): Deleted. * dfg/DFGObjectMaterializationData.h: (JSC::DFG::PhantomPropertyValue::PhantomPropertyValue): Deleted. (JSC::DFG::PhantomPropertyValue::operator==): Deleted. * dfg/DFGOpInfo.h: Added. (JSC::DFG::OpInfo::OpInfo): * dfg/DFGOperations.cpp: * dfg/DFGOperations.h: * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGPromotedHeapLocation.cpp: (WTF::printInternal): * dfg/DFGPromotedHeapLocation.h: * dfg/DFGSafeToExecute.h: (JSC::DFG::safeToExecute): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::~SpeculativeJIT): (JSC::DFG::SpeculativeJIT::emitAllocateRawObject): (JSC::DFG::SpeculativeJIT::emitGetLength): (JSC::DFG::SpeculativeJIT::compileLazyJSConstant): (JSC::DFG::SpeculativeJIT::compileMaterializeNewObject): (JSC::DFG::SpeculativeJIT::compileRecordRegExpCachedResult): (JSC::DFG::SpeculativeJIT::emitAllocateJSArray): Deleted. * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::emitAllocateDestructibleObject): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGStrengthReductionPhase.cpp: (JSC::DFG::StrengthReductionPhase::StrengthReductionPhase): (JSC::DFG::StrengthReductionPhase::handleNode): (JSC::DFG::StrengthReductionPhase::handleCommutativity): (JSC::DFG::StrengthReductionPhase::executeInsertionSet): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (JSC::DFG::Validate::validateCPS): * ftl/FTLAbstractHeapRepository.cpp: * ftl/FTLAbstractHeapRepository.h: * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileNode): (JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSize): (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject): (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeCreateActivation): (JSC::FTL::DFG::LowerDFGToB3::compileSetRegExpObjectLastIndex): (JSC::FTL::DFG::LowerDFGToB3::compileRecordRegExpCachedResult): (JSC::FTL::DFG::LowerDFGToB3::didOverflowStack): (JSC::FTL::DFG::LowerDFGToB3::storageForTransition): (JSC::FTL::DFG::LowerDFGToB3::initializeArrayElements): (JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorage): (JSC::FTL::DFG::LowerDFGToB3::isNotCellOrMisc): (JSC::FTL::DFG::LowerDFGToB3::unboxDouble): * ftl/FTLOperations.cpp: (JSC::FTL::operationPopulateObjectInOSR): (JSC::FTL::operationNewObjectWithButterfly): Deleted. * ftl/FTLOperations.h: * inspector/ContentSearchUtilities.cpp: * runtime/JSObject.h: (JSC::JSObject::createRawObject): (JSC::JSFinalObject::create): * runtime/RegExp.cpp: (JSC::RegExp::compile): (JSC::RegExp::match): (JSC::RegExp::matchConcurrently): (JSC::RegExp::compileMatchOnly): (JSC::RegExp::deleteCode): * runtime/RegExp.h: * runtime/RegExpCachedResult.h: (JSC::RegExpCachedResult::offsetOfLastRegExp): (JSC::RegExpCachedResult::offsetOfLastInput): (JSC::RegExpCachedResult::offsetOfResult): (JSC::RegExpCachedResult::offsetOfReified): * runtime/RegExpConstructor.h: (JSC::RegExpConstructor::offsetOfCachedResult): * runtime/RegExpInlines.h: (JSC::RegExp::hasCodeFor): (JSC::RegExp::compileIfNecessary): (JSC::RegExp::matchInline): (JSC::RegExp::hasMatchOnlyCodeFor): (JSC::RegExp::compileIfNecessaryMatchOnly): * runtime/RegExpObjectInlines.h: (JSC::RegExpObject::execInline): * runtime/StringPrototype.cpp: (JSC::substituteBackreferencesSlow): (JSC::substituteBackreferencesInline): (JSC::substituteBackreferences): (JSC::StringRange::StringRange): * runtime/StringPrototype.h: * runtime/VM.h: * tests/stress/simple-regexp-exec-folding-fail.js: Added. (foo): * tests/stress/simple-regexp-exec-folding.js: Added. (foo): * tests/stress/simple-regexp-test-folding-fail.js: Added. (foo): * tests/stress/simple-regexp-test-folding.js: Added. (foo): * yarr/RegularExpression.cpp: * yarr/Yarr.h: * yarr/YarrInterpreter.cpp: (JSC::Yarr::Interpreter::interpret): (JSC::Yarr::ByteCompiler::ByteCompiler): (JSC::Yarr::ByteCompiler::compile): (JSC::Yarr::ByteCompiler::checkInput): (JSC::Yarr::byteCompile): (JSC::Yarr::interpret): * yarr/YarrInterpreter.h: (JSC::Yarr::BytecodePattern::BytecodePattern): Source/WTF: DFG and FTL should constant-fold RegExpExec https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. Make executeInsertions() return the amount by which the vector increased in size. This is a convenient feature that I use in DFG::InsertionSet. * wtf/Insertion.h: (WTF::executeInsertions): LayoutTests: DFG and FTL should constant-fold RegExpExec https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. * js/regress/script-tests/simple-regexp-exec-folding-fail.js: Added. * js/regress/script-tests/simple-regexp-exec-folding.js: Added. * js/regress/script-tests/simple-regexp-test-folding-fail.js: Added. * js/regress/script-tests/simple-regexp-test-folding.js: Added. * js/regress/simple-regexp-exec-folding-expected.txt: Added. * js/regress/simple-regexp-exec-folding-fail-expected.txt: Added. * js/regress/simple-regexp-exec-folding-fail.html: Added. * js/regress/simple-regexp-exec-folding.html: Added. * js/regress/simple-regexp-test-folding-expected.txt: Added. * js/regress/simple-regexp-test-folding-fail-expected.txt: Added. * js/regress/simple-regexp-test-folding-fail.html: Added. * js/regress/simple-regexp-test-folding.html: Added. Canonical link: https://commits.webkit.org/174348@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-05 22:13:16 +00:00
size_t numInsertions = insertions.size();
if (!numInsertions)
return 0;
Implement Air::allocateStack() in ES6 to see how much of a bad idea that is https://bugs.webkit.org/show_bug.cgi?id=158318 Reviewed by Saam Barati. PerformanceTests: This adds a new benchmark for us to play with called JSAir. It's a complete ES6 implementation of Air's allocateStack() phase along with all of Air needed to run that phase. This includes things like stack slots, registers, temporaries, basic blocks, instructions, and all of the code for iterating over, inspecting, and modifying those things. To make this work, JSC can now dump Air just before allocateStack() in the form of JS code that creates a Code object that matches exactly what C++ Air saw. This benchmark comprises four Air IRs: - Octane/gbemu's largest function, executeIteration. - Kraken/imaging-gaussian-blur's largest function in OSR entry mode, gaussuanBlur. - Octane/typescript's largest function that is actually hot, scanIdentifier. - JSAir's largest hot function, which is anonymous, so we call it by its hash (ACLj8C). This runs in about 2 seconds on my machine in JSC trunk. It includes both a commandline harness and a web harness. JSAir is almost exactly 100x slower in ES6 in WebKit than the C++ Air::allocateStack() phase on which it is based. JSAir uses the following ES6 features: - Symbol. - for-of. - arrow functions. - Map/Set. - let/const. - classes. All of these things are used in anger and should end up on the hot path. There is also code that uses Proxies, but it ends up being dead. We can improve this even more: I still need to add result validation: https://bugs.webkit.org/show_bug.cgi?id=158493 I want to make it use more ES6 features: https://bugs.webkit.org/show_bug.cgi?id=158497 * JSAir: Added. * JSAir/all.js: Added. * JSAir/allocate_stack.js: Added. (allocateStack.attemptAssignment): (allocateStack.assign): (allocateStack.interfere): (allocateStack.): (allocateStack): * JSAir/arg.js: Added. (Arg): (Arg.isAnyUse): (Arg.isColdUse): (Arg.isWarmUse): (Arg.cooled): (Arg.isEarlyUse): (Arg.isLateUse): (Arg.isAnyDef): (Arg.isEarlyDef): (Arg.isLateDef): (Arg.isZDef): (Arg.typeForB3Type): (Arg.widthForB3Type): (Arg.conservativeWidth): (Arg.minimumWidth): (Arg.bytes): (Arg.widthForBytes): (Arg.createTmp): (Arg.fromReg): (Arg.createImm): (Arg.createBigImm): (Arg.createBitImm): (Arg.createBitImm64): (Arg.createAddr): (Arg.createStack): (Arg.createCallArg): (Arg.createStackAddr): (Arg.isValidScale): (Arg.logScale): (Arg.createIndex): (Arg.createRelCond): (Arg.createResCond): (Arg.createDoubleCond): (Arg.createWidth): (Arg.prototype.get kind): (Arg.prototype.get isTmp): (Arg.prototype.get isImm): (Arg.prototype.get isBigImm): (Arg.prototype.get isBitImm): (Arg.prototype.get isBitImm64): (Arg.prototype.get isSomeImm): (Arg.prototype.get isAddr): (Arg.prototype.get isStack): (Arg.prototype.get isCallArg): (Arg.prototype.get isIndex): (Arg.prototype.get isMemory): (Arg.prototype.get isStackMemory): (Arg.prototype.get isRelCond): (Arg.prototype.get isResCond): (Arg.prototype.get isDoubleCond): (Arg.prototype.get isCondition): (Arg.prototype.get isWidth): (Arg.prototype.get isAlive): (Arg.prototype.get tmp): (Arg.prototype.get value): (Arg.prototype.get base): (Arg.prototype.get hasOffset): (Arg.prototype.get offset): (Arg.prototype.get stackSlot): (Arg.prototype.get index): (Arg.prototype.get scale): (Arg.prototype.get logScale): (Arg.prototype.get width): (Arg.prototype.get isGPTmp): (Arg.prototype.get isFPTmp): (Arg.prototype.get isGP): (Arg.prototype.get isFP): (Arg.prototype.get hasType): (Arg.prototype.get type): (Arg.prototype.isType): (Arg.prototype.isCompatibleType): (Arg.prototype.get isGPR): (Arg.prototype.get gpr): (Arg.prototype.get isFPR): (Arg.prototype.get fpr): (Arg.prototype.get isReg): (Arg.prototype.get reg): (Arg.isValidImmForm): (Arg.isValidBitImmForm): (Arg.isValidBitImm64Form): (Arg.isValidAddrForm): (Arg.isValidIndexForm): (Arg.prototype.isValidForm): (Arg.prototype.forEachTmpFast): (Arg.prototype.usesTmp): (Arg.prototype.forEachTmp): (Arg.prototype.is): (Arg.prototype.as): (Arg.prototype.forEachFast): (Arg.prototype.forEach): (Arg.extract): (Arg.forEachFast): (Arg.forEach): (Arg.prototype.get condition): (Arg.prototype.get isInvertible): (Arg.prototype.toString): * JSAir/basic_block.js: Added. (BasicBlock): (BasicBlock.prototype.get index): (BasicBlock.prototype.get size): (BasicBlock.prototype.Symbol.iterator): (BasicBlock.prototype.at): (BasicBlock.get last): (BasicBlock.get insts): (BasicBlock.get numSuccessors): (BasicBlock.get successors): (BasicBlock.get successorBlocks.): (BasicBlock.get successorBlocks): (BasicBlock.set get numPredecessors): (BasicBlock.get predecessors): (BasicBlock.get frequency): (BasicBlock.get headerString): (BasicBlock.get footerString): * JSAir/benchmark.js: Added. (benchmark): * JSAir/code.js: Added. (Code): (Code.prototype.addBlock): (Code.prototype.addStackSlot): (Code.prototype.newTmp): (Code.prototype.get size): (Code.prototype.at): (Code.prototype.Symbol.iterator): (Code.prototype.get blocks): (Code.prototype.get stackSlots): (Code.prototype.tmps): (Code.prototype.get callArgAreaSize): (Code.prototype.requestCallArgAreaSize): (Code.prototype.get frameSize): (Code.prototype.setFrameSize): (Code.prototype.toString): * JSAir/custom.js: Added. (const.ShuffleCustom.forEachArg): (const.ShuffleCustom.hasNonArgNonControlEffects): (const.PatchCustom.forEachArg): (const.PatchCustom.hasNonArgNonControlEffects): (const.CCallCustom.forEachArg): (const.CCallCustom.hasNonArgNonControlEffects): (const.ColdCCallCustom.forEachArg): (const.ColdCCallCustom.hasNonArgNonControlEffects): * JSAir/frequented_block.js: Added. (FrequentedBlock): (FrequentedBlock.prototype.toString): * JSAir/insertion_set.js: Added. (Insertion): (Insertion.prototype.get index): (Insertion.prototype.get element): (Insertion.prototype.lessThan): (InsertionSet): (InsertionSet.prototype.appendInsertion): (InsertionSet.prototype.append): (InsertionSet.prototype.execute): * JSAir/inst.js: Added. (Inst): (Inst.prototype.append): (Inst.prototype.clear): (Inst.prototype.get opcode): (Inst.prototype.get args): (Inst.prototype.visitArg): (Inst.prototype.forEachTmpFast): (Inst.prototype.forEachArg): (Inst.prototype.forEachTmp): (Inst.prototype.forEach): (Inst.forEachDef): (Inst.forEachDefWithExtraClobberedRegs): (Inst.prototype.get hasNonArgEffects): (Inst.prototype.toString): * JSAir/liveness.js: Added. (Liveness): (Liveness.prototype.get thing): (Liveness.prototype.get code): (Liveness.prototype.get liveAtHead): (Liveness.prototype.get liveAtTail): (Liveness.prototype.localCalc.LocalCalc): (Liveness.prototype.localCalc.LocalCalc.prototype.get liveSet): (Liveness.prototype.localCalc.LocalCalc.prototype.execute): (Liveness.prototype.localCalc): * JSAir/opcode.js: Added. (Inst_forEachArg): (Inst_hasNonArgEffects): * JSAir/payload-gbemu-executeIteration.js: Added. (createPayloadGbemuExecuteIteration): * JSAir/payload-imaging-gaussian-blur-gaussianBlur.js: Added. (createPayloadImagingGaussianBlurGaussianBlur): * JSAir/payload-jsair-ACLj8C.js: Added. (createPayloadJSAirACLj8C): * JSAir/payload-typescript-scanIdentifier.js: Added. (createPayloadTypescriptScanIdentifier): * JSAir/reg.js: Added. (Reg): (Reg.fromReg): (Reg.prototype.get index): (Reg.prototype.get type): (Reg.prototype.get name): (Reg.prototype.get isCalleeSave): (Reg.prototype.get isReg): (Reg.prototype.toString): (Reg.extract): (Reg.forEachFast): (Reg.forEach): (newGPR): (Reg.gprs.Reg.fprs.Reg.calleeSaveGPRs.Reg.calleeSaveFPRs.Reg.calleeSaves): * JSAir/stack_slot.js: Added. (StackSlot): (StackSlot.prototype.get byteSize): (StackSlot.prototype.get kind): (StackSlot.prototype.get isLocked): (StackSlot.prototype.get isSpill): (StackSlot.prototype.get index): (StackSlot.prototype.ensureSize): (StackSlot.prototype.get alignment): (StackSlot.prototype.get offsetFromFP): (StackSlot.prototype.setOffsetFromFP): (StackSlot.prototype.toString): (StackSlot.extract): (StackSlot.forEachFast): (StackSlot.forEach): * JSAir/symbols.js: Added. * JSAir/test.html: Added. * JSAir/test.js: Added. * JSAir/tmp.js: Added. (Tmp): (Tmp.fromReg): (Tmp.prototype.get index): (Tmp.prototype.get type): (Tmp.prototype.get isReg): (Tmp.prototype.toString): (Tmp.extract): (Tmp.forEachFast): (Tmp.forEach): * JSAir/tmp_base.js: Added. (TmpBase.prototype.get isGP): (TmpBase.prototype.get isFP): (TmpBase.prototype.get isGPR): (TmpBase.prototype.get isFPR): (TmpBase.prototype.get reg): (TmpBase.prototype.get gpr): (TmpBase.prototype.get fpr): (TmpBase): * JSAir/util.js: Added. (isRepresentableAsInt32): (addIndexed): (roundUpToMultipleOf): (symbolName): (mergeIntoSet): (nonEmptyRangesOverlap): (rangesOverlap): (removeAllMatching): (swap): (bubble): (bubbleSort): (currentTime): (else.currentTime): Source/JavaScriptCore: Most of these changes are to support dumpAsJS(). But I also found some duplicate and dead code while rewriting it to JS. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/air/AirAllocateStack.cpp: * b3/air/AirArg.h: (JSC::B3::Air::Arg::isSomeImm): (JSC::B3::Air::Arg::isAddr): (JSC::B3::Air::Arg::tmpIndex): (JSC::B3::Air::Arg::isValidImmForm): (JSC::B3::Air::Arg::withOffset): Deleted. This was dead code. * b3/air/AirArgInlines.h: It turns out that Inst has a ForEach thing that duplicated some of the logic of ArgThingHelper, so I just made ArgThingHelper more powerful. (JSC::B3::Air::ArgThingHelper<Arg>::forEach): (JSC::B3::Air::ArgThingHelper<Reg>::is): (JSC::B3::Air::ArgThingHelper<Reg>::as): (JSC::B3::Air::ArgThingHelper<Reg>::forEachFast): (JSC::B3::Air::ArgThingHelper<Reg>::forEach): (JSC::B3::Air::Arg::is): * b3/air/AirDumpAsJS.cpp: Added. (JSC::B3::Air::dumpAsJS): * b3/air/AirDumpAsJS.h: Added. * b3/air/AirFixObviousSpills.cpp: * b3/air/AirGenerate.cpp: (JSC::B3::Air::prepareForGeneration): * b3/air/AirInstInlines.h: (JSC::B3::Air::Inst::forEach): (JSC::B3::Air::Inst::extraClobberedRegs): (JSC::B3::Air::ForEach<Tmp>::forEach): Deleted. This was doing what ArgThingHelper would have done but not as well. (JSC::B3::Air::ForEach<Arg>::forEach): Deleted. (JSC::B3::Air::ForEach<Reg>::forEach): Deleted. * b3/air/AirLogRegisterPressure.cpp: * b3/air/AirReportUsedRegisters.cpp: * b3/air/AirSpillEverything.cpp: * b3/air/opcode_generator.rb: Make this dump opcode.js, which is like what it dumps for C++. * jit/Reg.cpp: (JSC::Reg::debugName): (JSC::Reg::dump): * jit/Reg.h: (JSC::Reg::hash): * jsc.cpp: Fix jsc so that it reports the filename and line number of parser errors. (dumpException): * parser/ParserError.h: Make it easier to debug this code. (WTF::printInternal): * runtime/Options.h: Source/WTF: * wtf/Insertion.h: (WTF::executeInsertions): I found a bug while rewriting this code in JS. * wtf/PrintStream.h: (WTF::PrintStream::print): (WTF::PrintStream::println): This is useful to have. Canonical link: https://commits.webkit.org/176569@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201783 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-06-08 01:43:35 +00:00
size_t originalTargetSize = target.size();
Source/JavaScriptCore: DFG and FTL should constant-fold RegExpExec, RegExpTest, and StringReplace https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. This enables constant-folding of RegExpExec, RegExpTest, and StringReplace. It's now possible to run Yarr on the JIT threads. Since previous work on constant-folding strings gave the DFG an API for reasoning about JSString constants in terms of JIT-thread-local WTF::Strings, it's now super easy to just pass strings to Yarr and build IR based on the results. But RegExpExec is hard: the folded version still must allocate a RegExpMatchesArray. We must use the same Structure that the code would have used or else we'll pollute the program's inline caches. Also, RegExpMatchesArray.h|cpp will allocate the array and its named properties in one go - we don't want to lose that optimization. So, this patch enables MaterializeNewObject to allocate objects or arrays with any number of indexed or named properties. Previously it could only handle objects (but not arrays) and named properties (but not indexed ones). This also adds a few minor things for setting the RegExpConstructor cached result. This is about a 2x speed-up on microbenchmarks when we fold a match success and about a 8x speed-up when we fold a match failure. It's a 10% speed-up on Octane/regexp. * JavaScriptCore.xcodeproj/project.pbxproj: * dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): * dfg/DFGClobberize.h: (JSC::DFG::clobberize): * dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): * dfg/DFGInsertionSet.cpp: (JSC::DFG::InsertionSet::insertSlow): (JSC::DFG::InsertionSet::execute): * dfg/DFGInsertionSet.h: (JSC::DFG::InsertionSet::insertCheck): * dfg/DFGLazyJSValue.cpp: (JSC::DFG::LazyJSValue::tryGetString): * dfg/DFGMayExit.cpp: (JSC::DFG::mayExit): * dfg/DFGNode.h: (JSC::DFG::StackAccessData::flushedAt): (JSC::DFG::OpInfo::OpInfo): Deleted. * dfg/DFGNodeType.h: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGObjectMaterializationData.cpp: (JSC::DFG::ObjectMaterializationData::dump): (JSC::DFG::PhantomPropertyValue::dump): Deleted. (JSC::DFG::ObjectMaterializationData::oneWaySimilarityScore): Deleted. (JSC::DFG::ObjectMaterializationData::similarityScore): Deleted. * dfg/DFGObjectMaterializationData.h: (JSC::DFG::PhantomPropertyValue::PhantomPropertyValue): Deleted. (JSC::DFG::PhantomPropertyValue::operator==): Deleted. * dfg/DFGOpInfo.h: Added. (JSC::DFG::OpInfo::OpInfo): * dfg/DFGOperations.cpp: * dfg/DFGOperations.h: * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGPromotedHeapLocation.cpp: (WTF::printInternal): * dfg/DFGPromotedHeapLocation.h: * dfg/DFGSafeToExecute.h: (JSC::DFG::safeToExecute): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::~SpeculativeJIT): (JSC::DFG::SpeculativeJIT::emitAllocateRawObject): (JSC::DFG::SpeculativeJIT::emitGetLength): (JSC::DFG::SpeculativeJIT::compileLazyJSConstant): (JSC::DFG::SpeculativeJIT::compileMaterializeNewObject): (JSC::DFG::SpeculativeJIT::compileRecordRegExpCachedResult): (JSC::DFG::SpeculativeJIT::emitAllocateJSArray): Deleted. * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::emitAllocateDestructibleObject): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGStrengthReductionPhase.cpp: (JSC::DFG::StrengthReductionPhase::StrengthReductionPhase): (JSC::DFG::StrengthReductionPhase::handleNode): (JSC::DFG::StrengthReductionPhase::handleCommutativity): (JSC::DFG::StrengthReductionPhase::executeInsertionSet): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (JSC::DFG::Validate::validateCPS): * ftl/FTLAbstractHeapRepository.cpp: * ftl/FTLAbstractHeapRepository.h: * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileNode): (JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSize): (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject): (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeCreateActivation): (JSC::FTL::DFG::LowerDFGToB3::compileSetRegExpObjectLastIndex): (JSC::FTL::DFG::LowerDFGToB3::compileRecordRegExpCachedResult): (JSC::FTL::DFG::LowerDFGToB3::didOverflowStack): (JSC::FTL::DFG::LowerDFGToB3::storageForTransition): (JSC::FTL::DFG::LowerDFGToB3::initializeArrayElements): (JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorage): (JSC::FTL::DFG::LowerDFGToB3::isNotCellOrMisc): (JSC::FTL::DFG::LowerDFGToB3::unboxDouble): * ftl/FTLOperations.cpp: (JSC::FTL::operationPopulateObjectInOSR): (JSC::FTL::operationNewObjectWithButterfly): Deleted. * ftl/FTLOperations.h: * inspector/ContentSearchUtilities.cpp: * runtime/JSObject.h: (JSC::JSObject::createRawObject): (JSC::JSFinalObject::create): * runtime/RegExp.cpp: (JSC::RegExp::compile): (JSC::RegExp::match): (JSC::RegExp::matchConcurrently): (JSC::RegExp::compileMatchOnly): (JSC::RegExp::deleteCode): * runtime/RegExp.h: * runtime/RegExpCachedResult.h: (JSC::RegExpCachedResult::offsetOfLastRegExp): (JSC::RegExpCachedResult::offsetOfLastInput): (JSC::RegExpCachedResult::offsetOfResult): (JSC::RegExpCachedResult::offsetOfReified): * runtime/RegExpConstructor.h: (JSC::RegExpConstructor::offsetOfCachedResult): * runtime/RegExpInlines.h: (JSC::RegExp::hasCodeFor): (JSC::RegExp::compileIfNecessary): (JSC::RegExp::matchInline): (JSC::RegExp::hasMatchOnlyCodeFor): (JSC::RegExp::compileIfNecessaryMatchOnly): * runtime/RegExpObjectInlines.h: (JSC::RegExpObject::execInline): * runtime/StringPrototype.cpp: (JSC::substituteBackreferencesSlow): (JSC::substituteBackreferencesInline): (JSC::substituteBackreferences): (JSC::StringRange::StringRange): * runtime/StringPrototype.h: * runtime/VM.h: * tests/stress/simple-regexp-exec-folding-fail.js: Added. (foo): * tests/stress/simple-regexp-exec-folding.js: Added. (foo): * tests/stress/simple-regexp-test-folding-fail.js: Added. (foo): * tests/stress/simple-regexp-test-folding.js: Added. (foo): * yarr/RegularExpression.cpp: * yarr/Yarr.h: * yarr/YarrInterpreter.cpp: (JSC::Yarr::Interpreter::interpret): (JSC::Yarr::ByteCompiler::ByteCompiler): (JSC::Yarr::ByteCompiler::compile): (JSC::Yarr::ByteCompiler::checkInput): (JSC::Yarr::byteCompile): (JSC::Yarr::interpret): * yarr/YarrInterpreter.h: (JSC::Yarr::BytecodePattern::BytecodePattern): Source/WTF: DFG and FTL should constant-fold RegExpExec https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. Make executeInsertions() return the amount by which the vector increased in size. This is a convenient feature that I use in DFG::InsertionSet. * wtf/Insertion.h: (WTF::executeInsertions): LayoutTests: DFG and FTL should constant-fold RegExpExec https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. * js/regress/script-tests/simple-regexp-exec-folding-fail.js: Added. * js/regress/script-tests/simple-regexp-exec-folding.js: Added. * js/regress/script-tests/simple-regexp-test-folding-fail.js: Added. * js/regress/script-tests/simple-regexp-test-folding.js: Added. * js/regress/simple-regexp-exec-folding-expected.txt: Added. * js/regress/simple-regexp-exec-folding-fail-expected.txt: Added. * js/regress/simple-regexp-exec-folding-fail.html: Added. * js/regress/simple-regexp-exec-folding.html: Added. * js/regress/simple-regexp-test-folding-expected.txt: Added. * js/regress/simple-regexp-test-folding-fail-expected.txt: Added. * js/regress/simple-regexp-test-folding-fail.html: Added. * js/regress/simple-regexp-test-folding.html: Added. Canonical link: https://commits.webkit.org/174348@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-05 22:13:16 +00:00
target.grow(target.size() + numInsertions);
fourthTier: DFG should have an SSA form for use by FTL https://bugs.webkit.org/show_bug.cgi?id=118338 Source/JavaScriptCore: Reviewed by Mark Hahnenberg. Adds an SSA form to the DFG. We can convert ThreadedCPS form into SSA form after breaking critical edges. The conversion algorithm follows Aycock and Horspool, and the SSA form itself follows something I've done before, where instead of having Phi functions specify input nodes corresponding to block predecessors, we instead have Upsilon functions in the predecessors that specify which value in that block goes into which subsequent Phi. Upsilons don't have to dominate Phis (usually they don't) and they correspond to a non-SSA "mov" into the Phi's "variable". This gives all of the good properties of SSA, while ensuring that a bunch of CFG transformations don't have to be SSA-aware. So far the only DFG phases that are SSA-aware are DCE and CFA. CFG simplification is probably SSA-aware by default, though I haven't tried it. Constant folding probably needs a few tweaks, but is likely ready. Ditto for CSE, though it's not clear that we'd want to use block-local CSE when we could be doing GVN. Currently only the FTL can generate code from the SSA form, and there is no way to convert from SSA to ThreadedCPS or LoadStore. There probably will never be such a capability. In order to handle OSR exit state in the SSA, we place MovHints at Phi points. Other than that, you can reconstruct state-at-exit by forward propagating MovHints. Note that MovHint is the new SetLocal in SSA. SetLocal and GetLocal only survive into SSA if they are on captured variables, or in the case of flushes. A "live SetLocal" will be NodeMustGenerate and will always correspond to a flush. Computing the state-at-exit requires running SSA liveness analysis, OSR availability analysis, and flush liveness analysis. The FTL runs all of these prior to generating code. While OSR exit continues to be tricky, much of the logic is now factored into separate phases and the backend has to do less work to reason about what happened outside of the basic block that is being lowered. Conversion from DFG SSA to LLVM SSA is done by ensuring that we generate code in depth-first order, thus guaranteeing that a node will always be lowered (and hence have a LValue) before any of the blocks dominated by that node's block have code generated. For Upsilon/Phi, we just use alloca's. We could do something more clever there, but it's probably not worth it, at least not now. Finally, while the SSA form is currently only being converted to LLVM IR, there is nothing that prevents us from considering other backends in the future - with the caveat that this form is designed to be first lowered to a lower-level SSA before actual machine code generation commences. So we ought to either use LLVM (the intended path) or we will have to write our own SSA low-level backend. This runs all of the code that the FTL was known to run previously. No change in performance for now. But it does open some exciting possibilities! * JavaScriptCore.xcodeproj/project.pbxproj: * bytecode/Operands.h: (JSC::OperandValueTraits::dump): (JSC::Operands::fill): (Operands): (JSC::Operands::clear): (JSC::Operands::operator==): * dfg/DFGAbstractState.cpp: (JSC::DFG::AbstractState::beginBasicBlock): (JSC::DFG::setLiveValues): (DFG): (JSC::DFG::AbstractState::initialize): (JSC::DFG::AbstractState::endBasicBlock): (JSC::DFG::AbstractState::executeEffects): (JSC::DFG::AbstractState::mergeStateAtTail): (JSC::DFG::AbstractState::merge): * dfg/DFGAbstractState.h: (AbstractState): * dfg/DFGAdjacencyList.h: (JSC::DFG::AdjacencyList::justOneChild): (AdjacencyList): * dfg/DFGBasicBlock.cpp: Added. (DFG): (JSC::DFG::BasicBlock::BasicBlock): (JSC::DFG::BasicBlock::~BasicBlock): (JSC::DFG::BasicBlock::ensureLocals): (JSC::DFG::BasicBlock::isInPhis): (JSC::DFG::BasicBlock::isInBlock): (JSC::DFG::BasicBlock::removePredecessor): (JSC::DFG::BasicBlock::replacePredecessor): (JSC::DFG::BasicBlock::dump): (JSC::DFG::BasicBlock::SSAData::SSAData): (JSC::DFG::BasicBlock::SSAData::~SSAData): * dfg/DFGBasicBlock.h: (BasicBlock): (JSC::DFG::BasicBlock::operator[]): (JSC::DFG::BasicBlock::successor): (JSC::DFG::BasicBlock::successorForCondition): (SSAData): * dfg/DFGBasicBlockInlines.h: (DFG): * dfg/DFGBlockInsertionSet.cpp: Added. (DFG): (JSC::DFG::BlockInsertionSet::BlockInsertionSet): (JSC::DFG::BlockInsertionSet::~BlockInsertionSet): (JSC::DFG::BlockInsertionSet::insert): (JSC::DFG::BlockInsertionSet::insertBefore): (JSC::DFG::BlockInsertionSet::execute): * dfg/DFGBlockInsertionSet.h: Added. (DFG): (BlockInsertionSet): * dfg/DFGCFAPhase.cpp: (JSC::DFG::CFAPhase::run): * dfg/DFGCFGSimplificationPhase.cpp: * dfg/DFGCPSRethreadingPhase.cpp: (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock): * dfg/DFGCommon.cpp: (WTF::printInternal): * dfg/DFGCommon.h: (JSC::DFG::doesKill): (DFG): (JSC::DFG::killStatusForDoesKill): * dfg/DFGConstantFoldingPhase.cpp: (JSC::DFG::ConstantFoldingPhase::foldConstants): (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter): * dfg/DFGCriticalEdgeBreakingPhase.cpp: Added. (DFG): (CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::run): (JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge): (JSC::DFG::performCriticalEdgeBreaking): * dfg/DFGCriticalEdgeBreakingPhase.h: Added. (DFG): * dfg/DFGDCEPhase.cpp: (JSC::DFG::DCEPhase::run): (JSC::DFG::DCEPhase::findTypeCheckRoot): (JSC::DFG::DCEPhase::countNode): (DCEPhase): (JSC::DFG::DCEPhase::countEdge): (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren): * dfg/DFGDriver.cpp: (JSC::DFG::compile): * dfg/DFGEdge.cpp: (JSC::DFG::Edge::dump): * dfg/DFGEdge.h: (JSC::DFG::Edge::Edge): (JSC::DFG::Edge::setNode): (JSC::DFG::Edge::useKindUnchecked): (JSC::DFG::Edge::setUseKind): (JSC::DFG::Edge::setProofStatus): (JSC::DFG::Edge::willNotHaveCheck): (JSC::DFG::Edge::willHaveCheck): (Edge): (JSC::DFG::Edge::killStatusUnchecked): (JSC::DFG::Edge::killStatus): (JSC::DFG::Edge::setKillStatus): (JSC::DFG::Edge::doesKill): (JSC::DFG::Edge::doesNotKill): (JSC::DFG::Edge::shift): (JSC::DFG::Edge::makeWord): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGFlushFormat.cpp: Added. (WTF): (WTF::printInternal): * dfg/DFGFlushFormat.h: Added. (DFG): (JSC::DFG::resultFor): (JSC::DFG::useKindFor): (WTF): * dfg/DFGFlushLivenessAnalysisPhase.cpp: Added. (DFG): (FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::run): (JSC::DFG::FlushLivenessAnalysisPhase::process): (JSC::DFG::FlushLivenessAnalysisPhase::setForNode): (JSC::DFG::FlushLivenessAnalysisPhase::flushFormat): (JSC::DFG::performFlushLivenessAnalysis): * dfg/DFGFlushLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): (JSC::DFG::Graph::dumpBlockHeader): (DFG): (JSC::DFG::Graph::addForDepthFirstSort): (JSC::DFG::Graph::getBlocksInDepthFirstOrder): * dfg/DFGGraph.h: (JSC::DFG::Graph::convertToConstant): (JSC::DFG::Graph::valueProfileFor): (Graph): * dfg/DFGInsertionSet.h: (DFG): (JSC::DFG::InsertionSet::execute): * dfg/DFGLivenessAnalysisPhase.cpp: Added. (DFG): (LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::run): (JSC::DFG::LivenessAnalysisPhase::process): (JSC::DFG::LivenessAnalysisPhase::addChildUse): (JSC::DFG::performLivenessAnalysis): * dfg/DFGLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGNode.cpp: (JSC::DFG::Node::hasVariableAccessData): (DFG): * dfg/DFGNode.h: (DFG): (Node): (JSC::DFG::Node::hasLocal): (JSC::DFG::Node::variableAccessData): (JSC::DFG::Node::hasPhi): (JSC::DFG::Node::phi): (JSC::DFG::Node::takenBlock): (JSC::DFG::Node::notTakenBlock): (JSC::DFG::Node::successor): (JSC::DFG::Node::successorForCondition): (JSC::DFG::nodeComparator): (JSC::DFG::nodeListDump): (JSC::DFG::nodeMapDump): * dfg/DFGNodeFlags.cpp: (JSC::DFG::dumpNodeFlags): * dfg/DFGNodeType.h: (DFG): * dfg/DFGOSRAvailabilityAnalysisPhase.cpp: Added. (DFG): (OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::run): (JSC::DFG::performOSRAvailabilityAnalysis): * dfg/DFGOSRAvailabilityAnalysisPhase.h: Added. (DFG): * dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): * dfg/DFGPredictionInjectionPhase.cpp: (JSC::DFG::PredictionInjectionPhase::run): * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSSAConversionPhase.cpp: Added. (DFG): (SSAConversionPhase): (JSC::DFG::SSAConversionPhase::SSAConversionPhase): (JSC::DFG::SSAConversionPhase::run): (JSC::DFG::SSAConversionPhase::forwardPhiChildren): (JSC::DFG::SSAConversionPhase::forwardPhi): (JSC::DFG::SSAConversionPhase::forwardPhiEdge): (JSC::DFG::SSAConversionPhase::deduplicateChildren): (JSC::DFG::SSAConversionPhase::addFlushedLocalOp): (JSC::DFG::SSAConversionPhase::addFlushedLocalEdge): (JSC::DFG::performSSAConversion): * dfg/DFGSSAConversionPhase.h: Added. (DFG): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (Validate): (JSC::DFG::Validate::validateCPS): * dfg/DFGVariableAccessData.h: (JSC::DFG::VariableAccessData::flushFormat): (VariableAccessData): * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToLLVM.cpp: (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::lower): (JSC::FTL::LowerDFGToLLVM::createPhiVariables): (JSC::FTL::LowerDFGToLLVM::compileBlock): (JSC::FTL::LowerDFGToLLVM::compileNode): (JSC::FTL::LowerDFGToLLVM::compileUpsilon): (LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::compilePhi): (JSC::FTL::LowerDFGToLLVM::compileJSConstant): (JSC::FTL::LowerDFGToLLVM::compileWeakJSConstant): (JSC::FTL::LowerDFGToLLVM::compileGetArgument): (JSC::FTL::LowerDFGToLLVM::compileGetLocal): (JSC::FTL::LowerDFGToLLVM::compileSetLocal): (JSC::FTL::LowerDFGToLLVM::compileAdd): (JSC::FTL::LowerDFGToLLVM::compileArithSub): (JSC::FTL::LowerDFGToLLVM::compileArithMul): (JSC::FTL::LowerDFGToLLVM::compileArithDiv): (JSC::FTL::LowerDFGToLLVM::compileArithMod): (JSC::FTL::LowerDFGToLLVM::compileArithMinOrMax): (JSC::FTL::LowerDFGToLLVM::compileArithAbs): (JSC::FTL::LowerDFGToLLVM::compileArithNegate): (JSC::FTL::LowerDFGToLLVM::compileBitAnd): (JSC::FTL::LowerDFGToLLVM::compileBitOr): (JSC::FTL::LowerDFGToLLVM::compileBitXor): (JSC::FTL::LowerDFGToLLVM::compileBitRShift): (JSC::FTL::LowerDFGToLLVM::compileBitLShift): (JSC::FTL::LowerDFGToLLVM::compileBitURShift): (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber): (JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble): (JSC::FTL::LowerDFGToLLVM::compileGetButterfly): (JSC::FTL::LowerDFGToLLVM::compileGetArrayLength): (JSC::FTL::LowerDFGToLLVM::compileGetByVal): (JSC::FTL::LowerDFGToLLVM::compileGetByOffset): (JSC::FTL::LowerDFGToLLVM::compileGetGlobalVar): (JSC::FTL::LowerDFGToLLVM::compileCompareEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareLess): (JSC::FTL::LowerDFGToLLVM::compileCompareLessEq): (JSC::FTL::LowerDFGToLLVM::compileCompareGreater): (JSC::FTL::LowerDFGToLLVM::compileCompareGreaterEq): (JSC::FTL::LowerDFGToLLVM::compileLogicalNot): (JSC::FTL::LowerDFGToLLVM::speculateBackward): (JSC::FTL::LowerDFGToLLVM::lowInt32): (JSC::FTL::LowerDFGToLLVM::lowCell): (JSC::FTL::LowerDFGToLLVM::lowBoolean): (JSC::FTL::LowerDFGToLLVM::lowDouble): (JSC::FTL::LowerDFGToLLVM::lowJSValue): (JSC::FTL::LowerDFGToLLVM::lowStorage): (JSC::FTL::LowerDFGToLLVM::speculate): (JSC::FTL::LowerDFGToLLVM::speculateBoolean): (JSC::FTL::LowerDFGToLLVM::isLive): (JSC::FTL::LowerDFGToLLVM::use): (JSC::FTL::LowerDFGToLLVM::initializeOSRExitStateForBlock): (JSC::FTL::LowerDFGToLLVM::appendOSRExit): (JSC::FTL::LowerDFGToLLVM::emitOSRExitCall): (JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode): (JSC::FTL::LowerDFGToLLVM::linkOSRExitsAndCompleteInitializationBlocks): (JSC::FTL::LowerDFGToLLVM::setInt32): (JSC::FTL::LowerDFGToLLVM::setJSValue): (JSC::FTL::LowerDFGToLLVM::setBoolean): (JSC::FTL::LowerDFGToLLVM::setStorage): (JSC::FTL::LowerDFGToLLVM::setDouble): (JSC::FTL::LowerDFGToLLVM::isValid): * ftl/FTLLoweredNodeValue.h: Added. (FTL): (LoweredNodeValue): (JSC::FTL::LoweredNodeValue::LoweredNodeValue): (JSC::FTL::LoweredNodeValue::isSet): (JSC::FTL::LoweredNodeValue::operator!): (JSC::FTL::LoweredNodeValue::value): (JSC::FTL::LoweredNodeValue::block): * ftl/FTLValueFromBlock.h: (JSC::FTL::ValueFromBlock::ValueFromBlock): (ValueFromBlock): * ftl/FTLValueSource.cpp: (JSC::FTL::ValueSource::dump): * ftl/FTLValueSource.h: Source/WTF: Reviewed by Mark Hahnenberg. - Extend variadicity of PrintStream and dataLog. - Give HashSet the ability to add a span of things. - Give HashSet the ability to == another HashSet. - Note FIXME's in HashTable concerning copying performance, that affects the way that the DFG now uses HashSets and HashMaps. - Factor out the bulk-insertion logic of JSC::DFG::InsertionSet into WTF::Insertion, so that it can be used in more places. - Create a dumper for lists and maps. * WTF.xcodeproj/project.pbxproj: * wtf/DataLog.h: (WTF): (WTF::dataLog): * wtf/HashSet.h: (HashSet): (WTF): (WTF::::add): (WTF::=): * wtf/HashTable.h: (WTF::::HashTable): (WTF::=): * wtf/Insertion.h: Added. (WTF): (Insertion): (WTF::Insertion::Insertion): (WTF::Insertion::index): (WTF::Insertion::element): (WTF::Insertion::operator<): (WTF::executeInsertions): * wtf/ListDump.h: Added. (WTF): (ListDump): (WTF::ListDump::ListDump): (WTF::ListDump::dump): (MapDump): (WTF::MapDump::MapDump): (WTF::MapDump::dump): (WTF::listDump): (WTF::sortedListDump): (WTF::lessThan): (WTF::mapDump): (WTF::sortedMapDump): * wtf/PrintStream.h: (PrintStream): (WTF::PrintStream::print): Conflicts: Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj Canonical link: https://commits.webkit.org/137058@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-07-25 04:04:45 +00:00
size_t lastIndex = target.size();
Source/JavaScriptCore: DFG and FTL should constant-fold RegExpExec, RegExpTest, and StringReplace https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. This enables constant-folding of RegExpExec, RegExpTest, and StringReplace. It's now possible to run Yarr on the JIT threads. Since previous work on constant-folding strings gave the DFG an API for reasoning about JSString constants in terms of JIT-thread-local WTF::Strings, it's now super easy to just pass strings to Yarr and build IR based on the results. But RegExpExec is hard: the folded version still must allocate a RegExpMatchesArray. We must use the same Structure that the code would have used or else we'll pollute the program's inline caches. Also, RegExpMatchesArray.h|cpp will allocate the array and its named properties in one go - we don't want to lose that optimization. So, this patch enables MaterializeNewObject to allocate objects or arrays with any number of indexed or named properties. Previously it could only handle objects (but not arrays) and named properties (but not indexed ones). This also adds a few minor things for setting the RegExpConstructor cached result. This is about a 2x speed-up on microbenchmarks when we fold a match success and about a 8x speed-up when we fold a match failure. It's a 10% speed-up on Octane/regexp. * JavaScriptCore.xcodeproj/project.pbxproj: * dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): * dfg/DFGClobberize.h: (JSC::DFG::clobberize): * dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): * dfg/DFGInsertionSet.cpp: (JSC::DFG::InsertionSet::insertSlow): (JSC::DFG::InsertionSet::execute): * dfg/DFGInsertionSet.h: (JSC::DFG::InsertionSet::insertCheck): * dfg/DFGLazyJSValue.cpp: (JSC::DFG::LazyJSValue::tryGetString): * dfg/DFGMayExit.cpp: (JSC::DFG::mayExit): * dfg/DFGNode.h: (JSC::DFG::StackAccessData::flushedAt): (JSC::DFG::OpInfo::OpInfo): Deleted. * dfg/DFGNodeType.h: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGObjectMaterializationData.cpp: (JSC::DFG::ObjectMaterializationData::dump): (JSC::DFG::PhantomPropertyValue::dump): Deleted. (JSC::DFG::ObjectMaterializationData::oneWaySimilarityScore): Deleted. (JSC::DFG::ObjectMaterializationData::similarityScore): Deleted. * dfg/DFGObjectMaterializationData.h: (JSC::DFG::PhantomPropertyValue::PhantomPropertyValue): Deleted. (JSC::DFG::PhantomPropertyValue::operator==): Deleted. * dfg/DFGOpInfo.h: Added. (JSC::DFG::OpInfo::OpInfo): * dfg/DFGOperations.cpp: * dfg/DFGOperations.h: * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGPromotedHeapLocation.cpp: (WTF::printInternal): * dfg/DFGPromotedHeapLocation.h: * dfg/DFGSafeToExecute.h: (JSC::DFG::safeToExecute): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::~SpeculativeJIT): (JSC::DFG::SpeculativeJIT::emitAllocateRawObject): (JSC::DFG::SpeculativeJIT::emitGetLength): (JSC::DFG::SpeculativeJIT::compileLazyJSConstant): (JSC::DFG::SpeculativeJIT::compileMaterializeNewObject): (JSC::DFG::SpeculativeJIT::compileRecordRegExpCachedResult): (JSC::DFG::SpeculativeJIT::emitAllocateJSArray): Deleted. * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::emitAllocateDestructibleObject): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGStrengthReductionPhase.cpp: (JSC::DFG::StrengthReductionPhase::StrengthReductionPhase): (JSC::DFG::StrengthReductionPhase::handleNode): (JSC::DFG::StrengthReductionPhase::handleCommutativity): (JSC::DFG::StrengthReductionPhase::executeInsertionSet): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (JSC::DFG::Validate::validateCPS): * ftl/FTLAbstractHeapRepository.cpp: * ftl/FTLAbstractHeapRepository.h: * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileNode): (JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSize): (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject): (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeCreateActivation): (JSC::FTL::DFG::LowerDFGToB3::compileSetRegExpObjectLastIndex): (JSC::FTL::DFG::LowerDFGToB3::compileRecordRegExpCachedResult): (JSC::FTL::DFG::LowerDFGToB3::didOverflowStack): (JSC::FTL::DFG::LowerDFGToB3::storageForTransition): (JSC::FTL::DFG::LowerDFGToB3::initializeArrayElements): (JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorage): (JSC::FTL::DFG::LowerDFGToB3::isNotCellOrMisc): (JSC::FTL::DFG::LowerDFGToB3::unboxDouble): * ftl/FTLOperations.cpp: (JSC::FTL::operationPopulateObjectInOSR): (JSC::FTL::operationNewObjectWithButterfly): Deleted. * ftl/FTLOperations.h: * inspector/ContentSearchUtilities.cpp: * runtime/JSObject.h: (JSC::JSObject::createRawObject): (JSC::JSFinalObject::create): * runtime/RegExp.cpp: (JSC::RegExp::compile): (JSC::RegExp::match): (JSC::RegExp::matchConcurrently): (JSC::RegExp::compileMatchOnly): (JSC::RegExp::deleteCode): * runtime/RegExp.h: * runtime/RegExpCachedResult.h: (JSC::RegExpCachedResult::offsetOfLastRegExp): (JSC::RegExpCachedResult::offsetOfLastInput): (JSC::RegExpCachedResult::offsetOfResult): (JSC::RegExpCachedResult::offsetOfReified): * runtime/RegExpConstructor.h: (JSC::RegExpConstructor::offsetOfCachedResult): * runtime/RegExpInlines.h: (JSC::RegExp::hasCodeFor): (JSC::RegExp::compileIfNecessary): (JSC::RegExp::matchInline): (JSC::RegExp::hasMatchOnlyCodeFor): (JSC::RegExp::compileIfNecessaryMatchOnly): * runtime/RegExpObjectInlines.h: (JSC::RegExpObject::execInline): * runtime/StringPrototype.cpp: (JSC::substituteBackreferencesSlow): (JSC::substituteBackreferencesInline): (JSC::substituteBackreferences): (JSC::StringRange::StringRange): * runtime/StringPrototype.h: * runtime/VM.h: * tests/stress/simple-regexp-exec-folding-fail.js: Added. (foo): * tests/stress/simple-regexp-exec-folding.js: Added. (foo): * tests/stress/simple-regexp-test-folding-fail.js: Added. (foo): * tests/stress/simple-regexp-test-folding.js: Added. (foo): * yarr/RegularExpression.cpp: * yarr/Yarr.h: * yarr/YarrInterpreter.cpp: (JSC::Yarr::Interpreter::interpret): (JSC::Yarr::ByteCompiler::ByteCompiler): (JSC::Yarr::ByteCompiler::compile): (JSC::Yarr::ByteCompiler::checkInput): (JSC::Yarr::byteCompile): (JSC::Yarr::interpret): * yarr/YarrInterpreter.h: (JSC::Yarr::BytecodePattern::BytecodePattern): Source/WTF: DFG and FTL should constant-fold RegExpExec https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. Make executeInsertions() return the amount by which the vector increased in size. This is a convenient feature that I use in DFG::InsertionSet. * wtf/Insertion.h: (WTF::executeInsertions): LayoutTests: DFG and FTL should constant-fold RegExpExec https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. * js/regress/script-tests/simple-regexp-exec-folding-fail.js: Added. * js/regress/script-tests/simple-regexp-exec-folding.js: Added. * js/regress/script-tests/simple-regexp-test-folding-fail.js: Added. * js/regress/script-tests/simple-regexp-test-folding.js: Added. * js/regress/simple-regexp-exec-folding-expected.txt: Added. * js/regress/simple-regexp-exec-folding-fail-expected.txt: Added. * js/regress/simple-regexp-exec-folding-fail.html: Added. * js/regress/simple-regexp-exec-folding.html: Added. * js/regress/simple-regexp-test-folding-expected.txt: Added. * js/regress/simple-regexp-test-folding-fail-expected.txt: Added. * js/regress/simple-regexp-test-folding-fail.html: Added. * js/regress/simple-regexp-test-folding.html: Added. Canonical link: https://commits.webkit.org/174348@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-05 22:13:16 +00:00
for (size_t indexInInsertions = numInsertions; indexInInsertions--;) {
ASSERT(!indexInInsertions || insertions[indexInInsertions].index() >= insertions[indexInInsertions - 1].index());
Implement Air::allocateStack() in ES6 to see how much of a bad idea that is https://bugs.webkit.org/show_bug.cgi?id=158318 Reviewed by Saam Barati. PerformanceTests: This adds a new benchmark for us to play with called JSAir. It's a complete ES6 implementation of Air's allocateStack() phase along with all of Air needed to run that phase. This includes things like stack slots, registers, temporaries, basic blocks, instructions, and all of the code for iterating over, inspecting, and modifying those things. To make this work, JSC can now dump Air just before allocateStack() in the form of JS code that creates a Code object that matches exactly what C++ Air saw. This benchmark comprises four Air IRs: - Octane/gbemu's largest function, executeIteration. - Kraken/imaging-gaussian-blur's largest function in OSR entry mode, gaussuanBlur. - Octane/typescript's largest function that is actually hot, scanIdentifier. - JSAir's largest hot function, which is anonymous, so we call it by its hash (ACLj8C). This runs in about 2 seconds on my machine in JSC trunk. It includes both a commandline harness and a web harness. JSAir is almost exactly 100x slower in ES6 in WebKit than the C++ Air::allocateStack() phase on which it is based. JSAir uses the following ES6 features: - Symbol. - for-of. - arrow functions. - Map/Set. - let/const. - classes. All of these things are used in anger and should end up on the hot path. There is also code that uses Proxies, but it ends up being dead. We can improve this even more: I still need to add result validation: https://bugs.webkit.org/show_bug.cgi?id=158493 I want to make it use more ES6 features: https://bugs.webkit.org/show_bug.cgi?id=158497 * JSAir: Added. * JSAir/all.js: Added. * JSAir/allocate_stack.js: Added. (allocateStack.attemptAssignment): (allocateStack.assign): (allocateStack.interfere): (allocateStack.): (allocateStack): * JSAir/arg.js: Added. (Arg): (Arg.isAnyUse): (Arg.isColdUse): (Arg.isWarmUse): (Arg.cooled): (Arg.isEarlyUse): (Arg.isLateUse): (Arg.isAnyDef): (Arg.isEarlyDef): (Arg.isLateDef): (Arg.isZDef): (Arg.typeForB3Type): (Arg.widthForB3Type): (Arg.conservativeWidth): (Arg.minimumWidth): (Arg.bytes): (Arg.widthForBytes): (Arg.createTmp): (Arg.fromReg): (Arg.createImm): (Arg.createBigImm): (Arg.createBitImm): (Arg.createBitImm64): (Arg.createAddr): (Arg.createStack): (Arg.createCallArg): (Arg.createStackAddr): (Arg.isValidScale): (Arg.logScale): (Arg.createIndex): (Arg.createRelCond): (Arg.createResCond): (Arg.createDoubleCond): (Arg.createWidth): (Arg.prototype.get kind): (Arg.prototype.get isTmp): (Arg.prototype.get isImm): (Arg.prototype.get isBigImm): (Arg.prototype.get isBitImm): (Arg.prototype.get isBitImm64): (Arg.prototype.get isSomeImm): (Arg.prototype.get isAddr): (Arg.prototype.get isStack): (Arg.prototype.get isCallArg): (Arg.prototype.get isIndex): (Arg.prototype.get isMemory): (Arg.prototype.get isStackMemory): (Arg.prototype.get isRelCond): (Arg.prototype.get isResCond): (Arg.prototype.get isDoubleCond): (Arg.prototype.get isCondition): (Arg.prototype.get isWidth): (Arg.prototype.get isAlive): (Arg.prototype.get tmp): (Arg.prototype.get value): (Arg.prototype.get base): (Arg.prototype.get hasOffset): (Arg.prototype.get offset): (Arg.prototype.get stackSlot): (Arg.prototype.get index): (Arg.prototype.get scale): (Arg.prototype.get logScale): (Arg.prototype.get width): (Arg.prototype.get isGPTmp): (Arg.prototype.get isFPTmp): (Arg.prototype.get isGP): (Arg.prototype.get isFP): (Arg.prototype.get hasType): (Arg.prototype.get type): (Arg.prototype.isType): (Arg.prototype.isCompatibleType): (Arg.prototype.get isGPR): (Arg.prototype.get gpr): (Arg.prototype.get isFPR): (Arg.prototype.get fpr): (Arg.prototype.get isReg): (Arg.prototype.get reg): (Arg.isValidImmForm): (Arg.isValidBitImmForm): (Arg.isValidBitImm64Form): (Arg.isValidAddrForm): (Arg.isValidIndexForm): (Arg.prototype.isValidForm): (Arg.prototype.forEachTmpFast): (Arg.prototype.usesTmp): (Arg.prototype.forEachTmp): (Arg.prototype.is): (Arg.prototype.as): (Arg.prototype.forEachFast): (Arg.prototype.forEach): (Arg.extract): (Arg.forEachFast): (Arg.forEach): (Arg.prototype.get condition): (Arg.prototype.get isInvertible): (Arg.prototype.toString): * JSAir/basic_block.js: Added. (BasicBlock): (BasicBlock.prototype.get index): (BasicBlock.prototype.get size): (BasicBlock.prototype.Symbol.iterator): (BasicBlock.prototype.at): (BasicBlock.get last): (BasicBlock.get insts): (BasicBlock.get numSuccessors): (BasicBlock.get successors): (BasicBlock.get successorBlocks.): (BasicBlock.get successorBlocks): (BasicBlock.set get numPredecessors): (BasicBlock.get predecessors): (BasicBlock.get frequency): (BasicBlock.get headerString): (BasicBlock.get footerString): * JSAir/benchmark.js: Added. (benchmark): * JSAir/code.js: Added. (Code): (Code.prototype.addBlock): (Code.prototype.addStackSlot): (Code.prototype.newTmp): (Code.prototype.get size): (Code.prototype.at): (Code.prototype.Symbol.iterator): (Code.prototype.get blocks): (Code.prototype.get stackSlots): (Code.prototype.tmps): (Code.prototype.get callArgAreaSize): (Code.prototype.requestCallArgAreaSize): (Code.prototype.get frameSize): (Code.prototype.setFrameSize): (Code.prototype.toString): * JSAir/custom.js: Added. (const.ShuffleCustom.forEachArg): (const.ShuffleCustom.hasNonArgNonControlEffects): (const.PatchCustom.forEachArg): (const.PatchCustom.hasNonArgNonControlEffects): (const.CCallCustom.forEachArg): (const.CCallCustom.hasNonArgNonControlEffects): (const.ColdCCallCustom.forEachArg): (const.ColdCCallCustom.hasNonArgNonControlEffects): * JSAir/frequented_block.js: Added. (FrequentedBlock): (FrequentedBlock.prototype.toString): * JSAir/insertion_set.js: Added. (Insertion): (Insertion.prototype.get index): (Insertion.prototype.get element): (Insertion.prototype.lessThan): (InsertionSet): (InsertionSet.prototype.appendInsertion): (InsertionSet.prototype.append): (InsertionSet.prototype.execute): * JSAir/inst.js: Added. (Inst): (Inst.prototype.append): (Inst.prototype.clear): (Inst.prototype.get opcode): (Inst.prototype.get args): (Inst.prototype.visitArg): (Inst.prototype.forEachTmpFast): (Inst.prototype.forEachArg): (Inst.prototype.forEachTmp): (Inst.prototype.forEach): (Inst.forEachDef): (Inst.forEachDefWithExtraClobberedRegs): (Inst.prototype.get hasNonArgEffects): (Inst.prototype.toString): * JSAir/liveness.js: Added. (Liveness): (Liveness.prototype.get thing): (Liveness.prototype.get code): (Liveness.prototype.get liveAtHead): (Liveness.prototype.get liveAtTail): (Liveness.prototype.localCalc.LocalCalc): (Liveness.prototype.localCalc.LocalCalc.prototype.get liveSet): (Liveness.prototype.localCalc.LocalCalc.prototype.execute): (Liveness.prototype.localCalc): * JSAir/opcode.js: Added. (Inst_forEachArg): (Inst_hasNonArgEffects): * JSAir/payload-gbemu-executeIteration.js: Added. (createPayloadGbemuExecuteIteration): * JSAir/payload-imaging-gaussian-blur-gaussianBlur.js: Added. (createPayloadImagingGaussianBlurGaussianBlur): * JSAir/payload-jsair-ACLj8C.js: Added. (createPayloadJSAirACLj8C): * JSAir/payload-typescript-scanIdentifier.js: Added. (createPayloadTypescriptScanIdentifier): * JSAir/reg.js: Added. (Reg): (Reg.fromReg): (Reg.prototype.get index): (Reg.prototype.get type): (Reg.prototype.get name): (Reg.prototype.get isCalleeSave): (Reg.prototype.get isReg): (Reg.prototype.toString): (Reg.extract): (Reg.forEachFast): (Reg.forEach): (newGPR): (Reg.gprs.Reg.fprs.Reg.calleeSaveGPRs.Reg.calleeSaveFPRs.Reg.calleeSaves): * JSAir/stack_slot.js: Added. (StackSlot): (StackSlot.prototype.get byteSize): (StackSlot.prototype.get kind): (StackSlot.prototype.get isLocked): (StackSlot.prototype.get isSpill): (StackSlot.prototype.get index): (StackSlot.prototype.ensureSize): (StackSlot.prototype.get alignment): (StackSlot.prototype.get offsetFromFP): (StackSlot.prototype.setOffsetFromFP): (StackSlot.prototype.toString): (StackSlot.extract): (StackSlot.forEachFast): (StackSlot.forEach): * JSAir/symbols.js: Added. * JSAir/test.html: Added. * JSAir/test.js: Added. * JSAir/tmp.js: Added. (Tmp): (Tmp.fromReg): (Tmp.prototype.get index): (Tmp.prototype.get type): (Tmp.prototype.get isReg): (Tmp.prototype.toString): (Tmp.extract): (Tmp.forEachFast): (Tmp.forEach): * JSAir/tmp_base.js: Added. (TmpBase.prototype.get isGP): (TmpBase.prototype.get isFP): (TmpBase.prototype.get isGPR): (TmpBase.prototype.get isFPR): (TmpBase.prototype.get reg): (TmpBase.prototype.get gpr): (TmpBase.prototype.get fpr): (TmpBase): * JSAir/util.js: Added. (isRepresentableAsInt32): (addIndexed): (roundUpToMultipleOf): (symbolName): (mergeIntoSet): (nonEmptyRangesOverlap): (rangesOverlap): (removeAllMatching): (swap): (bubble): (bubbleSort): (currentTime): (else.currentTime): Source/JavaScriptCore: Most of these changes are to support dumpAsJS(). But I also found some duplicate and dead code while rewriting it to JS. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/air/AirAllocateStack.cpp: * b3/air/AirArg.h: (JSC::B3::Air::Arg::isSomeImm): (JSC::B3::Air::Arg::isAddr): (JSC::B3::Air::Arg::tmpIndex): (JSC::B3::Air::Arg::isValidImmForm): (JSC::B3::Air::Arg::withOffset): Deleted. This was dead code. * b3/air/AirArgInlines.h: It turns out that Inst has a ForEach thing that duplicated some of the logic of ArgThingHelper, so I just made ArgThingHelper more powerful. (JSC::B3::Air::ArgThingHelper<Arg>::forEach): (JSC::B3::Air::ArgThingHelper<Reg>::is): (JSC::B3::Air::ArgThingHelper<Reg>::as): (JSC::B3::Air::ArgThingHelper<Reg>::forEachFast): (JSC::B3::Air::ArgThingHelper<Reg>::forEach): (JSC::B3::Air::Arg::is): * b3/air/AirDumpAsJS.cpp: Added. (JSC::B3::Air::dumpAsJS): * b3/air/AirDumpAsJS.h: Added. * b3/air/AirFixObviousSpills.cpp: * b3/air/AirGenerate.cpp: (JSC::B3::Air::prepareForGeneration): * b3/air/AirInstInlines.h: (JSC::B3::Air::Inst::forEach): (JSC::B3::Air::Inst::extraClobberedRegs): (JSC::B3::Air::ForEach<Tmp>::forEach): Deleted. This was doing what ArgThingHelper would have done but not as well. (JSC::B3::Air::ForEach<Arg>::forEach): Deleted. (JSC::B3::Air::ForEach<Reg>::forEach): Deleted. * b3/air/AirLogRegisterPressure.cpp: * b3/air/AirReportUsedRegisters.cpp: * b3/air/AirSpillEverything.cpp: * b3/air/opcode_generator.rb: Make this dump opcode.js, which is like what it dumps for C++. * jit/Reg.cpp: (JSC::Reg::debugName): (JSC::Reg::dump): * jit/Reg.h: (JSC::Reg::hash): * jsc.cpp: Fix jsc so that it reports the filename and line number of parser errors. (dumpException): * parser/ParserError.h: Make it easier to debug this code. (WTF::printInternal): * runtime/Options.h: Source/WTF: * wtf/Insertion.h: (WTF::executeInsertions): I found a bug while rewriting this code in JS. * wtf/PrintStream.h: (WTF::PrintStream::print): (WTF::PrintStream::println): This is useful to have. Canonical link: https://commits.webkit.org/176569@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201783 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-06-08 01:43:35 +00:00
ASSERT_UNUSED(originalTargetSize, insertions[indexInInsertions].index() <= originalTargetSize);
fourthTier: DFG should have an SSA form for use by FTL https://bugs.webkit.org/show_bug.cgi?id=118338 Source/JavaScriptCore: Reviewed by Mark Hahnenberg. Adds an SSA form to the DFG. We can convert ThreadedCPS form into SSA form after breaking critical edges. The conversion algorithm follows Aycock and Horspool, and the SSA form itself follows something I've done before, where instead of having Phi functions specify input nodes corresponding to block predecessors, we instead have Upsilon functions in the predecessors that specify which value in that block goes into which subsequent Phi. Upsilons don't have to dominate Phis (usually they don't) and they correspond to a non-SSA "mov" into the Phi's "variable". This gives all of the good properties of SSA, while ensuring that a bunch of CFG transformations don't have to be SSA-aware. So far the only DFG phases that are SSA-aware are DCE and CFA. CFG simplification is probably SSA-aware by default, though I haven't tried it. Constant folding probably needs a few tweaks, but is likely ready. Ditto for CSE, though it's not clear that we'd want to use block-local CSE when we could be doing GVN. Currently only the FTL can generate code from the SSA form, and there is no way to convert from SSA to ThreadedCPS or LoadStore. There probably will never be such a capability. In order to handle OSR exit state in the SSA, we place MovHints at Phi points. Other than that, you can reconstruct state-at-exit by forward propagating MovHints. Note that MovHint is the new SetLocal in SSA. SetLocal and GetLocal only survive into SSA if they are on captured variables, or in the case of flushes. A "live SetLocal" will be NodeMustGenerate and will always correspond to a flush. Computing the state-at-exit requires running SSA liveness analysis, OSR availability analysis, and flush liveness analysis. The FTL runs all of these prior to generating code. While OSR exit continues to be tricky, much of the logic is now factored into separate phases and the backend has to do less work to reason about what happened outside of the basic block that is being lowered. Conversion from DFG SSA to LLVM SSA is done by ensuring that we generate code in depth-first order, thus guaranteeing that a node will always be lowered (and hence have a LValue) before any of the blocks dominated by that node's block have code generated. For Upsilon/Phi, we just use alloca's. We could do something more clever there, but it's probably not worth it, at least not now. Finally, while the SSA form is currently only being converted to LLVM IR, there is nothing that prevents us from considering other backends in the future - with the caveat that this form is designed to be first lowered to a lower-level SSA before actual machine code generation commences. So we ought to either use LLVM (the intended path) or we will have to write our own SSA low-level backend. This runs all of the code that the FTL was known to run previously. No change in performance for now. But it does open some exciting possibilities! * JavaScriptCore.xcodeproj/project.pbxproj: * bytecode/Operands.h: (JSC::OperandValueTraits::dump): (JSC::Operands::fill): (Operands): (JSC::Operands::clear): (JSC::Operands::operator==): * dfg/DFGAbstractState.cpp: (JSC::DFG::AbstractState::beginBasicBlock): (JSC::DFG::setLiveValues): (DFG): (JSC::DFG::AbstractState::initialize): (JSC::DFG::AbstractState::endBasicBlock): (JSC::DFG::AbstractState::executeEffects): (JSC::DFG::AbstractState::mergeStateAtTail): (JSC::DFG::AbstractState::merge): * dfg/DFGAbstractState.h: (AbstractState): * dfg/DFGAdjacencyList.h: (JSC::DFG::AdjacencyList::justOneChild): (AdjacencyList): * dfg/DFGBasicBlock.cpp: Added. (DFG): (JSC::DFG::BasicBlock::BasicBlock): (JSC::DFG::BasicBlock::~BasicBlock): (JSC::DFG::BasicBlock::ensureLocals): (JSC::DFG::BasicBlock::isInPhis): (JSC::DFG::BasicBlock::isInBlock): (JSC::DFG::BasicBlock::removePredecessor): (JSC::DFG::BasicBlock::replacePredecessor): (JSC::DFG::BasicBlock::dump): (JSC::DFG::BasicBlock::SSAData::SSAData): (JSC::DFG::BasicBlock::SSAData::~SSAData): * dfg/DFGBasicBlock.h: (BasicBlock): (JSC::DFG::BasicBlock::operator[]): (JSC::DFG::BasicBlock::successor): (JSC::DFG::BasicBlock::successorForCondition): (SSAData): * dfg/DFGBasicBlockInlines.h: (DFG): * dfg/DFGBlockInsertionSet.cpp: Added. (DFG): (JSC::DFG::BlockInsertionSet::BlockInsertionSet): (JSC::DFG::BlockInsertionSet::~BlockInsertionSet): (JSC::DFG::BlockInsertionSet::insert): (JSC::DFG::BlockInsertionSet::insertBefore): (JSC::DFG::BlockInsertionSet::execute): * dfg/DFGBlockInsertionSet.h: Added. (DFG): (BlockInsertionSet): * dfg/DFGCFAPhase.cpp: (JSC::DFG::CFAPhase::run): * dfg/DFGCFGSimplificationPhase.cpp: * dfg/DFGCPSRethreadingPhase.cpp: (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock): * dfg/DFGCommon.cpp: (WTF::printInternal): * dfg/DFGCommon.h: (JSC::DFG::doesKill): (DFG): (JSC::DFG::killStatusForDoesKill): * dfg/DFGConstantFoldingPhase.cpp: (JSC::DFG::ConstantFoldingPhase::foldConstants): (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter): * dfg/DFGCriticalEdgeBreakingPhase.cpp: Added. (DFG): (CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::run): (JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge): (JSC::DFG::performCriticalEdgeBreaking): * dfg/DFGCriticalEdgeBreakingPhase.h: Added. (DFG): * dfg/DFGDCEPhase.cpp: (JSC::DFG::DCEPhase::run): (JSC::DFG::DCEPhase::findTypeCheckRoot): (JSC::DFG::DCEPhase::countNode): (DCEPhase): (JSC::DFG::DCEPhase::countEdge): (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren): * dfg/DFGDriver.cpp: (JSC::DFG::compile): * dfg/DFGEdge.cpp: (JSC::DFG::Edge::dump): * dfg/DFGEdge.h: (JSC::DFG::Edge::Edge): (JSC::DFG::Edge::setNode): (JSC::DFG::Edge::useKindUnchecked): (JSC::DFG::Edge::setUseKind): (JSC::DFG::Edge::setProofStatus): (JSC::DFG::Edge::willNotHaveCheck): (JSC::DFG::Edge::willHaveCheck): (Edge): (JSC::DFG::Edge::killStatusUnchecked): (JSC::DFG::Edge::killStatus): (JSC::DFG::Edge::setKillStatus): (JSC::DFG::Edge::doesKill): (JSC::DFG::Edge::doesNotKill): (JSC::DFG::Edge::shift): (JSC::DFG::Edge::makeWord): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGFlushFormat.cpp: Added. (WTF): (WTF::printInternal): * dfg/DFGFlushFormat.h: Added. (DFG): (JSC::DFG::resultFor): (JSC::DFG::useKindFor): (WTF): * dfg/DFGFlushLivenessAnalysisPhase.cpp: Added. (DFG): (FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::run): (JSC::DFG::FlushLivenessAnalysisPhase::process): (JSC::DFG::FlushLivenessAnalysisPhase::setForNode): (JSC::DFG::FlushLivenessAnalysisPhase::flushFormat): (JSC::DFG::performFlushLivenessAnalysis): * dfg/DFGFlushLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): (JSC::DFG::Graph::dumpBlockHeader): (DFG): (JSC::DFG::Graph::addForDepthFirstSort): (JSC::DFG::Graph::getBlocksInDepthFirstOrder): * dfg/DFGGraph.h: (JSC::DFG::Graph::convertToConstant): (JSC::DFG::Graph::valueProfileFor): (Graph): * dfg/DFGInsertionSet.h: (DFG): (JSC::DFG::InsertionSet::execute): * dfg/DFGLivenessAnalysisPhase.cpp: Added. (DFG): (LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::run): (JSC::DFG::LivenessAnalysisPhase::process): (JSC::DFG::LivenessAnalysisPhase::addChildUse): (JSC::DFG::performLivenessAnalysis): * dfg/DFGLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGNode.cpp: (JSC::DFG::Node::hasVariableAccessData): (DFG): * dfg/DFGNode.h: (DFG): (Node): (JSC::DFG::Node::hasLocal): (JSC::DFG::Node::variableAccessData): (JSC::DFG::Node::hasPhi): (JSC::DFG::Node::phi): (JSC::DFG::Node::takenBlock): (JSC::DFG::Node::notTakenBlock): (JSC::DFG::Node::successor): (JSC::DFG::Node::successorForCondition): (JSC::DFG::nodeComparator): (JSC::DFG::nodeListDump): (JSC::DFG::nodeMapDump): * dfg/DFGNodeFlags.cpp: (JSC::DFG::dumpNodeFlags): * dfg/DFGNodeType.h: (DFG): * dfg/DFGOSRAvailabilityAnalysisPhase.cpp: Added. (DFG): (OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::run): (JSC::DFG::performOSRAvailabilityAnalysis): * dfg/DFGOSRAvailabilityAnalysisPhase.h: Added. (DFG): * dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): * dfg/DFGPredictionInjectionPhase.cpp: (JSC::DFG::PredictionInjectionPhase::run): * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSSAConversionPhase.cpp: Added. (DFG): (SSAConversionPhase): (JSC::DFG::SSAConversionPhase::SSAConversionPhase): (JSC::DFG::SSAConversionPhase::run): (JSC::DFG::SSAConversionPhase::forwardPhiChildren): (JSC::DFG::SSAConversionPhase::forwardPhi): (JSC::DFG::SSAConversionPhase::forwardPhiEdge): (JSC::DFG::SSAConversionPhase::deduplicateChildren): (JSC::DFG::SSAConversionPhase::addFlushedLocalOp): (JSC::DFG::SSAConversionPhase::addFlushedLocalEdge): (JSC::DFG::performSSAConversion): * dfg/DFGSSAConversionPhase.h: Added. (DFG): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (Validate): (JSC::DFG::Validate::validateCPS): * dfg/DFGVariableAccessData.h: (JSC::DFG::VariableAccessData::flushFormat): (VariableAccessData): * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToLLVM.cpp: (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::lower): (JSC::FTL::LowerDFGToLLVM::createPhiVariables): (JSC::FTL::LowerDFGToLLVM::compileBlock): (JSC::FTL::LowerDFGToLLVM::compileNode): (JSC::FTL::LowerDFGToLLVM::compileUpsilon): (LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::compilePhi): (JSC::FTL::LowerDFGToLLVM::compileJSConstant): (JSC::FTL::LowerDFGToLLVM::compileWeakJSConstant): (JSC::FTL::LowerDFGToLLVM::compileGetArgument): (JSC::FTL::LowerDFGToLLVM::compileGetLocal): (JSC::FTL::LowerDFGToLLVM::compileSetLocal): (JSC::FTL::LowerDFGToLLVM::compileAdd): (JSC::FTL::LowerDFGToLLVM::compileArithSub): (JSC::FTL::LowerDFGToLLVM::compileArithMul): (JSC::FTL::LowerDFGToLLVM::compileArithDiv): (JSC::FTL::LowerDFGToLLVM::compileArithMod): (JSC::FTL::LowerDFGToLLVM::compileArithMinOrMax): (JSC::FTL::LowerDFGToLLVM::compileArithAbs): (JSC::FTL::LowerDFGToLLVM::compileArithNegate): (JSC::FTL::LowerDFGToLLVM::compileBitAnd): (JSC::FTL::LowerDFGToLLVM::compileBitOr): (JSC::FTL::LowerDFGToLLVM::compileBitXor): (JSC::FTL::LowerDFGToLLVM::compileBitRShift): (JSC::FTL::LowerDFGToLLVM::compileBitLShift): (JSC::FTL::LowerDFGToLLVM::compileBitURShift): (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber): (JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble): (JSC::FTL::LowerDFGToLLVM::compileGetButterfly): (JSC::FTL::LowerDFGToLLVM::compileGetArrayLength): (JSC::FTL::LowerDFGToLLVM::compileGetByVal): (JSC::FTL::LowerDFGToLLVM::compileGetByOffset): (JSC::FTL::LowerDFGToLLVM::compileGetGlobalVar): (JSC::FTL::LowerDFGToLLVM::compileCompareEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareLess): (JSC::FTL::LowerDFGToLLVM::compileCompareLessEq): (JSC::FTL::LowerDFGToLLVM::compileCompareGreater): (JSC::FTL::LowerDFGToLLVM::compileCompareGreaterEq): (JSC::FTL::LowerDFGToLLVM::compileLogicalNot): (JSC::FTL::LowerDFGToLLVM::speculateBackward): (JSC::FTL::LowerDFGToLLVM::lowInt32): (JSC::FTL::LowerDFGToLLVM::lowCell): (JSC::FTL::LowerDFGToLLVM::lowBoolean): (JSC::FTL::LowerDFGToLLVM::lowDouble): (JSC::FTL::LowerDFGToLLVM::lowJSValue): (JSC::FTL::LowerDFGToLLVM::lowStorage): (JSC::FTL::LowerDFGToLLVM::speculate): (JSC::FTL::LowerDFGToLLVM::speculateBoolean): (JSC::FTL::LowerDFGToLLVM::isLive): (JSC::FTL::LowerDFGToLLVM::use): (JSC::FTL::LowerDFGToLLVM::initializeOSRExitStateForBlock): (JSC::FTL::LowerDFGToLLVM::appendOSRExit): (JSC::FTL::LowerDFGToLLVM::emitOSRExitCall): (JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode): (JSC::FTL::LowerDFGToLLVM::linkOSRExitsAndCompleteInitializationBlocks): (JSC::FTL::LowerDFGToLLVM::setInt32): (JSC::FTL::LowerDFGToLLVM::setJSValue): (JSC::FTL::LowerDFGToLLVM::setBoolean): (JSC::FTL::LowerDFGToLLVM::setStorage): (JSC::FTL::LowerDFGToLLVM::setDouble): (JSC::FTL::LowerDFGToLLVM::isValid): * ftl/FTLLoweredNodeValue.h: Added. (FTL): (LoweredNodeValue): (JSC::FTL::LoweredNodeValue::LoweredNodeValue): (JSC::FTL::LoweredNodeValue::isSet): (JSC::FTL::LoweredNodeValue::operator!): (JSC::FTL::LoweredNodeValue::value): (JSC::FTL::LoweredNodeValue::block): * ftl/FTLValueFromBlock.h: (JSC::FTL::ValueFromBlock::ValueFromBlock): (ValueFromBlock): * ftl/FTLValueSource.cpp: (JSC::FTL::ValueSource::dump): * ftl/FTLValueSource.h: Source/WTF: Reviewed by Mark Hahnenberg. - Extend variadicity of PrintStream and dataLog. - Give HashSet the ability to add a span of things. - Give HashSet the ability to == another HashSet. - Note FIXME's in HashTable concerning copying performance, that affects the way that the DFG now uses HashSets and HashMaps. - Factor out the bulk-insertion logic of JSC::DFG::InsertionSet into WTF::Insertion, so that it can be used in more places. - Create a dumper for lists and maps. * WTF.xcodeproj/project.pbxproj: * wtf/DataLog.h: (WTF): (WTF::dataLog): * wtf/HashSet.h: (HashSet): (WTF): (WTF::::add): (WTF::=): * wtf/HashTable.h: (WTF::::HashTable): (WTF::=): * wtf/Insertion.h: Added. (WTF): (Insertion): (WTF::Insertion::Insertion): (WTF::Insertion::index): (WTF::Insertion::element): (WTF::Insertion::operator<): (WTF::executeInsertions): * wtf/ListDump.h: Added. (WTF): (ListDump): (WTF::ListDump::ListDump): (WTF::ListDump::dump): (MapDump): (WTF::MapDump::MapDump): (WTF::MapDump::dump): (WTF::listDump): (WTF::sortedListDump): (WTF::lessThan): (WTF::mapDump): (WTF::sortedMapDump): * wtf/PrintStream.h: (PrintStream): (WTF::PrintStream::print): Conflicts: Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj Canonical link: https://commits.webkit.org/137058@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-07-25 04:04:45 +00:00
size_t firstIndex = insertions[indexInInsertions].index() + indexInInsertions;
size_t indexOffset = indexInInsertions + 1;
for (size_t i = lastIndex; --i > firstIndex;)
Replace WTF::move with WTFMove https://bugs.webkit.org/show_bug.cgi?id=152601 Reviewed by Brady Eidson. Source/JavaScriptCore: * API/ObjCCallbackFunction.mm: (JSC::ObjCCallbackFunctionImpl::ObjCCallbackFunctionImpl): (JSC::ObjCCallbackFunction::ObjCCallbackFunction): (JSC::ObjCCallbackFunction::create): (objCCallbackFunctionForInvocation): * assembler/AssemblerBuffer.h: (JSC::AssemblerBuffer::releaseAssemblerData): * assembler/LinkBuffer.cpp: (JSC::LinkBuffer::linkCode): * b3/B3BlockInsertionSet.cpp: (JSC::B3::BlockInsertionSet::insert): (JSC::B3::BlockInsertionSet::splitForward): * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::run): (JSC::B3::Air::LowerToAir::lower): * b3/B3OpaqueByproducts.cpp: (JSC::B3::OpaqueByproducts::add): * b3/B3Procedure.cpp: (JSC::B3::Procedure::addBlock): (JSC::B3::Procedure::addDataSection): * b3/B3Procedure.h: (JSC::B3::Procedure::releaseByproducts): * b3/B3ProcedureInlines.h: (JSC::B3::Procedure::add): * b3/B3Value.h: * b3/air/AirCode.cpp: (JSC::B3::Air::Code::addBlock): (JSC::B3::Air::Code::addStackSlot): (JSC::B3::Air::Code::addSpecial): * b3/air/AirInst.h: (JSC::B3::Air::Inst::Inst): * b3/air/AirIteratedRegisterCoalescing.cpp: * b3/air/AirSimplifyCFG.cpp: (JSC::B3::Air::simplifyCFG): * bindings/ScriptValue.cpp: (Deprecated::jsToInspectorValue): * builtins/BuiltinExecutables.cpp: (JSC::createExecutableInternal): * bytecode/BytecodeBasicBlock.cpp: (JSC::computeBytecodeBasicBlocks): * bytecode/CodeBlock.cpp: (JSC::CodeBlock::finishCreation): (JSC::CodeBlock::setCalleeSaveRegisters): * bytecode/CodeBlock.h: (JSC::CodeBlock::setJITCodeMap): (JSC::CodeBlock::livenessAnalysis): * bytecode/GetByIdStatus.cpp: (JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback): * bytecode/GetByIdVariant.cpp: (JSC::GetByIdVariant::GetByIdVariant): * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::regenerateWithCases): (JSC::PolymorphicAccess::regenerateWithCase): (JSC::PolymorphicAccess::regenerate): * bytecode/PutByIdStatus.cpp: (JSC::PutByIdStatus::computeForStubInfo): * bytecode/PutByIdVariant.cpp: (JSC::PutByIdVariant::setter): * bytecode/StructureStubClearingWatchpoint.cpp: (JSC::StructureStubClearingWatchpoint::push): * bytecode/StructureStubClearingWatchpoint.h: (JSC::StructureStubClearingWatchpoint::StructureStubClearingWatchpoint): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedCodeBlock::setInstructions): * bytecode/UnlinkedFunctionExecutable.cpp: (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): * bytecode/UnlinkedFunctionExecutable.h: * bytecompiler/SetForScope.h: (JSC::SetForScope::SetForScope): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::livenessFor): (JSC::DFG::Graph::killsFor): * dfg/DFGJITCompiler.cpp: (JSC::DFG::JITCompiler::link): (JSC::DFG::JITCompiler::compile): (JSC::DFG::JITCompiler::compileFunction): * dfg/DFGJITFinalizer.cpp: (JSC::DFG::JITFinalizer::JITFinalizer): * dfg/DFGLivenessAnalysisPhase.cpp: (JSC::DFG::LivenessAnalysisPhase::process): * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::addSlowPathGenerator): (JSC::DFG::SpeculativeJIT::compileIn): (JSC::DFG::SpeculativeJIT::compileCreateDirectArguments): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::cachedGetById): (JSC::DFG::SpeculativeJIT::cachedPutById): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::cachedGetById): (JSC::DFG::SpeculativeJIT::cachedPutById): * dfg/DFGWorklist.cpp: (JSC::DFG::Worklist::finishCreation): * disassembler/Disassembler.cpp: (JSC::disassembleAsynchronously): * ftl/FTLB3Compile.cpp: (JSC::FTL::compile): * ftl/FTLCompile.cpp: (JSC::FTL::mmAllocateDataSection): * ftl/FTLJITCode.cpp: (JSC::FTL::JITCode::initializeB3Byproducts): * ftl/FTLJITFinalizer.h: (JSC::FTL::OutOfLineCodeInfo::OutOfLineCodeInfo): * ftl/FTLLink.cpp: (JSC::FTL::link): * ftl/FTLLowerDFGToLLVM.cpp: (JSC::FTL::DFG::LowerDFGToLLVM::compileTailCall): (JSC::FTL::DFG::LowerDFGToLLVM::lazySlowPath): * heap/Heap.cpp: (JSC::Heap::releaseDelayedReleasedObjects): (JSC::Heap::markRoots): (JSC::Heap::setIncrementalSweeper): * heap/HeapInlines.h: (JSC::Heap::releaseSoon): (JSC::Heap::registerWeakGCMap): * heap/WeakInlines.h: * inspector/ConsoleMessage.cpp: (Inspector::ConsoleMessage::addToFrontend): * inspector/ContentSearchUtilities.cpp: (Inspector::ContentSearchUtilities::searchInTextByLines): * inspector/InjectedScript.cpp: (Inspector::InjectedScript::getFunctionDetails): (Inspector::InjectedScript::getProperties): (Inspector::InjectedScript::getDisplayableProperties): (Inspector::InjectedScript::getInternalProperties): (Inspector::InjectedScript::getCollectionEntries): (Inspector::InjectedScript::wrapCallFrames): * inspector/InspectorAgentRegistry.cpp: (Inspector::AgentRegistry::append): (Inspector::AgentRegistry::appendExtraAgent): * inspector/InspectorBackendDispatcher.cpp: (Inspector::BackendDispatcher::CallbackBase::CallbackBase): (Inspector::BackendDispatcher::CallbackBase::sendSuccess): (Inspector::BackendDispatcher::BackendDispatcher): (Inspector::BackendDispatcher::create): (Inspector::BackendDispatcher::sendPendingErrors): * inspector/InspectorProtocolTypes.h: (Inspector::Protocol::Array::addItem): * inspector/InspectorValues.cpp: * inspector/InspectorValues.h: (Inspector::InspectorObjectBase::setValue): (Inspector::InspectorObjectBase::setObject): (Inspector::InspectorObjectBase::setArray): (Inspector::InspectorArrayBase::pushValue): (Inspector::InspectorArrayBase::pushObject): (Inspector::InspectorArrayBase::pushArray): * inspector/JSGlobalObjectConsoleClient.cpp: (Inspector::JSGlobalObjectConsoleClient::messageWithTypeAndLevel): (Inspector::JSGlobalObjectConsoleClient::timeEnd): * inspector/JSGlobalObjectInspectorController.cpp: (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController): (Inspector::JSGlobalObjectInspectorController::appendExtraAgent): * inspector/JSInjectedScriptHost.cpp: (Inspector::JSInjectedScriptHost::JSInjectedScriptHost): * inspector/JSInjectedScriptHost.h: (Inspector::JSInjectedScriptHost::create): * inspector/agents/InspectorAgent.cpp: (Inspector::InspectorAgent::activateExtraDomain): * inspector/agents/InspectorConsoleAgent.cpp: (Inspector::InspectorConsoleAgent::addMessageToConsole): (Inspector::InspectorConsoleAgent::addConsoleMessage): * inspector/agents/InspectorDebuggerAgent.cpp: (Inspector::InspectorDebuggerAgent::setBreakpointByUrl): (Inspector::InspectorDebuggerAgent::resolveBreakpoint): (Inspector::InspectorDebuggerAgent::schedulePauseOnNextStatement): (Inspector::InspectorDebuggerAgent::breakpointActionProbe): (Inspector::InspectorDebuggerAgent::breakProgram): * inspector/agents/InspectorHeapAgent.cpp: (Inspector::InspectorHeapAgent::didGarbageCollect): * inspector/agents/InspectorRuntimeAgent.cpp: (Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets): (Inspector::InspectorRuntimeAgent::getBasicBlocks): * inspector/agents/InspectorScriptProfilerAgent.cpp: (Inspector::InspectorScriptProfilerAgent::addEvent): (Inspector::buildInspectorObject): (Inspector::buildProfileInspectorObject): (Inspector::InspectorScriptProfilerAgent::trackingComplete): * inspector/augmentable/AlternateDispatchableAgent.h: * inspector/scripts/codegen/cpp_generator_templates.py: * inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py: (CppBackendDispatcherImplementationGenerator._generate_small_dispatcher_switch_implementation_for_domain): (CppBackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command): * inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py: (CppFrontendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_event): * inspector/scripts/codegen/generate_cpp_protocol_types_header.py: (_generate_unchecked_setter_for_member): * inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py: (ObjCConfigurationImplementationGenerator._generate_success_block_for_command): * inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py: (ObjCFrontendDispatcherImplementationGenerator._generate_event_out_parameters): * inspector/scripts/codegen/objc_generator_templates.py: * inspector/scripts/tests/expected/commands-with-async-attribute.json-result: * inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result: * inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result: * inspector/scripts/tests/expected/enum-values.json-result: * inspector/scripts/tests/expected/events-with-optional-parameters.json-result: * inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result: * inspector/scripts/tests/expected/same-type-id-different-domain.json-result: * inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result: * inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result: * inspector/scripts/tests/expected/type-declaration-array-type.json-result: * inspector/scripts/tests/expected/type-declaration-enum-type.json-result: * inspector/scripts/tests/expected/type-declaration-object-type.json-result: * inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result: * jit/CallFrameShuffler.cpp: (JSC::CallFrameShuffler::performSafeWrites): * jit/PolymorphicCallStubRoutine.cpp: (JSC::PolymorphicCallStubRoutine::PolymorphicCallStubRoutine): * jit/Repatch.cpp: (JSC::tryCacheGetByID): (JSC::tryCachePutByID): (JSC::tryRepatchIn): (JSC::linkPolymorphicCall): * parser/Nodes.cpp: (JSC::ProgramNode::setClosedVariables): * parser/Parser.cpp: (JSC::Parser<LexerType>::parseInner): (JSC::Parser<LexerType>::parseFunctionInfo): * parser/Parser.h: (JSC::Parser::closedVariables): * parser/SourceProviderCache.cpp: (JSC::SourceProviderCache::add): * profiler/ProfileNode.h: (JSC::CalculateProfileSubtreeDataFunctor::returnValue): * replay/EncodedValue.cpp: (JSC::EncodedValue::get<EncodedValue>): * replay/scripts/CodeGeneratorReplayInputs.py: (Generator.generate_member_move_expression): * replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.cpp: (Test::HandleWheelEvent::HandleWheelEvent): (JSC::InputTraits<Test::HandleWheelEvent>::decode): * replay/scripts/tests/expected/generate-memoized-type-modes.json-TestReplayInputs.cpp: (Test::MapInput::MapInput): (JSC::InputTraits<Test::MapInput>::decode): * runtime/ConsoleClient.cpp: (JSC::ConsoleClient::internalMessageWithTypeAndLevel): (JSC::ConsoleClient::logWithLevel): (JSC::ConsoleClient::clear): (JSC::ConsoleClient::dir): (JSC::ConsoleClient::dirXML): (JSC::ConsoleClient::table): (JSC::ConsoleClient::trace): (JSC::ConsoleClient::assertCondition): (JSC::ConsoleClient::group): (JSC::ConsoleClient::groupCollapsed): (JSC::ConsoleClient::groupEnd): * runtime/JSNativeStdFunction.cpp: (JSC::JSNativeStdFunction::create): * runtime/JSString.h: (JSC::jsNontrivialString): * runtime/JSStringJoiner.cpp: (JSC::JSStringJoiner::join): * runtime/JSStringJoiner.h: (JSC::JSStringJoiner::append): * runtime/NativeStdFunctionCell.cpp: (JSC::NativeStdFunctionCell::create): (JSC::NativeStdFunctionCell::NativeStdFunctionCell): * runtime/ScopedArgumentsTable.cpp: (JSC::ScopedArgumentsTable::setLength): * runtime/StructureIDTable.cpp: (JSC::StructureIDTable::resize): * runtime/TypeSet.cpp: (JSC::StructureShape::inspectorRepresentation): * runtime/WeakGCMap.h: (JSC::WeakGCMap::set): * tools/CodeProfile.h: (JSC::CodeProfile::addChild): * yarr/YarrInterpreter.cpp: (JSC::Yarr::ByteCompiler::compile): (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd): * yarr/YarrInterpreter.h: (JSC::Yarr::BytecodePattern::BytecodePattern): * yarr/YarrPattern.cpp: (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor): (JSC::Yarr::YarrPatternConstructor::reset): (JSC::Yarr::YarrPatternConstructor::atomPatternCharacter): (JSC::Yarr::YarrPatternConstructor::atomCharacterClassEnd): (JSC::Yarr::YarrPatternConstructor::atomParenthesesSubpatternBegin): (JSC::Yarr::YarrPatternConstructor::atomParentheticalAssertionBegin): (JSC::Yarr::YarrPatternConstructor::copyDisjunction): Source/WebCore: * Modules/battery/NavigatorBattery.cpp: (WebCore::NavigatorBattery::from): * Modules/encryptedmedia/CDMSessionClearKey.cpp: (WebCore::CDMSessionClearKey::update): * Modules/encryptedmedia/MediaKeys.cpp: (WebCore::MediaKeys::create): (WebCore::MediaKeys::MediaKeys): * Modules/gamepad/NavigatorGamepad.cpp: (WebCore::NavigatorGamepad::from): * Modules/gamepad/deprecated/NavigatorGamepad.cpp: (WebCore::NavigatorGamepad::from): * Modules/geolocation/GeoNotifier.cpp: (WebCore::GeoNotifier::GeoNotifier): (WebCore::GeoNotifier::setFatalError): * Modules/geolocation/GeoNotifier.h: (WebCore::GeoNotifier::create): * Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::Watchers::add): (WebCore::Geolocation::getCurrentPosition): (WebCore::Geolocation::watchPosition): * Modules/geolocation/GeolocationController.cpp: (WebCore::GeolocationController::viewStateDidChange): * Modules/geolocation/Geoposition.h: (WebCore::Geoposition::create): (WebCore::Geoposition::Geoposition): * Modules/geolocation/NavigatorGeolocation.cpp: (WebCore::NavigatorGeolocation::from): * Modules/indexeddb/DOMWindowIndexedDatabase.cpp: (WebCore::DOMWindowIndexedDatabase::from): * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp: (WebCore::WorkerGlobalScopeIndexedDatabase::from): * Modules/indexeddb/client/IDBAnyImpl.cpp: (WebCore::IDBClient::IDBAny::IDBAny): * Modules/indexeddb/client/IDBAnyImpl.h: (WebCore::IDBClient::IDBAny::create): * Modules/indexeddb/client/IDBDatabaseImpl.cpp: (WebCore::IDBClient::IDBDatabase::willCommitTransaction): (WebCore::IDBClient::IDBDatabase::willAbortTransaction): (WebCore::IDBClient::IDBDatabase::fireVersionChangeEvent): * Modules/indexeddb/client/IDBIndexImpl.cpp: (WebCore::IDBClient::IDBIndex::openCursor): (WebCore::IDBClient::IDBIndex::openKeyCursor): * Modules/indexeddb/client/IDBObjectStoreImpl.cpp: (WebCore::IDBClient::IDBObjectStore::openCursor): (WebCore::IDBClient::IDBObjectStore::get): (WebCore::IDBClient::IDBObjectStore::deleteFunction): (WebCore::IDBClient::IDBObjectStore::createIndex): (WebCore::IDBClient::IDBObjectStore::index): * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp: (WebCore::IDBClient::IDBOpenDBRequest::onSuccess): (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded): * Modules/indexeddb/client/IDBRequestImpl.cpp: (WebCore::IDBClient::IDBRequest::enqueueEvent): (WebCore::IDBClient::IDBRequest::setResult): (WebCore::IDBClient::IDBRequest::setResultToStructuredClone): * Modules/indexeddb/client/IDBTransactionImpl.cpp: (WebCore::IDBClient::IDBTransaction::abort): (WebCore::IDBClient::IDBTransaction::scheduleOperation): (WebCore::IDBClient::IDBTransaction::commit): (WebCore::IDBClient::IDBTransaction::enqueueEvent): (WebCore::IDBClient::IDBTransaction::createObjectStore): (WebCore::IDBClient::IDBTransaction::createIndex): (WebCore::IDBClient::IDBTransaction::doRequestOpenCursor): (WebCore::IDBClient::IDBTransaction::iterateCursor): (WebCore::IDBClient::IDBTransaction::requestGetRecord): (WebCore::IDBClient::IDBTransaction::requestIndexRecord): (WebCore::IDBClient::IDBTransaction::requestClearObjectStore): (WebCore::IDBClient::IDBTransaction::requestPutOrAdd): (WebCore::IDBClient::IDBTransaction::deleteObjectStore): (WebCore::IDBClient::IDBTransaction::deleteIndex): * Modules/indexeddb/legacy/IDBDatabaseBackend.cpp: (WebCore::IDBDatabaseBackend::processPendingOpenCalls): * Modules/indexeddb/legacy/IDBDatabaseBackend.h: (WebCore::IDBDatabaseBackend::setPendingSecondHalfOpen): * Modules/indexeddb/legacy/LegacyAny.h: (WebCore::LegacyAny::create): * Modules/indexeddb/legacy/LegacyDatabase.cpp: (WebCore::LegacyDatabase::enqueueEvent): * Modules/indexeddb/legacy/LegacyRequest.cpp: (WebCore::LegacyRequest::enqueueEvent): * Modules/indexeddb/legacy/LegacyTransaction.cpp: (WebCore::LegacyTransaction::enqueueEvent): * Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::postDatabaseTask): (WebCore::IDBServer::IDBServer::postDatabaseTaskReply): * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp: (WebCore::IDBServer::MemoryBackingStoreTransaction::indexDeleted): (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreDeleted): (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreCleared): (WebCore::IDBServer::MemoryBackingStoreTransaction::indexCleared): (WebCore::IDBServer::MemoryBackingStoreTransaction::abort): * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction): (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore): (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore): (WebCore::IDBServer::MemoryIDBBackingStore::restoreObjectStoreForVersionChangeAbort): (WebCore::IDBServer::MemoryIDBBackingStore::registerObjectStore): * Modules/indexeddb/server/MemoryIndex.cpp: (WebCore::IDBServer::MemoryIndex::objectStoreCleared): (WebCore::IDBServer::MemoryIndex::replaceIndexValueStore): * Modules/indexeddb/server/MemoryObjectStore.cpp: (WebCore::IDBServer::MemoryObjectStore::createIndex): (WebCore::IDBServer::MemoryObjectStore::maybeRestoreDeletedIndex): (WebCore::IDBServer::MemoryObjectStore::deleteIndex): (WebCore::IDBServer::MemoryObjectStore::clear): (WebCore::IDBServer::MemoryObjectStore::replaceKeyValueStore): (WebCore::IDBServer::MemoryObjectStore::registerIndex): * Modules/indexeddb/server/ServerOpenDBRequest.cpp: (WebCore::IDBServer::ServerOpenDBRequest::notifiedConnectionsOfVersionChange): * Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection): (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation): (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction): (WebCore::IDBServer::UniqueIDBDatabase::maybeNotifyConnectionsOfVersionChange): (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient): (WebCore::IDBServer::UniqueIDBDatabase::enqueueTransaction): (WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableTransaction): * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp: (WebCore::IDBServer::UniqueIDBDatabaseConnection::establishTransaction): * Modules/indexeddb/shared/IndexKey.cpp: (WebCore::IndexKey::isolatedCopy): * Modules/mediasession/WebMediaSessionManager.cpp: (WebCore::WebMediaSessionManager::setPlaybackTarget): * Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::setPrivateAndOpen): * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::create): (WebCore::SourceBuffer::SourceBuffer): * Modules/mediastream/MediaDevices.cpp: (WebCore::MediaDevices::getUserMedia): (WebCore::MediaDevices::enumerateDevices): * Modules/mediastream/MediaDevicesRequest.cpp: (WebCore::MediaDevicesRequest::create): (WebCore::MediaDevicesRequest::MediaDevicesRequest): * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::create): (WebCore::MediaStream::MediaStream): (WebCore::MediaStream::addTrack): (WebCore::MediaStream::didRemoveTrack): (WebCore::MediaStream::internalAddTrack): (WebCore::MediaStream::internalRemoveTrack): * Modules/mediastream/NavigatorMediaDevices.cpp: (WebCore::NavigatorMediaDevices::from): * Modules/mediastream/RTCConfiguration.cpp: (WebCore::RTCConfiguration::initialize): * Modules/mediastream/RTCDTMFSender.cpp: (WebCore::RTCDTMFSender::create): (WebCore::RTCDTMFSender::RTCDTMFSender): (WebCore::RTCDTMFSender::scheduleDispatchEvent): * Modules/mediastream/RTCDataChannel.cpp: (WebCore::RTCDataChannel::create): (WebCore::RTCDataChannel::RTCDataChannel): (WebCore::RTCDataChannel::scheduleDispatchEvent): * Modules/mediastream/RTCIceCandidateEvent.cpp: (WebCore::RTCIceCandidateEvent::create): (WebCore::RTCIceCandidateEvent::RTCIceCandidateEvent): * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::create): (WebCore::RTCPeerConnection::RTCPeerConnection): (WebCore::RTCPeerConnection::addTrack): (WebCore::RTCPeerConnection::queuedCreateOffer): (WebCore::RTCPeerConnection::queuedCreateAnswer): (WebCore::RTCPeerConnection::queuedSetLocalDescription): (WebCore::RTCPeerConnection::queuedSetRemoteDescription): (WebCore::RTCPeerConnection::queuedAddIceCandidate): (WebCore::RTCPeerConnection::setConfiguration): (WebCore::RTCPeerConnection::privateGetStats): * Modules/mediastream/RTCRtpReceiver.cpp: (WebCore::RTCRtpReceiver::RTCRtpReceiver): * Modules/mediastream/RTCRtpReceiver.h: (WebCore::RTCRtpReceiver::create): * Modules/mediastream/RTCRtpSender.cpp: (WebCore::RTCRtpSender::RTCRtpSender): * Modules/mediastream/RTCRtpSender.h: (WebCore::RTCRtpSender::create): * Modules/mediastream/RTCTrackEvent.cpp: (WebCore::RTCTrackEvent::create): * Modules/mediastream/UserMediaRequest.cpp: (WebCore::UserMediaRequest::start): (WebCore::UserMediaRequest::UserMediaRequest): * Modules/navigatorcontentutils/NavigatorContentUtils.cpp: (WebCore::provideNavigatorContentUtilsTo): * Modules/navigatorcontentutils/NavigatorContentUtils.h: * Modules/notifications/DOMWindowNotifications.cpp: (WebCore::DOMWindowNotifications::from): * Modules/notifications/NotificationCenter.cpp: (WebCore::NotificationCenter::timerFired): * Modules/notifications/WorkerGlobalScopeNotifications.cpp: (WebCore::WorkerGlobalScopeNotifications::from): * Modules/plugins/QuickTimePluginReplacement.mm: (WebCore::QuickTimePluginReplacement::createElementRenderer): * Modules/plugins/YouTubePluginReplacement.cpp: (WebCore::YouTubePluginReplacement::createElementRenderer): (WebCore::YouTubePluginReplacement::installReplacement): * Modules/quota/DOMWindowQuota.cpp: (WebCore::DOMWindowQuota::from): * Modules/quota/NavigatorStorageQuota.cpp: (WebCore::NavigatorStorageQuota::from): * Modules/quota/WorkerNavigatorStorageQuota.cpp: (WebCore::WorkerNavigatorStorageQuota::from): * Modules/speech/DOMWindowSpeechSynthesis.cpp: (WebCore::DOMWindowSpeechSynthesis::from): * Modules/speech/SpeechSynthesis.cpp: (WebCore::SpeechSynthesis::setPlatformSynthesizer): * Modules/webaudio/AsyncAudioDecoder.cpp: (WebCore::AsyncAudioDecoder::decodeAsync): * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::addReaction): (WebCore::AudioContext::suspend): (WebCore::AudioContext::resume): (WebCore::AudioContext::close): * Modules/webaudio/AudioNode.cpp: (WebCore::AudioNode::addInput): (WebCore::AudioNode::addOutput): * Modules/webaudio/AudioScheduledSourceNode.cpp: (WebCore::AudioScheduledSourceNode::addEventListener): * Modules/webaudio/ConvolverNode.cpp: (WebCore::ConvolverNode::setBuffer): * Modules/webaudio/MediaStreamAudioDestinationNode.cpp: (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode): * Modules/webaudio/ScriptProcessorNode.cpp: (WebCore::ScriptProcessorNode::addEventListener): * Modules/webdatabase/Database.cpp: (WebCore::Database::openAndVerifyVersion): (WebCore::Database::scheduleTransaction): (WebCore::Database::scheduleTransactionStep): (WebCore::Database::markAsDeletedAndClose): (WebCore::Database::runTransaction): (WebCore::Database::tableNames): * Modules/webdatabase/DatabaseThread.cpp: (WebCore::DatabaseThread::scheduleTask): (WebCore::DatabaseThread::scheduleImmediateTask): * Modules/webdatabase/SQLTransaction.cpp: (WebCore::SQLTransaction::create): (WebCore::SQLTransaction::SQLTransaction): (WebCore::SQLTransaction::executeSQL): * Modules/webdatabase/SQLTransactionBackend.cpp: (WebCore::SQLTransactionBackend::enqueueStatementBackend): (WebCore::SQLTransactionBackend::executeSQL): * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData): (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks): * Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveBinaryData): (WebCore::WebSocket::dispatchOrQueueEvent): * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::processFrame): * Modules/websockets/WebSocketExtensionDispatcher.cpp: (WebCore::WebSocketExtensionDispatcher::addProcessor): * Modules/websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::addExtensionProcessor): * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData): * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::notificationPostTimerFired): (WebCore::AXObjectCache::passwordNotificationPostTimerFired): * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::ariaLabeledByText): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::selectText): * accessibility/AccessibilityObject.h: (WebCore::AccessibilityText::AccessibilityText): * bindings/gobject/DOMObjectCache.cpp: * bindings/js/IDBBindingUtilities.cpp: (WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath): (WebCore::generateIndexKeyForValue): * bindings/js/JSCryptoAlgorithmDictionary.cpp: (WebCore::createAesCbcParams): (WebCore::createAesKeyGenParams): (WebCore::createHmacParams): (WebCore::createHmacKeyParams): (WebCore::createRsaKeyGenParams): (WebCore::createRsaOaepParams): (WebCore::createRsaSsaParams): * bindings/js/JSCryptoKeySerializationJWK.cpp: (WebCore::createHMACParameters): (WebCore::createRSAKeyParametersWithHash): (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): * bindings/js/JSDOMPromise.h: (WebCore::DOMPromise::DOMPromise): * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::queueTaskToEventLoop): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::setTimeout): (WebCore::JSDOMWindow::setInterval): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/js/JSMessageEventCustom.cpp: (WebCore::handleInitMessageEvent): * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::encrypt): (WebCore::JSSubtleCrypto::decrypt): (WebCore::JSSubtleCrypto::sign): (WebCore::JSSubtleCrypto::verify): (WebCore::JSSubtleCrypto::digest): (WebCore::JSSubtleCrypto::generateKey): (WebCore::importKey): (WebCore::JSSubtleCrypto::importKey): (WebCore::JSSubtleCrypto::exportKey): (WebCore::JSSubtleCrypto::wrapKey): (WebCore::JSSubtleCrypto::unwrapKey): * bindings/js/JSWorkerGlobalScopeCustom.cpp: (WebCore::JSWorkerGlobalScope::setTimeout): (WebCore::JSWorkerGlobalScope::setInterval): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneDeserializer::readRSAKey): (WebCore::CloneDeserializer::readTerminal): (WebCore::SerializedScriptValue::SerializedScriptValue): (WebCore::SerializedScriptValue::create): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::JSTestActiveDOMObject::JSTestActiveDOMObject): * bindings/scripts/test/JS/JSTestActiveDOMObject.h: (WebCore::JSTestActiveDOMObject::create): * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: (WebCore::JSTestClassWithJSBuiltinConstructor::JSTestClassWithJSBuiltinConstructor): * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h: (WebCore::JSTestClassWithJSBuiltinConstructor::create): * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject): * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: (WebCore::JSTestCustomConstructorWithNoInterfaceObject::create): * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: (WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter): * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: (WebCore::JSTestCustomNamedGetter::create): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::JSTestEventConstructor::JSTestEventConstructor): * bindings/scripts/test/JS/JSTestEventConstructor.h: (WebCore::JSTestEventConstructor::create): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::JSTestEventTarget::JSTestEventTarget): * bindings/scripts/test/JS/JSTestEventTarget.h: (WebCore::JSTestEventTarget::create): * bindings/scripts/test/JS/JSTestException.cpp: (WebCore::JSTestException::JSTestException): * bindings/scripts/test/JS/JSTestException.h: (WebCore::JSTestException::create): * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: (WebCore::JSTestGenerateIsReachable::JSTestGenerateIsReachable): * bindings/scripts/test/JS/JSTestGenerateIsReachable.h: (WebCore::JSTestGenerateIsReachable::create): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::JSTestInterface): * bindings/scripts/test/JS/JSTestInterface.h: * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::create): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructor::JSTestNamedConstructor): * bindings/scripts/test/JS/JSTestNamedConstructor.h: (WebCore::JSTestNamedConstructor::create): * bindings/scripts/test/JS/JSTestNode.cpp: (WebCore::JSTestNode::JSTestNode): * bindings/scripts/test/JS/JSTestNode.h: * bindings/scripts/test/JS/JSTestNondeterministic.cpp: (WebCore::JSTestNondeterministic::JSTestNondeterministic): * bindings/scripts/test/JS/JSTestNondeterministic.h: (WebCore::JSTestNondeterministic::create): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::JSTestObj): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::create): * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: (WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors): * bindings/scripts/test/JS/JSTestOverloadedConstructors.h: (WebCore::JSTestOverloadedConstructors::create): * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: (WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins): * bindings/scripts/test/JS/JSTestOverrideBuiltins.h: (WebCore::JSTestOverrideBuiltins::create): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::create): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::JSTestTypedefs::JSTestTypedefs): * bindings/scripts/test/JS/JSTestTypedefs.h: (WebCore::JSTestTypedefs::create): * bindings/scripts/test/JS/JSattribute.cpp: (WebCore::JSattribute::JSattribute): * bindings/scripts/test/JS/JSattribute.h: (WebCore::JSattribute::create): * bindings/scripts/test/JS/JSreadonly.cpp: (WebCore::JSreadonly::JSreadonly): * bindings/scripts/test/JS/JSreadonly.h: (WebCore::JSreadonly::create): * bridge/c/CRuntimeObject.cpp: (JSC::Bindings::CRuntimeObject::CRuntimeObject): * bridge/c/CRuntimeObject.h: (JSC::Bindings::CRuntimeObject::create): * bridge/c/c_class.cpp: (JSC::Bindings::CClass::methodNamed): (JSC::Bindings::CClass::fieldNamed): * bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::CInstance): * bridge/c/c_instance.h: (JSC::Bindings::CInstance::create): * bridge/jsc/BridgeJSC.cpp: (JSC::Bindings::Array::Array): (JSC::Bindings::Instance::Instance): * bridge/objc/ObjCRuntimeObject.h: (JSC::Bindings::ObjCRuntimeObject::create): * bridge/objc/objc_class.mm: (JSC::Bindings::ObjcClass::methodNamed): (JSC::Bindings::ObjcClass::fieldNamed): * bridge/objc/objc_instance.mm: (ObjcInstance::ObjcInstance): (ObjcInstance::create): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcArray::ObjcArray): * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::RuntimeObject): * bridge/runtime_object.h: * contentextensions/CombinedFiltersAlphabet.cpp: (WebCore::ContentExtensions::TermCreatorTranslator::translate): * contentextensions/CombinedURLFilters.cpp: (WebCore::ContentExtensions::ActiveSubtree::ActiveSubtree): (WebCore::ContentExtensions::generateSuffixWithReverseSuffixTree): (WebCore::ContentExtensions::generateNFAForSubtree): (WebCore::ContentExtensions::CombinedURLFilters::processNFAs): * contentextensions/ContentExtension.cpp: (WebCore::ContentExtensions::ContentExtension::create): (WebCore::ContentExtensions::ContentExtension::ContentExtension): * contentextensions/ContentExtensionCompiler.cpp: (WebCore::ContentExtensions::compileRuleList): * contentextensions/ContentExtensionParser.cpp: (WebCore::ContentExtensions::loadEncodedRules): * contentextensions/ContentExtensionsBackend.cpp: (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension): * contentextensions/DFACombiner.cpp: (WebCore::ContentExtensions::DFACombiner::combineDFAs): * contentextensions/DFACombiner.h: (WebCore::ContentExtensions::DFACombiner::addDFA): * contentextensions/ImmutableNFANodeBuilder.h: (WebCore::ContentExtensions::ImmutableNFANodeBuilder::ImmutableNFANodeBuilder): (WebCore::ContentExtensions::ImmutableNFANodeBuilder::operator=): * contentextensions/MutableRange.h: (WebCore::ContentExtensions::MutableRange::MutableRange): (WebCore::ContentExtensions::MutableRange::operator=): * contentextensions/MutableRangeList.h: (WebCore::ContentExtensions::MutableRangeList::extend): (WebCore::ContentExtensions::MutableRangeList::insertBetween): * contentextensions/Term.h: (WebCore::ContentExtensions::Term::Term): (WebCore::ContentExtensions::Term::operator=): (WebCore::ContentExtensions::Term::generateSubgraphForAtom): * crypto/CryptoAlgorithm.cpp: (WebCore::CryptoAlgorithm::encryptForWrapKey): (WebCore::CryptoAlgorithm::decryptForUnwrapKey): * crypto/CryptoKeyPair.cpp: (WebCore::CryptoKeyPair::CryptoKeyPair): * crypto/CryptoKeyPair.h: (WebCore::CryptoKeyPair::create): * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: (WebCore::CryptoAlgorithmAES_CBC::encrypt): (WebCore::CryptoAlgorithmAES_CBC::decrypt): * crypto/algorithms/CryptoAlgorithmAES_KW.cpp: (WebCore::CryptoAlgorithmAES_KW::encryptForWrapKey): (WebCore::CryptoAlgorithmAES_KW::decryptForUnwrapKey): * crypto/algorithms/CryptoAlgorithmHMAC.cpp: (WebCore::CryptoAlgorithmHMAC::sign): (WebCore::CryptoAlgorithmHMAC::verify): * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp: (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt): (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt): (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey): * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign): (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify): (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey): * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp: (WebCore::CryptoAlgorithmRSA_OAEP::encrypt): (WebCore::CryptoAlgorithmRSA_OAEP::decrypt): (WebCore::CryptoAlgorithmRSA_OAEP::generateKey): * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp: (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt): (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt): * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::generatePair): * css/BasicShapeFunctions.cpp: (WebCore::valueForBasicShape): (WebCore::basicShapeForValue): * css/CSSBasicShapes.cpp: (WebCore::CSSBasicShapePath::CSSBasicShapePath): * css/CSSBasicShapes.h: * css/CSSBorderImage.cpp: (WebCore::createBorderImageValue): * css/CSSCalculationValue.cpp: * css/CSSCalculationValue.h: (WebCore::CSSCalcValue::CSSCalcValue): * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForNinePieceImageSlice): (WebCore::valueForNinePieceImageQuad): (WebCore::computedTransform): (WebCore::ComputedStyleExtractor::valueForShadow): (WebCore::ComputedStyleExtractor::valueForFilter): (WebCore::valueForGridTrackList): (WebCore::valueForGridPosition): (WebCore::scrollSnapPoints): (WebCore::scrollSnapCoordinates): (WebCore::getWillChangePropertyValue): (WebCore::fontVariantLigaturesPropertyValue): (WebCore::fontVariantNumericPropertyValue): (WebCore::fontVariantEastAsianPropertyValue): (WebCore::fillRepeatToCSSValue): (WebCore::fillSizeToCSSValue): (WebCore::fontVariantFromStyle): (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSCrossfadeValue.cpp: (WebCore::CSSCrossfadeValue::blend): * css/CSSCursorImageValue.cpp: (WebCore::CSSCursorImageValue::CSSCursorImageValue): * css/CSSCursorImageValue.h: (WebCore::CSSCursorImageValue::create): * css/CSSFilterImageValue.cpp: (WebCore::CSSFilterImageValue::image): * css/CSSFilterImageValue.h: (WebCore::CSSFilterImageValue::create): * css/CSSFontFace.cpp: (WebCore::CSSFontFace::addSource): * css/CSSFontFace.h: (WebCore::CSSFontFace::create): (WebCore::CSSFontFace::insertFeature): * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::font): * css/CSSFontFeatureValue.cpp: (WebCore::CSSFontFeatureValue::CSSFontFeatureValue): * css/CSSFontFeatureValue.h: (WebCore::CSSFontFeatureValue::create): * css/CSSFontSelector.cpp: (WebCore::createFontFace): (WebCore::constructFamilyFontFaces): * css/CSSGrammar.y.in: * css/CSSImageValue.cpp: (WebCore::CSSImageValue::cloneForCSSOM): * css/CSSKeyframeRule.cpp: (WebCore::StyleKeyframe::StyleKeyframe): * css/CSSKeyframeRule.h: (WebCore::StyleKeyframe::create): * css/CSSParser.cpp: (WebCore::CSSParser::parseFontFaceValue): (WebCore::CSSParser::parseMediaQuery): (WebCore::CSSParser::parseSizesAttribute): (WebCore::CSSParser::SourceSize::SourceSize): (WebCore::CSSParser::sourceSize): (WebCore::CSSParser::addFillValue): (WebCore::CSSParser::addAnimationValue): (WebCore::CSSParser::parse4ValuesFillPosition): (WebCore::CSSParser::parse3ValuesFillPosition): (WebCore::CSSParser::parseFillPosition): (WebCore::CSSParser::parseFillSize): (WebCore::CSSParser::parseDashboardRegions): (WebCore::CSSParser::parseClipShape): (WebCore::CSSParser::parseBasicShapePath): (WebCore::CSSParser::parseSystemFont): (WebCore::CSSParser::parseBorderImageRepeat): (WebCore::BorderImageSliceParseContext::commitBorderImageSlice): (WebCore::BorderImageQuadParseContext::commitBorderImageQuad): (WebCore::CSSParser::parseBuiltinFilterArguments): (WebCore::CSSParser::parseFontFeatureTag): (WebCore::CSSParser::parseFontVariantLigatures): (WebCore::CSSParser::parseFontVariantNumeric): (WebCore::CSSParser::parseFontVariantEastAsian): (WebCore::CSSParser::createKeyframesRule): (WebCore::CSSParser::rewriteSpecifiers): (WebCore::CSSParser::createPageRule): (WebCore::CSSParser::createSelectorVector): (WebCore::CSSParser::recycleSelectorVector): * css/CSSParserValues.cpp: (WebCore::CSSParserSelector::~CSSParserSelector): (WebCore::CSSParserSelector::adoptSelectorVector): (WebCore::CSSParserSelector::setLangArgumentList): (WebCore::CSSParserSelector::insertTagHistory): (WebCore::CSSParserSelector::appendTagHistory): (WebCore::CSSParserSelector::prependTagSelector): * css/CSSParserValues.h: (WebCore::CSSParserSelector::releaseSelector): (WebCore::CSSParserSelector::setTagHistory): * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): * css/CSSProperty.cpp: (WebCore::CSSProperty::wrapValueInCommaSeparatedList): * css/CSSSegmentedFontFace.cpp: (WebCore::CSSSegmentedFontFace::appendFontFace): (WebCore::appendFontWithInvalidUnicodeRangeIfLoading): * css/CSSSelector.cpp: (WebCore::CSSSelector::setLangArgumentList): (WebCore::CSSSelector::setSelectorList): * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::create): (WebCore::CSSStyleSheet::CSSStyleSheet): * css/CSSValueList.h: (WebCore::CSSValueList::append): (WebCore::CSSValueList::prepend): * css/DocumentRuleSets.cpp: (WebCore::DocumentRuleSets::initUserStyle): * css/FontLoader.cpp: (WebCore::FontLoader::scheduleEvent): * css/MediaList.cpp: (WebCore::MediaQuerySet::parse): (WebCore::MediaQuerySet::add): (WebCore::MediaQuerySet::addMediaQuery): * css/MediaQuery.cpp: (WebCore::MediaQuery::MediaQuery): * css/Pair.h: (WebCore::Pair::create): (WebCore::Pair::Pair): * css/RuleSet.cpp: (WebCore::RuleSet::addRegionRule): * css/RuleSet.h: (WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair): * css/SVGCSSComputedStyleDeclaration.cpp: (WebCore::paintOrder): * css/SourceSizeList.cpp: (WebCore::match): (WebCore::parseSizesAttribute): * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyTextOrBoxShadowValue): (WebCore::StyleBuilderCustom::applyValueContent): (WebCore::StyleBuilderCustom::applyValueWillChange): * css/StyleResolver.cpp: (WebCore::StyleResolver::State::setStyle): (WebCore::StyleResolver::addToMatchedPropertiesCache): * css/StyleResolver.h: (WebCore::StyleResolver::State::setParentStyle): (WebCore::StyleResolver::State::setAuthorRollback): (WebCore::StyleResolver::State::setUserRollback): * css/StyleRule.cpp: (WebCore::StyleRule::StyleRule): (WebCore::StyleRule::create): (WebCore::StyleRulePage::StyleRulePage): (WebCore::StyleRuleFontFace::StyleRuleFontFace): (WebCore::StyleRuleGroup::wrapperInsertRule): (WebCore::StyleRuleViewport::StyleRuleViewport): * css/StyleRule.h: (WebCore::StyleRule::create): (WebCore::StyleRule::wrapperAdoptSelectorList): (WebCore::StyleRuleFontFace::create): (WebCore::StyleRulePage::create): (WebCore::StyleRulePage::wrapperAdoptSelectorList): (WebCore::StyleRuleViewport::create): * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList): * dom/ActiveDOMCallbackMicrotask.cpp: (WebCore::ActiveDOMCallbackMicrotask::ActiveDOMCallbackMicrotask): * dom/Attr.cpp: (WebCore::Attr::cloneNodeInternal): * dom/ChildListMutationScope.cpp: (WebCore::ChildListMutationAccumulator::ChildListMutationAccumulator): * dom/ContainerNode.cpp: (WebCore::ContainerNode::insertBefore): (WebCore::ContainerNode::append): (WebCore::ContainerNode::prepend): * dom/DataTransfer.cpp: (WebCore::DataTransfer::DataTransfer): * dom/Document.cpp: (WebCore::Document::createNodeIterator): (WebCore::Document::createTreeWalker): (WebCore::Document::logExceptionToConsole): (WebCore::Document::cloneNodeInternal): (WebCore::Document::enqueueWindowEvent): (WebCore::Document::enqueueDocumentEvent): (WebCore::Document::enqueueOverflowEvent): (WebCore::Document::setTransformSource): (WebCore::Document::addMessage): (WebCore::Document::postTask): (WebCore::Document::pendingTasksTimerFired): (WebCore::Document::sendWillRevealEdgeEventsIfNeeded): * dom/DocumentEventQueue.cpp: (WebCore::DocumentEventQueue::enqueueOrDispatchScrollEvent): * dom/DocumentFragment.cpp: (WebCore::DocumentFragment::cloneNodeInternal): * dom/Element.cpp: (WebCore::Element::createElementRenderer): (WebCore::Element::addShadowRoot): (WebCore::Element::dispatchFocusInEvent): (WebCore::Element::dispatchFocusOutEvent): (WebCore::Element::dispatchFocusEvent): (WebCore::Element::dispatchBlurEvent): (WebCore::Element::resolveComputedStyle): (WebCore::Element::setBeforePseudoElement): (WebCore::Element::setAfterPseudoElement): * dom/ElementRareData.h: (WebCore::ElementRareData::setShadowRoot): (WebCore::ElementRareData::setAttributeMap): (WebCore::ElementRareData::setComputedStyle): (WebCore::ElementRareData::setClassList): (WebCore::ElementRareData::setDataset): (WebCore::ElementRareData::setBeforePseudoElement): (WebCore::ElementRareData::setAfterPseudoElement): * dom/Event.cpp: (WebCore::Event::setTarget): * dom/EventTarget.cpp: (WebCore::EventTarget::addEventListener): * dom/ExtensionStyleSheets.cpp: (WebCore::ExtensionStyleSheets::addUserStyleSheet): (WebCore::ExtensionStyleSheets::addAuthorStyleSheetForTesting): * dom/FocusEvent.cpp: (WebCore::FocusEvent::FocusEvent): * dom/FocusEvent.h: * dom/MessageEvent.cpp: (WebCore::MessageEvent::MessageEvent): (WebCore::MessageEvent::initMessageEvent): * dom/MessageEvent.h: * dom/MessagePort.cpp: (WebCore::MessagePort::postMessage): (WebCore::MessagePort::disentangle): (WebCore::MessagePort::entangle): (WebCore::MessagePort::dispatchMessages): (WebCore::MessagePort::disentanglePorts): (WebCore::MessagePort::entanglePorts): (WebCore::MessagePort::addEventListener): * dom/Microtasks.cpp: (WebCore::MicrotaskQueue::append): (WebCore::MicrotaskQueue::performMicrotaskCheckpoint): * dom/MutationObserver.cpp: (WebCore::queueMutationObserverCompoundMicrotask): * dom/NativeNodeFilter.h: * dom/Node.cpp: (WebCore::Node::before): (WebCore::Node::after): (WebCore::Node::replaceWith): (WebCore::Document::invalidateNodeListAndCollectionCaches): (WebCore::tryAddEventListener): (WebCore::Node::addEventListener): * dom/NodeIterator.cpp: (WebCore::NodeIterator::NodeIterator): * dom/NodeIterator.h: (WebCore::NodeIterator::create): * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::setCSSStyleSheet): * dom/PseudoElement.cpp: (WebCore::PseudoElement::didRecalcStyle): * dom/ScopedEventQueue.cpp: (WebCore::ScopedEventQueue::enqueueEvent): (WebCore::ScopedEventQueue::dispatchAllEvents): * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::reportException): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::Task::Task): * dom/SecurityContext.cpp: (WebCore::SecurityContext::setSecurityOriginPolicy): (WebCore::SecurityContext::setContentSecurityPolicy): * dom/SecurityOriginPolicy.cpp: (WebCore::SecurityOriginPolicy::create): (WebCore::SecurityOriginPolicy::SecurityOriginPolicy): * dom/SelectorQuery.cpp: (WebCore::SelectorQuery::SelectorQuery): (WebCore::SelectorQueryCache::add): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::ShadowRoot): * dom/ShadowRoot.h: * dom/SlotAssignment.cpp: (WebCore::SlotAssignment::SlotAssignment): * dom/StyledElement.cpp: (WebCore::StyledElement::rebuildPresentationAttributeStyle): * dom/Text.cpp: (WebCore::Text::splitText): (WebCore::Text::replaceWholeText): * dom/Traversal.cpp: (WebCore::NodeIteratorBase::NodeIteratorBase): * dom/TreeWalker.cpp: (WebCore::TreeWalker::TreeWalker): (WebCore::TreeWalker::traverseSiblings): * dom/TreeWalker.h: (WebCore::TreeWalker::create): * dom/TypedElementDescendantIterator.h: (WebCore::DoubleTypedElementDescendantIteratorAdapter<ElementType>::DoubleTypedElementDescendantIteratorAdapter): (WebCore::DoubleTypedElementDescendantIterator<ElementType>::DoubleTypedElementDescendantIterator): * dom/default/PlatformMessagePortChannel.cpp: (WebCore::PlatformMessagePortChannel::EventData::EventData): (WebCore::MessagePortChannel::createChannel): (WebCore::MessagePortChannel::postMessageToRemote): * dom/default/PlatformMessagePortChannel.h: (WebCore::PlatformMessagePortChannel::EventData::channels): (WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty): * editing/AppendNodeCommand.cpp: (WebCore::AppendNodeCommand::AppendNodeCommand): * editing/AppendNodeCommand.h: (WebCore::AppendNodeCommand::create): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::replaceTextInNode): (WebCore::CompositeEditCommand::moveParagraphs): * editing/DeleteFromTextNodeCommand.h: (WebCore::DeleteFromTextNodeCommand::create): * editing/EditingStyle.cpp: (WebCore::applyTextDecorationChangeToValueList): (WebCore::EditingStyle::overrideTypingStyleAt): (WebCore::EditingStyle::conflictsWithInlineStyleOfElement): (WebCore::mergeTextDecorationValues): (WebCore::StyleChange::StyleChange): * editing/Editor.cpp: (WebCore::Editor::insertDictationPhrases): (WebCore::Editor::setTextAsChildOfElement): (WebCore::Editor::applyStyleToSelection): * editing/EditorCommand.cpp: (WebCore::applyCommandToFrame): (WebCore::executeInsertNode): (WebCore::executeInsertHorizontalRule): (WebCore::executeInsertImage): (WebCore::executeStrikethrough): (WebCore::executeUnderline): * editing/InsertIntoTextNodeCommand.h: (WebCore::InsertIntoTextNodeCommand::create): * editing/InsertNodeBeforeCommand.h: (WebCore::InsertNodeBeforeCommand::create): * editing/MergeIdenticalElementsCommand.cpp: (WebCore::MergeIdenticalElementsCommand::doApply): (WebCore::MergeIdenticalElementsCommand::doUnapply): * editing/MoveSelectionCommand.cpp: (WebCore::MoveSelectionCommand::doApply): * editing/RemoveNodeCommand.cpp: (WebCore::RemoveNodeCommand::RemoveNodeCommand): * editing/RemoveNodeCommand.h: (WebCore::RemoveNodeCommand::create): * editing/ReplaceDeleteFromTextNodeCommand.cpp: (WebCore::ReplaceDeleteFromTextNodeCommand::ReplaceDeleteFromTextNodeCommand): * editing/ReplaceDeleteFromTextNodeCommand.h: * editing/ReplaceInsertIntoTextNodeCommand.cpp: (WebCore::ReplaceInsertIntoTextNodeCommand::ReplaceInsertIntoTextNodeCommand): * editing/ReplaceInsertIntoTextNodeCommand.h: * editing/ReplaceNodeWithSpanCommand.cpp: (WebCore::swapInNodePreservingAttributesAndChildren): * editing/ReplaceSelectionCommand.h: (WebCore::ReplaceSelectionCommand::create): * editing/SplitElementCommand.cpp: (WebCore::SplitElementCommand::executeApply): (WebCore::SplitElementCommand::doUnapply): * editing/TextCheckingHelper.cpp: (WebCore::findGrammaticalErrors): (WebCore::checkTextOfParagraph): * editing/TextIterator.cpp: (WebCore::TextIteratorCopyableText::set): (WebCore::TextIterator::handleReplacedElement): (WebCore::TextIterator::emitText): (WebCore::SimplifiedBackwardsTextIterator::handleTextNode): (WebCore::TextIterator::rangeFromLocationAndLength): * editing/WrapContentsInDummySpanCommand.cpp: (WebCore::WrapContentsInDummySpanCommand::executeApply): (WebCore::WrapContentsInDummySpanCommand::doUnapply): * editing/ios/DictationCommandIOS.cpp: (WebCore::DictationCommandIOS::DictationCommandIOS): * editing/ios/DictationCommandIOS.h: (WebCore::DictationCommandIOS::create): * editing/ios/EditorIOS.mm: (WebCore::Editor::WebContentReader::readURL): (WebCore::Editor::createFragmentForImageResourceAndAddResource): * editing/mac/EditorMac.mm: (WebCore::Editor::WebContentReader::readFilenames): (WebCore::Editor::WebContentReader::readURL): (WebCore::Editor::createFragmentForImageResourceAndAddResource): * editing/markup.cpp: (WebCore::fillContainerFromString): (WebCore::createFragmentFromText): (WebCore::replaceChildrenWithFragment): (WebCore::replaceChildrenWithText): * fileapi/AsyncFileStream.cpp: (WebCore::callOnFileThread): * fileapi/Blob.cpp: (WebCore::Blob::Blob): * fileapi/Blob.h: (WebCore::Blob::create): * fileapi/FileList.h: (WebCore::FileList::create): (WebCore::FileList::FileList): (WebCore::FileList::append): * fileapi/ThreadableBlobRegistry.cpp: (WebCore::BlobRegistryContext::BlobRegistryContext): (WebCore::ThreadableBlobRegistry::registerBlobURL): * fileapi/WebKitBlobBuilder.cpp: (WebCore::BlobBuilder::append): (WebCore::BlobBuilder::finalize): * history/BackForwardController.cpp: (WebCore::BackForwardController::BackForwardController): (WebCore::BackForwardController::addItem): * history/BackForwardList.cpp: (WebCore::BackForwardList::addItem): * history/CachedFrame.cpp: (WebCore::CachedFrame::setCachedFramePlatformData): * history/HistoryItem.cpp: (WebCore::HistoryItem::setStateObject): (WebCore::HistoryItem::addChildItem): (WebCore::HistoryItem::setChildItem): (WebCore::HistoryItem::setFormData): (WebCore::HistoryItem::setRedirectURLs): * history/PageCache.cpp: (WebCore::PageCache::take): * html/BaseButtonInputType.cpp: (WebCore::BaseButtonInputType::createInputRenderer): * html/BaseChooserOnlyDateAndTimeInputType.cpp: (WebCore::BaseChooserOnlyDateAndTimeInputType::createShadowSubtree): * html/ColorInputType.cpp: (WebCore::ColorInputType::createShadowSubtree): * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocumentParser::appendEntry): (WebCore::FTPDirectoryDocumentParser::createTDForFilename): (WebCore::FTPDirectoryDocumentParser::createBasicDocument): (WebCore::FTPDirectoryDocumentParser::append): * html/FileInputType.cpp: (WebCore::FileInputType::createInputRenderer): (WebCore::FileInputType::createFileList): * html/FormController.cpp: (WebCore::FormController::formStatesFromStateVector): * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::createElementRenderer): * html/HTMLAttachmentElement.cpp: (WebCore::HTMLAttachmentElement::createElementRenderer): * html/HTMLBRElement.cpp: (WebCore::HTMLBRElement::createElementRenderer): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::collectStyleForPresentationAttribute): * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::createElementRenderer): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createElementRenderer): (WebCore::HTMLCanvasElement::setImageBuffer): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::updateNamedElementCache): * html/HTMLCollection.h: (WebCore::HTMLCollection::setNamedItemCache): * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::createElementRenderer): (WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot): * html/HTMLElement.cpp: (WebCore::HTMLElement::populateEventHandlerNameMap): (WebCore::HTMLElement::setInnerText): (WebCore::HTMLElement::createElementRenderer): * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::createElementRenderer): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::dispatchBlurEvent): * html/HTMLFormControlsCollection.cpp: (WebCore::HTMLFormControlsCollection::updateNamedElementCache): * html/HTMLFrameElement.cpp: (WebCore::HTMLFrameElement::createElementRenderer): * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::createElementRenderer): * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::createElementRenderer): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::createElementRenderer): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateType): (WebCore::HTMLInputElement::createElementRenderer): * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::HTMLKeygenElement): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setCSSStyleSheet): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::createElementRenderer): (WebCore::HTMLMediaElement::addEventListener): (WebCore::HTMLMediaElement::setWirelessPlaybackTarget): (WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader): * html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::createElementRenderer): (WebCore::HTMLMeterElement::didAddUserAgentShadowRoot): * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::createForJSConstructor): * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::createElementRenderer): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::createElementRenderer): * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::createElementRenderer): (WebCore::HTMLProgressElement::didAddUserAgentShadowRoot): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::createElementRenderer): (WebCore::HTMLSelectElement::dispatchFocusEvent): (WebCore::HTMLSelectElement::dispatchBlurEvent): * html/HTMLSummaryElement.cpp: (WebCore::HTMLSummaryElement::createElementRenderer): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::insertRow): * html/HTMLTableRowElement.cpp: (WebCore::HTMLTableRowElement::insertCell): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::createElementRenderer): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::dispatchFocusEvent): (WebCore::HTMLTextFormControlElement::dispatchBlurEvent): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::createElementRenderer): * html/HTMLWBRElement.cpp: (WebCore::HTMLWBRElement::createElementRenderer): * html/ImageDocument.cpp: (WebCore::ImageDocument::createDocumentStructure): * html/ImageInputType.cpp: (WebCore::ImageInputType::createInputRenderer): * html/InputType.cpp: (WebCore::InputType::createInputRenderer): * html/MediaDocument.cpp: (WebCore::MediaDocumentParser::createDocumentStructure): * html/MediaElementSession.cpp: (WebCore::MediaElementSession::setPlaybackTarget): * html/PluginDocument.cpp: (WebCore::PluginDocumentParser::createDocumentStructure): * html/RangeInputType.cpp: (WebCore::RangeInputType::createShadowSubtree): (WebCore::RangeInputType::createInputRenderer): * html/RubyElement.cpp: (WebCore::RubyElement::createElementRenderer): * html/RubyTextElement.cpp: (WebCore::RubyTextElement::createElementRenderer): * html/SearchInputType.cpp: (WebCore::SearchInputType::createInputRenderer): (WebCore::SearchInputType::createShadowSubtree): * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::createInputRenderer): * html/ValidationMessage.cpp: (WebCore::ValidationMessage::buildBubbleTree): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::createLinearGradient): (WebCore::CanvasRenderingContext2D::createRadialGradient): * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer): * html/parser/AtomicHTMLToken.h: (WebCore::AtomicHTMLToken::AtomicHTMLToken): * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::executeQueuedTasks): (WebCore::HTMLConstructionSite::insertTextNode): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::append): * html/parser/HTMLElementStack.cpp: (WebCore::HTMLElementStack::ElementRecord::ElementRecord): (WebCore::HTMLElementStack::pushCommon): * html/parser/HTMLElementStack.h: (WebCore::HTMLElementStack::ElementRecord::releaseNext): (WebCore::HTMLElementStack::ElementRecord::setNext): * html/parser/HTMLPreloadScanner.cpp: (WebCore::TokenPreloadScanner::scan): (WebCore::HTMLPreloadScanner::scan): * html/parser/HTMLResourcePreloader.cpp: (WebCore::HTMLResourcePreloader::preload): * html/parser/HTMLStackItem.h: (WebCore::HTMLStackItem::HTMLStackItem): (WebCore::HTMLStackItem::create): * html/parser/HTMLToken.h: (WebCore::HTMLToken::releaseDoctypeData): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::takeScriptToProcess): (WebCore::HTMLTreeBuilder::processFakeStartTag): (WebCore::HTMLTreeBuilder::insertPhoneNumberLink): * html/parser/TextDocumentParser.cpp: (WebCore::TextDocumentParser::append): (WebCore::TextDocumentParser::insertFakePreElement): * html/parser/XSSAuditorDelegate.cpp: (WebCore::XSSAuditorDelegate::generateViolationReport): * html/shadow/DetailsMarkerControl.cpp: (WebCore::DetailsMarkerControl::createElementRenderer): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTimelineContainerElement::createElementRenderer): (WebCore::MediaControlVolumeSliderContainerElement::createElementRenderer): (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu): (WebCore::MediaControlTextTrackContainerElement::createElementRenderer): (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): * html/shadow/MediaControls.cpp: (WebCore::MediaControls::createTextTrackDisplay): * html/shadow/MediaControlsApple.cpp: (WebCore::MediaControlsApple::createControls): (WebCore::MediaControlsApple::showClosedCaptionTrackList): * html/shadow/MeterShadowElement.cpp: (WebCore::MeterInnerElement::createElementRenderer): * html/shadow/ProgressShadowElement.cpp: (WebCore::ProgressInnerElement::createElementRenderer): * html/shadow/SliderThumbElement.cpp: (WebCore::RenderSliderThumb::RenderSliderThumb): (WebCore::SliderThumbElement::createElementRenderer): (WebCore::SliderContainerElement::createElementRenderer): * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerContainer::createElementRenderer): (WebCore::TextControlInnerTextElement::createElementRenderer): * html/shadow/mac/ImageControlsButtonElementMac.cpp: (WebCore::RenderImageControlsButton::RenderImageControlsButton): (WebCore::ImageControlsButtonElementMac::createElementRenderer): * html/shadow/mac/ImageControlsRootElementMac.cpp: (WebCore::RenderImageControls::RenderImageControls): (WebCore::ImageControlsRootElement::maybeCreate): (WebCore::ImageControlsRootElementMac::createElementRenderer): * html/track/VTTCue.cpp: (WebCore::VTTCueBox::createElementRenderer): * html/track/WebVTTElement.cpp: (WebCore::WebVTTElement::cloneElementWithoutAttributesAndChildren): * html/track/WebVTTParser.cpp: (WebCore::WebVTTTreeBuilder::constructTreeFromToken): * inspector/CommandLineAPIHost.cpp: (WebCore::CommandLineAPIHost::inspectImpl): (WebCore::CommandLineAPIHost::addInspectedObject): * inspector/DOMEditor.cpp: (WebCore::DOMEditor::InsertBeforeAction::InsertBeforeAction): (WebCore::DOMEditor::ReplaceChildNodeAction::ReplaceChildNodeAction): (WebCore::DOMEditor::insertBefore): (WebCore::DOMEditor::setOuterHTML): (WebCore::DOMEditor::replaceChild): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::createDigest): (WebCore::DOMPatchSupport::removeChildAndMoveToNew): * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getMatchedStylesForNode): (WebCore::InspectorCSSAgent::addRule): (WebCore::InspectorCSSAgent::getSupportedCSSProperties): (WebCore::InspectorCSSAgent::getSupportedSystemFontFamilyNames): (WebCore::InspectorCSSAgent::getNamedFlowCollection): (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList): (WebCore::InspectorCSSAgent::buildArrayForRegions): (WebCore::InspectorCSSAgent::buildObjectForNamedFlow): * inspector/InspectorConsoleInstrumentation.h: (WebCore::InspectorInstrumentation::addMessageToConsole): (WebCore::InspectorInstrumentation::consoleCount): (WebCore::InspectorInstrumentation::stopConsoleTiming): (WebCore::InspectorInstrumentation::consoleTimeStamp): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushNodePathToFrontend): (WebCore::InspectorDOMAgent::highlightRect): (WebCore::InspectorDOMAgent::highlightQuad): (WebCore::InspectorDOMAgent::innerHighlightQuad): (WebCore::InspectorDOMAgent::highlightSelector): (WebCore::InspectorDOMAgent::buildObjectForNode): (WebCore::InspectorDOMAgent::buildArrayForPseudoElements): (WebCore::InspectorDOMAgent::buildObjectForEventListener): (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties): (WebCore::InspectorDOMAgent::didCommitLoad): (WebCore::InspectorDOMAgent::didInsertDOMNode): (WebCore::InspectorDOMAgent::styleAttributeInvalidated): * inspector/InspectorDOMDebuggerAgent.cpp: (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr): (WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode): (WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode): (WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr): (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded): (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest): * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::getDOMStorageItems): * inspector/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::didOpenDatabase): (WebCore::InspectorDatabaseAgent::executeSQL): * inspector/InspectorDatabaseResource.cpp: (WebCore::InspectorDatabaseResource::create): (WebCore::InspectorDatabaseResource::bind): * inspector/InspectorDatabaseResource.h: (WebCore::InspectorDatabaseResource::setDatabase): * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal): * inspector/InspectorHistory.cpp: (WebCore::InspectorHistory::perform): * inspector/InspectorIndexedDBAgent.cpp: (WebCore::InspectorIndexedDBAgent::requestDatabaseNames): (WebCore::InspectorIndexedDBAgent::requestDatabase): (WebCore::InspectorIndexedDBAgent::requestData): (WebCore::ClearObjectStoreListener::create): (WebCore::ClearObjectStoreListener::ClearObjectStoreListener): (WebCore::ClearObjectStore::create): (WebCore::ClearObjectStore::ClearObjectStore): (WebCore::InspectorIndexedDBAgent::clearObjectStore): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::addMessageToConsoleImpl): (WebCore::InspectorInstrumentation::didOpenDatabaseImpl): (WebCore::InspectorInstrumentation::sessionCreatedImpl): (WebCore::InspectorInstrumentation::sessionLoadedImpl): (WebCore::InspectorInstrumentation::sessionModifiedImpl): (WebCore::InspectorInstrumentation::segmentCreatedImpl): (WebCore::InspectorInstrumentation::segmentCompletedImpl): (WebCore::InspectorInstrumentation::segmentLoadedImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didOpenDatabase): (WebCore::InspectorInstrumentation::sessionCreated): (WebCore::InspectorInstrumentation::sessionLoaded): (WebCore::InspectorInstrumentation::sessionModified): (WebCore::InspectorInstrumentation::segmentCreated): (WebCore::InspectorInstrumentation::segmentCompleted): (WebCore::InspectorInstrumentation::segmentLoaded): * inspector/InspectorLayerTreeAgent.cpp: (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer): * inspector/InspectorNetworkAgent.cpp: (WebCore::buildObjectForResourceResponse): (WebCore::buildObjectForCachedResource): (WebCore::InspectorNetworkAgent::buildInitiatorObject): (WebCore::InspectorNetworkAgent::willSendWebSocketHandshakeRequest): (WebCore::InspectorNetworkAgent::didReceiveWebSocketHandshakeResponse): (WebCore::InspectorNetworkAgent::didReceiveWebSocketFrame): (WebCore::InspectorNetworkAgent::didSendWebSocketFrame): * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::highlightNodeList): (WebCore::InspectorOverlay::highlightQuad): (WebCore::buildObjectForHighlight): (WebCore::buildObjectForFlowRegions): (WebCore::InspectorOverlay::drawPaintRects): (WebCore::buildArrayForRendererFragments): (WebCore::buildObjectForShapeOutside): (WebCore::buildObjectForElementData): (WebCore::InspectorOverlay::buildHighlightObjectForNode): (WebCore::InspectorOverlay::buildObjectForHighlightedNodes): (WebCore::InspectorOverlay::reset): (WebCore::InspectorOverlay::evaluateInOverlay): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::buildObjectForFrameTree): * inspector/InspectorReplayAgent.cpp: (WebCore::buildInspectorObjectForSession): (WebCore::SerializeInputToJSONFunctor::operator()): (WebCore::SerializeInputToJSONFunctor::returnValue): (WebCore::buildInspectorObjectForSegment): (WebCore::InspectorReplayAgent::switchSession): (WebCore::InspectorReplayAgent::insertSessionSegment): (WebCore::InspectorReplayAgent::removeSessionSegment): (WebCore::InspectorReplayAgent::getSessionData): (WebCore::InspectorReplayAgent::getSegmentData): * inspector/InspectorStyleSheet.cpp: (WebCore::asCSSRuleList): (WebCore::InspectorStyle::create): (WebCore::InspectorStyle::buildObjectForStyle): (WebCore::InspectorStyle::buildArrayForComputedStyle): (WebCore::InspectorStyle::styleWithProperties): (WebCore::InspectorStyleSheet::create): (WebCore::InspectorStyleSheet::InspectorStyleSheet): (WebCore::InspectorStyleSheet::buildObjectForStyleSheet): (WebCore::buildObjectForSelectorHelper): (WebCore::InspectorStyleSheet::buildObjectForRule): (WebCore::InspectorStyleSheet::ensureSourceData): (WebCore::InspectorStyleSheet::buildArrayForRuleList): (WebCore::InspectorStyleSheet::collectFlatRules): (WebCore::InspectorStyleSheetForInlineStyle::create): (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle): * inspector/InspectorTimelineAgent.cpp: (WebCore::startProfiling): (WebCore::InspectorTimelineAgent::addRecordToTimeline): (WebCore::InspectorTimelineAgent::appendRecord): (WebCore::InspectorTimelineAgent::sendEvent): (WebCore::InspectorTimelineAgent::createRecordEntry): (WebCore::InspectorTimelineAgent::pushCurrentRecord): * inspector/InspectorTimelineAgent.h: * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::addResourceSharedBuffer): * inspector/NetworkResourcesData.h: (WebCore::NetworkResourcesData::ResourceData::setDecoder): (WebCore::NetworkResourcesData::ResourceData::setBuffer): * inspector/TimelineRecordFactory.cpp: (WebCore::buildInspectorObject): (WebCore::buildProfileInspectorObject): * inspector/WebInjectedScriptManager.cpp: (WebCore::WebInjectedScriptManager::WebInjectedScriptManager): * loader/ContentFilter.cpp: (WebCore::ContentFilter::createIfEnabled): (WebCore::ContentFilter::ContentFilter): * loader/CrossOriginPreflightResultCache.cpp: (WebCore::CrossOriginPreflightResultCache::appendEntry): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::subresources): (WebCore::DocumentLoader::installContentFilterUnblockHandler): * loader/DocumentLoader.h: (WebCore::DocumentLoader::setQuickLookHandle): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest): (WebCore::DocumentThreadableLoader::didReceiveResponse): * loader/HistoryController.cpp: (WebCore::HistoryController::updateBackForwardListClippedAtTarget): (WebCore::HistoryController::pushState): * loader/MediaResourceLoader.cpp: (WebCore::MediaResourceLoader::MediaResourceLoader): * loader/NavigationScheduler.cpp: (WebCore::NavigationScheduler::timerFired): (WebCore::NavigationScheduler::schedule): (WebCore::NavigationScheduler::cancel): * loader/NetscapePlugInStreamLoader.cpp: (WebCore::NetscapePlugInStreamLoader::willSendRequest): * loader/PolicyCallback.cpp: (WebCore::PolicyCallback::set): * loader/PolicyChecker.cpp: (WebCore::PolicyChecker::checkNavigationPolicy): (WebCore::PolicyChecker::checkNewWindowPolicy): (WebCore::PolicyChecker::checkContentPolicy): * loader/PolicyChecker.h: (WebCore::PolicyChecker::setContentFilterUnblockHandler): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSendRequest): * loader/ThreadableLoader.cpp: (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): (WebCore::ThreadableLoaderOptions::isolatedCopy): * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::ApplicationCacheGroup): * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): * loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::saveParsedStyleSheet): * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::syncThreadMainLoop): * mathml/MathMLInlineContainerElement.cpp: (WebCore::MathMLInlineContainerElement::createElementRenderer): * mathml/MathMLMathElement.cpp: (WebCore::MathMLMathElement::createElementRenderer): * mathml/MathMLMencloseElement.cpp: (WebCore::MathMLMencloseElement::createElementRenderer): * mathml/MathMLSelectElement.cpp: (WebCore::MathMLSelectElement::createElementRenderer): * mathml/MathMLTextElement.cpp: (WebCore::MathMLTextElement::createElementRenderer): * page/CaptionUserPreferences.cpp: (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride): * page/DOMTimer.cpp: (WebCore::DOMTimer::DOMTimer): (WebCore::DOMTimer::install): * page/DOMWindow.cpp: (WebCore::PostMessageTimer::PostMessageTimer): (WebCore::PostMessageTimer::event): (WebCore::DOMWindow::postMessage): (WebCore::DOMWindow::setTimeout): (WebCore::DOMWindow::setInterval): (WebCore::DOMWindow::addEventListener): (WebCore::DOMWindow::showModalDialog): * page/DebugPageOverlays.cpp: (WebCore::MouseWheelRegionOverlay::updateRegion): (WebCore::NonFastScrollableRegionOverlay::updateRegion): (WebCore::DebugPageOverlays::ensureRegionOverlayForFrame): * page/DragController.cpp: (WebCore::documentFragmentFromDragData): (WebCore::DragController::concludeEditDrag): * page/Frame.cpp: (WebCore::Frame::setView): * page/FrameView.cpp: (WebCore::FrameView::sendResizeEventIfNeeded): (WebCore::FrameView::updateOverflowStatus): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setSessionStorage): (WebCore::Page::setStorageNamespaceProvider): (WebCore::Page::setVisitedLinkStore): * page/PageConsoleClient.cpp: (WebCore::PageConsoleClient::addMessage): (WebCore::PageConsoleClient::messageWithTypeAndLevel): (WebCore::PageConsoleClient::count): (WebCore::PageConsoleClient::profileEnd): (WebCore::PageConsoleClient::timeEnd): (WebCore::PageConsoleClient::timeStamp): * page/PageOverlayController.cpp: (WebCore::PageOverlayController::installPageOverlay): * page/TextIndicator.cpp: (WebCore::takeSnapshot): * page/UserContentController.cpp: (WebCore::UserContentController::addUserScript): (WebCore::UserContentController::addUserStyleSheet): * page/UserScript.h: (WebCore::UserScript::UserScript): * page/UserStyleSheet.h: (WebCore::UserStyleSheet::UserStyleSheet): * page/WheelEventTestTrigger.cpp: (WebCore::WheelEventTestTrigger::setTestCallbackAndStartNotificationTimer): (WebCore::WheelEventTestTrigger::triggerTestTimerFired): * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle): (WebCore::AnimationControllerPrivate::addElementChangeToDispatch): * page/animation/CSSPropertyAnimation.cpp: (WebCore::blendFilter): (WebCore::crossfadeBlend): (WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists): (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists): (WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper): (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * page/cocoa/ResourceUsageOverlayCocoa.mm: (WebCore::RingBuffer::append): (WebCore::MemoryCategoryInfo::MemoryCategoryInfo): * page/mac/TextIndicatorWindow.mm: (WebCore::TextIndicatorWindow::clearTextIndicator): * page/scrolling/AxisScrollSnapOffsets.cpp: (WebCore::updateSnapOffsetsForScrollableArea): * page/scrolling/ScrollingStateTree.cpp: (WebCore::ScrollingStateTree::setRemovedNodes): * page/scrolling/ScrollingThread.cpp: (WebCore::ScrollingThread::dispatchBarrier): (WebCore::ScrollingThread::dispatchFunctionsFromScrollingThread): * page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::commitNewTreeState): * page/scrolling/ios/ScrollingTreeIOS.cpp: (WebCore::ScrollingTreeIOS::commitNewTreeState): * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::commitTreeState): * platform/CalculationValue.cpp: (WebCore::CalculationValue::create): * platform/CalculationValue.h: (WebCore::CalculationValue::CalculationValue): (WebCore::CalcExpressionBinaryOperation::CalcExpressionBinaryOperation): * platform/DragImage.cpp: (WebCore::createDragImageFromSnapshot): * platform/KeyedCoding.h: (WebCore::KeyedDecoder::decodeObjects): * platform/Length.cpp: (WebCore::Length::Length): (WebCore::Length::blendMixedTypes): * platform/LengthSize.h: (WebCore::LengthSize::LengthSize): (WebCore::LengthSize::setWidth): (WebCore::LengthSize::setHeight): * platform/MainThreadSharedTimer.cpp: (WebCore::MainThreadSharedTimer::setFiredFunction): * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::setHorizontalSnapOffsets): (WebCore::ScrollableArea::setVerticalSnapOffsets): * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::SharedBuffer): (WebCore::SharedBuffer::createWithContentsOfFile): (WebCore::SharedBuffer::maybeTransferMappedFileData): * platform/Supplementable.h: (WebCore::Supplement::provideTo): (WebCore::Supplementable::provideSupplement): * platform/Timer.h: (WebCore::Timer::Timer): (WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer): * platform/URL.h: (WebCore::URLCapture::releaseURL): * platform/audio/AudioBus.cpp: (WebCore::AudioBus::AudioBus): * platform/audio/HRTFDatabase.cpp: (WebCore::HRTFDatabase::HRTFDatabase): * platform/audio/HRTFElevation.cpp: (WebCore::HRTFElevation::createForSubject): (WebCore::HRTFElevation::createByInterpolatingSlices): * platform/audio/HRTFElevation.h: (WebCore::HRTFElevation::HRTFElevation): * platform/audio/HRTFKernel.cpp: (WebCore::HRTFKernel::createInterpolatedKernel): * platform/audio/HRTFKernel.h: (WebCore::HRTFKernel::create): (WebCore::HRTFKernel::HRTFKernel): * platform/audio/ReverbConvolver.cpp: (WebCore::ReverbConvolver::ReverbConvolver): * platform/audio/ios/MediaSessionManagerIOS.mm: (-[WebMediaSessionHelper dealloc]): * platform/cf/KeyedDecoderCF.cpp: (WebCore::KeyedDecoderCF::KeyedDecoderCF): * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm: (WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler): * platform/glib/KeyedDecoderGlib.cpp: (WebCore::KeyedDecoderGlib::dictionaryFromGVariant): * platform/graphics/FloatPolygon.cpp: (WebCore::FloatPolygon::FloatPolygon): * platform/graphics/Font.cpp: (WebCore::Font::Font): (WebCore::createAndFillGlyphPage): (WebCore::Font::systemFallbackFontForCharacter): * platform/graphics/Font.h: (WebCore::Font::create): * platform/graphics/FontCache.cpp: (WebCore::FontCache::purgeInactiveFontData): * platform/graphics/FontCascade.cpp: (WebCore::FontCascadeCacheEntry::FontCascadeCacheEntry): (WebCore::retrieveOrAddCachedFonts): (WebCore::FontCascade::update): * platform/graphics/FontCascadeFonts.cpp: (WebCore::realizeNextFallback): * platform/graphics/FontCascadeFonts.h: (WebCore::FontCascadeFonts::create): * platform/graphics/FontDescription.h: (WebCore::FontDescription::setFeatureSettings): * platform/graphics/FontFeatureSettings.cpp: (WebCore::FontFeature::FontFeature): (WebCore::FontFeatureSettings::insert): * platform/graphics/FontRanges.h: (WebCore::FontRanges::Range::Range): * platform/graphics/GLContext.cpp: (WebCore::GLContext::createContextForWindow): * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::setStrokePattern): (WebCore::GraphicsContext::setFillPattern): (WebCore::GraphicsContext::setStrokeGradient): (WebCore::GraphicsContext::setFillGradient): (WebCore::GraphicsContext::drawConsumingImageBuffer): * platform/graphics/GraphicsLayer.cpp: (WebCore::KeyframeValueList::insert): * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::setWirelessPlaybackTarget): (WebCore::MediaPlayer::createResourceLoader): * platform/graphics/PlatformMediaResourceLoader.h: (WebCore::PlatformMediaResourceLoader::PlatformMediaResourceLoader): * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: (WebCore::CDMPrivateMediaSourceAVFObjC::createSession): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setWirelessPlaybackTarget): * platform/graphics/ca/TileController.cpp: (WebCore::TileController::setContentsScale): * platform/graphics/cg/IOSurfacePool.cpp: (WebCore::IOSurfacePool::takeSurface): (WebCore::IOSurfacePool::addSurface): (WebCore::IOSurfacePool::insertSurfaceIntoPool): (WebCore::IOSurfacePool::collectInUseSurfaces): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::copyImage): (WebCore::ImageBuffer::sinkIntoImage): (WebCore::ImageBuffer::sinkIntoNativeImage): (WebCore::ImageBuffer::drawConsuming): * platform/graphics/cocoa/IOSurface.mm: (IOSurface::moveToPool): (IOSurface::createFromImageBuffer): (IOSurface::convertToFormat): * platform/graphics/efl/CairoUtilitiesEfl.cpp: (WebCore::evasObjectFromCairoImageSurface): * platform/graphics/efl/GraphicsContext3DEfl.cpp: (WebCore::GraphicsContext3D::setContextLostCallback): * platform/graphics/efl/GraphicsContext3DPrivate.cpp: (WebCore::GraphicsContext3DPrivate::setContextLostCallback): * platform/graphics/egl/GLContextEGL.cpp: (WebCore::GLContextEGL::createWindowContext): (WebCore::GLContextEGL::createPixmapContext): (WebCore::GLContextEGL::createContext): (WebCore::GLContextEGL::GLContextEGL): * platform/graphics/filters/FETile.cpp: (WebCore::FETile::platformApplySoftware): * platform/graphics/filters/Filter.h: (WebCore::Filter::setSourceImage): * platform/graphics/filters/FilterOperation.h: * platform/graphics/glx/GLContextGLX.cpp: (WebCore::GLContextGLX::createWindowContext): (WebCore::GLContextGLX::createPbufferContext): (WebCore::GLContextGLX::createPixmapContext): (WebCore::GLContextGLX::createContext): (WebCore::GLContextGLX::GLContextGLX): * platform/graphics/gpu/Texture.cpp: (WebCore::Texture::Texture): (WebCore::Texture::create): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor): * platform/graphics/gstreamer/MediaPlayerRequestInstallMissingPluginsCallback.h: (WebCore::MediaPlayerRequestInstallMissingPluginsCallback::create): (WebCore::MediaPlayerRequestInstallMissingPluginsCallback::MediaPlayerRequestInstallMissingPluginsCallback): * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: (VideoRenderRequestScheduler::render): * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::setWirelessPlaybackTarget): * platform/graphics/opengl/Extensions3DOpenGLES.cpp: (WebCore::Extensions3DOpenGLES::setEXTContextLostCallback): * platform/graphics/surfaces/GLTransportSurface.cpp: (WebCore::GLTransportSurface::createTransportSurface): (WebCore::GLTransportSurfaceClient::createTransportSurfaceClient): * platform/graphics/surfaces/egl/EGLSurface.cpp: (WebCore::EGLTransportSurface::createTransportSurface): (WebCore::EGLTransportSurface::createTransportSurfaceClient): * platform/graphics/texmap/BitmapTexturePool.cpp: (WebCore::BitmapTexturePool::BitmapTexturePool): * platform/graphics/texmap/BitmapTexturePool.h: (WebCore::BitmapTexturePool::Entry::Entry): * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::removeAllChildren): * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: (WebCore::TextureMapperPlatformLayerBuffer::TextureMapperPlatformLayerBuffer): * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h: (WebCore::TextureMapperPlatformLayerBuffer::setUnmanagedBufferDataHolder): * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp: (WebCore::TextureMapperPlatformLayerProxy::pushNextBuffer): (WebCore::TextureMapperPlatformLayerProxy::getAvailableBuffer): (WebCore::TextureMapperPlatformLayerProxy::releaseUnusedBuffersTimerFired): (WebCore::TextureMapperPlatformLayerProxy::swapBuffer): (WebCore::TextureMapperPlatformLayerProxy::scheduleUpdateOnCompositorThread): (WebCore::TextureMapperPlatformLayerProxy::compositorThreadUpdateTimerFired): * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: (WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::adjustContentsScale): * platform/graphics/wayland/PlatformDisplayWayland.cpp: (WebCore::PlatformDisplayWayland::createSharingGLContext): * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/win/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * platform/graphics/win/FontCustomPlatformDataCairo.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * platform/graphics/win/FontPlatformDataCGWin.cpp: (WebCore::FontPlatformData::FontPlatformData): * platform/graphics/win/FontPlatformDataCairoWin.cpp: (WebCore::FontPlatformData::FontPlatformData): * platform/graphics/win/FontPlatformDataWin.cpp: (WebCore::FontPlatformData::FontPlatformData): * platform/graphics/win/SharedGDIObject.h: (WebCore::SharedGDIObject::create): (WebCore::SharedGDIObject::SharedGDIObject): * platform/graphics/win/SimpleFontDataWin.cpp: (WebCore::Font::platformCreateScaledFont): * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: (WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline): * platform/mac/HIDGamepadProvider.cpp: (WebCore::HIDGamepadProvider::deviceAdded): * platform/mac/ThemeMac.mm: (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): * platform/mediastream/MediaStreamPrivate.cpp: (WebCore::MediaStreamPrivate::create): * platform/mediastream/MediaStreamTrackPrivate.cpp: (WebCore::MediaStreamTrackPrivate::create): * platform/mediastream/mac/AVVideoCaptureSource.mm: (WebCore::AVVideoCaptureSource::currentFrameImage): * platform/network/BlobData.h: (WebCore::RawData::create): (WebCore::RawData::RawData): * platform/network/BlobPart.h: (WebCore::BlobPart::BlobPart): (WebCore::BlobPart::moveData): * platform/network/DataURLDecoder.cpp: (WebCore::DataURLDecoder::DecodingResultDispatcher::dispatch): (WebCore::DataURLDecoder::DecodingResultDispatcher::DecodingResultDispatcher): (WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired): (WebCore::DataURLDecoder::createDecodeTask): (WebCore::DataURLDecoder::decode): * platform/network/HTTPHeaderMap.cpp: (WebCore::HTTPHeaderMap::adopt): * platform/network/NetworkStateNotifier.cpp: (WebCore::NetworkStateNotifier::addNetworkStateChangeListener): * platform/network/ResourceHandle.h: (WebCore::ResourceHandle::setQuickLookHandle): * platform/network/ResourceRequestBase.cpp: (WebCore::ResourceRequestBase::adopt): (WebCore::ResourceRequestBase::copyData): (WebCore::ResourceRequestBase::setHTTPHeaderFields): * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::adopt): (WebCore::ResourceResponseBase::copyData): * platform/network/cf/FormDataStreamCFNet.cpp: (WebCore::advanceCurrentStream): * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::releaseConnectionForDownload): * platform/network/curl/CurlCacheManager.cpp: (WebCore::CurlCacheManager::loadIndex): (WebCore::CurlCacheManager::didReceiveResponse): * platform/network/curl/SocketStreamHandle.h: (WebCore::SocketStreamHandle::SocketData::SocketData): * platform/network/curl/SocketStreamHandleCurl.cpp: (WebCore::SocketStreamHandle::platformSend): (WebCore::SocketStreamHandle::readData): (WebCore::SocketStreamHandle::sendData): (WebCore::SocketStreamHandle::didReceiveData): (WebCore::SocketStreamHandle::createCopy): * platform/network/soup/NetworkStorageSessionSoup.cpp: (WebCore::NetworkStorageSession::NetworkStorageSession): (WebCore::NetworkStorageSession::setSoupNetworkSession): * platform/text/LocaleICU.cpp: (WebCore::LocaleICU::createLabelVector): (WebCore::createFallbackMonthLabels): (WebCore::createFallbackAMPMLabels): * platform/win/WCDataObject.cpp: (WebCore::WCDataObject::SetData): * plugins/DOMMimeType.cpp: (WebCore::DOMMimeType::DOMMimeType): * plugins/DOMMimeType.h: (WebCore::DOMMimeType::create): * plugins/DOMPlugin.cpp: (WebCore::DOMPlugin::DOMPlugin): * plugins/DOMPlugin.h: (WebCore::DOMPlugin::create): * plugins/PluginData.cpp: (WebCore::PluginData::publiclyVisiblePlugins): * rendering/ClipPathOperation.h: * rendering/FloatingObjects.cpp: (WebCore::FloatingObjects::moveAllToFloatInfoMap): (WebCore::FloatingObjects::add): * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/RenderAttachment.cpp: (WebCore::RenderAttachment::RenderAttachment): * rendering/RenderBlock.cpp: (WebCore::OverflowEventDispatcher::~OverflowEventDispatcher): (WebCore::RenderBlock::RenderBlock): * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::RenderBlockFlow): (WebCore::RenderBlockFlow::layoutLineGridBox): (WebCore::RenderBlockFlow::insertFloatingObject): * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::setLineGridBox): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::createAndAppendRootInlineBox): (WebCore::constructBidiRunsForSegment): (WebCore::RenderBlockFlow::linkToEndLineIfNeeded): * rendering/RenderBox.cpp: (WebCore::RenderBox::RenderBox): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::RenderBoxModelObject): (WebCore::RenderBoxModelObject::paintFillLayerExtended): * rendering/RenderButton.cpp: (WebCore::RenderButton::RenderButton): * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox): * rendering/RenderDetailsMarker.cpp: (WebCore::RenderDetailsMarker::RenderDetailsMarker): * rendering/RenderElement.cpp: (WebCore::RenderElement::RenderElement): (WebCore::RenderElement::createFor): (WebCore::RenderElement::setStyle): (WebCore::RenderElement::propagateStyleToAnonymousChildren): * rendering/RenderElement.h: (WebCore::RenderElement::setStyleInternal): (WebCore::RenderElement::setAnimatableStyle): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::RenderEmbeddedObject): (WebCore::RenderEmbeddedObject::createForApplet): * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::RenderFieldset): * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::RenderFileUploadControl): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::RenderFlexibleBox): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::RenderFlowThread): * rendering/RenderFrame.cpp: (WebCore::RenderFrame::RenderFrame): * rendering/RenderFrameBase.cpp: (WebCore::RenderFrameBase::RenderFrameBase): * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::RenderFrameSet): * rendering/RenderFullScreen.cpp: (WebCore::RenderFullScreen::RenderFullScreen): (WebCore::RenderFullScreen::createPlaceholder): * rendering/RenderGrid.cpp: (WebCore::RenderGrid::RenderGrid): (WebCore::RenderGrid::computeFlexFactorUnitSize): * rendering/RenderHTMLCanvas.cpp: (WebCore::RenderHTMLCanvas::RenderHTMLCanvas): * rendering/RenderIFrame.cpp: (WebCore::RenderIFrame::RenderIFrame): * rendering/RenderImage.cpp: (WebCore::RenderImage::RenderImage): * rendering/RenderInline.cpp: (WebCore::RenderInline::RenderInline): (WebCore::updateStyleOfAnonymousBlockContinuations): (WebCore::RenderInline::addChildIgnoringContinuation): (WebCore::RenderInline::splitInlines): (WebCore::RenderInline::createAndAppendInlineFlowBox): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers): * rendering/RenderLayerModelObject.cpp: (WebCore::RenderLayerModelObject::RenderLayerModelObject): * rendering/RenderLineBreak.cpp: (WebCore::RenderLineBreak::RenderLineBreak): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::RenderListBox): * rendering/RenderListItem.cpp: (WebCore::RenderListItem::RenderListItem): (WebCore::RenderListItem::styleDidChange): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::RenderListMarker): * rendering/RenderMedia.cpp: (WebCore::RenderMedia::RenderMedia): * rendering/RenderMediaControlElements.cpp: (WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer): (WebCore::RenderMediaControlTimelineContainer::RenderMediaControlTimelineContainer): (WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::RenderMenuList): * rendering/RenderMeter.cpp: (WebCore::RenderMeter::RenderMeter): * rendering/RenderMultiColumnFlowThread.cpp: (WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread): * rendering/RenderMultiColumnSet.cpp: (WebCore::RenderMultiColumnSet::RenderMultiColumnSet): * rendering/RenderMultiColumnSpannerPlaceholder.cpp: (WebCore::RenderMultiColumnSpannerPlaceholder::RenderMultiColumnSpannerPlaceholder): * rendering/RenderNamedFlowFragment.cpp: (WebCore::RenderNamedFlowFragment::RenderNamedFlowFragment): * rendering/RenderNamedFlowThread.cpp: (WebCore::RenderNamedFlowThread::RenderNamedFlowThread): (WebCore::RenderNamedFlowThread::updateWritingMode): * rendering/RenderProgress.cpp: (WebCore::RenderProgress::RenderProgress): * rendering/RenderPtr.h: * rendering/RenderQuote.cpp: (WebCore::RenderQuote::RenderQuote): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::RenderRegion): * rendering/RenderRegionSet.cpp: (WebCore::RenderRegionSet::RenderRegionSet): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::RenderReplaced): * rendering/RenderReplica.cpp: (WebCore::RenderReplica::RenderReplica): * rendering/RenderRuby.cpp: (WebCore::RenderRubyAsInline::RenderRubyAsInline): (WebCore::RenderRubyAsBlock::RenderRubyAsBlock): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::RenderRubyBase): * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::createRubyBase): * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::RenderRubyText): * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::RenderScrollbarPart): * rendering/RenderSearchField.cpp: (WebCore::RenderSearchField::RenderSearchField): (WebCore::RenderSearchField::updateCancelButtonVisibility): * rendering/RenderSlider.cpp: (WebCore::RenderSlider::RenderSlider): * rendering/RenderSnapshottedPlugIn.cpp: (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): * rendering/RenderTable.cpp: (WebCore::RenderTable::RenderTable): * rendering/RenderTableCaption.cpp: (WebCore::RenderTableCaption::RenderTableCaption): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::RenderTableCell): * rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::RenderTableCol): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::RenderTableRow): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::RenderTableSection): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::RenderTextControl): * rendering/RenderTextControl.h: * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): * rendering/RenderTextControlSingleLine.h: * rendering/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::getThemePartFromCache): (WebCore::RenderThemeEfl::loadTheme): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintProgressBar): * rendering/RenderVTTCue.cpp: (WebCore::RenderVTTCue::RenderVTTCue): * rendering/RenderVideo.cpp: (WebCore::RenderVideo::RenderVideo): * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): (WebCore::RenderView::updateSelectionForSubtrees): (WebCore::RenderView::applySubtreeSelection): * rendering/RenderView.h: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::RenderWidget): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::placeEllipsis): * rendering/mathml/RenderMathMLBlock.cpp: (WebCore::RenderMathMLBlock::RenderMathMLBlock): * rendering/mathml/RenderMathMLBlock.h: * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::RenderMathMLFenced): * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::RenderMathMLFraction): * rendering/mathml/RenderMathMLMath.cpp: (WebCore::RenderMathMLMath::RenderMathMLMath): * rendering/mathml/RenderMathMLMenclose.cpp: (WebCore::RenderMathMLMenclose::RenderMathMLMenclose): * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::RenderMathMLOperator): (WebCore::RenderMathMLOperator::updateStyle): * rendering/mathml/RenderMathMLRadicalOperator.cpp: (WebCore::RenderMathMLRadicalOperator::RenderMathMLRadicalOperator): * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::RenderMathMLRoot): (WebCore::RenderMathMLRoot::updateStyle): * rendering/mathml/RenderMathMLRoot.h: * rendering/mathml/RenderMathMLRow.cpp: (WebCore::RenderMathMLRow::RenderMathMLRow): * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::RenderMathMLScripts): * rendering/mathml/RenderMathMLScripts.h: * rendering/mathml/RenderMathMLSpace.cpp: (WebCore::RenderMathMLSpace::RenderMathMLSpace): * rendering/mathml/RenderMathMLSquareRoot.cpp: (WebCore::RenderMathMLSquareRoot::RenderMathMLSquareRoot): * rendering/mathml/RenderMathMLToken.cpp: (WebCore::RenderMathMLToken::RenderMathMLToken): (WebCore::RenderMathMLToken::updateStyle): * rendering/mathml/RenderMathMLUnderOver.cpp: (WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver): * rendering/shapes/PolygonShape.h: (WebCore::PolygonShape::PolygonShape): * rendering/shapes/RasterShape.h: * rendering/shapes/Shape.cpp: (WebCore::createPolygonShape): (WebCore::Shape::createShape): (WebCore::Shape::createRasterShape): (WebCore::Shape::createBoxShape): * rendering/style/BasicShapes.cpp: (WebCore::BasicShapeCenterCoordinate::updateComputedLength): (WebCore::BasicShapeCircle::blend): (WebCore::BasicShapeEllipse::blend): (WebCore::BasicShapePolygon::blend): (WebCore::BasicShapePath::BasicShapePath): (WebCore::BasicShapePath::blend): (WebCore::BasicShapeInset::blend): * rendering/style/BasicShapes.h: * rendering/style/ContentData.cpp: (WebCore::ContentData::clone): (WebCore::ImageContentData::createContentRenderer): (WebCore::TextContentData::createContentRenderer): (WebCore::QuoteContentData::createContentRenderer): * rendering/style/ContentData.h: (WebCore::ContentData::setNext): * rendering/style/DataRef.h: (WebCore::DataRef::DataRef): * rendering/style/FillLayer.cpp: (WebCore::FillLayer::~FillLayer): * rendering/style/FillLayer.h: (WebCore::FillLayer::setXPosition): (WebCore::FillLayer::setYPosition): (WebCore::FillLayer::setNext): * rendering/style/NinePieceImage.cpp: (WebCore::NinePieceImage::NinePieceImage): * rendering/style/NinePieceImage.h: (WebCore::NinePieceImage::setImageSlices): (WebCore::NinePieceImage::setBorderSlices): (WebCore::NinePieceImage::setOutset): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::setWillChange): (WebCore::RenderStyle::appendContent): (WebCore::RenderStyle::setContent): (WebCore::RenderStyle::setTextShadow): (WebCore::RenderStyle::setBoxShadow): (WebCore::RenderStyle::setWordSpacing): (WebCore::RenderStyle::setScrollSnapPointsX): (WebCore::RenderStyle::setScrollSnapPointsY): (WebCore::RenderStyle::setScrollSnapDestination): (WebCore::RenderStyle::setScrollSnapCoordinates): * rendering/style/RenderStyle.h: * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setShadow): * rendering/style/ShadowData.h: (WebCore::ShadowData::setNext): * rendering/style/StyleGeneratedImage.cpp: (WebCore::StyleGeneratedImage::StyleGeneratedImage): * rendering/style/StyleGeneratedImage.h: * rendering/style/StyleReflection.h: (WebCore::StyleReflection::setOffset): * rendering/svg/RenderSVGBlock.cpp: (WebCore::RenderSVGBlock::RenderSVGBlock): * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::RenderSVGContainer): * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::RenderSVGEllipse): * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::RenderSVGForeignObject): * rendering/svg/RenderSVGGradientStop.cpp: (WebCore::RenderSVGGradientStop::RenderSVGGradientStop): * rendering/svg/RenderSVGHiddenContainer.cpp: (WebCore::RenderSVGHiddenContainer::RenderSVGHiddenContainer): * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::RenderSVGImage): * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::RenderSVGInline): (WebCore::RenderSVGInline::createInlineFlowBox): * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::createTextBox): * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::RenderSVGModelObject): * rendering/svg/RenderSVGPath.cpp: (WebCore::RenderSVGPath::RenderSVGPath): * rendering/svg/RenderSVGRect.cpp: (WebCore::RenderSVGRect::RenderSVGRect): * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::RenderSVGResourceClipper): * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::RenderSVGResourceFilter): (WebCore::RenderSVGResourceFilter::buildPrimitives): (WebCore::RenderSVGResourceFilter::applyResource): (WebCore::RenderSVGResourceFilter::postApplyResource): * rendering/svg/RenderSVGResourceFilterPrimitive.cpp: (WebCore::RenderSVGResourceFilterPrimitive::RenderSVGResourceFilterPrimitive): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::RenderSVGResourceGradient): (WebCore::createMaskAndSwapContextForTextGradient): * rendering/svg/RenderSVGResourceLinearGradient.cpp: (WebCore::RenderSVGResourceLinearGradient::RenderSVGResourceLinearGradient): * rendering/svg/RenderSVGResourceMarker.cpp: (WebCore::RenderSVGResourceMarker::RenderSVGResourceMarker): * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::RenderSVGResourceMasker): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::RenderSVGResourcePattern): (WebCore::RenderSVGResourcePattern::buildPattern): * rendering/svg/RenderSVGResourceRadialGradient.cpp: (WebCore::RenderSVGResourceRadialGradient::RenderSVGResourceRadialGradient): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::RenderSVGRoot): * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::RenderSVGShape): * rendering/svg/RenderSVGTSpan.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::RenderSVGText): (WebCore::RenderSVGText::createRootInlineBox): * rendering/svg/RenderSVGTextPath.cpp: (WebCore::RenderSVGTextPath::RenderSVGTextPath): * rendering/svg/RenderSVGTransformableContainer.cpp: (WebCore::RenderSVGTransformableContainer::RenderSVGTransformableContainer): * rendering/svg/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::RenderSVGViewportContainer): * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::addResourcesFromRenderer): * replay/CapturingInputCursor.cpp: (WebCore::CapturingInputCursor::CapturingInputCursor): (WebCore::CapturingInputCursor::create): (WebCore::CapturingInputCursor::storeInput): * replay/FunctorInputCursor.h: (WebCore::FunctorInputCursor::FunctorInputCursor): * replay/MemoizedDOMResult.cpp: (JSC::InputTraits<MemoizedDOMResultBase>::decode): * replay/ReplayController.cpp: (WebCore::ReplayController::createSegment): * replay/ReplayInputCreationMethods.cpp: (WebCore::InitialNavigation::createFromPage): * replay/ReplaySession.cpp: (WebCore::ReplaySession::appendSegment): (WebCore::ReplaySession::insertSegment): * replay/ReplayingInputCursor.cpp: (WebCore::ReplayingInputCursor::ReplayingInputCursor): (WebCore::ReplayingInputCursor::create): * replay/SegmentedInputStorage.cpp: (WebCore::SegmentedInputStorage::store): * replay/SerializationMethods.cpp: (JSC::EncodingTraits<NondeterministicInputBase>::decodeValue): * replay/UserInputBridge.cpp: (WebCore::UserInputBridge::handleMousePressEvent): (WebCore::UserInputBridge::handleMouseReleaseEvent): (WebCore::UserInputBridge::handleMouseMoveEvent): (WebCore::UserInputBridge::handleMouseMoveOnScrollbarEvent): (WebCore::UserInputBridge::handleKeyEvent): (WebCore::UserInputBridge::handleWheelEvent): * storage/Storage.cpp: (WebCore::Storage::create): (WebCore::Storage::Storage): * style/StyleResolveForDocument.cpp: (WebCore::Style::resolveForDocument): * style/StyleResolveTree.cpp: (WebCore::Style::createRendererIfNeeded): (WebCore::Style::setBeforeOrAfterPseudoElement): (WebCore::Style::resolveTree): * svg/SVGAElement.cpp: (WebCore::SVGAElement::createElementRenderer): * svg/SVGAltGlyphElement.cpp: (WebCore::SVGAltGlyphElement::createElementRenderer): * svg/SVGAnimatedPath.cpp: (WebCore::SVGAnimatedPathAnimator::constructFromString): (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): * svg/SVGAnimatedTypeAnimator.cpp: (WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName): * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::createElementRenderer): * svg/SVGClipPathElement.cpp: (WebCore::SVGClipPathElement::createElementRenderer): * svg/SVGDefsElement.cpp: (WebCore::SVGDefsElement::createElementRenderer): * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::markPendingResourcesForRemoval): (WebCore::SVGDocumentExtensions::addElementReferencingTarget): (WebCore::SVGDocumentExtensions::rebuildElements): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::createElementRenderer): * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::createElementRenderer): * svg/SVGFilterPrimitiveStandardAttributes.cpp: (WebCore::SVGFilterPrimitiveStandardAttributes::createElementRenderer): * svg/SVGFontElement.cpp: (WebCore::SVGKerningMap::insert): * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::createElementRenderer): * svg/SVGGElement.cpp: (WebCore::SVGGElement::createElementRenderer): * svg/SVGGraphicsElement.cpp: (WebCore::SVGGraphicsElement::createElementRenderer): * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::createElementRenderer): * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::createElementRenderer): * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::createElementRenderer): * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::createElementRenderer): * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::createElementRenderer): * svg/SVGPathUtilities.cpp: (WebCore::appendSVGPathByteStreamFromSVGPathSeg): * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::createElementRenderer): * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::createElementRenderer): * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::createElementRenderer): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::createElementRenderer): * svg/SVGStopElement.cpp: (WebCore::SVGStopElement::createElementRenderer): * svg/SVGSwitchElement.cpp: (WebCore::SVGSwitchElement::createElementRenderer): * svg/SVGSymbolElement.cpp: (WebCore::SVGSymbolElement::createElementRenderer): * svg/SVGTRefElement.cpp: (WebCore::SVGTRefTargetEventListener::attach): (WebCore::SVGTRefElement::createElementRenderer): * svg/SVGTSpanElement.cpp: (WebCore::SVGTSpanElement::createElementRenderer): * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::createElementRenderer): * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::createElementRenderer): * svg/SVGToOTFFontConversion.cpp: (WebCore::SVGToOTFFontConverter::releaseResult): (WebCore::SVGToOTFFontConverter::appendKERNSubtable): (WebCore::SVGToOTFFontConverter::processGlyphElement): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::createElementRenderer): (WebCore::SVGUseElement::cloneTarget): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::~SVGImage): (WebCore::SVGImage::drawPatternForContainer): * testing/Internals.cpp: (WebCore::Internals::insertAuthorCSS): (WebCore::Internals::insertUserCSS): (WebCore::Internals::queueMicroTask): * workers/DedicatedWorkerGlobalScope.cpp: (WebCore::DedicatedWorkerGlobalScope::postMessage): * workers/Worker.cpp: (WebCore::Worker::create): (WebCore::Worker::postMessage): * workers/WorkerEventQueue.cpp: (WebCore::WorkerEventQueue::EventDispatcher::EventDispatcher): * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::postTask): (WebCore::WorkerGlobalScope::setTimeout): (WebCore::WorkerGlobalScope::setInterval): (WebCore::WorkerGlobalScope::importScripts): (WebCore::WorkerGlobalScope::addMessage): (WebCore::WorkerGlobalScope::addMessageToWorkerConsole): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::postMessageToWorkerObject): (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope): (WebCore::WorkerMessagingProxy::postTaskToLoader): (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope): (WebCore::WorkerMessagingProxy::workerThreadCreated): * workers/WorkerRunLoop.cpp: (WebCore::WorkerRunLoop::postTask): (WebCore::WorkerRunLoop::postTaskAndTerminate): (WebCore::WorkerRunLoop::postTaskForMode): (WebCore::WorkerRunLoop::Task::Task): * xml/DOMParser.cpp: (WebCore::DOMParser::parseFromString): * xml/NativeXPathNSResolver.cpp: (WebCore::NativeXPathNSResolver::NativeXPathNSResolver): * xml/NativeXPathNSResolver.h: (WebCore::NativeXPathNSResolver::create): * xml/XMLErrors.cpp: (WebCore::XMLErrors::insertErrorMessageBlock): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseBlob): * xml/XMLHttpRequestProgressEventThrottle.cpp: (WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent): (WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents): * xml/XMLTreeViewer.cpp: (WebCore::XMLTreeViewer::transformDocumentToTreeView): * xml/XPathExpression.cpp: (WebCore::XPathExpression::XPathExpression): (WebCore::XPathExpression::createExpression): * xml/XPathExpressionNode.cpp: (WebCore::XPath::Expression::setSubexpressions): * xml/XPathExpressionNode.h: (WebCore::XPath::Expression::addSubexpression): * xml/XPathFunctions.cpp: (WebCore::XPath::Function::setArguments): (WebCore::XPath::FunId::evaluate): (WebCore::XPath::Function::create): * xml/XPathGrammar.y: * xml/XPathNodeSet.cpp: (WebCore::XPath::NodeSet::sort): (WebCore::XPath::NodeSet::traversalSort): * xml/XPathNodeSet.h: (WebCore::XPath::NodeSet::NodeSet): (WebCore::XPath::NodeSet::append): * xml/XPathParser.cpp: (WebCore::XPath::Parser::parseStatement): * xml/XPathParser.h: (WebCore::XPath::Parser::setParseResult): * xml/XPathPath.cpp: (WebCore::XPath::Filter::Filter): (WebCore::XPath::Filter::evaluate): (WebCore::XPath::LocationPath::evaluate): (WebCore::XPath::LocationPath::appendStep): (WebCore::XPath::LocationPath::prependStep): (WebCore::XPath::Path::Path): * xml/XPathPredicate.cpp: (WebCore::XPath::StringExpression::StringExpression): (WebCore::XPath::Negative::Negative): (WebCore::XPath::NumericOp::NumericOp): (WebCore::XPath::EqTestOp::EqTestOp): (WebCore::XPath::LogicalOp::LogicalOp): (WebCore::XPath::Union::Union): * xml/XPathStep.cpp: (WebCore::XPath::Step::Step): (WebCore::XPath::Step::optimize): (WebCore::XPath::optimizeStepPair): (WebCore::XPath::Step::evaluate): * xml/XPathStep.h: (WebCore::XPath::Step::NodeTest::NodeTest): (WebCore::XPath::Step::NodeTest::operator=): * xml/XPathValue.h: (WebCore::XPath::Value::Value): (WebCore::XPath::Value::Data::create): (WebCore::XPath::Value::Data::Data): * xml/XSLTProcessor.h: (WebCore::XSLTProcessor::setXSLStyleSheet): (WebCore::XSLTProcessor::importStylesheet): * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::append): * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::PendingCallbacks::appendStartElementNSCallback): (WebCore::PendingCallbacks::appendCharactersCallback): (WebCore::PendingCallbacks::appendProcessingInstructionCallback): (WebCore::PendingCallbacks::appendCDATABlockCallback): (WebCore::PendingCallbacks::appendCommentCallback): (WebCore::PendingCallbacks::appendInternalSubsetCallback): (WebCore::PendingCallbacks::appendErrorCallback): (WebCore::OffsetBuffer::OffsetBuffer): (WebCore::openFunc): (WebCore::XMLDocumentParser::cdataBlock): (WebCore::XMLDocumentParser::comment): (WebCore::parseAttributes): Source/WebKit: * Storage/StorageNamespaceImpl.cpp: (WebCore::StorageNamespaceImpl::storageArea): Source/WebKit/ios: * WebCoreSupport/WebFixedPositionContent.mm: (-[WebFixedPositionContent setViewportConstrainedLayers:stickyContainerMap:]): * WebCoreSupport/WebInspectorClientIOS.mm: (WebInspectorFrontendClient::WebInspectorFrontendClient): Source/WebKit/mac: * History/WebHistoryItem.mm: (-[WebHistoryItem initFromDictionaryRepresentation:]): * Plugins/Hosted/HostedNetscapePluginStream.mm: (WebKit::HostedNetscapePluginStream::willSendRequest): * Plugins/Hosted/NetscapePluginInstanceProxy.h: (WebKit::NetscapePluginInstanceProxy::setCurrentReply): * Plugins/WebNetscapePluginStream.mm: (WebNetscapePluginStream::willSendRequest): * Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]): * WebCoreSupport/WebContextMenuClient.mm: (WebContextMenuClient::imageForCurrentSharingServicePickerItem): * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::dispatchDecidePolicyForResponse): (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): (WebFrameLoaderClient::dispatchWillSubmitForm): (WebFrameLoaderClient::createDocumentLoader): * WebCoreSupport/WebInspectorClient.mm: (WebInspectorFrontendClient::WebInspectorFrontendClient): * WebView/WebArchive.mm: (-[WebArchive initWithMainResource:subresources:subframeArchives:]): * WebView/WebFrame.mm: (-[WebFrame _documentFragmentWithNodesAsParagraphs:]): * WebView/WebHTMLView.mm: (-[WebHTMLView _applyEditingStyleToSelection:withUndoAction:]): * WebView/WebMediaPlaybackTargetPicker.mm: (WebMediaPlaybackTargetPicker::setPlaybackTarget): * WebView/WebView.mm: (-[WebView _loadBackForwardListFromOtherView:]): (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]): (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]): Source/WebKit/win: * Plugins/PluginStream.cpp: (WebCore::PluginStream::willSendRequest): * Plugins/PluginView.cpp: (WebCore::PluginView::requestTimerFired): (WebCore::PluginView::scheduleRequest): (WebCore::PluginView::handlePost): * WebCoreSupport/WebFrameLoaderClient.cpp: (WebFrameLoaderClient::createDocumentLoader): * WebCoreSupport/WebInspectorClient.cpp: (WebInspectorFrontendClient::WebInspectorFrontendClient): * WebHistory.cpp: (createUserInfoFromArray): * WebHistoryItem.cpp: (WebHistoryItem::initFromDictionaryRepresentation): * WebView.cpp: (WebView::addToDirtyRegion): (WebView::scrollBackingStore): (WebView::loadBackForwardListFromOtherView): (WebView::addUserScriptToGroup): (WebView::addUserStyleSheetToGroup): Source/WebKit2: * DatabaseProcess/DatabaseProcess.cpp: (WebKit::DatabaseProcess::postDatabaseTask): (WebKit::DatabaseProcess::fetchWebsiteData): (WebKit::DatabaseProcess::deleteWebsiteData): (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins): (WebKit::DatabaseProcess::indexedDatabaseOrigins): * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp: (WebKit::UniqueIDBDatabase::postTransactionOperation): (WebKit::UniqueIDBDatabase::postMainThreadTask): (WebKit::UniqueIDBDatabase::postDatabaseTask): * NetworkProcess/Downloads/DownloadManager.cpp: (WebKit::DownloadManager::startDownload): (WebKit::DownloadManager::convertHandleToDownload): (WebKit::DownloadManager::resumeDownload): * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm: (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate): * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: (WebKit::NetworkBlobRegistry::registerBlobURL): * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad): (WebKit::NetworkConnectionToWebProcess::registerBlobURL): * NetworkProcess/NetworkLoad.cpp: (WebKit::NetworkLoad::didReceiveData): (WebKit::NetworkLoad::didReceiveBuffer): (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace): * NetworkProcess/NetworkProcess.cpp: (WebKit::fetchDiskCacheEntries): (WebKit::NetworkProcess::fetchWebsiteData): (WebKit::NetworkProcess::deleteWebsiteData): (WebKit::clearDiskCacheEntries): (WebKit::NetworkProcess::deleteWebsiteDataForOrigins): * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData): (WebKit::NetworkResourceLoader::NetworkResourceLoader): (WebKit::NetworkResourceLoader::retrieveCacheEntry): (WebKit::NetworkResourceLoader::didFinishLoading): (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry): (WebKit::NetworkResourceLoader::validateCacheEntry): * NetworkProcess/NetworkResourceLoader.h: * NetworkProcess/cache/NetworkCache.cpp: (WebKit::NetworkCache::Cache::retrieve): (WebKit::NetworkCache::Cache::store): (WebKit::NetworkCache::Cache::clear): * NetworkProcess/cache/NetworkCacheCoders.h: * NetworkProcess/cache/NetworkCacheDataSoup.cpp: (WebKit::NetworkCache::Data::empty): (WebKit::NetworkCache::Data::subrange): (WebKit::NetworkCache::concatenate): (WebKit::NetworkCache::Data::adoptMap): * NetworkProcess/cache/NetworkCacheEntry.cpp: (WebKit::NetworkCache::Entry::Entry): * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp: (WebKit::NetworkCache::runTaskInQueue): (WebKit::NetworkCache::fillDataFromReadBuffer): (WebKit::NetworkCache::IOChannel::readSyncInThread): * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad): (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading): (WebKit::NetworkCache::SpeculativeLoad::didComplete): * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::SpeculativeLoadManager::ExpiringEntry::ExpiringEntry): (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry): (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::takeCacheEntry): (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::create): (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::setExistingSubresourcesEntry): (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad): (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad): (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry): (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage): (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry): (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry): (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry): * NetworkProcess/cache/NetworkCacheStatistics.cpp: (WebKit::NetworkCache::Statistics::queryWasEverRequested): * NetworkProcess/cache/NetworkCacheStorage.cpp: (WebKit::NetworkCache::Storage::ReadOperation::finish): (WebKit::NetworkCache::Storage::synchronize): (WebKit::NetworkCache::Storage::dispatchReadOperation): (WebKit::NetworkCache::Storage::dispatchWriteOperation): (WebKit::NetworkCache::Storage::retrieve): (WebKit::NetworkCache::Storage::store): (WebKit::NetworkCache::Storage::traverse): (WebKit::NetworkCache::Storage::clear): * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp: (WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry): (WebKit::NetworkCache::SubresourcesEntry::updateSubresourceKeys): * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkDataTask::NetworkDataTask): * NetworkProcess/soup/NetworkProcessSoup.cpp: (WebKit::NetworkProcess::clearDiskCache): * Platform/IPC/ArgumentCoders.h: (IPC::ArgumentCoder<WTF::Optional<T>>::decode): * Platform/IPC/ArgumentDecoder.cpp: (IPC::ArgumentDecoder::ArgumentDecoder): * Platform/IPC/ArgumentEncoder.cpp: (IPC::ArgumentEncoder::addAttachment): (IPC::ArgumentEncoder::releaseAttachments): * Platform/IPC/Attachment.cpp: (IPC::Attachment::encode): * Platform/IPC/Connection.cpp: (IPC::Connection::SyncMessageState::processIncomingMessage): (IPC::Connection::SyncMessageState::dispatchMessages): (IPC::Connection::dispatchWorkQueueMessageReceiverMessage): (IPC::Connection::sendMessage): (IPC::Connection::sendSyncReply): (IPC::Connection::waitForMessage): (IPC::Connection::sendSyncMessage): (IPC::Connection::sendSyncMessageFromSecondaryThread): (IPC::Connection::waitForSyncReply): (IPC::Connection::processIncomingSyncReply): (IPC::Connection::processIncomingMessage): (IPC::Connection::sendOutgoingMessages): (IPC::Connection::dispatchSyncMessage): (IPC::Connection::enqueueIncomingMessage): (IPC::Connection::dispatchOneMessage): * Platform/IPC/Connection.h: (IPC::Connection::Identifier::Identifier): (IPC::Connection::send): (IPC::Connection::sendSync): * Platform/IPC/HandleMessage.h: (IPC::handleMessage): (IPC::handleMessageDelayed): * Platform/IPC/MessageDecoder.cpp: (IPC::MessageDecoder::MessageDecoder): (IPC::MessageDecoder::setImportanceAssertion): (IPC::MessageDecoder::unwrapForTesting): * Platform/IPC/MessageDecoder.h: (IPC::MessageDecoder::setMessageProcessingToken): * Platform/IPC/MessageEncoder.cpp: (IPC::MessageEncoder::wrapForTesting): * Platform/IPC/MessageRecorder.cpp: (IPC::MessageRecorder::recordOutgoingMessage): (IPC::MessageRecorder::recordIncomingMessage): (IPC::MessageRecorder::MessageProcessingToken::MessageProcessingToken): * Platform/IPC/MessageSender.cpp: (IPC::MessageSender::sendMessage): * Platform/IPC/MessageSender.h: (IPC::MessageSender::send): (IPC::MessageSender::sendSync): * Platform/IPC/glib/GSocketMonitor.cpp: (IPC::GSocketMonitor::start): * Platform/IPC/mac/ConnectionMac.mm: (IPC::Connection::open): (IPC::createMessageDecoder): (IPC::Connection::receiveSourceEventHandler): * Platform/IPC/unix/ConnectionUnix.cpp: (IPC::Connection::processMessage): * Platform/unix/SharedMemoryUnix.cpp: (WebKit::SharedMemory::Handle::decode): (WebKit::SharedMemory::Handle::releaseAttachment): (WebKit::SharedMemory::Handle::adoptAttachment): * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm: (WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate): * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::initializePluginProcess): * PluginProcess/WebProcessConnection.cpp: (WebKit::WebProcessConnection::addPluginControllerProxy): (WebKit::WebProcessConnection::createPluginInternal): * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::platformInitializePluginProcess): * Scripts/webkit/LegacyMessageReceiver-expected.cpp: (Messages::WebPage::GetPluginProcessConnection::DelayedReply::DelayedReply): (Messages::WebPage::GetPluginProcessConnection::DelayedReply::send): (Messages::WebPage::TestMultipleAttributes::DelayedReply::DelayedReply): (Messages::WebPage::TestMultipleAttributes::DelayedReply::send): * Scripts/webkit/MessageReceiver-expected.cpp: (Messages::WebPage::GetPluginProcessConnection::DelayedReply::DelayedReply): (Messages::WebPage::GetPluginProcessConnection::DelayedReply::send): (Messages::WebPage::TestMultipleAttributes::DelayedReply::DelayedReply): (Messages::WebPage::TestMultipleAttributes::DelayedReply::send): * Scripts/webkit/messages.py: (generate_message_handler): * Shared/API/APIArray.cpp: (API::Array::create): (API::Array::createStringArray): (API::Array::copy): * Shared/API/APIArray.h: * Shared/API/APIDictionary.cpp: (API::Dictionary::create): (API::Dictionary::Dictionary): (API::Dictionary::keys): * Shared/API/APIPageGroupHandle.cpp: (API::PageGroupHandle::create): (API::PageGroupHandle::PageGroupHandle): (API::PageGroupHandle::decode): * Shared/API/APIString.h: * Shared/API/APIURL.h: (API::URL::create): (API::URL::URL): * Shared/API/Cocoa/RemoteObjectInvocation.h: (WebKit::RemoteObjectInvocation::ReplyInfo::ReplyInfo): * Shared/API/Cocoa/RemoteObjectInvocation.mm: (WebKit::RemoteObjectInvocation::RemoteObjectInvocation): (WebKit::RemoteObjectInvocation::decode): * Shared/API/Cocoa/WKRemoteObjectCoder.mm: (ensureObjectStream): (createEncodedObject): * Shared/API/Cocoa/_WKRemoteObjectInterface.mm: (initializeMethod): (-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:ofReply:]): * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm: (-[_WKRemoteObjectRegistry _sendInvocation:interface:]): * Shared/API/c/WKArray.cpp: (WKArrayCreate): (WKArrayCreateAdoptingValues): * Shared/API/c/WKDictionary.cpp: (WKDictionaryCreate): * Shared/API/c/WKSharedAPICast.h: (WebKit::ProxyingRefPtr::ProxyingRefPtr): * Shared/APIWebArchive.mm: (API::WebArchive::WebArchive): (API::WebArchive::subresources): (API::WebArchive::subframeArchives): * Shared/AsyncRequest.cpp: (WebKit::AsyncRequest::AsyncRequest): (WebKit::AsyncRequest::setAbortHandler): * Shared/AsyncRequest.h: * Shared/BlockingResponseMap.h: (BlockingResponseMap::didReceiveResponse): * Shared/ChildProcessProxy.cpp: (WebKit::ChildProcessProxy::sendMessage): (WebKit::ChildProcessProxy::didFinishLaunching): * Shared/ChildProcessProxy.h: (WebKit::ChildProcessProxy::send): (WebKit::ChildProcessProxy::sendSync): * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebKit::CoordinatedGraphicsScene::dispatchOnMainThread): (WebKit::CoordinatedGraphicsScene::dispatchOnClientRunLoop): (WebKit::CoordinatedGraphicsScene::createLayer): (WebKit::CoordinatedGraphicsScene::syncRemoteContent): (WebKit::CoordinatedGraphicsScene::appendUpdate): * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp: (WebKit::ThreadSafeCoordinatedSurface::create): (WebKit::ThreadSafeCoordinatedSurface::ThreadSafeCoordinatedSurface): * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: (WebKit::CompositingRunLoop::CompositingRunLoop): (WebKit::CompositingRunLoop::callOnCompositingRunLoop): (WebKit::ThreadedCompositor::callOnCompositingThread): * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h: (WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate): (WebKit::XPCServiceInitializer): * Shared/Plugins/Netscape/PluginInformation.cpp: (WebKit::createPluginInformationDictionary): * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h: (WebKit::RemoteScrollingCoordinatorTransaction::setStateTreeToEncode): * Shared/SessionTracker.cpp: (WebKit::SessionTracker::setSession): * Shared/UserData.cpp: (WebKit::UserData::UserData): (WebKit::transformGraph): (WebKit::UserData::decode): * Shared/WebBackForwardListItem.cpp: (WebKit::WebBackForwardListItem::create): (WebKit::WebBackForwardListItem::WebBackForwardListItem): * Shared/WebBackForwardListItem.h: (WebKit::WebBackForwardListItem::setPageState): * Shared/WebCompiledContentExtension.cpp: (WebKit::WebCompiledContentExtension::create): (WebKit::WebCompiledContentExtension::WebCompiledContentExtension): * Shared/WebCompiledContentExtensionData.h: (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData): * Shared/WebContextMenuItem.cpp: (WebKit::WebContextMenuItem::submenuItemsAsAPIArray): * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<UserStyleSheet>::decode): (IPC::ArgumentCoder<UserScript>::decode): (IPC::ArgumentCoder<FilterOperations>::decode): (IPC::ArgumentCoder<BlobPart>::decode): * Shared/WebKeyboardEvent.cpp: (WebKit::WebKeyboardEvent::WebKeyboardEvent): * Shared/WebPreferencesStore.h: (WebKit::WebPreferencesStore::Value::Value): * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::createArrayFromLayerList): * Shared/WebRenderObject.cpp: (WebKit::WebRenderObject::WebRenderObject): * Shared/WebTouchEvent.cpp: (WebKit::WebTouchEvent::WebTouchEvent): * Shared/efl/WebEventFactory.cpp: (WebKit::WebEventFactory::createWebTouchEvent): * Shared/gtk/NativeWebKeyboardEventGtk.cpp: (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): * Shared/gtk/NativeWebTouchEventGtk.cpp: (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): * Shared/gtk/WebContextMenuItemGtk.cpp: (WebKit::WebContextMenuItemGtk::WebContextMenuItemGtk): * Shared/gtk/WebEventFactory.cpp: (WebKit::WebEventFactory::createWebKeyboardEvent): (WebKit::WebEventFactory::createWebTouchEvent): * Shared/linux/SeccompFilters/OpenSyscall.cpp: (WebKit::OpenSyscall::createFromOpenatContext): (WebKit::OpenSyscall::createFromCreatContext): (WebKit::OpenSyscallResult::encode): * Shared/mac/ObjCObjectGraph.mm: (WebKit::ObjCObjectGraph::decode): * Shared/mac/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::takeFrontContextPendingFlush): (WebKit::RemoteLayerBackingStore::Buffer::discard): * Shared/mac/RemoteLayerTreeTransaction.h: (WebKit::RemoteLayerTreeTransaction::setCallbackIDs): * Shared/mac/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setCreatedLayers): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): * Shared/soup/WebCoreArgumentCodersSoup.cpp: (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData): * UIProcess/API/APIProcessPoolConfiguration.h: * UIProcess/API/APISessionState.cpp: (API::SessionState::create): (API::SessionState::SessionState): * UIProcess/API/APIUserContentExtension.cpp: (API::UserContentExtension::UserContentExtension): * UIProcess/API/APIUserContentExtension.h: * UIProcess/API/APIUserContentExtensionStore.cpp: (API::compiledToFile): (API::createExtension): (API::UserContentExtensionStore::compileContentExtension): * UIProcess/API/APIUserScript.h: * UIProcess/API/APIWebsiteDataRecord.cpp: (API::WebsiteDataRecord::create): (API::WebsiteDataRecord::WebsiteDataRecord): * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::create): (API::WebsiteDataStore::WebsiteDataStore): * UIProcess/API/C/WKApplicationCacheManager.cpp: (WKApplicationCacheManagerGetApplicationCacheOrigins): * UIProcess/API/C/WKKeyValueStorageManager.cpp: (WKKeyValueStorageManagerGetKeyValueStorageOrigins): (WKKeyValueStorageManagerGetStorageDetailsByOrigin): * UIProcess/API/C/WKPage.cpp: (WKPageCopySessionState): (WKPageRestoreFromSessionState): (WKPageSetPageContextMenuClient): (WKPageSetPageFindMatchesClient): (WKPageSetPageLoaderClient): (WebKit::RunJavaScriptAlertResultListener::create): (WebKit::RunJavaScriptAlertResultListener::RunJavaScriptAlertResultListener): (WebKit::RunJavaScriptConfirmResultListener::create): (WebKit::RunJavaScriptConfirmResultListener::RunJavaScriptConfirmResultListener): (WebKit::RunJavaScriptPromptResultListener::create): (WebKit::RunJavaScriptPromptResultListener::RunJavaScriptPromptResultListener): (WKPageSetPageUIClient): (WKPageSetPageNavigationClient): (WKPageCopyRelatedPages): * UIProcess/API/C/WKResourceCacheManager.cpp: (WKResourceCacheManagerGetCacheOrigins): * UIProcess/API/C/WKSessionStateRef.cpp: (WKSessionStateCreateFromData): * UIProcess/API/C/mac/WKContextPrivateMac.mm: (WKContextGetInfoForInstalledPlugIns): * UIProcess/API/C/mac/WKPagePrivateMac.mm: (-[WKObservablePageState initWithPage:]): * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm: (createWKArray): * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView initWithFrame:configuration:]): (-[WKWebView _takeViewSnapshot]): (-[WKWebView _restoreFromSessionStateData:]): (-[WKWebView _setInputDelegate:]): * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (LazyInitialized::set): * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]): * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm: (-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]): * UIProcess/API/Cocoa/_WKSessionState.mm: (-[_WKSessionState _initWithSessionState:]): * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm: (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]): * UIProcess/API/efl/ewk_database_manager.cpp: (EwkDatabaseManager::getDatabaseOrigins): * UIProcess/API/gtk/WebKitContextMenuItem.cpp: (webkitContextMenuItemToWebContextMenuItemGtk): * UIProcess/API/gtk/WebKitFileChooserRequest.cpp: (webkit_file_chooser_request_select_files): * UIProcess/API/gtk/WebKitNotificationProvider.cpp: (WebKitNotificationProvider::notificationCloseCallback): * UIProcess/API/gtk/WebKitWebContext.cpp: (webkit_web_context_prefetch_dns): (webkitWebContextCreatePageForWebView): * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_get_snapshot): * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseTouchEvent): (webkitWebViewBaseCreateWebPage): * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp: (webkitWebsiteDataManagerCreate): (webkitWebsiteDataManagerGetDataStore): * UIProcess/API/mac/WKView.mm: (-[WKView initWithFrame:processPool:configuration:webView:]): (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): (-[WKView initWithFrame:configurationRef:]): * UIProcess/Cocoa/NavigationState.mm: (WebKit::tryAppLink): (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse): * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::takeViewSnapshot): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: (WebKit::CoordinatedLayerTreeHostProxy::dispatchUpdate): * UIProcess/Databases/DatabaseProcessProxy.cpp: (WebKit::DatabaseProcessProxy::fetchWebsiteData): (WebKit::DatabaseProcessProxy::deleteWebsiteData): (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins): * UIProcess/GenericCallback.h: (WebKit::CallbackMap::put): * UIProcess/InspectorServer/WebSocketServer.cpp: (WebKit::WebSocketServer::didAcceptConnection): * UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp: (WebKit::connectionCallback): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::fetchWebsiteData): * UIProcess/Notifications/WebNotificationManagerProxy.cpp: (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications): * UIProcess/Notifications/WebNotificationProvider.cpp: (WebKit::WebNotificationProvider::clearNotifications): * UIProcess/PageLoadState.cpp: (WebKit::PageLoadState::Transaction::Transaction): * UIProcess/Plugins/PlugInAutoStartProvider.cpp: (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy): * UIProcess/Plugins/PluginProcessManager.cpp: (WebKit::PluginProcessManager::pluginProcessToken): (WebKit::PluginProcessManager::fetchWebsiteData): (WebKit::PluginProcessManager::deleteWebsiteData): (WebKit::PluginProcessManager::deleteWebsiteDataForHostNames): * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::fetchWebsiteData): (WebKit::PluginProcessProxy::deleteWebsiteData): (WebKit::PluginProcessProxy::deleteWebsiteDataForHostNames): * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree): * UIProcess/StatisticsRequest.cpp: (WebKit::StatisticsRequest::completedRequest): * UIProcess/Storage/LocalStorageDatabase.cpp: (WebKit::LocalStorageDatabase::create): (WebKit::LocalStorageDatabase::LocalStorageDatabase): * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea): (WebKit::StorageManager::StorageArea::create): (WebKit::StorageManager::StorageArea::StorageArea): (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea): (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea): (WebKit::StorageManager::getSessionStorageOrigins): (WebKit::StorageManager::getLocalStorageOrigins): (WebKit::StorageManager::getLocalStorageOriginDetails): (WebKit::StorageManager::createTransientLocalStorageMap): (WebKit::StorageManager::createSessionStorageMap): * UIProcess/UserContent/WebScriptMessageHandler.cpp: (WebKit::WebScriptMessageHandler::create): (WebKit::WebScriptMessageHandler::WebScriptMessageHandler): * UIProcess/UserContent/WebUserContentControllerProxy.cpp: (WebKit::WebUserContentControllerProxy::addUserStyleSheet): * UIProcess/ViewGestureController.cpp: (WebKit::ViewGestureController::SnapshotRemovalTracker::start): (WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackImmediately): * UIProcess/WebBackForwardList.cpp: (WebKit::WebBackForwardList::addItem): (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit): (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit): (WebKit::WebBackForwardList::removeAllItems): (WebKit::WebBackForwardList::clear): (WebKit::WebBackForwardList::restoreFromState): * UIProcess/WebCookieManagerProxy.cpp: (WebKit::WebCookieManagerProxy::getHostnamesWithCookies): (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy): * UIProcess/WebFormClient.cpp: (WebKit::WebFormClient::willSubmitForm): * UIProcess/WebFrameListenerProxy.h: (WebKit::WebFrameListenerProxy::setNavigation): * UIProcess/WebFrameProxy.h: (WebKit::WebFrameProxy::contentFilterDidBlockLoad): * UIProcess/WebGrammarDetail.cpp: (WebKit::WebGrammarDetail::guesses): * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::createInspectorPage): * UIProcess/WebMediaCacheManagerProxy.cpp: (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache): * UIProcess/WebPageProxy.cpp: (WebKit::ExceededDatabaseQuotaRecords::add): (WebKit::WebPageProxy::create): (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::setHistoryClient): (WebKit::WebPageProxy::setNavigationClient): (WebKit::WebPageProxy::setLoaderClient): (WebKit::WebPageProxy::setPolicyClient): (WebKit::WebPageProxy::setFormClient): (WebKit::WebPageProxy::setUIClient): (WebKit::WebPageProxy::setFindClient): (WebKit::WebPageProxy::setFindMatchesClient): (WebKit::WebPageProxy::setDiagnosticLoggingClient): (WebKit::WebPageProxy::setContextMenuClient): (WebKit::WebPageProxy::reattachToWebProcessForReload): (WebKit::WebPageProxy::reattachToWebProcessWithItem): (WebKit::WebPageProxy::loadRequest): (WebKit::WebPageProxy::loadFile): (WebKit::WebPageProxy::loadData): (WebKit::WebPageProxy::loadHTMLString): (WebKit::WebPageProxy::reload): (WebKit::WebPageProxy::didChangeBackForwardList): (WebKit::WebPageProxy::setInitialFocus): (WebKit::WebPageProxy::validateCommand): (WebKit::WebPageProxy::handleWheelEvent): (WebKit::WebPageProxy::processNextQueuedWheelEvent): (WebKit::WebPageProxy::restoreFromSessionState): (WebKit::WebPageProxy::runJavaScriptInMainFrame): (WebKit::WebPageProxy::getRenderTreeExternalRepresentation): (WebKit::WebPageProxy::getSourceForFrame): (WebKit::WebPageProxy::getContentsAsString): (WebKit::WebPageProxy::getBytecodeProfile): (WebKit::WebPageProxy::getContentsAsMHTMLData): (WebKit::WebPageProxy::getSelectionOrContentsAsString): (WebKit::WebPageProxy::getSelectionAsWebArchiveData): (WebKit::WebPageProxy::getMainResourceDataOfFrame): (WebKit::WebPageProxy::getResourceDataFromFrame): (WebKit::WebPageProxy::getWebArchiveOfFrame): (WebKit::WebPageProxy::decidePolicyForNavigationAction): (WebKit::WebPageProxy::decidePolicyForNewWindowAction): (WebKit::WebPageProxy::decidePolicyForResponse): (WebKit::WebPageProxy::sendMessage): (WebKit::WebPageProxy::exceededDatabaseQuota): (WebKit::WebPageProxy::getMarkedRangeAsync): (WebKit::WebPageProxy::getSelectedRangeAsync): (WebKit::WebPageProxy::characterIndexForPointAsync): (WebKit::WebPageProxy::firstRectForCharacterRangeAsync): (WebKit::WebPageProxy::takeSnapshot): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::setHistoryClient): (WebKit::WebProcessPool::setDownloadClient): (WebKit::WebProcessPool::createWebPage): (WebKit::WebProcessPool::getStatistics): (WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::createWebPage): (WebKit::WebProcessProxy::addBackForwardItem): (WebKit::WebProcessProxy::fetchWebsiteData): * UIProcess/WebsiteData/WebsiteDataRecord.cpp: (WebKit::WebsiteDataRecord::add): * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::create): (WebKit::WebsiteDataStore::WebsiteDataStore): (WebKit::WebsiteDataStore::fetchData): (WebKit::WebsiteDataStore::removeData): (WebKit::WebsiteDataStore::mediaKeyOrigins): * UIProcess/efl/InputMethodContextEfl.cpp: (WebKit::InputMethodContextEfl::InputMethodContextEfl): * UIProcess/efl/InputMethodContextEfl.h: (WebKit::InputMethodContextEfl::create): * UIProcess/efl/WebContextMenuProxyEfl.cpp: (WebKit::WebContextMenuProxyEfl::showContextMenu): * UIProcess/efl/WebUIPopupMenuClient.cpp: (WebUIPopupMenuClient::showPopupMenu): * UIProcess/gtk/InputMethodFilter.cpp: (WebKit::InputMethodFilter::filterKeyEvent): * UIProcess/gtk/KeyBindingTranslator.cpp: (WebKit::KeyBindingTranslator::commandsForKeyEvent): * UIProcess/gtk/RedirectedXCompositeWindow.cpp: (WebKit::XDamageNotifier::add): (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow): (WebKit::RedirectedXCompositeWindow::surface): * UIProcess/ios/WKActionSheetAssistant.mm: (-[WKActionSheetAssistant showImageSheet]): (-[WKActionSheetAssistant showLinkSheet]): * UIProcess/ios/WKContentView.mm: (-[WKContentView _commonInitializationWithProcessPool:configuration:]): (-[WKContentView initWithFrame:processPool:configuration:webView:]): * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView actionSheetAssistant:decideActionsForElement:defaultActions:]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKGeolocationProviderIOS geolocationAuthorizationDenied]): * UIProcess/ios/WKPDFView.mm: (-[WKPDFView actionSheetAssistant:decideActionsForElement:defaultActions:]): * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::selectWithGesture): (WebKit::WebPageProxy::updateSelectionWithTouches): (WebKit::WebPageProxy::requestAutocorrectionData): (WebKit::WebPageProxy::applyAutocorrection): (WebKit::WebPageProxy::executeEditCommand): (WebKit::WebPageProxy::selectTextWithGranularityAtPoint): (WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection): (WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection): (WebKit::WebPageProxy::selectPositionAtPoint): (WebKit::WebPageProxy::beginSelectionInDirection): (WebKit::WebPageProxy::updateSelectionWithExtentPoint): (WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary): (WebKit::WebPageProxy::requestDictationContext): (WebKit::WebPageProxy::requestAutocorrectionContext): (WebKit::WebPageProxy::getLookupContextAtPoint): (WebKit::WebPageProxy::selectWithTwoTouches): (WebKit::WebPageProxy::moveSelectionByOffset): (WebKit::WebPageProxy::focusNextAssistedNode): * UIProcess/ios/WebVideoFullscreenManagerProxy.h: * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: (WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface): * UIProcess/ios/forms/WKFileUploadPanel.mm: (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]): * UIProcess/mac/LegacySessionStateCoding.cpp: (WebKit::HistoryEntryDataEncoder::finishEncoding): (WebKit::decodeFormData): (WebKit::decodeBackForwardTreeNode): (WebKit::decodeSessionHistoryEntries): * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm: (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing): * UIProcess/mac/ViewGestureController.h: (WebKit::ViewGestureController::setCustomSwipeViews): * UIProcess/mac/ViewGestureControllerMac.mm: (WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker): * UIProcess/mac/ViewSnapshotStore.mm: (WebKit::ViewSnapshot::create): (WebKit::ViewSnapshot::ViewSnapshot): (WebKit::ViewSnapshot::setSurface): * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync): (WebKit::WebPageProxy::fontAtSelection): * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (contextMenuItems): (WKBundlePageCopyOriginsWithApplicationCache): * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: (WKBundlePageOverlayCreate): * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp: (EwkExtension::didCreatePage): * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (webkitFrameGetOrCreate): (didInitiateLoadForResource): (willSendRequestForFrame): (didReceiveResponseForResource): (didReceiveContentLengthForResource): (didFinishLoadForResource): (didFailLoadForResource): (webkitWebPageDidReceiveMessage): * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm: (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::addUserScript): (WebKit::InjectedBundle::addUserStyleSheet): * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp: (WebKit::InjectedBundleBackForwardListItem::children): * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp: (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems): * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp: (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent): (WebKit::InjectedBundlePageFormClient::willSubmitForm): (WebKit::InjectedBundlePageFormClient::didAssociateFormControls): * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp: (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame): * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::willSendRequest): * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_PostURL): * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::scheduleTimer): * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::convertStringToKeyCodes): * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm: (WebKit::PDFPlugin::PDFPlugin): * WebProcess/Plugins/PDF/PDFPlugin.mm: (-[WKPDFHUDAnimationDelegate initWithAnimationCompletionHandler:]): * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm: (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement): * WebProcess/Storage/StorageAreaMap.cpp: (WebKit::StorageAreaMap::create): (WebKit::StorageAreaMap::StorageAreaMap): * WebProcess/Storage/StorageNamespaceImpl.cpp: (WebKit::StorageNamespaceImpl::storageArea): * WebProcess/UserContent/WebUserContentController.cpp: (WebKit::WebUserContentController::addUserContentExtensions): * WebProcess/WebCoreSupport/SessionStateConversion.cpp: (WebKit::toHTTPBody): (WebKit::toFrameState): (WebKit::applyFrameState): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm): (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad): * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp: (WebKit::WebPasteboardOverrides::addOverride): * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: (WebKit::WebEditorClient::executePendingEditorCommands): * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::findStringMatches): * WebProcess/WebPage/ViewUpdateDispatcher.cpp: (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::createSubframe): (WebKit::WebFrame::create): (WebKit::WebFrame::WebFrame): (WebKit::WebFrame::didReceivePolicyDecision): (WebKit::WebFrame::childFrames): (WebKit::WebFrame::createSelectionSnapshot): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setInjectedBundleContextMenuClient): (WebKit::WebPage::setInjectedBundleFormClient): (WebKit::WebPage::setInjectedBundleUIClient): (WebKit::WebPage::trackedRepaintRects): (WebKit::WebPage::createDocumentLoader): * WebProcess/WebPage/WebPageGroupProxy.cpp: (WebKit::WebPageGroupProxy::addUserContentExtension): * WebProcess/WebPage/WebPageOverlay.cpp: (WebKit::WebPageOverlay::create): (WebKit::WebPageOverlay::WebPageOverlay): * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: (WebKit::LayerTreeHostGtk::RenderFrameScheduler::RenderFrameScheduler): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::computePagesForPrintingAndStartDrawingToPDF): * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm: (WebKit::PlatformCAAnimationRemote::setTimingFunction): (WebKit::PlatformCAAnimationRemote::setValues): (WebKit::PlatformCAAnimationRemote::setTimingFunctions): * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm: (WebKit::RemoteLayerTreeContext::layerWasCreated): (WebKit::RemoteLayerTreeContext::buildTransaction): * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm: (WebKit::RemoteLayerTreeDrawingArea::flushLayers): (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create): (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::BackingStoreFlusher): (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): (WebKit::WebProcess::transformObjectsToHandles): * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess): * WebProcess/ios/WebVideoFullscreenManager.mm: (WebKit::WebVideoFullscreenInterfaceContext::setLayerHostingContext): (WebKit::WebVideoFullscreenManager::createModelAndInterface): (WebKit::WebVideoFullscreenManager::setSeekableRanges): * WebProcess/soup/WebKitSoupRequestInputStream.cpp: (webkitSoupRequestInputStreamDidFailWithError): Source/WTF: This also removes the definition of WTF::move. * wtf/Deque.h: * wtf/HashMap.h: * wtf/HashSet.h: * wtf/HashTable.h: (WTF::HashTable::add): (WTF::KeyTraits>::HashTable): * wtf/Insertion.h: (WTF::executeInsertions): * wtf/IteratorAdaptors.h: (WTF::FilterIterator::FilterIterator): (WTF::TransformIterator::TransformIterator): (WTF::makeTransformIterator): * wtf/IteratorRange.h: (WTF::IteratorRange::IteratorRange): * wtf/ListHashSet.h: (WTF::U>::takeFirst): (WTF::U>::takeLast): * wtf/MainThread.cpp: (WTF::callOnMainThread): * wtf/MallocPtr.h: (WTF::MallocPtr::operator=): * wtf/MessageQueue.h: (WTF::MessageQueue<DataType>::append): (WTF::MessageQueue<DataType>::appendAndKill): (WTF::MessageQueue<DataType>::appendAndCheckEmpty): (WTF::MessageQueue<DataType>::prepend): * wtf/NakedPtr.h: (WTF::=): * wtf/OSObjectPtr.h: (WTF::OSObjectPtr::operator=): * wtf/Optional.h: (WTF::Optional::Optional): (WTF::Optional::operator=): * wtf/RefPtr.h: (WTF::=): * wtf/RetainPtr.h: (WTF::=): * wtf/RunLoop.cpp: (WTF::RunLoop::dispatch): * wtf/SharedTask.h: (WTF::createSharedTask): * wtf/StdLibExtras.h: (WTF::move): Deleted. * wtf/Threading.cpp: (WTF::threadEntryPoint): (WTF::createThread): * wtf/Vector.h: (WTF::Vector::takeLast): * wtf/efl/DispatchQueueEfl.cpp: (DispatchQueue::dispatch): (DispatchQueue::setSocketEventHandler): (DispatchQueue::performTimerWork): (DispatchQueue::insertTimerWorkItem): * wtf/efl/DispatchQueueWorkItemEfl.h: (WorkItem::WorkItem): (TimerWorkItem::create): (TimerWorkItem::TimerWorkItem): * wtf/efl/WorkQueueEfl.cpp: (WorkQueue::registerSocketEventHandler): (WorkQueue::dispatch): (WorkQueue::dispatchAfter): * wtf/glib/GRefPtr.h: (WTF::=): * wtf/glib/WorkQueueGLib.cpp: (WTF::DispatchAfterContext::DispatchAfterContext): (WTF::WorkQueue::dispatchAfter): * wtf/text/AtomicString.h: (WTF::AtomicString::AtomicString): (WTF::AtomicString::operator=): * wtf/text/StringConcatenate.h: (WTF::tryMakeString): * wtf/text/WTFString.cpp: (WTF::String::isolatedCopy): * wtf/text/WTFString.h: (WTF::String::String): (WTF::StringCapture::releaseString): * wtf/win/GDIObject.h: (WTF::=): Tools: * DumpRenderTree/TestRunner.h: (TestRunner::setAllowedHosts): * DumpRenderTree/win/DRTDataObject.cpp: (DRTDataObject::SetData): * TestWebKitAPI/Tests/WTF/Deque.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/HashMap.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/HashSet.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/NakedPtr.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/Ref.cpp: (TestWebKitAPI::passWithRef): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/RefPtr.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/Vector.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/WTFString.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/CalculationValue.cpp: (TestWebKitAPI::createTestValue): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::InMemoryCompiledContentExtension::createFromFilter): (TestWebKitAPI::InMemoryCompiledContentExtension::create): (TestWebKitAPI::InMemoryCompiledContentExtension::InMemoryCompiledContentExtension): (TestWebKitAPI::createNFAs): (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebCore/DFACombiner.cpp: (TestWebKitAPI::combine): * TestWebKitAPI/Tests/WebCore/DFAHelpers.h: (TestWebKitAPI::createNFAs): * TestWebKitAPI/Tests/WebKit2/cocoa/WeakObjCPtr.mm: (TEST): * TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.cpp: (WebProcessTest::add): Canonical link: https://commits.webkit.org/170734@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-01-02 08:03:08 +00:00
target[i] = WTFMove(target[i - indexOffset]);
target[firstIndex] = WTFMove(insertions[indexInInsertions].element());
fourthTier: DFG should have an SSA form for use by FTL https://bugs.webkit.org/show_bug.cgi?id=118338 Source/JavaScriptCore: Reviewed by Mark Hahnenberg. Adds an SSA form to the DFG. We can convert ThreadedCPS form into SSA form after breaking critical edges. The conversion algorithm follows Aycock and Horspool, and the SSA form itself follows something I've done before, where instead of having Phi functions specify input nodes corresponding to block predecessors, we instead have Upsilon functions in the predecessors that specify which value in that block goes into which subsequent Phi. Upsilons don't have to dominate Phis (usually they don't) and they correspond to a non-SSA "mov" into the Phi's "variable". This gives all of the good properties of SSA, while ensuring that a bunch of CFG transformations don't have to be SSA-aware. So far the only DFG phases that are SSA-aware are DCE and CFA. CFG simplification is probably SSA-aware by default, though I haven't tried it. Constant folding probably needs a few tweaks, but is likely ready. Ditto for CSE, though it's not clear that we'd want to use block-local CSE when we could be doing GVN. Currently only the FTL can generate code from the SSA form, and there is no way to convert from SSA to ThreadedCPS or LoadStore. There probably will never be such a capability. In order to handle OSR exit state in the SSA, we place MovHints at Phi points. Other than that, you can reconstruct state-at-exit by forward propagating MovHints. Note that MovHint is the new SetLocal in SSA. SetLocal and GetLocal only survive into SSA if they are on captured variables, or in the case of flushes. A "live SetLocal" will be NodeMustGenerate and will always correspond to a flush. Computing the state-at-exit requires running SSA liveness analysis, OSR availability analysis, and flush liveness analysis. The FTL runs all of these prior to generating code. While OSR exit continues to be tricky, much of the logic is now factored into separate phases and the backend has to do less work to reason about what happened outside of the basic block that is being lowered. Conversion from DFG SSA to LLVM SSA is done by ensuring that we generate code in depth-first order, thus guaranteeing that a node will always be lowered (and hence have a LValue) before any of the blocks dominated by that node's block have code generated. For Upsilon/Phi, we just use alloca's. We could do something more clever there, but it's probably not worth it, at least not now. Finally, while the SSA form is currently only being converted to LLVM IR, there is nothing that prevents us from considering other backends in the future - with the caveat that this form is designed to be first lowered to a lower-level SSA before actual machine code generation commences. So we ought to either use LLVM (the intended path) or we will have to write our own SSA low-level backend. This runs all of the code that the FTL was known to run previously. No change in performance for now. But it does open some exciting possibilities! * JavaScriptCore.xcodeproj/project.pbxproj: * bytecode/Operands.h: (JSC::OperandValueTraits::dump): (JSC::Operands::fill): (Operands): (JSC::Operands::clear): (JSC::Operands::operator==): * dfg/DFGAbstractState.cpp: (JSC::DFG::AbstractState::beginBasicBlock): (JSC::DFG::setLiveValues): (DFG): (JSC::DFG::AbstractState::initialize): (JSC::DFG::AbstractState::endBasicBlock): (JSC::DFG::AbstractState::executeEffects): (JSC::DFG::AbstractState::mergeStateAtTail): (JSC::DFG::AbstractState::merge): * dfg/DFGAbstractState.h: (AbstractState): * dfg/DFGAdjacencyList.h: (JSC::DFG::AdjacencyList::justOneChild): (AdjacencyList): * dfg/DFGBasicBlock.cpp: Added. (DFG): (JSC::DFG::BasicBlock::BasicBlock): (JSC::DFG::BasicBlock::~BasicBlock): (JSC::DFG::BasicBlock::ensureLocals): (JSC::DFG::BasicBlock::isInPhis): (JSC::DFG::BasicBlock::isInBlock): (JSC::DFG::BasicBlock::removePredecessor): (JSC::DFG::BasicBlock::replacePredecessor): (JSC::DFG::BasicBlock::dump): (JSC::DFG::BasicBlock::SSAData::SSAData): (JSC::DFG::BasicBlock::SSAData::~SSAData): * dfg/DFGBasicBlock.h: (BasicBlock): (JSC::DFG::BasicBlock::operator[]): (JSC::DFG::BasicBlock::successor): (JSC::DFG::BasicBlock::successorForCondition): (SSAData): * dfg/DFGBasicBlockInlines.h: (DFG): * dfg/DFGBlockInsertionSet.cpp: Added. (DFG): (JSC::DFG::BlockInsertionSet::BlockInsertionSet): (JSC::DFG::BlockInsertionSet::~BlockInsertionSet): (JSC::DFG::BlockInsertionSet::insert): (JSC::DFG::BlockInsertionSet::insertBefore): (JSC::DFG::BlockInsertionSet::execute): * dfg/DFGBlockInsertionSet.h: Added. (DFG): (BlockInsertionSet): * dfg/DFGCFAPhase.cpp: (JSC::DFG::CFAPhase::run): * dfg/DFGCFGSimplificationPhase.cpp: * dfg/DFGCPSRethreadingPhase.cpp: (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock): * dfg/DFGCommon.cpp: (WTF::printInternal): * dfg/DFGCommon.h: (JSC::DFG::doesKill): (DFG): (JSC::DFG::killStatusForDoesKill): * dfg/DFGConstantFoldingPhase.cpp: (JSC::DFG::ConstantFoldingPhase::foldConstants): (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter): * dfg/DFGCriticalEdgeBreakingPhase.cpp: Added. (DFG): (CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::run): (JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge): (JSC::DFG::performCriticalEdgeBreaking): * dfg/DFGCriticalEdgeBreakingPhase.h: Added. (DFG): * dfg/DFGDCEPhase.cpp: (JSC::DFG::DCEPhase::run): (JSC::DFG::DCEPhase::findTypeCheckRoot): (JSC::DFG::DCEPhase::countNode): (DCEPhase): (JSC::DFG::DCEPhase::countEdge): (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren): * dfg/DFGDriver.cpp: (JSC::DFG::compile): * dfg/DFGEdge.cpp: (JSC::DFG::Edge::dump): * dfg/DFGEdge.h: (JSC::DFG::Edge::Edge): (JSC::DFG::Edge::setNode): (JSC::DFG::Edge::useKindUnchecked): (JSC::DFG::Edge::setUseKind): (JSC::DFG::Edge::setProofStatus): (JSC::DFG::Edge::willNotHaveCheck): (JSC::DFG::Edge::willHaveCheck): (Edge): (JSC::DFG::Edge::killStatusUnchecked): (JSC::DFG::Edge::killStatus): (JSC::DFG::Edge::setKillStatus): (JSC::DFG::Edge::doesKill): (JSC::DFG::Edge::doesNotKill): (JSC::DFG::Edge::shift): (JSC::DFG::Edge::makeWord): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGFlushFormat.cpp: Added. (WTF): (WTF::printInternal): * dfg/DFGFlushFormat.h: Added. (DFG): (JSC::DFG::resultFor): (JSC::DFG::useKindFor): (WTF): * dfg/DFGFlushLivenessAnalysisPhase.cpp: Added. (DFG): (FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::run): (JSC::DFG::FlushLivenessAnalysisPhase::process): (JSC::DFG::FlushLivenessAnalysisPhase::setForNode): (JSC::DFG::FlushLivenessAnalysisPhase::flushFormat): (JSC::DFG::performFlushLivenessAnalysis): * dfg/DFGFlushLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): (JSC::DFG::Graph::dumpBlockHeader): (DFG): (JSC::DFG::Graph::addForDepthFirstSort): (JSC::DFG::Graph::getBlocksInDepthFirstOrder): * dfg/DFGGraph.h: (JSC::DFG::Graph::convertToConstant): (JSC::DFG::Graph::valueProfileFor): (Graph): * dfg/DFGInsertionSet.h: (DFG): (JSC::DFG::InsertionSet::execute): * dfg/DFGLivenessAnalysisPhase.cpp: Added. (DFG): (LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::run): (JSC::DFG::LivenessAnalysisPhase::process): (JSC::DFG::LivenessAnalysisPhase::addChildUse): (JSC::DFG::performLivenessAnalysis): * dfg/DFGLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGNode.cpp: (JSC::DFG::Node::hasVariableAccessData): (DFG): * dfg/DFGNode.h: (DFG): (Node): (JSC::DFG::Node::hasLocal): (JSC::DFG::Node::variableAccessData): (JSC::DFG::Node::hasPhi): (JSC::DFG::Node::phi): (JSC::DFG::Node::takenBlock): (JSC::DFG::Node::notTakenBlock): (JSC::DFG::Node::successor): (JSC::DFG::Node::successorForCondition): (JSC::DFG::nodeComparator): (JSC::DFG::nodeListDump): (JSC::DFG::nodeMapDump): * dfg/DFGNodeFlags.cpp: (JSC::DFG::dumpNodeFlags): * dfg/DFGNodeType.h: (DFG): * dfg/DFGOSRAvailabilityAnalysisPhase.cpp: Added. (DFG): (OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::run): (JSC::DFG::performOSRAvailabilityAnalysis): * dfg/DFGOSRAvailabilityAnalysisPhase.h: Added. (DFG): * dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): * dfg/DFGPredictionInjectionPhase.cpp: (JSC::DFG::PredictionInjectionPhase::run): * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSSAConversionPhase.cpp: Added. (DFG): (SSAConversionPhase): (JSC::DFG::SSAConversionPhase::SSAConversionPhase): (JSC::DFG::SSAConversionPhase::run): (JSC::DFG::SSAConversionPhase::forwardPhiChildren): (JSC::DFG::SSAConversionPhase::forwardPhi): (JSC::DFG::SSAConversionPhase::forwardPhiEdge): (JSC::DFG::SSAConversionPhase::deduplicateChildren): (JSC::DFG::SSAConversionPhase::addFlushedLocalOp): (JSC::DFG::SSAConversionPhase::addFlushedLocalEdge): (JSC::DFG::performSSAConversion): * dfg/DFGSSAConversionPhase.h: Added. (DFG): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (Validate): (JSC::DFG::Validate::validateCPS): * dfg/DFGVariableAccessData.h: (JSC::DFG::VariableAccessData::flushFormat): (VariableAccessData): * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToLLVM.cpp: (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::lower): (JSC::FTL::LowerDFGToLLVM::createPhiVariables): (JSC::FTL::LowerDFGToLLVM::compileBlock): (JSC::FTL::LowerDFGToLLVM::compileNode): (JSC::FTL::LowerDFGToLLVM::compileUpsilon): (LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::compilePhi): (JSC::FTL::LowerDFGToLLVM::compileJSConstant): (JSC::FTL::LowerDFGToLLVM::compileWeakJSConstant): (JSC::FTL::LowerDFGToLLVM::compileGetArgument): (JSC::FTL::LowerDFGToLLVM::compileGetLocal): (JSC::FTL::LowerDFGToLLVM::compileSetLocal): (JSC::FTL::LowerDFGToLLVM::compileAdd): (JSC::FTL::LowerDFGToLLVM::compileArithSub): (JSC::FTL::LowerDFGToLLVM::compileArithMul): (JSC::FTL::LowerDFGToLLVM::compileArithDiv): (JSC::FTL::LowerDFGToLLVM::compileArithMod): (JSC::FTL::LowerDFGToLLVM::compileArithMinOrMax): (JSC::FTL::LowerDFGToLLVM::compileArithAbs): (JSC::FTL::LowerDFGToLLVM::compileArithNegate): (JSC::FTL::LowerDFGToLLVM::compileBitAnd): (JSC::FTL::LowerDFGToLLVM::compileBitOr): (JSC::FTL::LowerDFGToLLVM::compileBitXor): (JSC::FTL::LowerDFGToLLVM::compileBitRShift): (JSC::FTL::LowerDFGToLLVM::compileBitLShift): (JSC::FTL::LowerDFGToLLVM::compileBitURShift): (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber): (JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble): (JSC::FTL::LowerDFGToLLVM::compileGetButterfly): (JSC::FTL::LowerDFGToLLVM::compileGetArrayLength): (JSC::FTL::LowerDFGToLLVM::compileGetByVal): (JSC::FTL::LowerDFGToLLVM::compileGetByOffset): (JSC::FTL::LowerDFGToLLVM::compileGetGlobalVar): (JSC::FTL::LowerDFGToLLVM::compileCompareEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareLess): (JSC::FTL::LowerDFGToLLVM::compileCompareLessEq): (JSC::FTL::LowerDFGToLLVM::compileCompareGreater): (JSC::FTL::LowerDFGToLLVM::compileCompareGreaterEq): (JSC::FTL::LowerDFGToLLVM::compileLogicalNot): (JSC::FTL::LowerDFGToLLVM::speculateBackward): (JSC::FTL::LowerDFGToLLVM::lowInt32): (JSC::FTL::LowerDFGToLLVM::lowCell): (JSC::FTL::LowerDFGToLLVM::lowBoolean): (JSC::FTL::LowerDFGToLLVM::lowDouble): (JSC::FTL::LowerDFGToLLVM::lowJSValue): (JSC::FTL::LowerDFGToLLVM::lowStorage): (JSC::FTL::LowerDFGToLLVM::speculate): (JSC::FTL::LowerDFGToLLVM::speculateBoolean): (JSC::FTL::LowerDFGToLLVM::isLive): (JSC::FTL::LowerDFGToLLVM::use): (JSC::FTL::LowerDFGToLLVM::initializeOSRExitStateForBlock): (JSC::FTL::LowerDFGToLLVM::appendOSRExit): (JSC::FTL::LowerDFGToLLVM::emitOSRExitCall): (JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode): (JSC::FTL::LowerDFGToLLVM::linkOSRExitsAndCompleteInitializationBlocks): (JSC::FTL::LowerDFGToLLVM::setInt32): (JSC::FTL::LowerDFGToLLVM::setJSValue): (JSC::FTL::LowerDFGToLLVM::setBoolean): (JSC::FTL::LowerDFGToLLVM::setStorage): (JSC::FTL::LowerDFGToLLVM::setDouble): (JSC::FTL::LowerDFGToLLVM::isValid): * ftl/FTLLoweredNodeValue.h: Added. (FTL): (LoweredNodeValue): (JSC::FTL::LoweredNodeValue::LoweredNodeValue): (JSC::FTL::LoweredNodeValue::isSet): (JSC::FTL::LoweredNodeValue::operator!): (JSC::FTL::LoweredNodeValue::value): (JSC::FTL::LoweredNodeValue::block): * ftl/FTLValueFromBlock.h: (JSC::FTL::ValueFromBlock::ValueFromBlock): (ValueFromBlock): * ftl/FTLValueSource.cpp: (JSC::FTL::ValueSource::dump): * ftl/FTLValueSource.h: Source/WTF: Reviewed by Mark Hahnenberg. - Extend variadicity of PrintStream and dataLog. - Give HashSet the ability to add a span of things. - Give HashSet the ability to == another HashSet. - Note FIXME's in HashTable concerning copying performance, that affects the way that the DFG now uses HashSets and HashMaps. - Factor out the bulk-insertion logic of JSC::DFG::InsertionSet into WTF::Insertion, so that it can be used in more places. - Create a dumper for lists and maps. * WTF.xcodeproj/project.pbxproj: * wtf/DataLog.h: (WTF): (WTF::dataLog): * wtf/HashSet.h: (HashSet): (WTF): (WTF::::add): (WTF::=): * wtf/HashTable.h: (WTF::::HashTable): (WTF::=): * wtf/Insertion.h: Added. (WTF): (Insertion): (WTF::Insertion::Insertion): (WTF::Insertion::index): (WTF::Insertion::element): (WTF::Insertion::operator<): (WTF::executeInsertions): * wtf/ListDump.h: Added. (WTF): (ListDump): (WTF::ListDump::ListDump): (WTF::ListDump::dump): (MapDump): (WTF::MapDump::MapDump): (WTF::MapDump::dump): (WTF::listDump): (WTF::sortedListDump): (WTF::lessThan): (WTF::mapDump): (WTF::sortedMapDump): * wtf/PrintStream.h: (PrintStream): (WTF::PrintStream::print): Conflicts: Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj Canonical link: https://commits.webkit.org/137058@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-07-25 04:04:45 +00:00
lastIndex = firstIndex;
}
Replace calls to Vector::resize() with calls to more efficient shrink() / grow() when applicable https://bugs.webkit.org/show_bug.cgi?id=174660 Reviewed by Geoffrey Garen. Replace calls to Vector::resize() with calls to more efficient shrink() / grow() when applicable. This essentially replaces a branch to figure out if the new size is less or greater than the current size by an assertion. Source/bmalloc: * bmalloc/Map.h: (bmalloc::Hash>::rehash): Source/JavaScriptCore: * b3/B3BasicBlockUtils.h: (JSC::B3::clearPredecessors): * b3/B3InferSwitches.cpp: * b3/B3LowerToAir.cpp: (JSC::B3::Air::LowerToAir::finishAppendingInstructions): * b3/B3ReduceStrength.cpp: * b3/B3SparseCollection.h: (JSC::B3::SparseCollection::packIndices): * b3/B3UseCounts.cpp: (JSC::B3::UseCounts::UseCounts): * b3/air/AirAllocateRegistersAndStackByLinearScan.cpp: * b3/air/AirEmitShuffle.cpp: (JSC::B3::Air::emitShuffle): * b3/air/AirLowerAfterRegAlloc.cpp: (JSC::B3::Air::lowerAfterRegAlloc): * b3/air/AirOptimizeBlockOrder.cpp: (JSC::B3::Air::optimizeBlockOrder): * bytecode/Operands.h: (JSC::Operands::ensureLocals): * bytecode/PreciseJumpTargets.cpp: (JSC::computePreciseJumpTargetsInternal): * dfg/DFGBlockInsertionSet.cpp: (JSC::DFG::BlockInsertionSet::execute): * dfg/DFGBlockMapInlines.h: (JSC::DFG::BlockMap<T>::BlockMap): * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::processSetLocalQueue): (JSC::DFG::ByteCodeParser::clearCaches): * dfg/DFGDisassembler.cpp: (JSC::DFG::Disassembler::Disassembler): * dfg/DFGFlowIndexing.cpp: (JSC::DFG::FlowIndexing::recompute): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::registerFrozenValues): * dfg/DFGInPlaceAbstractState.cpp: (JSC::DFG::setLiveValues): * dfg/DFGLICMPhase.cpp: (JSC::DFG::LICMPhase::run): * dfg/DFGLivenessAnalysisPhase.cpp: * dfg/DFGNaturalLoops.cpp: (JSC::DFG::NaturalLoops::NaturalLoops): * dfg/DFGStoreBarrierClusteringPhase.cpp: * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileNode): * heap/CodeBlockSet.cpp: (JSC::CodeBlockSet::deleteUnmarkedAndUnreferenced): * heap/MarkedSpace.cpp: (JSC::MarkedSpace::sweepLargeAllocations): * inspector/ContentSearchUtilities.cpp: (Inspector::ContentSearchUtilities::findMagicComment): * interpreter/ShadowChicken.cpp: (JSC::ShadowChicken::update): * parser/ASTBuilder.h: (JSC::ASTBuilder::shrinkOperandStackBy): * parser/Lexer.h: (JSC::Lexer::setOffset): * runtime/RegExpInlines.h: (JSC::RegExp::matchInline): * runtime/RegExpPrototype.cpp: (JSC::genericSplit): * yarr/RegularExpression.cpp: (JSC::Yarr::RegularExpression::match): Source/WebCore: * Modules/gamepad/Gamepad.cpp: (WebCore::Gamepad::Gamepad): * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::addReaction): * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::skipBuffer): * Modules/websockets/WebSocketDeflater.cpp: (WebCore::WebSocketDeflater::finish): * contentextensions/ContentExtensionCompiler.cpp: (WebCore::ContentExtensions::serializeSelector): * contentextensions/DFABytecodeCompiler.cpp: (WebCore::ContentExtensions::append): * crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp: (WebCore::gcryptEncrypt): (WebCore::gcryptDecrypt): * crypto/gcrypt/CryptoAlgorithmECDHGCrypt.cpp: (WebCore::gcryptDerive): * platform/gamepad/cocoa/GameControllerGamepadProvider.mm: (WebCore::GameControllerGamepadProvider::controllerDidConnect): * platform/gamepad/mac/HIDGamepadProvider.cpp: (WebCore::HIDGamepadProvider::deviceAdded): * platform/graphics/ImageBackingStore.h: (WebCore::ImageBackingStore::setSize): * platform/graphics/WOFFFileFormat.cpp: * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues): * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::resetCueValues): (WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer): * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp: (WebCore::InbandTextTrackPrivateAVCF::readNativeSampleBuffer): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::cfData): * platform/image-decoders/bmp/BMPImageDecoder.cpp: (WebCore::BMPImageDecoder::frameBufferAtIndex): * platform/image-decoders/ico/ICOImageDecoder.cpp: (WebCore::ICOImageDecoder::decode): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::JPEGImageDecoder::frameBufferAtIndex): * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageDecoder::frameBufferAtIndex): (WebCore::PNGImageDecoder::readChunks): * platform/image-decoders/webp/WEBPImageDecoder.cpp: (WebCore::WEBPImageDecoder::frameBufferAtIndex): * platform/image-encoders/JPEGImageEncoder.cpp: (WebCore::compressRGBABigEndianToJPEG): * platform/text/DecodeEscapeSequences.h: (WebCore::URLEscapeSequence::decodeRun): * platform/text/SuffixTree.h: (WebCore::SuffixTree::Node::Node): * rendering/Grid.cpp: (WebCore::Grid::setNeedsItemsPlacement): * rendering/RenderTable.cpp: (WebCore::RenderTable::invalidateCachedColumns): Source/WebKit: * Platform/IPC/ArgumentCoders.h: * UIProcess/Gamepad/UIGamepadProvider.cpp: (WebKit::UIGamepadProvider::platformGamepadConnected): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::setInitialConnectedGamepads): * WebProcess/Network/WebLoaderStrategy.cpp: (WebKit::WebLoaderStrategy::loadResourceSynchronously): * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp: (WebKit::WebPasteboardOverrides::getDataForOverride): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::requestAutocorrectionData): Source/WebKitLegacy/mac: * Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]): Source/WTF: * wtf/IndexSparseSet.h: (WTF::OverflowHandler>::IndexSparseSet): (WTF::OverflowHandler>::clear): * wtf/Insertion.h: (WTF::executeInsertions): * wtf/RangeSet.h: (WTF::RangeSet::compact): * wtf/Vector.h: (WTF::removeRepeatedElements): * wtf/persistence/Coders.h: Canonical link: https://commits.webkit.org/191511@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-20 21:06:12 +00:00
insertions.shrink(0);
Source/JavaScriptCore: DFG and FTL should constant-fold RegExpExec, RegExpTest, and StringReplace https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. This enables constant-folding of RegExpExec, RegExpTest, and StringReplace. It's now possible to run Yarr on the JIT threads. Since previous work on constant-folding strings gave the DFG an API for reasoning about JSString constants in terms of JIT-thread-local WTF::Strings, it's now super easy to just pass strings to Yarr and build IR based on the results. But RegExpExec is hard: the folded version still must allocate a RegExpMatchesArray. We must use the same Structure that the code would have used or else we'll pollute the program's inline caches. Also, RegExpMatchesArray.h|cpp will allocate the array and its named properties in one go - we don't want to lose that optimization. So, this patch enables MaterializeNewObject to allocate objects or arrays with any number of indexed or named properties. Previously it could only handle objects (but not arrays) and named properties (but not indexed ones). This also adds a few minor things for setting the RegExpConstructor cached result. This is about a 2x speed-up on microbenchmarks when we fold a match success and about a 8x speed-up when we fold a match failure. It's a 10% speed-up on Octane/regexp. * JavaScriptCore.xcodeproj/project.pbxproj: * dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): * dfg/DFGClobberize.h: (JSC::DFG::clobberize): * dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): * dfg/DFGInsertionSet.cpp: (JSC::DFG::InsertionSet::insertSlow): (JSC::DFG::InsertionSet::execute): * dfg/DFGInsertionSet.h: (JSC::DFG::InsertionSet::insertCheck): * dfg/DFGLazyJSValue.cpp: (JSC::DFG::LazyJSValue::tryGetString): * dfg/DFGMayExit.cpp: (JSC::DFG::mayExit): * dfg/DFGNode.h: (JSC::DFG::StackAccessData::flushedAt): (JSC::DFG::OpInfo::OpInfo): Deleted. * dfg/DFGNodeType.h: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGObjectMaterializationData.cpp: (JSC::DFG::ObjectMaterializationData::dump): (JSC::DFG::PhantomPropertyValue::dump): Deleted. (JSC::DFG::ObjectMaterializationData::oneWaySimilarityScore): Deleted. (JSC::DFG::ObjectMaterializationData::similarityScore): Deleted. * dfg/DFGObjectMaterializationData.h: (JSC::DFG::PhantomPropertyValue::PhantomPropertyValue): Deleted. (JSC::DFG::PhantomPropertyValue::operator==): Deleted. * dfg/DFGOpInfo.h: Added. (JSC::DFG::OpInfo::OpInfo): * dfg/DFGOperations.cpp: * dfg/DFGOperations.h: * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGPromotedHeapLocation.cpp: (WTF::printInternal): * dfg/DFGPromotedHeapLocation.h: * dfg/DFGSafeToExecute.h: (JSC::DFG::safeToExecute): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::~SpeculativeJIT): (JSC::DFG::SpeculativeJIT::emitAllocateRawObject): (JSC::DFG::SpeculativeJIT::emitGetLength): (JSC::DFG::SpeculativeJIT::compileLazyJSConstant): (JSC::DFG::SpeculativeJIT::compileMaterializeNewObject): (JSC::DFG::SpeculativeJIT::compileRecordRegExpCachedResult): (JSC::DFG::SpeculativeJIT::emitAllocateJSArray): Deleted. * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::emitAllocateDestructibleObject): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGStrengthReductionPhase.cpp: (JSC::DFG::StrengthReductionPhase::StrengthReductionPhase): (JSC::DFG::StrengthReductionPhase::handleNode): (JSC::DFG::StrengthReductionPhase::handleCommutativity): (JSC::DFG::StrengthReductionPhase::executeInsertionSet): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (JSC::DFG::Validate::validateCPS): * ftl/FTLAbstractHeapRepository.cpp: * ftl/FTLAbstractHeapRepository.h: * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileNode): (JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSize): (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject): (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeCreateActivation): (JSC::FTL::DFG::LowerDFGToB3::compileSetRegExpObjectLastIndex): (JSC::FTL::DFG::LowerDFGToB3::compileRecordRegExpCachedResult): (JSC::FTL::DFG::LowerDFGToB3::didOverflowStack): (JSC::FTL::DFG::LowerDFGToB3::storageForTransition): (JSC::FTL::DFG::LowerDFGToB3::initializeArrayElements): (JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorage): (JSC::FTL::DFG::LowerDFGToB3::isNotCellOrMisc): (JSC::FTL::DFG::LowerDFGToB3::unboxDouble): * ftl/FTLOperations.cpp: (JSC::FTL::operationPopulateObjectInOSR): (JSC::FTL::operationNewObjectWithButterfly): Deleted. * ftl/FTLOperations.h: * inspector/ContentSearchUtilities.cpp: * runtime/JSObject.h: (JSC::JSObject::createRawObject): (JSC::JSFinalObject::create): * runtime/RegExp.cpp: (JSC::RegExp::compile): (JSC::RegExp::match): (JSC::RegExp::matchConcurrently): (JSC::RegExp::compileMatchOnly): (JSC::RegExp::deleteCode): * runtime/RegExp.h: * runtime/RegExpCachedResult.h: (JSC::RegExpCachedResult::offsetOfLastRegExp): (JSC::RegExpCachedResult::offsetOfLastInput): (JSC::RegExpCachedResult::offsetOfResult): (JSC::RegExpCachedResult::offsetOfReified): * runtime/RegExpConstructor.h: (JSC::RegExpConstructor::offsetOfCachedResult): * runtime/RegExpInlines.h: (JSC::RegExp::hasCodeFor): (JSC::RegExp::compileIfNecessary): (JSC::RegExp::matchInline): (JSC::RegExp::hasMatchOnlyCodeFor): (JSC::RegExp::compileIfNecessaryMatchOnly): * runtime/RegExpObjectInlines.h: (JSC::RegExpObject::execInline): * runtime/StringPrototype.cpp: (JSC::substituteBackreferencesSlow): (JSC::substituteBackreferencesInline): (JSC::substituteBackreferences): (JSC::StringRange::StringRange): * runtime/StringPrototype.h: * runtime/VM.h: * tests/stress/simple-regexp-exec-folding-fail.js: Added. (foo): * tests/stress/simple-regexp-exec-folding.js: Added. (foo): * tests/stress/simple-regexp-test-folding-fail.js: Added. (foo): * tests/stress/simple-regexp-test-folding.js: Added. (foo): * yarr/RegularExpression.cpp: * yarr/Yarr.h: * yarr/YarrInterpreter.cpp: (JSC::Yarr::Interpreter::interpret): (JSC::Yarr::ByteCompiler::ByteCompiler): (JSC::Yarr::ByteCompiler::compile): (JSC::Yarr::ByteCompiler::checkInput): (JSC::Yarr::byteCompile): (JSC::Yarr::interpret): * yarr/YarrInterpreter.h: (JSC::Yarr::BytecodePattern::BytecodePattern): Source/WTF: DFG and FTL should constant-fold RegExpExec https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. Make executeInsertions() return the amount by which the vector increased in size. This is a convenient feature that I use in DFG::InsertionSet. * wtf/Insertion.h: (WTF::executeInsertions): LayoutTests: DFG and FTL should constant-fold RegExpExec https://bugs.webkit.org/show_bug.cgi?id=155270 Reviewed by Saam Barati. * js/regress/script-tests/simple-regexp-exec-folding-fail.js: Added. * js/regress/script-tests/simple-regexp-exec-folding.js: Added. * js/regress/script-tests/simple-regexp-test-folding-fail.js: Added. * js/regress/script-tests/simple-regexp-test-folding.js: Added. * js/regress/simple-regexp-exec-folding-expected.txt: Added. * js/regress/simple-regexp-exec-folding-fail-expected.txt: Added. * js/regress/simple-regexp-exec-folding-fail.html: Added. * js/regress/simple-regexp-exec-folding.html: Added. * js/regress/simple-regexp-test-folding-expected.txt: Added. * js/regress/simple-regexp-test-folding-fail-expected.txt: Added. * js/regress/simple-regexp-test-folding-fail.html: Added. * js/regress/simple-regexp-test-folding.html: Added. Canonical link: https://commits.webkit.org/174348@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-05 22:13:16 +00:00
return numInsertions;
fourthTier: DFG should have an SSA form for use by FTL https://bugs.webkit.org/show_bug.cgi?id=118338 Source/JavaScriptCore: Reviewed by Mark Hahnenberg. Adds an SSA form to the DFG. We can convert ThreadedCPS form into SSA form after breaking critical edges. The conversion algorithm follows Aycock and Horspool, and the SSA form itself follows something I've done before, where instead of having Phi functions specify input nodes corresponding to block predecessors, we instead have Upsilon functions in the predecessors that specify which value in that block goes into which subsequent Phi. Upsilons don't have to dominate Phis (usually they don't) and they correspond to a non-SSA "mov" into the Phi's "variable". This gives all of the good properties of SSA, while ensuring that a bunch of CFG transformations don't have to be SSA-aware. So far the only DFG phases that are SSA-aware are DCE and CFA. CFG simplification is probably SSA-aware by default, though I haven't tried it. Constant folding probably needs a few tweaks, but is likely ready. Ditto for CSE, though it's not clear that we'd want to use block-local CSE when we could be doing GVN. Currently only the FTL can generate code from the SSA form, and there is no way to convert from SSA to ThreadedCPS or LoadStore. There probably will never be such a capability. In order to handle OSR exit state in the SSA, we place MovHints at Phi points. Other than that, you can reconstruct state-at-exit by forward propagating MovHints. Note that MovHint is the new SetLocal in SSA. SetLocal and GetLocal only survive into SSA if they are on captured variables, or in the case of flushes. A "live SetLocal" will be NodeMustGenerate and will always correspond to a flush. Computing the state-at-exit requires running SSA liveness analysis, OSR availability analysis, and flush liveness analysis. The FTL runs all of these prior to generating code. While OSR exit continues to be tricky, much of the logic is now factored into separate phases and the backend has to do less work to reason about what happened outside of the basic block that is being lowered. Conversion from DFG SSA to LLVM SSA is done by ensuring that we generate code in depth-first order, thus guaranteeing that a node will always be lowered (and hence have a LValue) before any of the blocks dominated by that node's block have code generated. For Upsilon/Phi, we just use alloca's. We could do something more clever there, but it's probably not worth it, at least not now. Finally, while the SSA form is currently only being converted to LLVM IR, there is nothing that prevents us from considering other backends in the future - with the caveat that this form is designed to be first lowered to a lower-level SSA before actual machine code generation commences. So we ought to either use LLVM (the intended path) or we will have to write our own SSA low-level backend. This runs all of the code that the FTL was known to run previously. No change in performance for now. But it does open some exciting possibilities! * JavaScriptCore.xcodeproj/project.pbxproj: * bytecode/Operands.h: (JSC::OperandValueTraits::dump): (JSC::Operands::fill): (Operands): (JSC::Operands::clear): (JSC::Operands::operator==): * dfg/DFGAbstractState.cpp: (JSC::DFG::AbstractState::beginBasicBlock): (JSC::DFG::setLiveValues): (DFG): (JSC::DFG::AbstractState::initialize): (JSC::DFG::AbstractState::endBasicBlock): (JSC::DFG::AbstractState::executeEffects): (JSC::DFG::AbstractState::mergeStateAtTail): (JSC::DFG::AbstractState::merge): * dfg/DFGAbstractState.h: (AbstractState): * dfg/DFGAdjacencyList.h: (JSC::DFG::AdjacencyList::justOneChild): (AdjacencyList): * dfg/DFGBasicBlock.cpp: Added. (DFG): (JSC::DFG::BasicBlock::BasicBlock): (JSC::DFG::BasicBlock::~BasicBlock): (JSC::DFG::BasicBlock::ensureLocals): (JSC::DFG::BasicBlock::isInPhis): (JSC::DFG::BasicBlock::isInBlock): (JSC::DFG::BasicBlock::removePredecessor): (JSC::DFG::BasicBlock::replacePredecessor): (JSC::DFG::BasicBlock::dump): (JSC::DFG::BasicBlock::SSAData::SSAData): (JSC::DFG::BasicBlock::SSAData::~SSAData): * dfg/DFGBasicBlock.h: (BasicBlock): (JSC::DFG::BasicBlock::operator[]): (JSC::DFG::BasicBlock::successor): (JSC::DFG::BasicBlock::successorForCondition): (SSAData): * dfg/DFGBasicBlockInlines.h: (DFG): * dfg/DFGBlockInsertionSet.cpp: Added. (DFG): (JSC::DFG::BlockInsertionSet::BlockInsertionSet): (JSC::DFG::BlockInsertionSet::~BlockInsertionSet): (JSC::DFG::BlockInsertionSet::insert): (JSC::DFG::BlockInsertionSet::insertBefore): (JSC::DFG::BlockInsertionSet::execute): * dfg/DFGBlockInsertionSet.h: Added. (DFG): (BlockInsertionSet): * dfg/DFGCFAPhase.cpp: (JSC::DFG::CFAPhase::run): * dfg/DFGCFGSimplificationPhase.cpp: * dfg/DFGCPSRethreadingPhase.cpp: (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock): * dfg/DFGCommon.cpp: (WTF::printInternal): * dfg/DFGCommon.h: (JSC::DFG::doesKill): (DFG): (JSC::DFG::killStatusForDoesKill): * dfg/DFGConstantFoldingPhase.cpp: (JSC::DFG::ConstantFoldingPhase::foldConstants): (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter): * dfg/DFGCriticalEdgeBreakingPhase.cpp: Added. (DFG): (CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::CriticalEdgeBreakingPhase): (JSC::DFG::CriticalEdgeBreakingPhase::run): (JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge): (JSC::DFG::performCriticalEdgeBreaking): * dfg/DFGCriticalEdgeBreakingPhase.h: Added. (DFG): * dfg/DFGDCEPhase.cpp: (JSC::DFG::DCEPhase::run): (JSC::DFG::DCEPhase::findTypeCheckRoot): (JSC::DFG::DCEPhase::countNode): (DCEPhase): (JSC::DFG::DCEPhase::countEdge): (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren): * dfg/DFGDriver.cpp: (JSC::DFG::compile): * dfg/DFGEdge.cpp: (JSC::DFG::Edge::dump): * dfg/DFGEdge.h: (JSC::DFG::Edge::Edge): (JSC::DFG::Edge::setNode): (JSC::DFG::Edge::useKindUnchecked): (JSC::DFG::Edge::setUseKind): (JSC::DFG::Edge::setProofStatus): (JSC::DFG::Edge::willNotHaveCheck): (JSC::DFG::Edge::willHaveCheck): (Edge): (JSC::DFG::Edge::killStatusUnchecked): (JSC::DFG::Edge::killStatus): (JSC::DFG::Edge::setKillStatus): (JSC::DFG::Edge::doesKill): (JSC::DFG::Edge::doesNotKill): (JSC::DFG::Edge::shift): (JSC::DFG::Edge::makeWord): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGFlushFormat.cpp: Added. (WTF): (WTF::printInternal): * dfg/DFGFlushFormat.h: Added. (DFG): (JSC::DFG::resultFor): (JSC::DFG::useKindFor): (WTF): * dfg/DFGFlushLivenessAnalysisPhase.cpp: Added. (DFG): (FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::FlushLivenessAnalysisPhase): (JSC::DFG::FlushLivenessAnalysisPhase::run): (JSC::DFG::FlushLivenessAnalysisPhase::process): (JSC::DFG::FlushLivenessAnalysisPhase::setForNode): (JSC::DFG::FlushLivenessAnalysisPhase::flushFormat): (JSC::DFG::performFlushLivenessAnalysis): * dfg/DFGFlushLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): (JSC::DFG::Graph::dumpBlockHeader): (DFG): (JSC::DFG::Graph::addForDepthFirstSort): (JSC::DFG::Graph::getBlocksInDepthFirstOrder): * dfg/DFGGraph.h: (JSC::DFG::Graph::convertToConstant): (JSC::DFG::Graph::valueProfileFor): (Graph): * dfg/DFGInsertionSet.h: (DFG): (JSC::DFG::InsertionSet::execute): * dfg/DFGLivenessAnalysisPhase.cpp: Added. (DFG): (LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): (JSC::DFG::LivenessAnalysisPhase::run): (JSC::DFG::LivenessAnalysisPhase::process): (JSC::DFG::LivenessAnalysisPhase::addChildUse): (JSC::DFG::performLivenessAnalysis): * dfg/DFGLivenessAnalysisPhase.h: Added. (DFG): * dfg/DFGNode.cpp: (JSC::DFG::Node::hasVariableAccessData): (DFG): * dfg/DFGNode.h: (DFG): (Node): (JSC::DFG::Node::hasLocal): (JSC::DFG::Node::variableAccessData): (JSC::DFG::Node::hasPhi): (JSC::DFG::Node::phi): (JSC::DFG::Node::takenBlock): (JSC::DFG::Node::notTakenBlock): (JSC::DFG::Node::successor): (JSC::DFG::Node::successorForCondition): (JSC::DFG::nodeComparator): (JSC::DFG::nodeListDump): (JSC::DFG::nodeMapDump): * dfg/DFGNodeFlags.cpp: (JSC::DFG::dumpNodeFlags): * dfg/DFGNodeType.h: (DFG): * dfg/DFGOSRAvailabilityAnalysisPhase.cpp: Added. (DFG): (OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::OSRAvailabilityAnalysisPhase): (JSC::DFG::OSRAvailabilityAnalysisPhase::run): (JSC::DFG::performOSRAvailabilityAnalysis): * dfg/DFGOSRAvailabilityAnalysisPhase.h: Added. (DFG): * dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): * dfg/DFGPredictionInjectionPhase.cpp: (JSC::DFG::PredictionInjectionPhase::run): * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSSAConversionPhase.cpp: Added. (DFG): (SSAConversionPhase): (JSC::DFG::SSAConversionPhase::SSAConversionPhase): (JSC::DFG::SSAConversionPhase::run): (JSC::DFG::SSAConversionPhase::forwardPhiChildren): (JSC::DFG::SSAConversionPhase::forwardPhi): (JSC::DFG::SSAConversionPhase::forwardPhiEdge): (JSC::DFG::SSAConversionPhase::deduplicateChildren): (JSC::DFG::SSAConversionPhase::addFlushedLocalOp): (JSC::DFG::SSAConversionPhase::addFlushedLocalEdge): (JSC::DFG::performSSAConversion): * dfg/DFGSSAConversionPhase.h: Added. (DFG): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGValidate.cpp: (JSC::DFG::Validate::validate): (Validate): (JSC::DFG::Validate::validateCPS): * dfg/DFGVariableAccessData.h: (JSC::DFG::VariableAccessData::flushFormat): (VariableAccessData): * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToLLVM.cpp: (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::lower): (JSC::FTL::LowerDFGToLLVM::createPhiVariables): (JSC::FTL::LowerDFGToLLVM::compileBlock): (JSC::FTL::LowerDFGToLLVM::compileNode): (JSC::FTL::LowerDFGToLLVM::compileUpsilon): (LowerDFGToLLVM): (JSC::FTL::LowerDFGToLLVM::compilePhi): (JSC::FTL::LowerDFGToLLVM::compileJSConstant): (JSC::FTL::LowerDFGToLLVM::compileWeakJSConstant): (JSC::FTL::LowerDFGToLLVM::compileGetArgument): (JSC::FTL::LowerDFGToLLVM::compileGetLocal): (JSC::FTL::LowerDFGToLLVM::compileSetLocal): (JSC::FTL::LowerDFGToLLVM::compileAdd): (JSC::FTL::LowerDFGToLLVM::compileArithSub): (JSC::FTL::LowerDFGToLLVM::compileArithMul): (JSC::FTL::LowerDFGToLLVM::compileArithDiv): (JSC::FTL::LowerDFGToLLVM::compileArithMod): (JSC::FTL::LowerDFGToLLVM::compileArithMinOrMax): (JSC::FTL::LowerDFGToLLVM::compileArithAbs): (JSC::FTL::LowerDFGToLLVM::compileArithNegate): (JSC::FTL::LowerDFGToLLVM::compileBitAnd): (JSC::FTL::LowerDFGToLLVM::compileBitOr): (JSC::FTL::LowerDFGToLLVM::compileBitXor): (JSC::FTL::LowerDFGToLLVM::compileBitRShift): (JSC::FTL::LowerDFGToLLVM::compileBitLShift): (JSC::FTL::LowerDFGToLLVM::compileBitURShift): (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber): (JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble): (JSC::FTL::LowerDFGToLLVM::compileGetButterfly): (JSC::FTL::LowerDFGToLLVM::compileGetArrayLength): (JSC::FTL::LowerDFGToLLVM::compileGetByVal): (JSC::FTL::LowerDFGToLLVM::compileGetByOffset): (JSC::FTL::LowerDFGToLLVM::compileGetGlobalVar): (JSC::FTL::LowerDFGToLLVM::compileCompareEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareLess): (JSC::FTL::LowerDFGToLLVM::compileCompareLessEq): (JSC::FTL::LowerDFGToLLVM::compileCompareGreater): (JSC::FTL::LowerDFGToLLVM::compileCompareGreaterEq): (JSC::FTL::LowerDFGToLLVM::compileLogicalNot): (JSC::FTL::LowerDFGToLLVM::speculateBackward): (JSC::FTL::LowerDFGToLLVM::lowInt32): (JSC::FTL::LowerDFGToLLVM::lowCell): (JSC::FTL::LowerDFGToLLVM::lowBoolean): (JSC::FTL::LowerDFGToLLVM::lowDouble): (JSC::FTL::LowerDFGToLLVM::lowJSValue): (JSC::FTL::LowerDFGToLLVM::lowStorage): (JSC::FTL::LowerDFGToLLVM::speculate): (JSC::FTL::LowerDFGToLLVM::speculateBoolean): (JSC::FTL::LowerDFGToLLVM::isLive): (JSC::FTL::LowerDFGToLLVM::use): (JSC::FTL::LowerDFGToLLVM::initializeOSRExitStateForBlock): (JSC::FTL::LowerDFGToLLVM::appendOSRExit): (JSC::FTL::LowerDFGToLLVM::emitOSRExitCall): (JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode): (JSC::FTL::LowerDFGToLLVM::linkOSRExitsAndCompleteInitializationBlocks): (JSC::FTL::LowerDFGToLLVM::setInt32): (JSC::FTL::LowerDFGToLLVM::setJSValue): (JSC::FTL::LowerDFGToLLVM::setBoolean): (JSC::FTL::LowerDFGToLLVM::setStorage): (JSC::FTL::LowerDFGToLLVM::setDouble): (JSC::FTL::LowerDFGToLLVM::isValid): * ftl/FTLLoweredNodeValue.h: Added. (FTL): (LoweredNodeValue): (JSC::FTL::LoweredNodeValue::LoweredNodeValue): (JSC::FTL::LoweredNodeValue::isSet): (JSC::FTL::LoweredNodeValue::operator!): (JSC::FTL::LoweredNodeValue::value): (JSC::FTL::LoweredNodeValue::block): * ftl/FTLValueFromBlock.h: (JSC::FTL::ValueFromBlock::ValueFromBlock): (ValueFromBlock): * ftl/FTLValueSource.cpp: (JSC::FTL::ValueSource::dump): * ftl/FTLValueSource.h: Source/WTF: Reviewed by Mark Hahnenberg. - Extend variadicity of PrintStream and dataLog. - Give HashSet the ability to add a span of things. - Give HashSet the ability to == another HashSet. - Note FIXME's in HashTable concerning copying performance, that affects the way that the DFG now uses HashSets and HashMaps. - Factor out the bulk-insertion logic of JSC::DFG::InsertionSet into WTF::Insertion, so that it can be used in more places. - Create a dumper for lists and maps. * WTF.xcodeproj/project.pbxproj: * wtf/DataLog.h: (WTF): (WTF::dataLog): * wtf/HashSet.h: (HashSet): (WTF): (WTF::::add): (WTF::=): * wtf/HashTable.h: (WTF::::HashTable): (WTF::=): * wtf/Insertion.h: Added. (WTF): (Insertion): (WTF::Insertion::Insertion): (WTF::Insertion::index): (WTF::Insertion::element): (WTF::Insertion::operator<): (WTF::executeInsertions): * wtf/ListDump.h: Added. (WTF): (ListDump): (WTF::ListDump::ListDump): (WTF::ListDump::dump): (MapDump): (WTF::MapDump::MapDump): (WTF::MapDump::dump): (WTF::listDump): (WTF::sortedListDump): (WTF::lessThan): (WTF::mapDump): (WTF::sortedMapDump): * wtf/PrintStream.h: (PrintStream): (WTF::PrintStream::print): Conflicts: Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj Canonical link: https://commits.webkit.org/137058@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-07-25 04:04:45 +00:00
}
} // namespace WTF
using WTF::Insertion;
using WTF::executeInsertions;