Ignore:
Timestamp:
Dec 3, 2012, 1:21:22 AM (13 years ago)
Author:
[email protected]
Message:

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):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGNodeFlags.h

    r134168 r136372  
    5353#define NodeMayNegZero            0x200
    5454                               
    55 #define NodeBackPropMask         0x3C00
    56 #define NodeUseBottom             0x000
     55#define NodeBackPropMask         0x7C00
     56#define NodeUseBottom            0x0000
    5757#define NodeUsedAsNumber          0x400 // The result of this computation may be used in a context that observes fractional results.
    5858#define NodeNeedsNegZero          0x800 // The result of this computation may be used in a context that observes -0.
     
    6060#define NodeUsedAsValue          (NodeUsedAsNumber | NodeNeedsNegZero | NodeUsedAsOther)
    6161#define NodeUsedAsInt            0x2000 // The result of this computation is known to be used in a context that prefers, but does not require, integer values.
     62#define NodeUsedAsIntLocally     0x4000 // Same as NodeUsedAsInt, but within the same basic block.
    6263
    63 #define NodeDoesNotExit          0x4000 // This flag is negated to make it natural for the default to be that a node does exit.
     64#define NodeDoesNotExit          0x8000 // This flag is negated to make it natural for the default to be that a node does exit.
    6465
    6566typedef uint16_t NodeFlags;
Note: See TracChangeset for help on using the changeset viewer.