[JSC] DFG::Node should not have its own allocator
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jul 2016 01:36:44 +0000 (01:36 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jul 2016 01:36:44 +0000 (01:36 +0000)
commitaa93e08721153766f63ba38bc5914bce4c2093c6
tree09c9b7123d85bb08513b1295b62f64abc1e8a32f
parent4e336aa248fe765d8fcbd673ced406418f8b4115
[JSC] DFG::Node should not have its own allocator
https://bugs.webkit.org/show_bug.cgi?id=160098

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-07-27
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):
* dfg/DFGCleanUpPhase.cpp:
(JSC::DFG::CleanUpPhase::run):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::run):
* dfg/DFGConstantHoistingPhase.cpp:
* dfg/DFGDCEPhase.cpp:
(JSC::DFG::DCEPhase::fixupBlock):
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::Graph):
(JSC::DFG::Graph::deleteNode):
(JSC::DFG::Graph::killBlockAndItsContents):
(JSC::DFG::Graph::~Graph): Deleted.
* dfg/DFGGraph.h:
(JSC::DFG::Graph::addNode):
* dfg/DFGLICMPhase.cpp:
(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.
* dfg/DFGNode.h:
(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):
* dfg/DFGWorklist.cpp:
(JSC::DFG::Worklist::runThread):
* runtime/VM.cpp:
(JSC::VM::VM): Deleted.
* runtime/VM.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@203808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/b3/B3SparseCollection.h
Source/JavaScriptCore/dfg/DFGAllocator.h [deleted file]
Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp
Source/JavaScriptCore/dfg/DFGCleanUpPhase.cpp
Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp
Source/JavaScriptCore/dfg/DFGConstantHoistingPhase.cpp
Source/JavaScriptCore/dfg/DFGDCEPhase.cpp
Source/JavaScriptCore/dfg/DFGDriver.cpp
Source/JavaScriptCore/dfg/DFGGraph.cpp
Source/JavaScriptCore/dfg/DFGGraph.h
Source/JavaScriptCore/dfg/DFGLICMPhase.cpp
Source/JavaScriptCore/dfg/DFGLongLivedState.cpp [deleted file]
Source/JavaScriptCore/dfg/DFGLongLivedState.h [deleted file]
Source/JavaScriptCore/dfg/DFGNode.cpp
Source/JavaScriptCore/dfg/DFGNode.h
Source/JavaScriptCore/dfg/DFGNodeAllocator.h [deleted file]
Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp
Source/JavaScriptCore/dfg/DFGPlan.cpp
Source/JavaScriptCore/dfg/DFGPlan.h
Source/JavaScriptCore/dfg/DFGSSAConversionPhase.cpp
Source/JavaScriptCore/dfg/DFGWorklist.cpp
Source/JavaScriptCore/runtime/VM.cpp
Source/JavaScriptCore/runtime/VM.h