Ignore:
Timestamp:
Jun 6, 2012, 6:35:59 PM (13 years ago)
Author:
[email protected]
Message:

PredictedType should be called SpeculatedType
https://bugs.webkit.org/show_bug.cgi?id=88477

Rubber stamped by Gavin Barraclough.

  • CMakeLists.txt:
  • GNUmakefile.list.am:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Target.pri:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::shouldOptimizeNow):
(JSC::CodeBlock::dumpValueProfiles):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::valueProfilePredictionForBytecodeOffset):

  • bytecode/LazyOperandValueProfile.cpp:

(JSC::LazyOperandValueProfileParser::prediction):

  • bytecode/LazyOperandValueProfile.h:

(LazyOperandValueProfileParser):

  • bytecode/PredictedType.cpp: Removed.
  • bytecode/PredictedType.h: Removed.
  • bytecode/SpeculatedType.cpp: Copied from Source/JavaScriptCore/bytecode/PredictedType.cpp.

(JSC::speculationToString):
(JSC::speculationToAbbreviatedString):
(JSC::speculationFromClassInfo):
(JSC::speculationFromStructure):
(JSC::speculationFromCell):
(JSC::speculationFromValue):

  • bytecode/SpeculatedType.h: Copied from Source/JavaScriptCore/bytecode/PredictedType.h.

(JSC):
(JSC::isAnySpeculation):
(JSC::isCellSpeculation):
(JSC::isObjectSpeculation):
(JSC::isFinalObjectSpeculation):
(JSC::isFinalObjectOrOtherSpeculation):
(JSC::isFixedIndexedStorageObjectSpeculation):
(JSC::isStringSpeculation):
(JSC::isArraySpeculation):
(JSC::isFunctionSpeculation):
(JSC::isInt8ArraySpeculation):
(JSC::isInt16ArraySpeculation):
(JSC::isInt32ArraySpeculation):
(JSC::isUint8ArraySpeculation):
(JSC::isUint8ClampedArraySpeculation):
(JSC::isUint16ArraySpeculation):
(JSC::isUint32ArraySpeculation):
(JSC::isFloat32ArraySpeculation):
(JSC::isFloat64ArraySpeculation):
(JSC::isArgumentsSpeculation):
(JSC::isActionableIntMutableArraySpeculation):
(JSC::isActionableFloatMutableArraySpeculation):
(JSC::isActionableTypedMutableArraySpeculation):
(JSC::isActionableMutableArraySpeculation):
(JSC::isActionableArraySpeculation):
(JSC::isArrayOrOtherSpeculation):
(JSC::isMyArgumentsSpeculation):
(JSC::isInt32Speculation):
(JSC::isDoubleRealSpeculation):
(JSC::isDoubleSpeculation):
(JSC::isNumberSpeculation):
(JSC::isBooleanSpeculation):
(JSC::isOtherSpeculation):
(JSC::isEmptySpeculation):
(JSC::mergeSpeculations):
(JSC::mergeSpeculation):

  • bytecode/StructureSet.h:

(JSC::StructureSet::speculationFromStructures):

  • bytecode/ValueProfile.h:

(JSC::ValueProfileBase::ValueProfileBase):
(JSC::ValueProfileBase::dump):
(JSC::ValueProfileBase::computeUpdatedPrediction):
(ValueProfileBase):

  • dfg/DFGAbstractState.cpp:

(JSC::DFG::AbstractState::initialize):
(JSC::DFG::AbstractState::execute):
(JSC::DFG::AbstractState::mergeStateAtTail):

  • dfg/DFGAbstractState.h:

(JSC::DFG::AbstractState::speculateInt32Unary):
(JSC::DFG::AbstractState::speculateNumberUnary):
(JSC::DFG::AbstractState::speculateBooleanUnary):
(JSC::DFG::AbstractState::speculateInt32Binary):
(JSC::DFG::AbstractState::speculateNumberBinary):

  • dfg/DFGAbstractValue.h:

(JSC::DFG::StructureAbstractValue::filter):
(JSC::DFG::StructureAbstractValue::speculationFromStructures):
(JSC::DFG::AbstractValue::AbstractValue):
(JSC::DFG::AbstractValue::clear):
(JSC::DFG::AbstractValue::isClear):
(JSC::DFG::AbstractValue::makeTop):
(JSC::DFG::AbstractValue::clobberStructures):
(JSC::DFG::AbstractValue::isTop):
(JSC::DFG::AbstractValue::set):
(JSC::DFG::AbstractValue::merge):
(JSC::DFG::AbstractValue::filter):
(JSC::DFG::AbstractValue::validateIgnoringValue):
(JSC::DFG::AbstractValue::validate):
(JSC::DFG::AbstractValue::checkConsistency):
(JSC::DFG::AbstractValue::dump):
(AbstractValue):

  • dfg/DFGArgumentPosition.h:

(JSC::DFG::ArgumentPosition::ArgumentPosition):
(JSC::DFG::ArgumentPosition::mergeArgumentAwareness):
(JSC::DFG::ArgumentPosition::prediction):
(ArgumentPosition):

  • dfg/DFGArgumentsSimplificationPhase.cpp:

(JSC::DFG::ArgumentsSimplificationPhase::run):

  • dfg/DFGByteCodeParser.cpp:

(ByteCodeParser):
(JSC::DFG::ByteCodeParser::injectLazyOperandSpeculation):
(JSC::DFG::ByteCodeParser::getLocal):
(JSC::DFG::ByteCodeParser::getArgument):
(JSC::DFG::ByteCodeParser::addCall):
(JSC::DFG::ByteCodeParser::getSpeculationWithoutOSRExit):
(JSC::DFG::ByteCodeParser::getSpeculation):
(InlineStackEntry):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleIntrinsic):
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::fixVariableAccessSpeculations):
(JSC::DFG::ByteCodeParser::parse):

  • dfg/DFGCSEPhase.cpp:

(JSC::DFG::CSEPhase::getIndexedPropertyStorageLoadElimination):
(JSC::DFG::CSEPhase::performNodeCSE):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::run):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixDoubleEdge):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::nameOfVariableAccessData):
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::predictArgumentTypes):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::getJSConstantSpeculation):
(JSC::DFG::Graph::isPredictedNumerical):
(JSC::DFG::Graph::byValIsPure):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::getSpeculation):

  • dfg/DFGNode.h:

(JSC::DFG::Node::Node):
(JSC::DFG::Node::getHeapPrediction):
(JSC::DFG::Node::predictHeap):
(JSC::DFG::Node::prediction):
(JSC::DFG::Node::predict):
(JSC::DFG::Node::shouldSpeculateInteger):
(JSC::DFG::Node::shouldSpeculateDouble):
(JSC::DFG::Node::shouldSpeculateNumber):
(JSC::DFG::Node::shouldSpeculateBoolean):
(JSC::DFG::Node::shouldSpeculateFinalObject):
(JSC::DFG::Node::shouldSpeculateFinalObjectOrOther):
(JSC::DFG::Node::shouldSpeculateArray):
(JSC::DFG::Node::shouldSpeculateArguments):
(JSC::DFG::Node::shouldSpeculateInt8Array):
(JSC::DFG::Node::shouldSpeculateInt16Array):
(JSC::DFG::Node::shouldSpeculateInt32Array):
(JSC::DFG::Node::shouldSpeculateUint8Array):
(JSC::DFG::Node::shouldSpeculateUint8ClampedArray):
(JSC::DFG::Node::shouldSpeculateUint16Array):
(JSC::DFG::Node::shouldSpeculateUint32Array):
(JSC::DFG::Node::shouldSpeculateFloat32Array):
(JSC::DFG::Node::shouldSpeculateFloat64Array):
(JSC::DFG::Node::shouldSpeculateArrayOrOther):
(JSC::DFG::Node::shouldSpeculateObject):
(JSC::DFG::Node::shouldSpeculateCell):
(Node):

  • dfg/DFGPredictionPropagationPhase.cpp:

(JSC::DFG::PredictionPropagationPhase::setPrediction):
(JSC::DFG::PredictionPropagationPhase::mergePrediction):
(JSC::DFG::PredictionPropagationPhase::propagate):
(JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::fillStorage):
(JSC::DFG::SpeculativeJIT::writeBarrier):
(JSC::DFG::GPRTemporary::GPRTemporary):
(JSC::DFG::FPRTemporary::FPRTemporary):
(JSC::DFG::SpeculativeJIT::compilePeepHoleDoubleBranch):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::checkArgumentTypes):
(JSC::DFG::SpeculativeJIT::compileGetCharCodeAt):
(JSC::DFG::SpeculativeJIT::compileGetByValOnString):
(JSC::DFG::SpeculativeJIT::compileValueToInt32):
(JSC::DFG::SpeculativeJIT::compileDoubleAsInt32):
(JSC::DFG::SpeculativeJIT::compileInt32ToDouble):
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayLength):
(JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
(JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
(JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
(JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
(JSC::DFG::SpeculativeJIT::compileInstanceOf):
(JSC::DFG::SpeculativeJIT::compileAdd):
(JSC::DFG::SpeculativeJIT::compileArithSub):
(JSC::DFG::SpeculativeJIT::compileArithNegate):
(JSC::DFG::SpeculativeJIT::compileArithMul):
(JSC::DFG::SpeculativeJIT::compileArithMod):
(JSC::DFG::SpeculativeJIT::compare):
(JSC::DFG::SpeculativeJIT::compileStrictEq):
(JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
(JSC::DFG::SpeculativeJIT::compileGetByValOnArguments):
(JSC::DFG::SpeculativeJIT::compileGetArgumentsLength):
(JSC::DFG::SpeculativeJIT::compileRegExpExec):

  • dfg/DFGSpeculativeJIT.h:

(DFG):
(JSC::DFG::ValueSource::forSpeculation):
(SpeculativeJIT):
(GPRTemporary):
(FPRTemporary):
(JSC::DFG::SpecDoubleOperand::SpecDoubleOperand):
(JSC::DFG::SpecDoubleOperand::~SpecDoubleOperand):
(JSC::DFG::SpecDoubleOperand::fpr):
(JSC::DFG::SpecCellOperand::SpecCellOperand):
(JSC::DFG::SpecCellOperand::~SpecCellOperand):
(JSC::DFG::SpecCellOperand::gpr):
(JSC::DFG::SpecBooleanOperand::SpecBooleanOperand):
(JSC::DFG::SpecBooleanOperand::~SpecBooleanOperand):
(JSC::DFG::SpecBooleanOperand::gpr):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
(JSC::DFG::SpeculativeJIT::fillSpecDouble):
(JSC::DFG::SpeculativeJIT::fillSpecCell):
(JSC::DFG::SpeculativeJIT::fillSpecBoolean):
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileDoubleCompare):
(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::emitBranch):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
(JSC::DFG::SpeculativeJIT::fillSpecDouble):
(JSC::DFG::SpeculativeJIT::fillSpecCell):
(JSC::DFG::SpeculativeJIT::fillSpecBoolean):
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileDoubleCompare):
(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::emitBranch):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGVariableAccessData.h:

(JSC::DFG::VariableAccessData::VariableAccessData):
(JSC::DFG::VariableAccessData::predict):
(JSC::DFG::VariableAccessData::nonUnifiedPrediction):
(JSC::DFG::VariableAccessData::prediction):
(JSC::DFG::VariableAccessData::argumentAwarePrediction):
(JSC::DFG::VariableAccessData::mergeArgumentAwarePrediction):
(JSC::DFG::VariableAccessData::shouldUseDoubleFormatAccordingToVote):
(JSC::DFG::VariableAccessData::makePredictionForDoubleFormat):
(VariableAccessData):

File:
1 edited

Legend:

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

    r118579 r119660  
    8383   
    8484private:
    85     bool setPrediction(PredictedType prediction)
     85    bool setPrediction(SpeculatedType prediction)
    8686    {
    8787        ASSERT(m_graph[m_compileIndex].hasResult());
     
    8989        // setPrediction() is used when we know that there is no way that we can change
    9090        // our minds about what the prediction is going to be. There is no semantic
    91         // difference between setPrediction() and mergePrediction() other than the
     91        // difference between setPrediction() and mergeSpeculation() other than the
    9292        // increased checking to validate this property.
    93         ASSERT(m_graph[m_compileIndex].prediction() == PredictNone || m_graph[m_compileIndex].prediction() == prediction);
     93        ASSERT(m_graph[m_compileIndex].prediction() == SpecNone || m_graph[m_compileIndex].prediction() == prediction);
    9494       
    9595        return m_graph[m_compileIndex].predict(prediction);
    9696    }
    9797   
    98     bool mergePrediction(PredictedType prediction)
     98    bool mergePrediction(SpeculatedType prediction)
    9999    {
    100100        ASSERT(m_graph[m_compileIndex].hasResult());
     
    135135        case JSConstant:
    136136        case WeakJSConstant: {
    137             changed |= setPrediction(predictionFromValue(m_graph.valueOfJSConstant(m_compileIndex)));
     137            changed |= setPrediction(speculationFromValue(m_graph.valueOfJSConstant(m_compileIndex)));
    138138            break;
    139139        }
     
    141141        case GetLocal: {
    142142            VariableAccessData* variableAccessData = node.variableAccessData();
    143             PredictedType prediction = variableAccessData->prediction();
     143            SpeculatedType prediction = variableAccessData->prediction();
    144144            if (prediction)
    145145                changed |= mergePrediction(prediction);
     
    169169        case BitLShift:
    170170        case BitURShift: {
    171             changed |= setPrediction(PredictInt32);
     171            changed |= setPrediction(SpecInt32);
    172172            flags |= NodeUsedAsInt;
    173173            flags &= ~(NodeUsedAsNumber | NodeNeedsNegZero);
     
    178178           
    179179        case ValueToInt32: {
    180             changed |= setPrediction(PredictInt32);
     180            changed |= setPrediction(SpecInt32);
    181181            flags |= NodeUsedAsInt;
    182182            flags &= ~(NodeUsedAsNumber | NodeNeedsNegZero);
     
    206206
    207207        case StringCharCodeAt: {
    208             changed |= mergePrediction(PredictInt32);
     208            changed |= mergePrediction(SpecInt32);
    209209            changed |= m_graph[node.child1()].mergeFlags(NodeUsedAsValue);
    210210            changed |= m_graph[node.child2()].mergeFlags(NodeUsedAsNumber | NodeUsedAsInt);
     
    213213
    214214        case ArithMod: {
    215             PredictedType left = m_graph[node.child1()].prediction();
    216             PredictedType right = m_graph[node.child2()].prediction();
     215            SpeculatedType left = m_graph[node.child1()].prediction();
     216            SpeculatedType right = m_graph[node.child2()].prediction();
    217217           
    218218            if (left && right) {
    219                 if (isInt32Prediction(mergePredictions(left, right))
     219                if (isInt32Speculation(mergeSpeculations(left, right))
    220220                    && nodeCanSpeculateInteger(node.arithNodeFlags()))
    221                     changed |= mergePrediction(PredictInt32);
    222                 else
    223                     changed |= mergePrediction(PredictDouble);
     221                    changed |= mergePrediction(SpecInt32);
     222                else
     223                    changed |= mergePrediction(SpecDouble);
    224224            }
    225225           
     
    232232        case UInt32ToNumber: {
    233233            if (nodeCanSpeculateInteger(node.arithNodeFlags()))
    234                 changed |= mergePrediction(PredictInt32);
     234                changed |= mergePrediction(SpecInt32);
    235235            else
    236                 changed |= mergePrediction(PredictNumber);
     236                changed |= mergePrediction(SpecNumber);
    237237           
    238238            changed |= m_graph[node.child1()].mergeFlags(flags);
     
    241241
    242242        case ValueAdd: {
    243             PredictedType left = m_graph[node.child1()].prediction();
    244             PredictedType right = m_graph[node.child2()].prediction();
     243            SpeculatedType left = m_graph[node.child1()].prediction();
     244            SpeculatedType right = m_graph[node.child2()].prediction();
    245245           
    246246            if (left && right) {
    247                 if (isNumberPrediction(left) && isNumberPrediction(right)) {
     247                if (isNumberSpeculation(left) && isNumberSpeculation(right)) {
    248248                    if (m_graph.addShouldSpeculateInteger(node))
    249                         changed |= mergePrediction(PredictInt32);
     249                        changed |= mergePrediction(SpecInt32);
    250250                    else
    251                         changed |= mergePrediction(PredictDouble);
    252                 } else if (!(left & PredictNumber) || !(right & PredictNumber)) {
     251                        changed |= mergePrediction(SpecDouble);
     252                } else if (!(left & SpecNumber) || !(right & SpecNumber)) {
    253253                    // left or right is definitely something other than a number.
    254                     changed |= mergePrediction(PredictString);
     254                    changed |= mergePrediction(SpecString);
    255255                } else
    256                     changed |= mergePrediction(PredictString | PredictInt32 | PredictDouble);
     256                    changed |= mergePrediction(SpecString | SpecInt32 | SpecDouble);
    257257            }
    258258           
     
    266266           
    267267        case ArithAdd: {
    268             PredictedType left = m_graph[node.child1()].prediction();
    269             PredictedType right = m_graph[node.child2()].prediction();
     268            SpeculatedType left = m_graph[node.child1()].prediction();
     269            SpeculatedType right = m_graph[node.child2()].prediction();
    270270           
    271271            if (left && right) {
    272272                if (m_graph.addShouldSpeculateInteger(node))
    273                     changed |= mergePrediction(PredictInt32);
    274                 else
    275                     changed |= mergePrediction(PredictDouble);
     273                    changed |= mergePrediction(SpecInt32);
     274                else
     275                    changed |= mergePrediction(SpecDouble);
    276276            }
    277277           
     
    285285           
    286286        case ArithSub: {
    287             PredictedType left = m_graph[node.child1()].prediction();
    288             PredictedType right = m_graph[node.child2()].prediction();
     287            SpeculatedType left = m_graph[node.child1()].prediction();
     288            SpeculatedType right = m_graph[node.child2()].prediction();
    289289           
    290290            if (left && right) {
    291291                if (m_graph.addShouldSpeculateInteger(node))
    292                     changed |= mergePrediction(PredictInt32);
    293                 else
    294                     changed |= mergePrediction(PredictDouble);
     292                    changed |= mergePrediction(SpecInt32);
     293                else
     294                    changed |= mergePrediction(SpecDouble);
    295295            }
    296296
     
    306306            if (m_graph[node.child1()].prediction()) {
    307307                if (m_graph.negateShouldSpeculateInteger(node))
    308                     changed |= mergePrediction(PredictInt32);
    309                 else
    310                     changed |= mergePrediction(PredictDouble);
     308                    changed |= mergePrediction(SpecInt32);
     309                else
     310                    changed |= mergePrediction(SpecDouble);
    311311            }
    312312
     
    316316        case ArithMin:
    317317        case ArithMax: {
    318             PredictedType left = m_graph[node.child1()].prediction();
    319             PredictedType right = m_graph[node.child2()].prediction();
     318            SpeculatedType left = m_graph[node.child1()].prediction();
     319            SpeculatedType right = m_graph[node.child2()].prediction();
    320320           
    321321            if (left && right) {
    322                 if (isInt32Prediction(mergePredictions(left, right))
     322                if (isInt32Speculation(mergeSpeculations(left, right))
    323323                    && nodeCanSpeculateInteger(node.arithNodeFlags()))
    324                     changed |= mergePrediction(PredictInt32);
    325                 else
    326                     changed |= mergePrediction(PredictDouble);
     324                    changed |= mergePrediction(SpecInt32);
     325                else
     326                    changed |= mergePrediction(SpecDouble);
    327327            }
    328328
     
    334334
    335335        case ArithMul: {
    336             PredictedType left = m_graph[node.child1()].prediction();
    337             PredictedType right = m_graph[node.child2()].prediction();
     336            SpeculatedType left = m_graph[node.child1()].prediction();
     337            SpeculatedType right = m_graph[node.child2()].prediction();
    338338           
    339339            if (left && right) {
    340340                if (m_graph.mulShouldSpeculateInteger(node))
    341                     changed |= mergePrediction(PredictInt32);
    342                 else
    343                     changed |= mergePrediction(PredictDouble);
     341                    changed |= mergePrediction(SpecInt32);
     342                else
     343                    changed |= mergePrediction(SpecDouble);
    344344            }
    345345
     
    356356           
    357357        case ArithDiv: {
    358             PredictedType left = m_graph[node.child1()].prediction();
    359             PredictedType right = m_graph[node.child2()].prediction();
     358            SpeculatedType left = m_graph[node.child1()].prediction();
     359            SpeculatedType right = m_graph[node.child2()].prediction();
    360360           
    361361            if (left && right) {
    362                 if (isInt32Prediction(mergePredictions(left, right))
     362                if (isInt32Speculation(mergeSpeculations(left, right))
    363363                    && nodeCanSpeculateInteger(node.arithNodeFlags()))
    364                     changed |= mergePrediction(PredictInt32);
    365                 else
    366                     changed |= mergePrediction(PredictDouble);
     364                    changed |= mergePrediction(SpecInt32);
     365                else
     366                    changed |= mergePrediction(SpecDouble);
    367367            }
    368368
     
    379379           
    380380        case ArithSqrt: {
    381             changed |= setPrediction(PredictDouble);
     381            changed |= setPrediction(SpecDouble);
    382382            changed |= m_graph[node.child1()].mergeFlags(flags | NodeUsedAsValue);
    383383            break;
     
    385385           
    386386        case ArithAbs: {
    387             PredictedType child = m_graph[node.child1()].prediction();
     387            SpeculatedType child = m_graph[node.child1()].prediction();
    388388            if (nodeCanSpeculateInteger(node.arithNodeFlags()))
    389389                changed |= mergePrediction(child);
    390390            else
    391                 changed |= setPrediction(PredictDouble);
     391                changed |= setPrediction(SpecDouble);
    392392
    393393            flags &= ~NodeNeedsNegZero;
     
    410410        case IsObject:
    411411        case IsFunction: {
    412             changed |= setPrediction(PredictBoolean);
     412            changed |= setPrediction(SpecBoolean);
    413413            changed |= mergeDefaultFlags(node);
    414414            break;
     
    429429            if (m_graph[node.child1()].shouldSpeculateFloat32Array()
    430430                || m_graph[node.child1()].shouldSpeculateFloat64Array())
    431                 changed |= mergePrediction(PredictDouble);
     431                changed |= mergePrediction(SpecDouble);
    432432            else
    433433                changed |= mergePrediction(node.getHeapPrediction());
     
    445445           
    446446        case GetMyArgumentsLengthSafe: {
    447             changed |= setPrediction(PredictInt32);
     447            changed |= setPrediction(SpecInt32);
    448448            break;
    449449        }
     
    451451        case GetPropertyStorage:
    452452        case GetIndexedPropertyStorage: {
    453             changed |= setPrediction(PredictOther);
     453            changed |= setPrediction(SpecOther);
    454454            changed |= mergeDefaultFlags(node);
    455455            break;
     
    475475           
    476476        case ConvertThis: {
    477             PredictedType prediction = m_graph[node.child1()].prediction();
     477            SpeculatedType prediction = m_graph[node.child1()].prediction();
    478478            if (prediction) {
    479                 if (prediction & ~PredictObjectMask) {
    480                     prediction &= PredictObjectMask;
    481                     prediction = mergePredictions(prediction, PredictObjectOther);
     479                if (prediction & ~SpecObjectMask) {
     480                    prediction &= SpecObjectMask;
     481                    prediction = mergeSpeculations(prediction, SpecObjectOther);
    482482                }
    483483                changed |= mergePrediction(prediction);
     
    502502        case ResolveBaseStrictPut:
    503503        case ResolveGlobal: {
    504             PredictedType prediction = node.getHeapPrediction();
     504            SpeculatedType prediction = node.getHeapPrediction();
    505505            changed |= mergePrediction(prediction);
    506506            break;
     
    508508           
    509509        case GetScopeChain: {
    510             changed |= setPrediction(PredictCellOther);
     510            changed |= setPrediction(SpecCellOther);
    511511            break;
    512512        }
    513513           
    514514        case GetCallee: {
    515             changed |= setPrediction(PredictFunction);
     515            changed |= setPrediction(SpecFunction);
    516516            break;
    517517        }
     
    519519        case CreateThis:
    520520        case NewObject: {
    521             changed |= setPrediction(PredictFinalObject);
     521            changed |= setPrediction(SpecFinalObject);
    522522            changed |= mergeDefaultFlags(node);
    523523            break;
     
    525525           
    526526        case NewArray: {
    527             changed |= setPrediction(PredictArray);
     527            changed |= setPrediction(SpecArray);
    528528            for (unsigned childIdx = node.firstChild();
    529529                 childIdx < node.firstChild() + node.numChildren();
     
    536536           
    537537        case NewArrayBuffer: {
    538             changed |= setPrediction(PredictArray);
     538            changed |= setPrediction(SpecArray);
    539539            break;
    540540        }
    541541           
    542542        case NewRegexp: {
    543             changed |= setPrediction(PredictObjectOther);
     543            changed |= setPrediction(SpecObjectOther);
    544544            break;
    545545        }
    546546       
    547547        case StringCharAt: {
    548             changed |= setPrediction(PredictString);
     548            changed |= setPrediction(SpecString);
    549549            changed |= m_graph[node.child1()].mergeFlags(NodeUsedAsValue);
    550550            changed |= m_graph[node.child2()].mergeFlags(NodeUsedAsNumber | NodeUsedAsInt);
     
    553553           
    554554        case StrCat: {
    555             changed |= setPrediction(PredictString);
     555            changed |= setPrediction(SpecString);
    556556            for (unsigned childIdx = node.firstChild();
    557557                 childIdx < node.firstChild() + node.numChildren();
     
    562562           
    563563        case ToPrimitive: {
    564             PredictedType child = m_graph[node.child1()].prediction();
     564            SpeculatedType child = m_graph[node.child1()].prediction();
    565565            if (child) {
    566                 if (isObjectPrediction(child)) {
     566                if (isObjectSpeculation(child)) {
    567567                    // I'd love to fold this case into the case below, but I can't, because
    568                     // removing PredictObjectMask from something that only has an object
    569                     // prediction and nothing else means we have an ill-formed PredictedType
     568                    // removing SpecObjectMask from something that only has an object
     569                    // prediction and nothing else means we have an ill-formed SpeculatedType
    570570                    // (strong predict-none). This should be killed once we remove all traces
    571571                    // of static (aka weak) predictions.
    572                     changed |= mergePrediction(PredictString);
    573                 } else if (child & PredictObjectMask) {
     572                    changed |= mergePrediction(SpecString);
     573                } else if (child & SpecObjectMask) {
    574574                    // Objects get turned into strings. So if the input has hints of objectness,
    575575                    // the output will have hinsts of stringiness.
    576576                    changed |= mergePrediction(
    577                         mergePredictions(child & ~PredictObjectMask, PredictString));
     577                        mergeSpeculations(child & ~SpecObjectMask, SpecString));
    578578                } else
    579579                    changed |= mergePrediction(child);
     
    584584           
    585585        case CreateActivation: {
    586             changed |= setPrediction(PredictObjectOther);
     586            changed |= setPrediction(SpecObjectOther);
    587587            break;
    588588        }
     
    591591            // At this stage we don't try to predict whether the arguments are ours or
    592592            // someone else's. We could, but we don't, yet.
    593             changed |= setPrediction(PredictArguments);
     593            changed |= setPrediction(SpecArguments);
    594594            break;
    595595        }
     
    598598        case NewFunctionNoCheck:
    599599        case NewFunctionExpression: {
    600             changed |= setPrediction(PredictFunction);
     600            changed |= setPrediction(SpecFunction);
    601601            break;
    602602        }
     
    690690
    691691#if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE)
    692         dataLog("%s\n", predictionToString(m_graph[m_compileIndex].prediction()));
     692        dataLog("%s\n", speculationToString(m_graph[m_compileIndex].prediction()));
    693693#endif
    694694       
     
    785785            case ArithAdd:
    786786            case ArithSub: {
    787                 PredictedType left = m_graph[node.child1()].prediction();
    788                 PredictedType right = m_graph[node.child2()].prediction();
     787                SpeculatedType left = m_graph[node.child1()].prediction();
     788                SpeculatedType right = m_graph[node.child2()].prediction();
    789789               
    790790                VariableAccessData::Ballot ballot;
    791791               
    792                 if (isNumberPrediction(left) && isNumberPrediction(right)
     792                if (isNumberSpeculation(left) && isNumberSpeculation(right)
    793793                    && !m_graph.addShouldSpeculateInteger(node))
    794794                    ballot = VariableAccessData::VoteDouble;
     
    802802               
    803803            case ArithMul: {
    804                 PredictedType left = m_graph[node.child1()].prediction();
    805                 PredictedType right = m_graph[node.child2()].prediction();
     804                SpeculatedType left = m_graph[node.child1()].prediction();
     805                SpeculatedType right = m_graph[node.child2()].prediction();
    806806               
    807807                VariableAccessData::Ballot ballot;
    808808               
    809                 if (isNumberPrediction(left) && isNumberPrediction(right)
     809                if (isNumberSpeculation(left) && isNumberSpeculation(right)
    810810                    && !m_graph.mulShouldSpeculateInteger(node))
    811811                    ballot = VariableAccessData::VoteDouble;
     
    822822            case ArithMod:
    823823            case ArithDiv: {
    824                 PredictedType left = m_graph[node.child1()].prediction();
    825                 PredictedType right = m_graph[node.child2()].prediction();
     824                SpeculatedType left = m_graph[node.child1()].prediction();
     825                SpeculatedType right = m_graph[node.child2()].prediction();
    826826               
    827827                VariableAccessData::Ballot ballot;
    828828               
    829                 if (isNumberPrediction(left) && isNumberPrediction(right)
     829                if (isNumberSpeculation(left) && isNumberSpeculation(right)
    830830                    && !(Node::shouldSpeculateInteger(m_graph[node.child1()], m_graph[node.child1()])
    831831                         && node.canSpeculateInteger()))
     
    855855               
    856856            case SetLocal: {
    857                 PredictedType prediction = m_graph[node.child1()].prediction();
    858                 if (isDoublePrediction(prediction))
     857                SpeculatedType prediction = m_graph[node.child1()].prediction();
     858                if (isDoubleSpeculation(prediction))
    859859                    node.variableAccessData()->vote(VariableAccessData::VoteDouble);
    860                 else if (!isNumberPrediction(prediction) || isInt32Prediction(prediction))
     860                else if (!isNumberSpeculation(prediction) || isInt32Speculation(prediction))
    861861                    node.variableAccessData()->vote(VariableAccessData::VoteValue);
    862862                break;
Note: See TracChangeset for help on using the changeset viewer.