Ignore:
Timestamp:
Nov 16, 2011, 4:49:50 PM (14 years ago)
Author:
[email protected]
Message:

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.

  • 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):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/CodeOrigin.h

    r99148 r100527  
    6666    unsigned inlineDepth() const;
    6767   
     68    // If the code origin corresponds to inlined code, gives you the heap object that
     69    // would have owned the code if it had not been inlined. Otherwise returns 0.
     70    ExecutableBase* codeOriginOwner() const;
     71   
    6872    static unsigned inlineDepthForCallFrame(InlineCallFrame*);
    6973   
     
    127131}
    128132
     133inline ExecutableBase* CodeOrigin::codeOriginOwner() const
     134{
     135    if (!inlineCallFrame)
     136        return 0;
     137    return inlineCallFrame->executable.get();
     138}
     139
    129140} // namespace JSC
    130141
Note: See TracChangeset for help on using the changeset viewer.