⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 284788 in webkit


Ignore:
Timestamp:
Oct 25, 2021, 10:02:25 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

[JSC][32bit] Don't speculate Cell on PutByVal
https://bugs.webkit.org/show_bug.cgi?id=232242

Patch by Mikhail R. Gadelha <Mikhail R. Gadelha> on 2021-10-25
Reviewed by Yusuke Suzuki.

This patch is similar to https://bugs.webkit.org/show_bug.cgi?id=232052
but smaller: given that we have more registers available, we don't have
to speculate Cells anymore.

This patch removes the Cell speculation during the DFG FixUp phase and
adjust the operationPutByVal* calls to use the generic version (instead
of the Cell versions).

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r284781 r284788  
     12021-10-25  Mikhail R. Gadelha  <mikhail@igalia.com>
     2
     3        [JSC][32bit] Don't speculate Cell on PutByVal
     4        https://bugs.webkit.org/show_bug.cgi?id=232242
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        This patch is similar to https://bugs.webkit.org/show_bug.cgi?id=232052
     9        but smaller: given that we have more registers available, we don't have
     10        to speculate Cells anymore.
     11
     12        This patch removes the Cell speculation during the DFG FixUp phase and
     13        adjust the operationPutByVal* calls to use the generic version (instead
     14        of the Cell versions).
     15
     16        * dfg/DFGFixupPhase.cpp:
     17        (JSC::DFG::FixupPhase::fixupNode):
     18        * dfg/DFGSpeculativeJIT32_64.cpp:
     19        (JSC::DFG::SpeculativeJIT::compile):
     20
    1212021-10-25  Geza Lore  <gezalore@gmail.com>
    222
  • trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp

    r284700 r284788  
    12531253                    }
    12541254                }
    1255 #if USE(JSVALUE32_64)
    1256                 // Due to register pressure on 32-bit, we speculate cell and
    1257                 // ignore the base-is-not-cell case entirely by letting the
    1258                 // baseline JIT handle it.
    1259                 fixEdge<CellUse>(child1);
    1260 #endif
    12611255                break;
    12621256            case Array::Int32:
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp

    r284700 r284788  
    27412741                }
    27422742
    2743                 SpeculateCellOperand base(this, child1); // Save a register, speculate cell. We'll probably be right.
     2743                JSValueOperand base(this, child1);
    27442744                JSValueOperand property(this, child2);
    27452745                JSValueOperand value(this, child3);
    2746                 GPRReg baseGPR = base.gpr();
     2746                JSValueRegs baseRegs = base.jsValueRegs();
    27472747                JSValueRegs propertyRegs = property.jsValueRegs();
    27482748                JSValueRegs valueRegs = value.jsValueRegs();
     
    27502750                flushRegisters();
    27512751                if (node->op() == PutByValDirect)
    2752                     callOperation(node->ecmaMode().isStrict() ? operationPutByValDirectCellStrict : operationPutByValDirectCellNonStrict, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseGPR, propertyRegs, valueRegs);
     2752                    callOperation(node->ecmaMode().isStrict() ? operationPutByValDirectStrict : operationPutByValDirectNonStrict, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseRegs, propertyRegs, valueRegs);
    27532753                else
    2754                     callOperation(node->ecmaMode().isStrict() ? operationPutByValCellStrict : operationPutByValCellNonStrict, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseGPR, propertyRegs, valueRegs);
     2754                    callOperation(node->ecmaMode().isStrict() ? operationPutByValStrict : operationPutByValNonStrict, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseRegs, propertyRegs, valueRegs);
    27552755                m_jit.exceptionCheck();
    27562756
Note: See TracChangeset for help on using the changeset viewer.