Ignore:
Timestamp:
Mar 15, 2022, 10:35:12 PM (3 years ago)
Author:
[email protected]
Message:

[JSC] Add UnlinkedDFG compilation mode enum
https://bugs.webkit.org/show_bug.cgi?id=237934

Reviewed by Mark Lam.

This patch adds UnlinkedDFG compilation mode to prepare new unlinked DFG.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::inliningCost):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::watchCondition):
(JSC::DFG::Graph::watchConditions):
(JSC::DFG::Graph::watchGlobalProperty):
(JSC::DFG::Graph::tryGetConstantProperty):
(JSC::DFG::Graph::tryGetConstantClosureVar):
(JSC::DFG::Graph::tryGetFoldableView):
(JSC::DFG::Graph::getRegExpPrototypeProperty):
(JSC::DFG::Graph::canOptimizeStringObjectAccess):
(JSC::DFG::Graph::canDoFastSpread):

  • dfg/DFGGraph.h:
  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThreadImpl):

  • dfg/DFGTierUpCheckInjectionPhase.cpp:

(JSC::DFG::TierUpCheckInjectionPhase::run):

  • jit/JITCompilationMode.cpp:

(WTF::printInternal):

  • jit/JITCompilationMode.h:

(JSC::isDFG):
(JSC::isUnlinked):

  • jit/JITPlan.cpp:

(JSC::JITPlan::tier const):
(JSC::JITPlan::reportCompileTimes const):

  • jit/JITPlan.h:

(JSC::JITPlan::isDFG const):
(JSC::JITPlan::isUnlinked const):

  • profiler/ProfilerCompilationKind.cpp:

(WTF::printInternal):

  • profiler/ProfilerCompilationKind.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGGraph.h

    r289359 r291332  
    477477    }
    478478   
    479     ScriptExecutable* executableFor(InlineCallFrame* inlineCallFrame)
    480     {
    481         if (!inlineCallFrame)
    482             return m_codeBlock->ownerExecutable();
    483        
    484         return inlineCallFrame->baselineCodeBlock->ownerExecutable();
    485     }
    486    
    487     ScriptExecutable* executableFor(const CodeOrigin& codeOrigin)
    488     {
    489         return executableFor(codeOrigin.inlineCallFrame());
    490     }
    491    
    492479    CodeBlock* baselineCodeBlockFor(InlineCallFrame* inlineCallFrame)
    493480    {
     
    504491    bool masqueradesAsUndefinedWatchpointIsStillValid(const CodeOrigin& codeOrigin)
    505492    {
     493        if (m_plan.isUnlinked())
     494            return false;
    506495        return globalObjectFor(codeOrigin)->masqueradesAsUndefinedWatchpoint()->isStillValid();
    507496    }
     
    796785    bool isWatchingHavingABadTimeWatchpoint(Node* node)
    797786    {
     787        if (m_plan.isUnlinked())
     788            return false;
    798789        JSGlobalObject* globalObject = globalObjectFor(node->origin.semantic);
    799790        return watchpoints().isWatched(globalObject->havingABadTimeWatchpoint());
     
    802793    bool isWatchingGlobalObjectWatchpoint(JSGlobalObject* globalObject, InlineWatchpointSet& set)
    803794    {
     795        if (m_plan.isUnlinked())
     796            return false;
     797
    804798        if (watchpoints().isWatched(set))
    805799            return true;
     
    820814    bool isWatchingArrayIteratorProtocolWatchpoint(Node* node)
    821815    {
     816        if (m_plan.isUnlinked())
     817            return false;
     818
    822819        JSGlobalObject* globalObject = globalObjectFor(node->origin.semantic);
    823820        InlineWatchpointSet& set = globalObject->arrayIteratorProtocolWatchpointSet();
     
    827824    bool isWatchingNumberToStringWatchpoint(Node* node)
    828825    {
     826        if (m_plan.isUnlinked())
     827            return false;
     828
    829829        JSGlobalObject* globalObject = globalObjectFor(node->origin.semantic);
    830830        InlineWatchpointSet& set = globalObject->numberToStringWatchpointSet();
Note: See TracChangeset for help on using the changeset viewer.