Skip to content
  • fpizlo@apple.com's avatar
    DFG should trigger rage conversion from double to contiguous if it sees a... · f10d0722
    fpizlo@apple.com authored
    DFG should trigger rage conversion from double to contiguous if it sees a GetByVal on Double being used in an integer context
    https://bugs.webkit.org/show_bug.cgi?id=103858
    
    Reviewed by Gavin Barraclough.
    
    A rage conversion from double to contiguous is one where you try to convert each
    double to an int32.
    
    This is probably not the last we'll hear of rage conversion from double to contiguous.
    It may be better to do this right during parsing, which will result in fewer cases of
    Arrayification. But even so, this looks like a straight win already - 1% speed-up on
    Kraken, no major regression anywhere else.
    
    * dfg/DFGAbstractState.cpp:
    (JSC::DFG::AbstractState::execute):
    * dfg/DFGArrayMode.cpp:
    (JSC::DFG::ArrayMode::refine):
    (JSC::DFG::arrayConversionToString):
    (JSC::DFG::ArrayMode::dump):
    (WTF):
    (WTF::printInternal):
    * dfg/DFGArrayMode.h:
    (JSC::DFG::ArrayMode::withConversion):
    (ArrayMode):
    (JSC::DFG::ArrayMode::doesConversion):
    (WTF):
    * dfg/DFGFixupPhase.cpp:
    (JSC::DFG::FixupPhase::fixupBlock):
    (JSC::DFG::FixupPhase::fixupNode):
    (JSC::DFG::FixupPhase::checkArray):
    (FixupPhase):
    * dfg/DFGGraph.cpp:
    (JSC::DFG::Graph::dump):
    * dfg/DFGNodeFlags.h:
    (DFG):
    * dfg/DFGOperations.cpp:
    * dfg/DFGOperations.h:
    * dfg/DFGPredictionPropagationPhase.cpp:
    (JSC::DFG::PredictionPropagationPhase::propagate):
    * dfg/DFGSpeculativeJIT.cpp:
    (JSC::DFG::SpeculativeJIT::arrayify):
    * dfg/DFGStructureCheckHoistingPhase.cpp:
    (JSC::DFG::StructureCheckHoistingPhase::run):
    * runtime/JSObject.cpp:
    (JSC):
    (JSC::JSObject::genericConvertDoubleToContiguous):
    (JSC::JSObject::convertDoubleToContiguous):
    (JSC::JSObject::rageConvertDoubleToContiguous):
    (JSC::JSObject::ensureContiguousSlow):
    (JSC::JSObject::rageEnsureContiguousSlow):
    * runtime/JSObject.h:
    (JSObject):
    (JSC::JSObject::rageEnsureContiguous):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    f10d0722