Ignore:
Timestamp:
Sep 10, 2013, 9:35:16 PM (12 years ago)
Author:
[email protected]
Message:

Propagate the Int48 stuff into the prediction propagator.
https://bugs.webkit.org/show_bug.cgi?id=121132

Reviewed by Mark Hahnenberg.

This still has no effect on codegen since Int48 still looks like a Double right now.

  • bytecode/ExitKind.cpp:

(JSC::exitKindToString):

  • bytecode/ExitKind.h:
  • bytecode/SpeculatedType.cpp:

(JSC::speculationFromValue):

  • bytecode/SpeculatedType.h:

(JSC::isMachineIntSpeculation):
(JSC::isMachineIntSpeculationExpectingDefined):
(JSC::isMachineIntSpeculationForArithmetic):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::addShouldSpeculateMachineInt):
(JSC::DFG::Graph::mulShouldSpeculateInt32):
(JSC::DFG::Graph::mulShouldSpeculateMachineInt):
(JSC::DFG::Graph::negateShouldSpeculateMachineInt):
(JSC::DFG::Graph::hasExitSite):

  • dfg/DFGNode.h:

(JSC::DFG::Node::shouldSpeculateMachineInt):
(JSC::DFG::Node::shouldSpeculateMachineIntForArithmetic):
(JSC::DFG::Node::shouldSpeculateMachineIntExpectingDefined):
(JSC::DFG::Node::canSpeculateInt48):

  • dfg/DFGNodeFlags.h:

(JSC::DFG::nodeCanSpeculateInt48):

  • dfg/DFGPredictionPropagationPhase.cpp:

(JSC::DFG::PredictionPropagationPhase::propagate):

File:
1 edited

Legend:

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

    r155497 r155499  
    142142        case JSConstant:
    143143        case WeakJSConstant: {
    144             changed |= setPrediction(speculationFromValue(m_graph.valueOfJSConstant(node)));
     144            SpeculatedType type = speculationFromValue(m_graph.valueOfJSConstant(node));
     145            if (type == SpecInt48AsDouble)
     146                type = SpecInt48;
     147            changed |= setPrediction(type);
    145148            break;
    146149        }
     
    213216                    if (m_graph.addSpeculationMode(node) != DontSpeculateInt32)
    214217                        changed |= mergePrediction(SpecInt32);
     218                    else if (m_graph.addShouldSpeculateMachineInt(node))
     219                        changed |= mergePrediction(SpecInt48);
    215220                    else
    216221                        changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right));
     
    231236                if (m_graph.addSpeculationMode(node) != DontSpeculateInt32)
    232237                    changed |= mergePrediction(SpecInt32);
     238                else if (m_graph.addShouldSpeculateMachineInt(node))
     239                    changed |= mergePrediction(SpecInt48);
    233240                else
    234241                    changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right));
     
    244251                if (m_graph.addSpeculationMode(node) != DontSpeculateInt32)
    245252                    changed |= mergePrediction(SpecInt32);
     253                else if (m_graph.addShouldSpeculateMachineInt(node))
     254                    changed |= mergePrediction(SpecInt48);
    246255                else
    247256                    changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right));
     
    254263                if (m_graph.negateShouldSpeculateInt32(node))
    255264                    changed |= mergePrediction(SpecInt32);
     265                else if (m_graph.negateShouldSpeculateMachineInt(node))
     266                    changed |= mergePrediction(SpecInt48);
    256267                else
    257268                    changed |= mergePrediction(speculatedDoubleTypeForPrediction(node->child1()->prediction()));
     
    281292                if (m_graph.mulShouldSpeculateInt32(node))
    282293                    changed |= mergePrediction(SpecInt32);
     294                else if (m_graph.mulShouldSpeculateMachineInt(node))
     295                    changed |= mergePrediction(SpecInt48);
    283296                else
    284297                    changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right));
Note: See TracChangeset for help on using the changeset viewer.