Skip to content
  • fpizlo@apple.com's avatar
    JSC::CodeBlock should know which references generated by the DFG are weak · 5e37f9a2
    fpizlo@apple.com authored
    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.
    
    * bytecode/CodeBlock.cpp:
    (JSC::CodeBlock::visitAggregate):
    (JSC::CodeBlock::stronglyVisitWeakReferences):
    * bytecode/CodeBlock.h:
    (JSC::CodeBlock::appendWeakReference):
    (JSC::CodeBlock::shrinkWeakReferencesToFit):
    (JSC::CodeBlock::appendWeakReferenceTransition):
    (JSC::CodeBlock::shrinkWeakReferenceTransitionsToFit):
    (JSC::CodeBlock::WeakReferenceTransition::WeakReferenceTransition):
    * bytecode/CodeOrigin.h:
    (JSC::CodeOrigin::codeOriginOwner):
    * dfg/DFGByteCodeParser.cpp:
    (JSC::DFG::ByteCodeParser::handleCall):
    (JSC::DFG::ByteCodeParser::handleInlining):
    (JSC::DFG::ByteCodeParser::parseBlock):
    * dfg/DFGJITCompiler.cpp:
    (JSC::DFG::JITCompiler::link):
    * dfg/DFGJITCompiler.h:
    (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):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    5e37f9a2