fourthTier: NaturalLoops should be able to quickly answer questions like "what loops...
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jul 2013 04:04:51 +0000 (04:04 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jul 2013 04:04:51 +0000 (04:04 +0000)
commit0f4e5f5e132c9c6ec5143a5c652a469e961852ee
treeec1a9f45356b27b1d6cf334e1470113a5c10602e
parentf6cecea4b553e625560dd74a4cca501440128b35
fourthTier: NaturalLoops should be able to quickly answer questions like "what loops own this basic block"
https://bugs.webkit.org/show_bug.cgi?id=118750

Source/JavaScriptCore:

Reviewed by Mark Hahnenberg.

* dfg/DFGBasicBlock.h:
(BasicBlock):
* dfg/DFGNaturalLoops.cpp:
(JSC::DFG::NaturalLoops::compute):
(JSC::DFG::NaturalLoops::loopsOf):
* dfg/DFGNaturalLoops.h:
(DFG):
(JSC::DFG::NaturalLoop::NaturalLoop):
(NaturalLoop):
(JSC::DFG::NaturalLoop::index):
(JSC::DFG::NaturalLoop::isOuterMostLoop):
(JSC::DFG::NaturalLoop::addBlock):
(JSC::DFG::NaturalLoops::headerOf):
(JSC::DFG::NaturalLoops::innerMostLoopOf):
(NaturalLoops):
(JSC::DFG::NaturalLoops::innerMostOuterLoop):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):

Source/WTF:

Reviewed by Mark Hahnenberg.

Add a utility function for inserting an element into a vector that has bounded size,
and where the insertion causes things to drop off the end.

* wtf/StdLibExtras.h:
(WTF):
(WTF::insertIntoBoundedVector):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGBasicBlock.h
Source/JavaScriptCore/dfg/DFGNaturalLoops.cpp
Source/JavaScriptCore/dfg/DFGNaturalLoops.h
Source/JavaScriptCore/dfg/DFGPlan.cpp
Source/WTF/ChangeLog
Source/WTF/wtf/StdLibExtras.h