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.cpp

    r288815 r291332  
    10621062bool Graph::watchCondition(const ObjectPropertyCondition& key)
    10631063{
     1064    if (m_plan.isUnlinked())
     1065        return false;
     1066
    10641067    if (!key.isWatchable())
    10651068        return false;
     
    10821085bool Graph::watchConditions(const ObjectPropertyConditionSet& keys)
    10831086{
     1087    if (m_plan.isUnlinked())
     1088        return false;
     1089
    10841090    if (!keys.isValid())
    10851091        return false;
     
    10991105bool Graph::watchGlobalProperty(JSGlobalObject* globalObject, unsigned identifierNumber)
    11001106{
     1107    if (m_plan.isUnlinked())
     1108        return false;
     1109
    11011110    UniquedStringImpl* uid = identifiers()[identifierNumber];
    11021111    // If we already have a WatchpointSet, and it is already invalidated, it means that this scope operation must be changed from GlobalProperty to GlobalLexicalVar,
     
    12681277    JSValue base, const RegisteredStructureSet& structureSet, PropertyOffset offset)
    12691278{
     1279    if (m_plan.isUnlinked())
     1280        return JSValue();
     1281
    12701282    if (!base || !base.isObject())
    12711283        return JSValue();
     
    13531365{
    13541366    // This has an awesome concurrency story. See comment for GetGlobalVar in ByteCodeParser.
     1367
     1368    if (m_plan.isUnlinked())
     1369        return JSValue();
    13551370   
    13561371    if (!base)
     
    14031418JSArrayBufferView* Graph::tryGetFoldableView(JSValue value)
    14041419{
     1420    if (m_plan.isUnlinked())
     1421        return nullptr;
    14051422    if (!value)
    14061423        return nullptr;
     
    17311748bool Graph::getRegExpPrototypeProperty(JSObject* regExpPrototype, Structure* regExpPrototypeStructure, UniquedStringImpl* uid, JSValue& returnJSValue)
    17321749{
     1750    if (m_plan.isUnlinked())
     1751        return false;
     1752
    17331753    PropertyOffset offset = regExpPrototypeStructure->getConcurrently(uid);
    17341754    if (!isValidOffset(offset))
     
    17781798bool Graph::canOptimizeStringObjectAccess(const CodeOrigin& codeOrigin)
    17791799{
     1800    if (m_plan.isUnlinked())
     1801        return false;
     1802
    17801803    if (hasExitSite(codeOrigin, BadCache) || hasExitSite(codeOrigin, BadConstantCache))
    17811804        return false;
     
    18291852    // The parameter 'value' is the AbstractValue for child1 (the thing being spread).
    18301853    ASSERT(node->op() == Spread);
     1854
     1855    if (m_plan.isUnlinked())
     1856        return false;
    18311857
    18321858    if (node->child1().useKind() != ArrayUse) {
Note: See TracChangeset for help on using the changeset viewer.