[JSC] Use node index as DFG::MinifiedID
authorysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Apr 2019 01:50:50 +0000 (01:50 +0000)
committerysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Apr 2019 01:50:50 +0000 (01:50 +0000)
commit5c9a7072d611d188a55dcf5842646c75ff18f490
tree41c0c641f72b46b0e1ed497d9be99752c60ad141
parent99b16c30dcfeb83938ab644a2d0f1423da9f3a91
[JSC] Use node index as DFG::MinifiedID
https://bugs.webkit.org/show_bug.cgi?id=197186

Reviewed by Saam Barati.

DFG Nodes can be identified with index if the graph is given. We should use unsigned index as a DFG::MinifiedID's underlying
source instead of Node* to reduce the size of VariableEvent from 16 to 12. Vector<VariableEvent> is the main data in DFG's OSR
tracking. It is kept after DFG compilation is done to make OSR work. We saw that this is allocated with large size in GMail.

* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/DataFormat.h:
* bytecode/ValueRecovery.h:
* dfg/DFGGenerationInfo.h:
* dfg/DFGMinifiedID.h:
(JSC::DFG::MinifiedID::MinifiedID):
(JSC::DFG::MinifiedID::operator! const):
(JSC::DFG::MinifiedID::operator== const):
(JSC::DFG::MinifiedID::operator!= const):
(JSC::DFG::MinifiedID::operator< const):
(JSC::DFG::MinifiedID::operator> const):
(JSC::DFG::MinifiedID::operator<= const):
(JSC::DFG::MinifiedID::operator>= const):
(JSC::DFG::MinifiedID::hash const):
(JSC::DFG::MinifiedID::dump const):
(JSC::DFG::MinifiedID::isHashTableDeletedValue const):
(JSC::DFG::MinifiedID::fromBits):
(JSC::DFG::MinifiedID::bits const):
(JSC::DFG::MinifiedID::invalidIndex):
(JSC::DFG::MinifiedID::otherInvalidIndex):
(JSC::DFG::MinifiedID::node const): Deleted.
(JSC::DFG::MinifiedID::invalidID): Deleted.
(JSC::DFG::MinifiedID::otherInvalidID): Deleted.
* dfg/DFGMinifiedIDInlines.h: Copied from Source/JavaScriptCore/dfg/DFGMinifiedNode.cpp.
(JSC::DFG::MinifiedID::MinifiedID):
* dfg/DFGMinifiedNode.cpp:
* dfg/DFGValueSource.h:
(JSC::DFG::ValueSource::ValueSource):
* dfg/DFGVariableEvent.h:
(JSC::DFG::VariableEvent::dataFormat const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/bytecode/DataFormat.h
Source/JavaScriptCore/bytecode/ValueRecovery.h
Source/JavaScriptCore/dfg/DFGGenerationInfo.h
Source/JavaScriptCore/dfg/DFGMinifiedID.h
Source/JavaScriptCore/dfg/DFGMinifiedIDInlines.h [new file with mode: 0644]
Source/JavaScriptCore/dfg/DFGMinifiedNode.cpp
Source/JavaScriptCore/dfg/DFGValueSource.h
Source/JavaScriptCore/dfg/DFGVariableEvent.h