[JSC] DFG::Node should not have its own allocator
https://bugs.webkit.org/show_bug.cgi?id=160098
Patch by Benjamin Poulain <[email protected]> on 2016-07-25
Reviewed by Geoffrey Garen.
We need some design changes for DFG::Node:
-Accessing the index must be fast. B3 uses indices for sets
and maps, it is a lot faster than hashing pointers.
-We should be able to subclass DFG::Node to specialize it.
- CMakeLists.txt:
- JavaScriptCore.xcodeproj/project.pbxproj:
- dfg/DFGAllocator.h: Removed.
(JSC::DFG::Allocator::Region::size): Deleted.
(JSC::DFG::Allocator::Region::headerSize): Deleted.
(JSC::DFG::Allocator::Region::numberOfThingsPerRegion): Deleted.
(JSC::DFG::Allocator::Region::data): Deleted.
(JSC::DFG::Allocator::Region::isInThisRegion): Deleted.
(JSC::DFG::Allocator::Region::regionFor): Deleted.
(JSC::DFG::Allocator<T>::Allocator): Deleted.
(JSC::DFG::Allocator<T>::~Allocator): Deleted.
(JSC::DFG::Allocator<T>::allocate): Deleted.
(JSC::DFG::Allocator<T>::free): Deleted.
(JSC::DFG::Allocator<T>::freeAll): Deleted.
(JSC::DFG::Allocator<T>::reset): Deleted.
(JSC::DFG::Allocator<T>::indexOf): Deleted.
(JSC::DFG::Allocator<T>::allocatorOf): Deleted.
(JSC::DFG::Allocator<T>::bumpAllocate): Deleted.
(JSC::DFG::Allocator<T>::freeListAllocate): Deleted.
(JSC::DFG::Allocator<T>::allocateSlow): Deleted.
(JSC::DFG::Allocator<T>::freeRegionsStartingAt): Deleted.
(JSC::DFG::Allocator<T>::startBumpingIn): Deleted.
- dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::addToGraph):
- dfg/DFGCPSRethreadingPhase.cpp:
(JSC::DFG::CPSRethreadingPhase::freeUnnecessaryNodes):
(JSC::DFG::CPSRethreadingPhase::addPhiSilently):
(JSC::DFG::CleanUpPhase::run):
- dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::run):
- dfg/DFGConstantHoistingPhase.cpp:
- dfg/DFGDCEPhase.cpp:
(JSC::DFG::DCEPhase::fixupBlock):
(JSC::DFG::compileImpl):
(JSC::DFG::Graph::Graph):
(JSC::DFG::Graph::deleteNode):
(JSC::DFG::Graph::killBlockAndItsContents):
(JSC::DFG::Graph::~Graph): Deleted.
(JSC::DFG::Graph::addNode):
(JSC::DFG::LICMPhase::attemptHoist):
- dfg/DFGLongLivedState.cpp: Removed.
(JSC::DFG::LongLivedState::LongLivedState): Deleted.
(JSC::DFG::LongLivedState::~LongLivedState): Deleted.
(JSC::DFG::LongLivedState::shrinkToFit): Deleted.
- dfg/DFGLongLivedState.h: Removed.
- dfg/DFGNode.cpp:
(JSC::DFG::Node::index): Deleted.
(JSC::DFG::Node::index):
- dfg/DFGNodeAllocator.h: Removed.
(operator new ): Deleted.
- dfg/DFGObjectAllocationSinkingPhase.cpp:
- dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThread):
(JSC::DFG::Plan::compileInThreadImpl):
- dfg/DFGPlan.h:
- dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
(JSC::DFG::Worklist::runThread):
(JSC::VM::VM): Deleted.