Changeset 157329 in webkit


Ignore:
Timestamp:
Oct 11, 2013 7:21:45 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

DFG: Add JIT support for LogicalNot(String/StringIdent)
https://bugs.webkit.org/show_bug.cgi?id=122627

Patch by Nadav Rotem <nrotem@apple.com> on 2013-10-11
Reviewed by Filip Pizlo.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::::executeEffects):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileStringZeroLength):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compileLogicalNot):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileLogicalNot):

Location:
trunk
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r157327 r157329  
     12013-10-11  Nadav Rotem  <nrotem@apple.com>
     2
     3        DFG: Add JIT support for  LogicalNot(String/StringIdent)
     4        https://bugs.webkit.org/show_bug.cgi?id=122627
     5
     6        Reviewed by Filip Pizlo.
     7
     8        * dfg/DFGAbstractInterpreterInlines.h:
     9        (JSC::DFG::::executeEffects):
     10        * dfg/DFGFixupPhase.cpp:
     11        (JSC::DFG::FixupPhase::fixupNode):
     12        * dfg/DFGSpeculativeJIT.cpp:
     13        (JSC::DFG::SpeculativeJIT::compileStringZeroLength):
     14        * dfg/DFGSpeculativeJIT.h:
     15        * dfg/DFGSpeculativeJIT32_64.cpp:
     16        (JSC::DFG::SpeculativeJIT::compileLogicalNot):
     17        * dfg/DFGSpeculativeJIT64.cpp:
     18        (JSC::DFG::SpeculativeJIT::compileLogicalNot):
     19
    1202013-10-11  Filip Pizlo  <fpizlo@apple.com>
    221
  • trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h

    r157047 r157329  
    569569            case NumberUse:
    570570            case UntypedUse:
     571            case StringUse:
    571572                break;
    572573            case ObjectOrOtherUse:
  • trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp

    r157059 r157329  
    293293            else if (node->child1()->shouldSpeculateNumber())
    294294                fixEdge<NumberUse>(node->child1());
     295            else if (node->child1()->shouldSpeculateString())
     296                fixEdge<StringUse>(node->child1());
    295297            break;
    296298        }
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r157313 r157329  
    41684168}
    41694169
     4170void SpeculativeJIT::compileStringZeroLength(Node* node)
     4171{
     4172    SpeculateCellOperand str(this, node->child1());
     4173    GPRReg strGPR = str.gpr();
     4174
     4175    // Make sure that this is a string.
     4176    speculateString(node->child1(), strGPR);
     4177
     4178    GPRTemporary eq(this);
     4179    GPRReg eqGPR = eq.gpr();
     4180
     4181    // Fetch the length field from the string object.
     4182    m_jit.test32(MacroAssembler::Zero, MacroAssembler::Address(strGPR, JSString::offsetOfLength()), MacroAssembler::TrustedImm32(-1), eqGPR);
     4183
     4184#if USE(JSVALUE64)
     4185    m_jit.or32(TrustedImm32(ValueFalse), eqGPR);
     4186    jsValueResult(eqGPR, node, DataFormatJSBoolean);
     4187#else
     4188    booleanResult(eqGPR, node);
     4189#endif
     4190}
     4191
    41704192void SpeculativeJIT::compileGetIndexedPropertyStorage(Node* node)
    41714193{
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h

    r157173 r157329  
    19821982    void compileStringEquality(Node*);
    19831983    void compileStringIdentEquality(Node*);
     1984    void compileStringZeroLength(Node*);
     1985
    19841986    void emitObjectOrOtherBranch(Edge value, BasicBlock* taken, BasicBlock* notTaken);
    19851987    void emitBranch(Node*);
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp

    r157266 r157329  
    16591659        return;
    16601660    }
    1661        
     1661    case StringUse:
     1662        return compileStringZeroLength(node);
     1663
    16621664    default:
    16631665        RELEASE_ASSERT_NOT_REACHED();
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp

    r157266 r157329  
    20412041        return;
    20422042    }
    2043        
     2043    case StringUse:
     2044        return compileStringZeroLength(node);
     2045
    20442046    default:
    20452047        RELEASE_ASSERT_NOT_REACHED();
Note: See TracChangeset for help on using the changeset viewer.