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

Changeset 242655 in webkit


Ignore:
Timestamp:
Mar 8, 2019, 1:59:34 PM (7 years ago)
Author:
ysuzuki@apple.com
Message:

Unreviewed, follow-up after r242568

Robin pointed that calculation of numberOfChildren and nonEmptyIndex is unnecessary.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r242650 r242655  
     12019-03-08  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        Unreviewed, follow-up after r242568
     4
     5        Robin pointed that calculation of `numberOfChildren` and `nonEmptyIndex` is unnecessary.
     6
     7        * dfg/DFGAbstractInterpreterInlines.h:
     8        (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
     9
    1102019-03-08  Yusuke Suzuki  <ysuzuki@apple.com>
    211
  • trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h

    r242568 r242655  
    708708
    709709    case MakeRope: {
    710         unsigned numberOfChildren = 0;
    711710        unsigned numberOfRemovedChildren = 0;
    712         Optional<unsigned> nonEmptyIndex;
    713711        for (unsigned i = 0; i < AdjacencyList::Size; ++i) {
    714712            Edge& edge = node->children.child(i);
    715713            if (!edge)
    716714                break;
    717             ++numberOfChildren;
    718 
    719715            JSValue childConstant = m_state.forNode(edge).value();
    720             if (!childConstant) {
    721                 nonEmptyIndex = i;
     716            if (!childConstant)
    722717                continue;
    723             }
    724             if (!childConstant.isString()) {
    725                 nonEmptyIndex = i;
     718            if (!childConstant.isString())
    726719                continue;
    727             }
    728             if (asString(childConstant)->length()) {
    729                 nonEmptyIndex = i;
     720            if (asString(childConstant)->length())
    730721                continue;
    731             }
    732 
    733722            ++numberOfRemovedChildren;
    734723        }
Note: See TracChangeset for help on using the changeset viewer.