Ignore:
Timestamp:
Oct 14, 2012, 8:17:17 PM (13 years ago)
Author:
[email protected]
Message:

DFG should handle polymorphic array modes by eagerly transforming arrays into the most general applicable form
https://bugs.webkit.org/show_bug.cgi?id=99269

Reviewed by Geoffrey Garen.

This kills off a bunch of code for "polymorphic" array modes in the DFG. It should
also be a performance win for code that uses a lot of array storage arrays.

  • dfg/DFGAbstractState.cpp:

(JSC::DFG::AbstractState::execute):

  • dfg/DFGArrayMode.cpp:

(JSC::DFG::fromObserved):
(JSC::DFG::modeAlreadyChecked):
(JSC::DFG::modeToString):

  • dfg/DFGArrayMode.h:

(DFG):
(JSC::DFG::modeUsesButterfly):
(JSC::DFG::modeIsJSArray):
(JSC::DFG::mayStoreToTail):
(JSC::DFG::mayStoreToHole):
(JSC::DFG::canCSEStorage):
(JSC::DFG::modeSupportsLength):
(JSC::DFG::benefitsFromStructureCheck):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::checkArray):
(JSC::DFG::FixupPhase::blessArrayOperation):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::byValIsPure):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode):
(JSC::DFG::SpeculativeJIT::checkArray):
(JSC::DFG::SpeculativeJIT::arrayify):
(DFG):
(JSC::DFG::SpeculativeJIT::compileGetArrayLength):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::putByValWillNeedExtraRegister):
(SpeculativeJIT):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGAbstractState.cpp

    r131249 r131289  
    869869        case SLOW_PUT_ARRAY_STORAGE_MODES:
    870870        case ALL_EFFECTFUL_MODES:
    871         case POLYMORPHIC_MODES:
    872871            forNode(node.child1()).filter(SpecCell);
    873872            forNode(node.child2()).filter(SpecInt32);
     
    944943        case SLOW_PUT_ARRAY_STORAGE_MODES:
    945944        case ALL_EFFECTFUL_MODES:
    946         case POLYMORPHIC_MODES:
    947945            forNode(child1).filter(SpecCell);
    948946            forNode(child2).filter(SpecInt32);
     
    13851383        case ALL_CONTIGUOUS_MODES:
    13861384        case ALL_ARRAY_STORAGE_MODES:
    1387         case POLYMORPHIC_MODES: // These only get a CheckArray for GetArrayLength
    13881385            // This doesn't filter anything meaningful right now. We may want to add
    13891386            // CFA tracking of array mode speculations, but we don't have that, yet.
     
    14311428            node.setCanExit(true);
    14321429            forNode(node.child1()).filter(SpecCell);
    1433             forNode(node.child2()).filter(SpecInt32);
     1430            if (node.child2())
     1431                forNode(node.child2()).filter(SpecInt32);
    14341432            forNode(nodeIndex).clear();
    14351433            clobberStructures(indexInBlock);
Note: See TracChangeset for help on using the changeset viewer.