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

Changeset 230577 in webkit


Ignore:
Timestamp:
Apr 12, 2018, 9:11:22 AM (9 years ago)
Author:
Yusuke Suzuki
Message:

[DFG] Remove compileBigIntEquality in DFG 32bit
​https://bugs.webkit.org/show_bug.cgi?id=184535

Reviewed by Saam Barati.

We can have the unified implementation for compileBigIntEquality.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileBigIntEquality):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compileBigIntEquality): Deleted.

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileBigIntEquality): Deleted.

Location:
trunk/Source/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r230576 r230577  
     12018-04-12  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        [DFG] Remove compileBigIntEquality in DFG 32bit
     4        https://bugs.webkit.org/show_bug.cgi?id=184535
     5
     6        Reviewed by Saam Barati.
     7
     8        We can have the unified implementation for compileBigIntEquality.
     9
     10        * dfg/DFGSpeculativeJIT.cpp:
     11        (JSC::DFG::SpeculativeJIT::compileBigIntEquality):
     12        * dfg/DFGSpeculativeJIT32_64.cpp:
     13        (JSC::DFG::SpeculativeJIT::compileBigIntEquality): Deleted.
     14        * dfg/DFGSpeculativeJIT64.cpp:
     15        (JSC::DFG::SpeculativeJIT::compileBigIntEquality): Deleted.
     16
    1172018-04-12  Michael Catanzaro  <mcatanzaro@igalia.com>
    218
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r230556 r230577  
    1294112941}
    1294212942
     12943void SpeculativeJIT::compileBigIntEquality(Node* node)
     12944{
     12945    // FIXME: [ESNext][BigInt] Create specialized version of strict equals for BigIntUse
     12946    // https://bugs.webkit.org/show_bug.cgi?id=182895
     12947    SpeculateCellOperand left(this, node->child1());
     12948    SpeculateCellOperand right(this, node->child2());
     12949    GPRTemporary result(this, Reuse, left);
     12950    GPRReg leftGPR = left.gpr();
     12951    GPRReg rightGPR = right.gpr();
     12952    GPRReg resultGPR = result.gpr();
     12953
     12954    left.use();
     12955    right.use();
     12956
     12957    speculateBigInt(node->child1(), leftGPR);
     12958    speculateBigInt(node->child2(), rightGPR);
     12959
     12960    JITCompiler::Jump notEqualCase = m_jit.branchPtr(JITCompiler::NotEqual, leftGPR, rightGPR);
     12961
     12962    m_jit.move(JITCompiler::TrustedImm32(1), resultGPR);
     12963
     12964    JITCompiler::Jump done = m_jit.jump();
     12965
     12966    notEqualCase.link(&m_jit);
     12967
     12968    silentSpillAllRegisters(resultGPR);
     12969    callOperation(operationCompareStrictEqCell, resultGPR, leftGPR, rightGPR);
     12970    silentFillAllRegisters();
     12971
     12972    done.link(&m_jit);
     12973
     12974    unblessedBooleanResult(resultGPR, node, UseChildrenCalledExplicitly);
     12975}
     12976
    1294312977} } // namespace JSC::DFG
    1294412978
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp

    r230556 r230577  
    42684268}
    42694269
    4270 void SpeculativeJIT::compileBigIntEquality(Node* node)
    4271 {
    4272     // FIXME: [ESNext][BigInt] Create specialized version of strict equals for BigIntUse
    4273     // https://bugs.webkit.org/show_bug.cgi?id=182895
    4274     SpeculateCellOperand left(this, node->child1());
    4275     SpeculateCellOperand right(this, node->child2());
    4276     GPRReg leftPayloadGPR = left.gpr();
    4277     GPRReg rightPayloadGPR = right.gpr();
    4278 
    4279     GPRTemporary resultPayload(this, Reuse, left);
    4280     GPRReg resultPayloadGPR = resultPayload.gpr();
    4281 
    4282     left.use();
    4283     right.use();
    4284 
    4285     speculateBigInt(node->child1(), leftPayloadGPR);
    4286     speculateBigInt(node->child2(), rightPayloadGPR);
    4287 
    4288     JITCompiler::Jump notEqualCase = m_jit.branchPtr(JITCompiler::NotEqual, leftPayloadGPR, rightPayloadGPR);
    4289 
    4290     m_jit.move(JITCompiler::TrustedImm32(true), resultPayloadGPR);
    4291     JITCompiler::Jump done = m_jit.jump();
    4292 
    4293     notEqualCase.link(&m_jit);
    4294 
    4295     silentSpillAllRegisters(resultPayloadGPR);
    4296     callOperation(operationCompareStrictEqCell, resultPayloadGPR, leftPayloadGPR, rightPayloadGPR);
    4297     silentFillAllRegisters();
    4298 
    4299     m_jit.andPtr(JITCompiler::TrustedImm32(1), resultPayloadGPR);
    4300 
    4301     done.link(&m_jit);
    4302 
    4303     booleanResult(resultPayloadGPR, node, UseChildrenCalledExplicitly);
    4304 }
    4305 
    43064270#endif
    43074271
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp

    r230543 r230577  
    49084908}
    49094909
    4910 void SpeculativeJIT::compileBigIntEquality(Node* node)
    4911 {
    4912     // FIXME: [ESNext][BigInt] Create specialized version of strict equals for BigIntUse
    4913     // https://bugs.webkit.org/show_bug.cgi?id=182895
    4914     SpeculateCellOperand left(this, node->child1());
    4915     SpeculateCellOperand right(this, node->child2());
    4916     GPRTemporary result(this);
    4917     GPRReg leftGPR = left.gpr();
    4918     GPRReg rightGPR = right.gpr();
    4919     GPRReg resultGPR = result.gpr();
    4920 
    4921     left.use();
    4922     right.use();
    4923 
    4924     speculateBigInt(node->child1(), leftGPR);
    4925     speculateBigInt(node->child2(), rightGPR);
    4926 
    4927     JITCompiler::Jump notEqualCase = m_jit.branch64(JITCompiler::NotEqual, leftGPR, rightGPR);
    4928 
    4929     m_jit.move(JITCompiler::TrustedImm64(JSValue::encode(jsBoolean(true))), resultGPR);
    4930 
    4931     JITCompiler::Jump done = m_jit.jump();
    4932 
    4933     notEqualCase.link(&m_jit);
    4934 
    4935     silentSpillAllRegisters(resultGPR);
    4936     callOperation(operationCompareStrictEqCell, resultGPR, leftGPR, rightGPR);
    4937     silentFillAllRegisters();
    4938 
    4939     m_jit.and64(JITCompiler::TrustedImm32(1), resultGPR);
    4940     m_jit.or32(JITCompiler::TrustedImm32(ValueFalse), resultGPR);
    4941 
    4942     done.link(&m_jit);
    4943 
    4944     jsValueResult(resultGPR, m_currentNode, DataFormatJSBoolean, UseChildrenCalledExplicitly);
    4945 }
    4946 
    49474910#endif
    49484911
Note: See TracChangeset for help on using the changeset viewer.