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/DFGNode.h

    r119655 r119660  
    4040#include "JSValue.h"
    4141#include "Operands.h"
    42 #include "PredictedType.h"
     42#include "SpeculatedType.h"
    4343#include "ValueProfile.h"
    4444
     
    8383        , m_virtualRegister(InvalidVirtualRegister)
    8484        , m_refCount(0)
    85         , m_prediction(PredictNone)
     85        , m_prediction(SpecNone)
    8686    {
    8787        setOpAndDefaultFlags(op);
     
    9696        , m_refCount(0)
    9797        , m_opInfo(imm.m_value)
    98         , m_prediction(PredictNone)
     98        , m_prediction(SpecNone)
    9999    {
    100100        setOpAndDefaultFlags(op);
     
    110110        , m_opInfo(imm1.m_value)
    111111        , m_opInfo2(safeCast<unsigned>(imm2.m_value))
    112         , m_prediction(PredictNone)
     112        , m_prediction(SpecNone)
    113113    {
    114114        setOpAndDefaultFlags(op);
     
    124124        , m_opInfo(imm1.m_value)
    125125        , m_opInfo2(safeCast<unsigned>(imm2.m_value))
    126         , m_prediction(PredictNone)
     126        , m_prediction(SpecNone)
    127127    {
    128128        setOpAndDefaultFlags(op);
     
    595595    }
    596596   
    597     PredictedType getHeapPrediction()
     597    SpeculatedType getHeapPrediction()
    598598    {
    599599        ASSERT(hasHeapPrediction());
    600         return static_cast<PredictedType>(m_opInfo2);
    601     }
    602    
    603     bool predictHeap(PredictedType prediction)
     600        return static_cast<SpeculatedType>(m_opInfo2);
     601    }
     602   
     603    bool predictHeap(SpeculatedType prediction)
    604604    {
    605605        ASSERT(hasHeapPrediction());
    606606       
    607         return mergePrediction(m_opInfo2, prediction);
     607        return mergeSpeculation(m_opInfo2, prediction);
    608608    }
    609609   
     
    778778    }
    779779   
    780     PredictedType prediction()
     780    SpeculatedType prediction()
    781781    {
    782782        return m_prediction;
    783783    }
    784784   
    785     bool predict(PredictedType prediction)
    786     {
    787         return mergePrediction(m_prediction, prediction);
     785    bool predict(SpeculatedType prediction)
     786    {
     787        return mergeSpeculation(m_prediction, prediction);
    788788    }
    789789   
    790790    bool shouldSpeculateInteger()
    791791    {
    792         return isInt32Prediction(prediction());
     792        return isInt32Speculation(prediction());
    793793    }
    794794   
    795795    bool shouldSpeculateDouble()
    796796    {
    797         return isDoublePrediction(prediction());
     797        return isDoubleSpeculation(prediction());
    798798    }
    799799   
    800800    bool shouldSpeculateNumber()
    801801    {
    802         return isNumberPrediction(prediction());
     802        return isNumberSpeculation(prediction());
    803803    }
    804804   
    805805    bool shouldSpeculateBoolean()
    806806    {
    807         return isBooleanPrediction(prediction());
     807        return isBooleanSpeculation(prediction());
    808808    }
    809809   
    810810    bool shouldSpeculateFinalObject()
    811811    {
    812         return isFinalObjectPrediction(prediction());
     812        return isFinalObjectSpeculation(prediction());
    813813    }
    814814   
    815815    bool shouldSpeculateFinalObjectOrOther()
    816816    {
    817         return isFinalObjectOrOtherPrediction(prediction());
     817        return isFinalObjectOrOtherSpeculation(prediction());
    818818    }
    819819   
    820820    bool shouldSpeculateArray()
    821821    {
    822         return isArrayPrediction(prediction());
     822        return isArraySpeculation(prediction());
    823823    }
    824824   
    825825    bool shouldSpeculateArguments()
    826826    {
    827         return isArgumentsPrediction(prediction());
     827        return isArgumentsSpeculation(prediction());
    828828    }
    829829   
    830830    bool shouldSpeculateInt8Array()
    831831    {
    832         return isInt8ArrayPrediction(prediction());
     832        return isInt8ArraySpeculation(prediction());
    833833    }
    834834   
    835835    bool shouldSpeculateInt16Array()
    836836    {
    837         return isInt16ArrayPrediction(prediction());
     837        return isInt16ArraySpeculation(prediction());
    838838    }
    839839   
    840840    bool shouldSpeculateInt32Array()
    841841    {
    842         return isInt32ArrayPrediction(prediction());
     842        return isInt32ArraySpeculation(prediction());
    843843    }
    844844   
    845845    bool shouldSpeculateUint8Array()
    846846    {
    847         return isUint8ArrayPrediction(prediction());
     847        return isUint8ArraySpeculation(prediction());
    848848    }
    849849
    850850    bool shouldSpeculateUint8ClampedArray()
    851851    {
    852         return isUint8ClampedArrayPrediction(prediction());
     852        return isUint8ClampedArraySpeculation(prediction());
    853853    }
    854854   
    855855    bool shouldSpeculateUint16Array()
    856856    {
    857         return isUint16ArrayPrediction(prediction());
     857        return isUint16ArraySpeculation(prediction());
    858858    }
    859859   
    860860    bool shouldSpeculateUint32Array()
    861861    {
    862         return isUint32ArrayPrediction(prediction());
     862        return isUint32ArraySpeculation(prediction());
    863863    }
    864864   
    865865    bool shouldSpeculateFloat32Array()
    866866    {
    867         return isFloat32ArrayPrediction(prediction());
     867        return isFloat32ArraySpeculation(prediction());
    868868    }
    869869   
    870870    bool shouldSpeculateFloat64Array()
    871871    {
    872         return isFloat64ArrayPrediction(prediction());
     872        return isFloat64ArraySpeculation(prediction());
    873873    }
    874874   
    875875    bool shouldSpeculateArrayOrOther()
    876876    {
    877         return isArrayOrOtherPrediction(prediction());
     877        return isArrayOrOtherSpeculation(prediction());
    878878    }
    879879   
    880880    bool shouldSpeculateObject()
    881881    {
    882         return isObjectPrediction(prediction());
     882        return isObjectSpeculation(prediction());
    883883    }
    884884   
    885885    bool shouldSpeculateCell()
    886886    {
    887         return isCellPrediction(prediction());
     887        return isCellSpeculation(prediction());
    888888    }
    889889   
     
    943943    unsigned m_opInfo2;
    944944    // The prediction ascribed to this node after propagation.
    945     PredictedType m_prediction;
     945    SpeculatedType m_prediction;
    946946};
    947947
Note: See TracChangeset for help on using the changeset viewer.