JSC::CodeBlock should know which references generated by the DFG are weak
https://bugs.webkit.org/show_bug.cgi?id=72563
Reviewed by Geoff Garen.
CodeBlock::m_dfgData now tracks weak references and weak reference transitions
(like ephemerons) generated by the DFG. The DFG makes sure to notify the
CodeBlock of all uses of weak references and weak reference transitions.
CodeBlock currently marks them strongly, since the weak marking logic is not
in place, yet.
(JSC::CodeBlock::visitAggregate):
(JSC::CodeBlock::stronglyVisitWeakReferences):
(JSC::CodeBlock::appendWeakReference):
(JSC::CodeBlock::shrinkWeakReferencesToFit):
(JSC::CodeBlock::appendWeakReferenceTransition):
(JSC::CodeBlock::shrinkWeakReferenceTransitionsToFit):
(JSC::CodeBlock::WeakReferenceTransition::WeakReferenceTransition):
(JSC::CodeOrigin::codeOriginOwner):
- dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::addWeakReference):
(JSC::DFG::JITCompiler::addWeakReferenceTransition):
(JSC::DFG::JITCompiler::branchWeakPtr):
- dfg/DFGSpeculativeJIT.h:
- dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
- dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::fillJSValue):
(JSC::DFG::SpeculativeJIT::compile):