Changeset 200034 in webkit


Ignore:
Timestamp:
Apr 25, 2016 10:48:46 AM (8 years ago)
Author:
mark.lam@apple.com
Message:

Renaming SpecInt32, SpecInt52, MachineInt to SpecInt32Only, SpecInt52Only, AnyInt.
https://bugs.webkit.org/show_bug.cgi?id=156941

Reviewed by Filip Pizlo.

While looking at https://bugs.webkit.org/show_bug.cgi?id=153431, it was decided
that SpecInt32Only, SpecInt52Only, and AnyInt would be better names for
SpecInt32, SpecInt52, and MachineInt. Let's do a bulk rename.

This is only a renaming patch, and deletion of a piece of unused code. There are
no semantic changes.

  • bindings/ScriptValue.cpp:

(Inspector::jsToInspectorValue):

  • bytecode/SpeculatedType.cpp:

(JSC::dumpSpeculation):
(JSC::speculationToAbbreviatedString):
(JSC::speculationFromValue):
(JSC::leastUpperBoundOfStrictlyEquivalentSpeculations):
(JSC::typeOfDoubleNegation):
(JSC::typeOfDoubleRounding):

  • bytecode/SpeculatedType.h:

(JSC::isInt32Speculation):
(JSC::isInt32OrBooleanSpeculation):
(JSC::isInt32SpeculationForArithmetic):
(JSC::isInt32OrBooleanSpeculationForArithmetic):
(JSC::isInt32OrBooleanSpeculationExpectingDefined):
(JSC::isInt52Speculation):
(JSC::isAnyIntSpeculation):
(JSC::isAnyIntAsDoubleSpeculation):
(JSC::isDoubleRealSpeculation):
(JSC::isMachineIntSpeculation): Deleted.
(JSC::isInt52AsDoubleSpeculation): Deleted.
(JSC::isIntegerSpeculation): Deleted.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGAbstractValue.cpp:

(JSC::DFG::AbstractValue::set):
(JSC::DFG::AbstractValue::fixTypeForRepresentation):
(JSC::DFG::AbstractValue::checkConsistency):
(JSC::DFG::AbstractValue::resultType):

  • dfg/DFGAbstractValue.h:

(JSC::DFG::AbstractValue::validateType):

  • dfg/DFGArgumentsUtilities.cpp:

(JSC::DFG::emitCodeToGetArgumentsArrayLength):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixupToThis):
(JSC::DFG::FixupPhase::observeUseKindOnNode):
(JSC::DFG::FixupPhase::fixIntConvertingEdge):
(JSC::DFG::FixupPhase::fixIntOrBooleanEdge):
(JSC::DFG::FixupPhase::fixDoubleOrBooleanEdge):
(JSC::DFG::FixupPhase::truncateConstantToInt32):
(JSC::DFG::FixupPhase::attemptToMakeIntegerAdd):
(JSC::DFG::FixupPhase::prependGetArrayLength):
(JSC::DFG::FixupPhase::fixupChecksInBlock):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::addShouldSpeculateInt32):
(JSC::DFG::Graph::addShouldSpeculateAnyInt):
(JSC::DFG::Graph::binaryArithShouldSpeculateInt32):
(JSC::DFG::Graph::binaryArithShouldSpeculateAnyInt):
(JSC::DFG::Graph::unaryArithShouldSpeculateInt32):
(JSC::DFG::Graph::unaryArithShouldSpeculateAnyInt):
(JSC::DFG::Graph::addShouldSpeculateMachineInt): Deleted.
(JSC::DFG::Graph::binaryArithShouldSpeculateMachineInt): Deleted.
(JSC::DFG::Graph::unaryArithShouldSpeculateMachineInt): Deleted.

  • dfg/DFGInPlaceAbstractState.cpp:

(JSC::DFG::InPlaceAbstractState::initialize):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::noticeOSREntry):

  • dfg/DFGNode.cpp:

(JSC::DFG::Node::convertToIdentityOn):

  • dfg/DFGNode.h:

(JSC::DFG::Node::asNumber):
(JSC::DFG::Node::isAnyIntConstant):
(JSC::DFG::Node::asAnyInt):
(JSC::DFG::Node::isBooleanConstant):
(JSC::DFG::Node::shouldSpeculateInt32OrBooleanExpectingDefined):
(JSC::DFG::Node::shouldSpeculateAnyInt):
(JSC::DFG::Node::shouldSpeculateDouble):
(JSC::DFG::Node::shouldSpeculateNumber):
(JSC::DFG::Node::isMachineIntConstant): Deleted.
(JSC::DFG::Node::asMachineInt): Deleted.
(JSC::DFG::Node::shouldSpeculateMachineInt): Deleted.

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::OSREntryData::dumpInContext):
(JSC::DFG::prepareOSREntry):

  • dfg/DFGOSREntry.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSSALoweringPhase.cpp:

(JSC::DFG::SSALoweringPhase::handleNode):
(JSC::DFG::SSALoweringPhase::lowerBoundsCheck):

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::SafeToExecuteEdge::operator()):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::silentFill):
(JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
(JSC::DFG::SpeculativeJIT::compileArithAdd):
(JSC::DFG::SpeculativeJIT::compileArithSub):
(JSC::DFG::SpeculativeJIT::compileArithNegate):
(JSC::DFG::SpeculativeJIT::speculateInt32):
(JSC::DFG::SpeculativeJIT::speculateNumber):
(JSC::DFG::SpeculativeJIT::speculateMisc):
(JSC::DFG::SpeculativeJIT::speculate):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::spill):
(JSC::DFG::SpeculativeJIT::isKnownInteger):
(JSC::DFG::SpeculativeJIT::isKnownCell):
(JSC::DFG::SpeculativeJIT::isKnownNotInteger):
(JSC::DFG::SpeculativeJIT::isKnownNotNumber):
(JSC::DFG::SpeculativeJIT::isKnownNotCell):
(JSC::DFG::SpeculativeJIT::isKnownNotOther):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):
(JSC::DFG::SpeculativeJIT::fillSpeculateInt52):
(JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
(JSC::DFG::SpeculativeJIT::emitBranch):
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::blessBoolean):
(JSC::DFG::SpeculativeJIT::convertAnyInt):
(JSC::DFG::SpeculativeJIT::speculateAnyInt):
(JSC::DFG::SpeculativeJIT::speculateDoubleRepAnyInt):
(JSC::DFG::SpeculativeJIT::convertMachineInt): Deleted.
(JSC::DFG::SpeculativeJIT::speculateMachineInt): Deleted.
(JSC::DFG::SpeculativeJIT::speculateDoubleRepMachineInt): Deleted.

  • dfg/DFGUseKind.cpp:

(WTF::printInternal):

  • dfg/DFGUseKind.h:

(JSC::DFG::typeFilterFor):
(JSC::DFG::isNumerical):
(JSC::DFG::isDouble):

  • dfg/DFGValidate.cpp:
  • dfg/DFGVariableAccessData.cpp:

(JSC::DFG::VariableAccessData::makePredictionForDoubleFormat):
(JSC::DFG::VariableAccessData::couldRepresentInt52Impl):
(JSC::DFG::VariableAccessData::flushFormat):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileInt52Constant):
(JSC::FTL::DFG::LowerDFGToB3::compileInt52Rep):
(JSC::FTL::DFG::LowerDFGToB3::compileArithAddOrSub):
(JSC::FTL::DFG::LowerDFGToB3::compileArithNegate):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileArrayPush):
(JSC::FTL::DFG::LowerDFGToB3::lowInt32):
(JSC::FTL::DFG::LowerDFGToB3::strictInt52ToInt32):
(JSC::FTL::DFG::LowerDFGToB3::isInt32):
(JSC::FTL::DFG::LowerDFGToB3::isNotInt32):
(JSC::FTL::DFG::LowerDFGToB3::jsValueToStrictInt52):
(JSC::FTL::DFG::LowerDFGToB3::doubleToStrictInt52):
(JSC::FTL::DFG::LowerDFGToB3::speculate):
(JSC::FTL::DFG::LowerDFGToB3::speculateCellOrOther):
(JSC::FTL::DFG::LowerDFGToB3::speculateAnyInt):
(JSC::FTL::DFG::LowerDFGToB3::speculateDoubleRepReal):
(JSC::FTL::DFG::LowerDFGToB3::speculateDoubleRepAnyInt):
(JSC::FTL::DFG::LowerDFGToB3::speculateMachineInt): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::speculateDoubleRepMachineInt): Deleted.

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_profile_type):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_profile_type):

  • runtime/JSCJSValue.h:
  • runtime/JSCJSValueInlines.h:

(JSC::isInt52):
(JSC::JSValue::isAnyInt):
(JSC::JSValue::asAnyInt):
(JSC::JSValue::isMachineInt): Deleted.
(JSC::JSValue::asMachineInt): Deleted.

  • runtime/RuntimeType.cpp:

(JSC::runtimeTypeForValue):
(JSC::runtimeTypeAsString):

  • runtime/RuntimeType.h:
  • runtime/TypeSet.cpp:

(JSC::TypeSet::dumpTypes):
(JSC::TypeSet::displayName):
(JSC::TypeSet::inspectorTypeSet):
(JSC::TypeSet::toJSONString):

Location:
trunk/Source/JavaScriptCore
Files:
37 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r199968 r200034  
     12016-04-25  Mark Lam  <mark.lam@apple.com>
     2
     3        Renaming SpecInt32, SpecInt52, MachineInt to SpecInt32Only, SpecInt52Only, AnyInt.
     4        https://bugs.webkit.org/show_bug.cgi?id=156941
     5
     6        Reviewed by Filip Pizlo.
     7
     8        While looking at https://bugs.webkit.org/show_bug.cgi?id=153431, it was decided
     9        that SpecInt32Only, SpecInt52Only, and AnyInt would be better names for
     10        SpecInt32, SpecInt52, and MachineInt.  Let's do a bulk rename.
     11
     12        This is only a renaming patch, and deletion of a piece of unused code.  There are
     13        no semantic changes.
     14
     15        * bindings/ScriptValue.cpp:
     16        (Inspector::jsToInspectorValue):
     17        * bytecode/SpeculatedType.cpp:
     18        (JSC::dumpSpeculation):
     19        (JSC::speculationToAbbreviatedString):
     20        (JSC::speculationFromValue):
     21        (JSC::leastUpperBoundOfStrictlyEquivalentSpeculations):
     22        (JSC::typeOfDoubleNegation):
     23        (JSC::typeOfDoubleRounding):
     24        * bytecode/SpeculatedType.h:
     25        (JSC::isInt32Speculation):
     26        (JSC::isInt32OrBooleanSpeculation):
     27        (JSC::isInt32SpeculationForArithmetic):
     28        (JSC::isInt32OrBooleanSpeculationForArithmetic):
     29        (JSC::isInt32OrBooleanSpeculationExpectingDefined):
     30        (JSC::isInt52Speculation):
     31        (JSC::isAnyIntSpeculation):
     32        (JSC::isAnyIntAsDoubleSpeculation):
     33        (JSC::isDoubleRealSpeculation):
     34        (JSC::isMachineIntSpeculation): Deleted.
     35        (JSC::isInt52AsDoubleSpeculation): Deleted.
     36        (JSC::isIntegerSpeculation): Deleted.
     37        * dfg/DFGAbstractInterpreterInlines.h:
     38        (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
     39        * dfg/DFGAbstractValue.cpp:
     40        (JSC::DFG::AbstractValue::set):
     41        (JSC::DFG::AbstractValue::fixTypeForRepresentation):
     42        (JSC::DFG::AbstractValue::checkConsistency):
     43        (JSC::DFG::AbstractValue::resultType):
     44        * dfg/DFGAbstractValue.h:
     45        (JSC::DFG::AbstractValue::validateType):
     46        * dfg/DFGArgumentsUtilities.cpp:
     47        (JSC::DFG::emitCodeToGetArgumentsArrayLength):
     48        * dfg/DFGByteCodeParser.cpp:
     49        (JSC::DFG::ByteCodeParser::handleInlining):
     50        (JSC::DFG::ByteCodeParser::handleIntrinsicCall):
     51        * dfg/DFGFixupPhase.cpp:
     52        (JSC::DFG::FixupPhase::fixupNode):
     53        (JSC::DFG::FixupPhase::fixupToThis):
     54        (JSC::DFG::FixupPhase::observeUseKindOnNode):
     55        (JSC::DFG::FixupPhase::fixIntConvertingEdge):
     56        (JSC::DFG::FixupPhase::fixIntOrBooleanEdge):
     57        (JSC::DFG::FixupPhase::fixDoubleOrBooleanEdge):
     58        (JSC::DFG::FixupPhase::truncateConstantToInt32):
     59        (JSC::DFG::FixupPhase::attemptToMakeIntegerAdd):
     60        (JSC::DFG::FixupPhase::prependGetArrayLength):
     61        (JSC::DFG::FixupPhase::fixupChecksInBlock):
     62        * dfg/DFGGraph.h:
     63        (JSC::DFG::Graph::addShouldSpeculateInt32):
     64        (JSC::DFG::Graph::addShouldSpeculateAnyInt):
     65        (JSC::DFG::Graph::binaryArithShouldSpeculateInt32):
     66        (JSC::DFG::Graph::binaryArithShouldSpeculateAnyInt):
     67        (JSC::DFG::Graph::unaryArithShouldSpeculateInt32):
     68        (JSC::DFG::Graph::unaryArithShouldSpeculateAnyInt):
     69        (JSC::DFG::Graph::addShouldSpeculateMachineInt): Deleted.
     70        (JSC::DFG::Graph::binaryArithShouldSpeculateMachineInt): Deleted.
     71        (JSC::DFG::Graph::unaryArithShouldSpeculateMachineInt): Deleted.
     72        * dfg/DFGInPlaceAbstractState.cpp:
     73        (JSC::DFG::InPlaceAbstractState::initialize):
     74        * dfg/DFGJITCompiler.cpp:
     75        (JSC::DFG::JITCompiler::noticeOSREntry):
     76        * dfg/DFGNode.cpp:
     77        (JSC::DFG::Node::convertToIdentityOn):
     78        * dfg/DFGNode.h:
     79        (JSC::DFG::Node::asNumber):
     80        (JSC::DFG::Node::isAnyIntConstant):
     81        (JSC::DFG::Node::asAnyInt):
     82        (JSC::DFG::Node::isBooleanConstant):
     83        (JSC::DFG::Node::shouldSpeculateInt32OrBooleanExpectingDefined):
     84        (JSC::DFG::Node::shouldSpeculateAnyInt):
     85        (JSC::DFG::Node::shouldSpeculateDouble):
     86        (JSC::DFG::Node::shouldSpeculateNumber):
     87        (JSC::DFG::Node::isMachineIntConstant): Deleted.
     88        (JSC::DFG::Node::asMachineInt): Deleted.
     89        (JSC::DFG::Node::shouldSpeculateMachineInt): Deleted.
     90        * dfg/DFGOSREntry.cpp:
     91        (JSC::DFG::OSREntryData::dumpInContext):
     92        (JSC::DFG::prepareOSREntry):
     93        * dfg/DFGOSREntry.h:
     94        * dfg/DFGPredictionPropagationPhase.cpp:
     95        * dfg/DFGSSALoweringPhase.cpp:
     96        (JSC::DFG::SSALoweringPhase::handleNode):
     97        (JSC::DFG::SSALoweringPhase::lowerBoundsCheck):
     98        * dfg/DFGSafeToExecute.h:
     99        (JSC::DFG::SafeToExecuteEdge::operator()):
     100        * dfg/DFGSpeculativeJIT.cpp:
     101        (JSC::DFG::SpeculativeJIT::silentFill):
     102        (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
     103        (JSC::DFG::SpeculativeJIT::compileArithAdd):
     104        (JSC::DFG::SpeculativeJIT::compileArithSub):
     105        (JSC::DFG::SpeculativeJIT::compileArithNegate):
     106        (JSC::DFG::SpeculativeJIT::speculateInt32):
     107        (JSC::DFG::SpeculativeJIT::speculateNumber):
     108        (JSC::DFG::SpeculativeJIT::speculateMisc):
     109        (JSC::DFG::SpeculativeJIT::speculate):
     110        * dfg/DFGSpeculativeJIT.h:
     111        (JSC::DFG::SpeculativeJIT::spill):
     112        (JSC::DFG::SpeculativeJIT::isKnownInteger):
     113        (JSC::DFG::SpeculativeJIT::isKnownCell):
     114        (JSC::DFG::SpeculativeJIT::isKnownNotInteger):
     115        (JSC::DFG::SpeculativeJIT::isKnownNotNumber):
     116        (JSC::DFG::SpeculativeJIT::isKnownNotCell):
     117        (JSC::DFG::SpeculativeJIT::isKnownNotOther):
     118        * dfg/DFGSpeculativeJIT32_64.cpp:
     119        (JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):
     120        (JSC::DFG::SpeculativeJIT::compile):
     121        * dfg/DFGSpeculativeJIT64.cpp:
     122        (JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):
     123        (JSC::DFG::SpeculativeJIT::fillSpeculateInt52):
     124        (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
     125        (JSC::DFG::SpeculativeJIT::emitBranch):
     126        (JSC::DFG::SpeculativeJIT::compile):
     127        (JSC::DFG::SpeculativeJIT::blessBoolean):
     128        (JSC::DFG::SpeculativeJIT::convertAnyInt):
     129        (JSC::DFG::SpeculativeJIT::speculateAnyInt):
     130        (JSC::DFG::SpeculativeJIT::speculateDoubleRepAnyInt):
     131        (JSC::DFG::SpeculativeJIT::convertMachineInt): Deleted.
     132        (JSC::DFG::SpeculativeJIT::speculateMachineInt): Deleted.
     133        (JSC::DFG::SpeculativeJIT::speculateDoubleRepMachineInt): Deleted.
     134        * dfg/DFGUseKind.cpp:
     135        (WTF::printInternal):
     136        * dfg/DFGUseKind.h:
     137        (JSC::DFG::typeFilterFor):
     138        (JSC::DFG::isNumerical):
     139        (JSC::DFG::isDouble):
     140        * dfg/DFGValidate.cpp:
     141        * dfg/DFGVariableAccessData.cpp:
     142        (JSC::DFG::VariableAccessData::makePredictionForDoubleFormat):
     143        (JSC::DFG::VariableAccessData::couldRepresentInt52Impl):
     144        (JSC::DFG::VariableAccessData::flushFormat):
     145        * ftl/FTLCapabilities.cpp:
     146        (JSC::FTL::canCompile):
     147        * ftl/FTLLowerDFGToB3.cpp:
     148        (JSC::FTL::DFG::LowerDFGToB3::compileInt52Constant):
     149        (JSC::FTL::DFG::LowerDFGToB3::compileInt52Rep):
     150        (JSC::FTL::DFG::LowerDFGToB3::compileArithAddOrSub):
     151        (JSC::FTL::DFG::LowerDFGToB3::compileArithNegate):
     152        (JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
     153        (JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
     154        (JSC::FTL::DFG::LowerDFGToB3::compileArrayPush):
     155        (JSC::FTL::DFG::LowerDFGToB3::lowInt32):
     156        (JSC::FTL::DFG::LowerDFGToB3::strictInt52ToInt32):
     157        (JSC::FTL::DFG::LowerDFGToB3::isInt32):
     158        (JSC::FTL::DFG::LowerDFGToB3::isNotInt32):
     159        (JSC::FTL::DFG::LowerDFGToB3::jsValueToStrictInt52):
     160        (JSC::FTL::DFG::LowerDFGToB3::doubleToStrictInt52):
     161        (JSC::FTL::DFG::LowerDFGToB3::speculate):
     162        (JSC::FTL::DFG::LowerDFGToB3::speculateCellOrOther):
     163        (JSC::FTL::DFG::LowerDFGToB3::speculateAnyInt):
     164        (JSC::FTL::DFG::LowerDFGToB3::speculateDoubleRepReal):
     165        (JSC::FTL::DFG::LowerDFGToB3::speculateDoubleRepAnyInt):
     166        (JSC::FTL::DFG::LowerDFGToB3::speculateMachineInt): Deleted.
     167        (JSC::FTL::DFG::LowerDFGToB3::speculateDoubleRepMachineInt): Deleted.
     168        * jit/JITOpcodes.cpp:
     169        (JSC::JIT::emit_op_profile_type):
     170        * jit/JITOpcodes32_64.cpp:
     171        (JSC::JIT::emit_op_profile_type):
     172        * runtime/JSCJSValue.h:
     173        * runtime/JSCJSValueInlines.h:
     174        (JSC::isInt52):
     175        (JSC::JSValue::isAnyInt):
     176        (JSC::JSValue::asAnyInt):
     177        (JSC::JSValue::isMachineInt): Deleted.
     178        (JSC::JSValue::asMachineInt): Deleted.
     179        * runtime/RuntimeType.cpp:
     180        (JSC::runtimeTypeForValue):
     181        (JSC::runtimeTypeAsString):
     182        * runtime/RuntimeType.h:
     183        * runtime/TypeSet.cpp:
     184        (JSC::TypeSet::dumpTypes):
     185        (JSC::TypeSet::displayName):
     186        (JSC::TypeSet::inspectorTypeSet):
     187        (JSC::TypeSet::toJSONString):
     188
    11892016-04-24  Yusuke Suzuki  <utatane.tea@gmail.com>
    2190
  • trunk/Source/JavaScriptCore/bindings/ScriptValue.cpp

    r199619 r200034  
    5959    if (value.isNumber() && value.isDouble())
    6060        return InspectorValue::create(value.asNumber());
    61     if (value.isNumber() && value.isMachineInt())
    62         return InspectorValue::create(static_cast<int>(value.asMachineInt()));
     61    if (value.isNumber() && value.isAnyInt())
     62        return InspectorValue::create(static_cast<int>(value.asAnyInt()));
    6363    if (value.isString())
    6464        return InspectorValue::create(value.getString(&scriptState));
  • trunk/Source/JavaScriptCore/bytecode/SpeculatedType.cpp

    r199638 r200034  
    169169    }
    170170   
    171     if (value == SpecInt32)
     171    if (value == SpecInt32Only)
    172172        myOut.print("Int32");
    173173    else {
     
    183183    }
    184184   
    185     if (value & SpecInt52)
     185    if (value & SpecInt52Only)
    186186        myOut.print("Int52");
    187187       
     
    189189        myOut.print("Bytecodedouble");
    190190    else {
    191         if (value & SpecInt52AsDouble)
    192             myOut.print("Int52asdouble");
     191        if (value & SpecAnyIntAsDouble)
     192            myOut.print("AnyIntAsDouble");
    193193        else
    194194            isTop = false;
     
    275275    if (isInt32Speculation(prediction))
    276276        return "<Int32>";
    277     if (isInt52AsDoubleSpeculation(prediction))
    278         return "<Int52AsDouble>";
     277    if (isAnyIntAsDoubleSpeculation(prediction))
     278        return "<AnyIntAsDouble>";
    279279    if (isInt52Speculation(prediction))
    280280        return "<Int52>";
    281     if (isMachineIntSpeculation(prediction))
    282         return "<MachineInt>";
     281    if (isAnyIntSpeculation(prediction))
     282        return "<AnyInt>";
    283283    if (isDoubleSpeculation(prediction))
    284284        return "<Double>";
     
    394394        if (number != number)
    395395            return SpecDoublePureNaN;
    396         if (value.isMachineInt())
    397             return SpecInt52AsDouble;
     396        if (value.isAnyInt())
     397            return SpecAnyIntAsDouble;
    398398        return SpecNonIntAsDouble;
    399399    }
     
    440440SpeculatedType leastUpperBoundOfStrictlyEquivalentSpeculations(SpeculatedType type)
    441441{
    442     if (type & SpecInteger)
    443         type |= SpecInteger;
     442    if (type & (SpecAnyInt | SpecAnyIntAsDouble))
     443        type |= (SpecAnyInt | SpecAnyIntAsDouble);
    444444    if (type & SpecString)
    445445        type |= SpecString;
     
    527527    if (value & SpecDoubleNaN)
    528528        value |= SpecDoubleNaN;
    529     // We could get negative zero, which mixes SpecInt52AsDouble and SpecNotIntAsDouble.
     529    // We could get negative zero, which mixes SpecAnyIntAsDouble and SpecNotIntAsDouble.
    530530    // We could also overflow a large negative int into something that is no longer
    531531    // representable as an int.
     
    548548    // We might lose bits, which leads to a value becoming integer-representable.
    549549    if (value & SpecNonIntAsDouble)
    550         value |= SpecInt52AsDouble;
     550        value |= SpecAnyIntAsDouble;
    551551    return value;
    552552}
  • trunk/Source/JavaScriptCore/bytecode/SpeculatedType.h

    r199935 r200034  
    6767static const SpeculatedType SpecBoolInt32          = 1u << 21; // It's definitely an Int32 with value 0 or 1.
    6868static const SpeculatedType SpecNonBoolInt32       = 1u << 22; // It's definitely an Int32 with value other than 0 or 1.
    69 static const SpeculatedType SpecInt32              = SpecBoolInt32 | SpecNonBoolInt32; // It's definitely an Int32.
    70 static const SpeculatedType SpecInt52              = 1u << 23; // It's definitely an Int52 and we intend it to unbox it. It's also definitely not an Int32.
    71 static const SpeculatedType SpecMachineInt         = SpecInt32 | SpecInt52; // It's something that we can do machine int arithmetic on.
    72 static const SpeculatedType SpecInt52AsDouble      = 1u << 24; // It's definitely an Int52 and it's inside a double.
    73 static const SpeculatedType SpecInteger            = SpecMachineInt | SpecInt52AsDouble; // It's definitely some kind of integer.
     69static const SpeculatedType SpecInt32Only          = SpecBoolInt32 | SpecNonBoolInt32; // It's definitely an Int32.
     70static const SpeculatedType SpecInt52Only          = 1u << 23; // It's definitely an Int52 and we intend it to unbox it. It's also definitely not an Int32.
     71static const SpeculatedType SpecAnyInt             = SpecInt32Only | SpecInt52Only; // It's something that we can do machine int arithmetic on.
     72static const SpeculatedType SpecAnyIntAsDouble     = 1u << 24; // It's definitely an Int52 and it's inside a double.
    7473static const SpeculatedType SpecNonIntAsDouble     = 1u << 25; // It's definitely not an Int52 but it's a real number and it's a double.
    75 static const SpeculatedType SpecDoubleReal         = SpecNonIntAsDouble | SpecInt52AsDouble; // It's definitely a non-NaN double.
     74static const SpeculatedType SpecDoubleReal         = SpecNonIntAsDouble | SpecAnyIntAsDouble; // It's definitely a non-NaN double.
    7675static const SpeculatedType SpecDoublePureNaN      = 1u << 26; // It's definitely a NaN that is sae to tag (i.e. pure).
    7776static const SpeculatedType SpecDoubleImpureNaN    = 1u << 27; // It's definitely a NaN that is unsafe to tag (i.e. impure).
     
    7978static const SpeculatedType SpecBytecodeDouble     = SpecDoubleReal | SpecDoublePureNaN; // It's either a non-NaN or a NaN double, but it's definitely not impure NaN.
    8079static const SpeculatedType SpecFullDouble         = SpecDoubleReal | SpecDoubleNaN; // It's either a non-NaN or a NaN double.
    81 static const SpeculatedType SpecBytecodeRealNumber = SpecInt32 | SpecDoubleReal; // It's either an Int32 or a DoubleReal.
    82 static const SpeculatedType SpecFullRealNumber     = SpecMachineInt | SpecDoubleReal; // It's either an Int32 or a DoubleReal, or a Int52.
    83 static const SpeculatedType SpecBytecodeNumber     = SpecInt32 | SpecBytecodeDouble; // It's either an Int32 or a Double, and the Double cannot be an impure NaN.
    84 static const SpeculatedType SpecFullNumber         = SpecMachineInt | SpecFullDouble; // It's either an Int32, Int52, or a Double, and the Double can be impure NaN.
     80static const SpeculatedType SpecBytecodeRealNumber = SpecInt32Only | SpecDoubleReal; // It's either an Int32 or a DoubleReal.
     81static const SpeculatedType SpecFullRealNumber     = SpecAnyInt | SpecDoubleReal; // It's either an Int32 or a DoubleReal, or a Int52.
     82static const SpeculatedType SpecBytecodeNumber     = SpecInt32Only | SpecBytecodeDouble; // It's either an Int32 or a Double, and the Double cannot be an impure NaN.
     83static const SpeculatedType SpecFullNumber         = SpecAnyInt | SpecFullDouble; // It's either an Int32, Int52, or a Double, and the Double can be impure NaN.
    8584static const SpeculatedType SpecBoolean            = 1u << 28; // It's definitely a Boolean.
    8685static const SpeculatedType SpecOther              = 1u << 29; // It's definitely either Null or Undefined.
    8786static const SpeculatedType SpecMisc               = SpecBoolean | SpecOther; // It's definitely either a boolean, Null, or Undefined.
    88 static const SpeculatedType SpecHeapTop            = SpecCell | SpecBytecodeNumber | SpecMisc; // It can be any of the above, except for SpecInt52 and SpecDoubleImpureNaN.
     87static const SpeculatedType SpecHeapTop            = SpecCell | SpecBytecodeNumber | SpecMisc; // It can be any of the above, except for SpecInt52Only and SpecDoubleImpureNaN.
    8988static const SpeculatedType SpecPrimitive          = SpecString | SpecSymbol | SpecBytecodeNumber | SpecMisc; // It's any non-Object JSValue.
    9089static const SpeculatedType SpecEmpty              = 1u << 30; // It's definitely an empty value marker.
    91 static const SpeculatedType SpecBytecodeTop        = SpecHeapTop | SpecEmpty; // It can be any of the above, except for SpecInt52 and SpecDoubleImpureNaN. Corresponds to what could be found in a bytecode local.
     90static const SpeculatedType SpecBytecodeTop        = SpecHeapTop | SpecEmpty; // It can be any of the above, except for SpecInt52Only and SpecDoubleImpureNaN. Corresponds to what could be found in a bytecode local.
    9291static const SpeculatedType SpecFullTop            = SpecBytecodeTop | SpecFullNumber; // It can be anything that bytecode could see plus exotic encodings of numbers.
    9392
     
    289288inline bool isInt32Speculation(SpeculatedType value)
    290289{
    291     return value && !(value & ~SpecInt32);
     290    return value && !(value & ~SpecInt32Only);
    292291}
    293292
    294293inline bool isInt32OrBooleanSpeculation(SpeculatedType value)
    295294{
    296     return value && !(value & ~(SpecBoolean | SpecInt32));
     295    return value && !(value & ~(SpecBoolean | SpecInt32Only));
    297296}
    298297
    299298inline bool isInt32SpeculationForArithmetic(SpeculatedType value)
    300299{
    301     return !(value & (SpecFullDouble | SpecInt52));
     300    return !(value & (SpecFullDouble | SpecInt52Only));
    302301}
    303302
    304303inline bool isInt32OrBooleanSpeculationForArithmetic(SpeculatedType value)
    305304{
    306     return !(value & (SpecFullDouble | SpecInt52));
     305    return !(value & (SpecFullDouble | SpecInt52Only));
    307306}
    308307
     
    314313inline bool isInt52Speculation(SpeculatedType value)
    315314{
    316     return value == SpecInt52;
    317 }
    318 
    319 inline bool isMachineIntSpeculation(SpeculatedType value)
    320 {
    321     return !!value && (value & SpecMachineInt) == value;
    322 }
    323 
    324 inline bool isInt52AsDoubleSpeculation(SpeculatedType value)
    325 {
    326     return value == SpecInt52AsDouble;
    327 }
    328 
    329 inline bool isIntegerSpeculation(SpeculatedType value)
    330 {
    331     return !!value && (value & SpecInteger) == value;
     315    return value == SpecInt52Only;
     316}
     317
     318inline bool isAnyIntSpeculation(SpeculatedType value)
     319{
     320    return !!value && (value & SpecAnyInt) == value;
     321}
     322
     323inline bool isAnyIntAsDoubleSpeculation(SpeculatedType value)
     324{
     325    return value == SpecAnyIntAsDouble;
    332326}
    333327
  • trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h

    r199967 r200034  
    238238        clobberWorld(node->origin.semantic, clobberLimit);
    239239        LoadVarargsData* data = node->loadVarargsData();
    240         m_state.variables().operand(data->count).setType(SpecInt32);
     240        m_state.variables().operand(data->count).setType(SpecInt32Only);
    241241        for (unsigned i = data->limit - 1; i--;)
    242242            m_state.variables().operand(data->start.offset() + i).makeHeapTop();
     
    252252        if (node->child1().useKind() == UntypedUse || node->child2().useKind() == UntypedUse) {
    253253            clobberWorld(node->origin.semantic, clobberLimit);
    254             forNode(node).setType(m_graph, SpecInt32);
     254            forNode(node).setType(m_graph, SpecInt32Only);
    255255            break;
    256256        }
     
    294294        }
    295295       
    296         forNode(node).setType(SpecInt32);
     296        forNode(node).setType(SpecInt32Only);
    297297        break;
    298298    }
     
    302302        if (doesOverflow(node->arithMode())) {
    303303            if (enableInt52()) {
    304                 if (child && child.isMachineInt()) {
    305                     setConstant(node, jsNumber(child.asMachineInt()));
    306                     break;
    307                 }
    308                 forNode(node).setType(SpecMachineInt);
     304                if (child && child.isAnyInt()) {
     305                    setConstant(node, jsNumber(child.asAnyInt()));
     306                    break;
     307                }
     308                forNode(node).setType(SpecAnyInt);
    309309                break;
    310310            }
     
    314314                break;
    315315            }
    316             forNode(node).setType(SpecInt52AsDouble);
     316            forNode(node).setType(SpecAnyIntAsDouble);
    317317            break;
    318318        }
     
    324324            }
    325325        }
    326         forNode(node).setType(SpecInt32);
     326        forNode(node).setType(SpecInt32Only);
    327327        break;
    328328    }
     
    358358            }
    359359        }
    360         forNode(node).setType(SpecInt32);
     360        forNode(node).setType(SpecInt32Only);
    361361        break;
    362362    }
     
    387387        }
    388388       
    389         forNode(node).setType(SpecInt32);
     389        forNode(node).setType(SpecInt32Only);
    390390        break;
    391391    }
     
    442442    case Int52Rep: {
    443443        JSValue child = forNode(node->child1()).value();
    444         if (child && child.isMachineInt()) {
     444        if (child && child.isAnyInt()) {
    445445            setConstant(node, child);
    446446            break;
    447447        }
    448448       
    449         forNode(node).setType(SpecInt32);
     449        forNode(node).setType(SpecInt32Only);
    450450        break;
    451451    }
     
    491491                }
    492492            }
    493             forNode(node).setType(SpecInt32);
     493            forNode(node).setType(SpecInt32Only);
    494494            break;
    495495        case Int52RepUse:
    496             if (left && right && left.isMachineInt() && right.isMachineInt()) {
    497                 JSValue result = jsNumber(left.asMachineInt() + right.asMachineInt());
    498                 if (result.isMachineInt()) {
     496            if (left && right && left.isAnyInt() && right.isAnyInt()) {
     497                JSValue result = jsNumber(left.asAnyInt() + right.asAnyInt());
     498                if (result.isAnyInt()) {
    499499                    setConstant(node, result);
    500500                    break;
    501501                }
    502502            }
    503             forNode(node).setType(SpecMachineInt);
     503            forNode(node).setType(SpecAnyInt);
    504504            break;
    505505        case DoubleRepUse:
     
    526526            break;
    527527        }
    528         forNode(node).setType(SpecInt32);
     528        forNode(node).setType(SpecInt32Only);
    529529        break;
    530530    }
     
    551551                }
    552552            }
    553             forNode(node).setType(SpecInt32);
     553            forNode(node).setType(SpecInt32Only);
    554554            break;
    555555        case Int52RepUse:
    556             if (left && right && left.isMachineInt() && right.isMachineInt()) {
    557                 JSValue result = jsNumber(left.asMachineInt() - right.asMachineInt());
    558                 if (result.isMachineInt() || !shouldCheckOverflow(node->arithMode())) {
     556            if (left && right && left.isAnyInt() && right.isAnyInt()) {
     557                JSValue result = jsNumber(left.asAnyInt() - right.asAnyInt());
     558                if (result.isAnyInt() || !shouldCheckOverflow(node->arithMode())) {
    559559                    setConstant(node, result);
    560560                    break;
    561561                }
    562562            }
    563             forNode(node).setType(SpecMachineInt);
     563            forNode(node).setType(SpecAnyInt);
    564564            break;
    565565        case DoubleRepUse:
     
    603603                }
    604604            }
    605             forNode(node).setType(SpecInt32);
     605            forNode(node).setType(SpecInt32Only);
    606606            break;
    607607        case Int52RepUse:
    608             if (child && child.isMachineInt()) {
     608            if (child && child.isAnyInt()) {
    609609                double doubleResult;
    610610                if (shouldCheckNegativeZero(node->arithMode()))
     
    613613                    doubleResult = 0 - child.asNumber();
    614614                JSValue valueResult = jsNumber(doubleResult);
    615                 if (valueResult.isMachineInt()) {
     615                if (valueResult.isAnyInt()) {
    616616                    setConstant(node, valueResult);
    617617                    break;
    618618                }
    619619            }
    620             forNode(node).setType(SpecMachineInt);
     620            forNode(node).setType(SpecAnyInt);
    621621            break;
    622622        case DoubleRepUse:
     
    655655                }
    656656            }
    657             forNode(node).setType(SpecInt32);
     657            forNode(node).setType(SpecInt32Only);
    658658            break;
    659659        case Int52RepUse:
    660             if (left && right && left.isMachineInt() && right.isMachineInt()) {
     660            if (left && right && left.isAnyInt() && right.isAnyInt()) {
    661661                double doubleResult = left.asNumber() * right.asNumber();
    662662                if (!shouldCheckNegativeZero(node->arithMode()))
    663663                    doubleResult += 0;
    664664                JSValue valueResult = jsNumber(doubleResult);
    665                 if (valueResult.isMachineInt()) {
     665                if (valueResult.isAnyInt()) {
    666666                    setConstant(node, valueResult);
    667667                    break;
    668668                }
    669669            }
    670             forNode(node).setType(SpecMachineInt);
     670            forNode(node).setType(SpecAnyInt);
    671671            break;
    672672        case DoubleRepUse:
     
    707707                }
    708708            }
    709             forNode(node).setType(SpecInt32);
     709            forNode(node).setType(SpecInt32Only);
    710710            break;
    711711        case DoubleRepUse:
     
    746746                }
    747747            }
    748             forNode(node).setType(SpecInt32);
     748            forNode(node).setType(SpecInt32Only);
    749749            break;
    750750        case DoubleRepUse:
     
    773773                break;
    774774            }
    775             forNode(node).setType(SpecInt32);
     775            forNode(node).setType(SpecInt32Only);
    776776            break;
    777777        case DoubleRepUse:
     
    802802                break;
    803803            }
    804             forNode(node).setType(SpecInt32);
     804            forNode(node).setType(SpecInt32Only);
    805805            break;
    806806        case DoubleRepUse:
     
    833833                }
    834834            }
    835             forNode(node).setType(SpecInt32);
     835            forNode(node).setType(SpecInt32Only);
    836836            break;
    837837        case DoubleRepUse:
     
    909909        }
    910910        if (producesInteger(node->arithRoundingMode()))
    911             forNode(node).setType(SpecInt32);
     911            forNode(node).setType(SpecInt32Only);
    912912        else
    913913            forNode(node).setType(typeOfDoubleRounding(forNode(node->child1()).m_type));
     
    14631463       
    14641464    case StringCharCodeAt:
    1465         forNode(node).setType(SpecInt32);
     1465        forNode(node).setType(SpecInt32Only);
    14661466        break;
    14671467       
     
    15231523                forNode(node).makeHeapTop();
    15241524            } else
    1525                 forNode(node).setType(SpecInt32);
     1525                forNode(node).setType(SpecInt32Only);
    15261526            break;
    15271527        case Array::Double:
     
    15421542            break;
    15431543        case Array::Int8Array:
    1544             forNode(node).setType(SpecInt32);
     1544            forNode(node).setType(SpecInt32Only);
    15451545            break;
    15461546        case Array::Int16Array:
    1547             forNode(node).setType(SpecInt32);
     1547            forNode(node).setType(SpecInt32Only);
    15481548            break;
    15491549        case Array::Int32Array:
    1550             forNode(node).setType(SpecInt32);
     1550            forNode(node).setType(SpecInt32Only);
    15511551            break;
    15521552        case Array::Uint8Array:
    1553             forNode(node).setType(SpecInt32);
     1553            forNode(node).setType(SpecInt32Only);
    15541554            break;
    15551555        case Array::Uint8ClampedArray:
    1556             forNode(node).setType(SpecInt32);
     1556            forNode(node).setType(SpecInt32Only);
    15571557            break;
    15581558        case Array::Uint16Array:
    1559             forNode(node).setType(SpecInt32);
     1559            forNode(node).setType(SpecInt32Only);
    15601560            break;
    15611561        case Array::Uint32Array:
    15621562            if (node->shouldSpeculateInt32())
    1563                 forNode(node).setType(SpecInt32);
    1564             else if (enableInt52() && node->shouldSpeculateMachineInt())
    1565                 forNode(node).setType(SpecMachineInt);
     1563                forNode(node).setType(SpecInt32Only);
     1564            else if (enableInt52() && node->shouldSpeculateAnyInt())
     1565                forNode(node).setType(SpecAnyInt);
    15661566            else
    1567                 forNode(node).setType(SpecInt52AsDouble);
     1567                forNode(node).setType(SpecAnyIntAsDouble);
    15681568            break;
    15691569        case Array::Float32Array:
     
    19681968       
    19691969    case GetArgumentCount:
    1970         forNode(node).setType(SpecInt32);
     1970        forNode(node).setType(SpecInt32Only);
    19711971        break;
    19721972       
    19731973    case GetRestLength:
    1974         forNode(node).setType(SpecInt32);
     1974        forNode(node).setType(SpecInt32Only);
    19751975        break;
    19761976       
     
    21252125            break;
    21262126        }
    2127         forNode(node).setType(SpecInt32);
     2127        forNode(node).setType(SpecInt32Only);
    21282128        break;
    21292129    }
     
    23512351            break;
    23522352        }
    2353         forNode(node).setType(SpecInt32);
     2353        forNode(node).setType(SpecInt32Only);
    23542354        break;
    23552355    }
     
    26332633           
    26342634    case GetEnumerableLength: {
    2635         forNode(node).setType(SpecInt32);
     2635        forNode(node).setType(SpecInt32Only);
    26362636        break;
    26372637    }
  • trunk/Source/JavaScriptCore/dfg/DFGAbstractValue.cpp

    r199391 r200034  
    131131        return;
    132132    case InferredType::Int32:
    133         setType(SpecInt32);
     133        setType(SpecInt32Only);
    134134        return;
    135135    case InferredType::Number:
     
    179179                m_value = jsDoubleNumber(m_value.asNumber());
    180180        }
    181         if (m_type & SpecMachineInt) {
    182             m_type &= ~SpecMachineInt;
    183             m_type |= SpecInt52AsDouble;
     181        if (m_type & SpecAnyInt) {
     182            m_type &= ~SpecAnyInt;
     183            m_type |= SpecAnyIntAsDouble;
    184184        }
    185185        if (m_type & ~SpecFullDouble)
    186186            DFG_CRASH(graph, node, toCString("Abstract value ", *this, " for double node has type outside SpecFullDouble.\n").data());
    187187    } else if (representation == NodeResultInt52) {
    188         if (m_type & SpecInt52AsDouble) {
    189             m_type &= ~SpecInt52AsDouble;
    190             m_type |= SpecInt52;
    191         }
    192         if (m_type & ~SpecMachineInt)
    193             DFG_CRASH(graph, node, toCString("Abstract value ", *this, " for int52 node has type outside SpecMachineInt.\n").data());
     188        if (m_type & SpecAnyIntAsDouble) {
     189            m_type &= ~SpecAnyIntAsDouble;
     190            m_type |= SpecInt52Only;
     191        }
     192        if (m_type & ~SpecAnyInt)
     193            DFG_CRASH(graph, node, toCString("Abstract value ", *this, " for int52 node has type outside SpecAnyInt.\n").data());
    194194    } else {
    195         if (m_type & SpecInt52) {
    196             m_type &= ~SpecInt52;
    197             m_type |= SpecInt52AsDouble;
     195        if (m_type & SpecInt52Only) {
     196            m_type &= ~SpecInt52Only;
     197            m_type |= SpecAnyIntAsDouble;
    198198        }
    199199        if (m_type & ~SpecBytecodeTop)
     
    481481        // This relaxes the assertion below a bit, since we don't know the representation of the
    482482        // node.
    483         if (type & SpecInt52)
    484             type |= SpecInt52AsDouble;
     483        if (type & SpecInt52Only)
     484            type |= SpecAnyIntAsDouble;
    485485        ASSERT(mergeSpeculations(type, speculationFromValue(m_value)) == type);
    486486    }
     
    503503    if (isType(SpecBoolean))
    504504        return ResultType::booleanType();
    505     if (isType(SpecInt32))
     505    if (isType(SpecInt32Only))
    506506        return ResultType::numberTypeIsInt32();
    507507    if (isType(SpecBytecodeNumber))
  • trunk/Source/JavaScriptCore/dfg/DFGAbstractValue.h

    r191224 r200034  
    377377    // and the set of cell values that have the given structure. This abstract
    378378    // value is then the intersection of the m_structure and the set of values
    379     // whose type is m_type. So, for example if m_type is SpecFinal|SpecInt32 and
     379    // whose type is m_type. So, for example if m_type is SpecFinal|SpecInt32Only and
    380380    // m_structure is [0x12345] then this abstract value corresponds to the set of
    381381    // all integers unified with the set of all objects with structure 0x12345.
     
    420420            return true;
    421421       
    422         // Constant folding always represents Int52's in a double (i.e. Int52AsDouble).
    423         // So speculationFromValue(value) for an Int52 value will return Int52AsDouble,
     422        // Constant folding always represents Int52's in a double (i.e. AnyIntAsDouble).
     423        // So speculationFromValue(value) for an Int52 value will return AnyIntAsDouble,
    424424        // and that's fine - the type validates just fine.
    425425        SpeculatedType type = m_type;
    426         if (type & SpecInt52)
    427             type |= SpecInt52AsDouble;
     426        if (type & SpecInt52Only)
     427            type |= SpecAnyIntAsDouble;
    428428       
    429429        if (mergeSpeculations(type, speculationFromValue(value)) != type)
  • trunk/Source/JavaScriptCore/dfg/DFGArgumentsUtilities.cpp

    r181993 r200034  
    7777    Node* argumentCount;
    7878    if (!inlineCallFrame)
    79         argumentCount = insertionSet.insertNode(nodeIndex, SpecInt32, GetArgumentCount, origin);
     79        argumentCount = insertionSet.insertNode(nodeIndex, SpecInt32Only, GetArgumentCount, origin);
    8080    else {
    8181        VirtualRegister argumentCountRegister(inlineCallFrame->stackOffset + JSStack::ArgumentCount);
    8282       
    8383        argumentCount = insertionSet.insertNode(
    84             nodeIndex, SpecInt32, GetStack, origin,
     84            nodeIndex, SpecInt32Only, GetStack, origin,
    8585            OpInfo(graph.m_stackAccessData.add(argumentCountRegister, FlushedInt32)));
    8686    }
    8787   
    8888    return insertionSet.insertNode(
    89         nodeIndex, SpecInt32, ArithSub, origin, OpInfo(Arith::Unchecked),
     89        nodeIndex, SpecInt32Only, ArithSub, origin, OpInfo(Arith::Unchecked),
    9090        Edge(argumentCount, Int32Use),
    9191        insertionSet.insertConstantForUse(
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r199801 r200034  
    17451745                    // matter very much, since our use of a SetArgument and Flushes for this local slot is
    17461746                    // mostly just a formality.
    1747                     countVariable->predict(SpecInt32);
     1747                    countVariable->predict(SpecInt32Only);
    17481748                    countVariable->mergeIsProfitableToUnbox(true);
    17491749                    Node* setArgumentCount = addToGraph(SetArgument, OpInfo(countVariable));
     
    23472347            Node* node = get(virtualRegisterForArgument(i, registerOffset));
    23482348            if (node->hasHeapPrediction())
    2349                 node->setHeapPrediction(SpecInt32);
     2349                node->setHeapPrediction(SpecInt32Only);
    23502350        }
    23512351        set(VirtualRegister(resultOperand), addToGraph(JSConstant, OpInfo(m_constantUndefined)));
  • trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp

    r199967 r200034  
    220220                break;
    221221            }
    222             if (m_graph.unaryArithShouldSpeculateMachineInt(node, FixupPass)) {
     222            if (m_graph.unaryArithShouldSpeculateAnyInt(node, FixupPass)) {
    223223                fixEdge<Int52RepUse>(node->child1());
    224224                if (bytecodeCanIgnoreNegativeZero(node->arithNodeFlags()))
     
    256256                break;
    257257            }
    258             if (m_graph.binaryArithShouldSpeculateMachineInt(node, FixupPass)) {
     258            if (m_graph.binaryArithShouldSpeculateAnyInt(node, FixupPass)) {
    259259                fixEdge<Int52RepUse>(leftChild);
    260260                fixEdge<Int52RepUse>(rightChild);
     
    447447            }
    448448            if (enableInt52()
    449                 && Node::shouldSpeculateMachineInt(node->child1().node(), node->child2().node())) {
     449                && Node::shouldSpeculateAnyInt(node->child1().node(), node->child2().node())) {
    450450                fixEdge<Int52RepUse>(node->child1());
    451451                fixEdge<Int52RepUse>(node->child2());
     
    552552            }
    553553            if (enableInt52()
    554                 && Node::shouldSpeculateMachineInt(node->child1().node(), node->child2().node())) {
     554                && Node::shouldSpeculateAnyInt(node->child1().node(), node->child2().node())) {
    555555                fixEdge<Int52RepUse>(node->child1());
    556556                fixEdge<Int52RepUse>(node->child2());
     
    764764                if (node->shouldSpeculateInt32())
    765765                    break;
    766                 if (node->shouldSpeculateMachineInt() && enableInt52())
     766                if (node->shouldSpeculateAnyInt() && enableInt52())
    767767                    node->setResult(NodeResultInt52);
    768768                else
     
    830830                if (child3->shouldSpeculateInt32())
    831831                    fixIntOrBooleanEdge(child3);
    832                 else if (child3->shouldSpeculateMachineInt())
     832                else if (child3->shouldSpeculateAnyInt())
    833833                    fixEdge<Int52RepUse>(child3);
    834834                else
     
    870870                    m_graph, node,
    871871                    node->child1()->prediction() & SpecCell,
    872                     SpecInt32,
     872                    SpecInt32Only,
    873873                    node->child2()->prediction()));
    874874            blessArrayOperation(node->child1(), Edge(), node->child3());
     
    14341434            RefPtr<TypeSet> typeSet = node->typeLocation()->m_instructionTypeSet;
    14351435            RuntimeTypeMask seenTypes = typeSet->seenTypes();
    1436             if (typeSet->doesTypeConformTo(TypeMachineInt)) {
     1436            if (typeSet->doesTypeConformTo(TypeAnyInt)) {
    14371437                if (node->child1()->shouldSpeculateInt32())
    14381438                    fixEdge<Int32Use>(node->child1());
    14391439                else
    1440                     fixEdge<MachineIntUse>(node->child1());
     1440                    fixEdge<AnyIntUse>(node->child1());
    14411441                node->remove();
    1442             } else if (typeSet->doesTypeConformTo(TypeNumber | TypeMachineInt)) {
     1442            } else if (typeSet->doesTypeConformTo(TypeNumber | TypeAnyInt)) {
    14431443                fixEdge<NumberUse>(node->child1());
    14441444                node->remove();
     
    16791679            }
    16801680
    1681             if (enableInt52() && node->child1()->shouldSpeculateMachineInt()) {
     1681            if (enableInt52() && node->child1()->shouldSpeculateAnyInt()) {
    16821682                fixEdge<Int52RepUse>(node->child1());
    16831683                node->convertToIdentity();
     
    20332033            break;
    20342034        case Int52RepUse:
    2035             if (isMachineIntSpeculation(variable->prediction()))
     2035            if (isAnyIntSpeculation(variable->prediction()))
    20362036                m_profitabilityChanged |= variable->mergeIsProfitableToUnbox(true);
    20372037            break;
     
    21102110       
    21112111        UseKind useKind;
    2112         if (node->shouldSpeculateMachineInt())
     2112        if (node->shouldSpeculateAnyInt())
    21132113            useKind = Int52RepUse;
    21142114        else if (node->shouldSpeculateNumber())
     
    21172117            useKind = NotCellUse;
    21182118        Node* newNode = m_insertionSet.insertNode(
    2119             m_indexInBlock, SpecInt32, ValueToInt32, m_currentNode->origin,
     2119            m_indexInBlock, SpecInt32Only, ValueToInt32, m_currentNode->origin,
    21202120            Edge(node, useKind));
    21212121        observeUseKindOnNode(node, useKind);
     
    21382138            useKind = UntypedUse;
    21392139        Node* newNode = m_insertionSet.insertNode(
    2140             m_indexInBlock, SpecInt32, BooleanToNumber, m_currentNode->origin,
     2140            m_indexInBlock, SpecInt32Only, BooleanToNumber, m_currentNode->origin,
    21412141            Edge(node, useKind));
    21422142        observeUseKindOnNode(node, useKind);
     
    21592159            useKind = UntypedUse;
    21602160        Node* newNode = m_insertionSet.insertNode(
    2161             m_indexInBlock, SpecInt32, BooleanToNumber, m_currentNode->origin,
     2161            m_indexInBlock, SpecInt32Only, BooleanToNumber, m_currentNode->origin,
    21622162            Edge(node, useKind));
    21632163        observeUseKindOnNode(node, useKind);
     
    21772177        ASSERT(value.isInt32());
    21782178        edge.setNode(m_insertionSet.insertNode(
    2179             m_indexInBlock, SpecInt32, JSConstant, m_currentNode->origin,
     2179            m_indexInBlock, SpecInt32Only, JSConstant, m_currentNode->origin,
    21802180            OpInfo(m_graph.freeze(value))));
    21812181    }
     
    22072207        }
    22082208       
    2209         if (m_graph.addShouldSpeculateMachineInt(node)) {
     2209        if (m_graph.addShouldSpeculateAnyInt(node)) {
    22102210            fixEdge<Int52RepUse>(node->child1());
    22112211            fixEdge<Int52RepUse>(node->child2());
     
    22802280        Node* storage = checkArray(arrayMode, origin, child, 0, lengthNeedsStorage);
    22812281        return m_insertionSet.insertNode(
    2282             m_indexInBlock, SpecInt32, GetArrayLength, origin,
     2282            m_indexInBlock, SpecInt32Only, GetArrayLength, origin,
    22832283            OpInfo(arrayMode.asWord()), Edge(child, KnownCellUse), Edge(storage));
    22842284    }
     
    23702370                    case DoubleRepUse:
    23712371                    case DoubleRepRealUse:
    2372                     case DoubleRepMachineIntUse: {
     2372                    case DoubleRepAnyIntUse: {
    23732373                        if (edge->hasDoubleResult())
    23742374                            break;
     
    23802380                        } else if (edge->hasInt52Result()) {
    23812381                            result = m_insertionSet.insertNode(
    2382                                 indexForChecks, SpecInt52AsDouble, DoubleRep, originForChecks,
     2382                                indexForChecks, SpecAnyIntAsDouble, DoubleRep, originForChecks,
    23832383                                Edge(edge.node(), Int52RepUse));
    23842384                        } else {
     
    24042404                            break;
    24052405           
    2406                         if (edge->isMachineIntConstant()) {
     2406                        if (edge->isAnyIntConstant()) {
    24072407                            result = m_insertionSet.insertNode(
    2408                                 indexForChecks, SpecMachineInt, Int52Constant, originForChecks,
     2408                                indexForChecks, SpecAnyInt, Int52Constant, originForChecks,
    24092409                                OpInfo(edge->constant()));
    24102410                        } else if (edge->hasDoubleResult()) {
    24112411                            result = m_insertionSet.insertNode(
    2412                                 indexForChecks, SpecMachineInt, Int52Rep, originForChecks,
    2413                                 Edge(edge.node(), DoubleRepMachineIntUse));
     2412                                indexForChecks, SpecAnyInt, Int52Rep, originForChecks,
     2413                                Edge(edge.node(), DoubleRepAnyIntUse));
    24142414                        } else if (edge->shouldSpeculateInt32ForArithmetic()) {
    24152415                            result = m_insertionSet.insertNode(
    2416                                 indexForChecks, SpecInt32, Int52Rep, originForChecks,
     2416                                indexForChecks, SpecInt32Only, Int52Rep, originForChecks,
    24172417                                Edge(edge.node(), Int32Use));
    24182418                        } else {
    24192419                            result = m_insertionSet.insertNode(
    2420                                 indexForChecks, SpecMachineInt, Int52Rep, originForChecks,
    2421                                 Edge(edge.node(), MachineIntUse));
     2420                                indexForChecks, SpecAnyInt, Int52Rep, originForChecks,
     2421                                Edge(edge.node(), AnyIntUse));
    24222422                        }
    24232423
     
    24362436                        } else {
    24372437                            result = m_insertionSet.insertNode(
    2438                                 indexForChecks, SpecInt32 | SpecInt52AsDouble, ValueRep,
     2438                                indexForChecks, SpecInt32Only | SpecAnyIntAsDouble, ValueRep,
    24392439                                originForChecks, Edge(edge.node(), Int52RepUse));
    24402440                        }
  • trunk/Source/JavaScriptCore/dfg/DFGGraph.h

    r198981 r200034  
    264264    }
    265265   
    266     bool addShouldSpeculateMachineInt(Node* add)
     266    bool addShouldSpeculateAnyInt(Node* add)
    267267    {
    268268        if (!enableInt52())
     
    272272        Node* right = add->child2().node();
    273273
    274         bool speculation = Node::shouldSpeculateMachineInt(left, right);
     274        bool speculation = Node::shouldSpeculateAnyInt(left, right);
    275275        return speculation && !hasExitSite(add, Int52Overflow);
    276276    }
     
    285285    }
    286286   
    287     bool binaryArithShouldSpeculateMachineInt(Node* node, PredictionPass pass)
     287    bool binaryArithShouldSpeculateAnyInt(Node* node, PredictionPass pass)
    288288    {
    289289        if (!enableInt52())
     
    293293        Node* right = node->child2().node();
    294294
    295         return Node::shouldSpeculateMachineInt(left, right)
     295        return Node::shouldSpeculateAnyInt(left, right)
    296296            && node->canSpeculateInt52(pass)
    297297            && !hasExitSite(node, Int52Overflow);
     
    304304    }
    305305   
    306     bool unaryArithShouldSpeculateMachineInt(Node* node, PredictionPass pass)
     306    bool unaryArithShouldSpeculateAnyInt(Node* node, PredictionPass pass)
    307307    {
    308308        if (!enableInt52())
    309309            return false;
    310         return node->child1()->shouldSpeculateMachineInt()
     310        return node->child1()->shouldSpeculateAnyInt()
    311311            && node->canSpeculateInt52(pass)
    312312            && !hasExitSite(node, Int52Overflow);
  • trunk/Source/JavaScriptCore/dfg/DFGInPlaceAbstractState.cpp

    r198979 r200034  
    119119        switch (format) {
    120120        case FlushedInt32:
    121             root->valuesAtHead.argument(i).setType(SpecInt32);
     121            root->valuesAtHead.argument(i).setType(SpecInt32Only);
    122122            break;
    123123        case FlushedBoolean:
  • trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp

    r199303 r200034  
    543543                break;
    544544            case FlushedInt52:
    545                 entry->m_localsForcedMachineInt.set(local);
     545                entry->m_localsForcedAnyInt.set(local);
    546546                break;
    547547            default:
  • trunk/Source/JavaScriptCore/dfg/DFGNode.cpp

    r197833 r200034  
    133133        switch (input) {
    134134        case NodeResultDouble:
    135             child1().setUseKind(DoubleRepMachineIntUse);
     135            child1().setUseKind(DoubleRepAnyIntUse);
    136136            return;
    137137        case NodeResultJS:
    138             child1().setUseKind(MachineIntUse);
     138            child1().setUseKind(AnyIntUse);
    139139            return;
    140140        default:
  • trunk/Source/JavaScriptCore/dfg/DFGNode.h

    r199699 r200034  
    682682    }
    683683     
    684     bool isMachineIntConstant()
    685     {
    686         return isConstant() && constant()->value().isMachineInt();
     684    bool isAnyIntConstant()
     685    {
     686        return isConstant() && constant()->value().isAnyInt();
    687687    }
    688688     
    689     int64_t asMachineInt()
    690     {
    691         return asJSValue().asMachineInt();
     689    int64_t asAnyInt()
     690    {
     691        return asJSValue().asAnyInt();
    692692    }
    693693     
     
    19211921    }
    19221922   
    1923     bool shouldSpeculateMachineInt()
    1924     {
    1925         return isMachineIntSpeculation(prediction());
     1923    bool shouldSpeculateAnyInt()
     1924    {
     1925        return isAnyIntSpeculation(prediction());
    19261926    }
    19271927   
     
    21542154    }
    21552155   
    2156     static bool shouldSpeculateMachineInt(Node* op1, Node* op2)
    2157     {
    2158         return op1->shouldSpeculateMachineInt() && op2->shouldSpeculateMachineInt();
     2156    static bool shouldSpeculateAnyInt(Node* op1, Node* op2)
     2157    {
     2158        return op1->shouldSpeculateAnyInt() && op2->shouldSpeculateAnyInt();
    21592159    }
    21602160   
  • trunk/Source/JavaScriptCore/dfg/DFGOSREntry.cpp

    r191058 r200034  
    6868        if (reg.isLocal() && m_localsForcedDouble.get(reg.toLocal()))
    6969            out.print(", forced double");
    70         if (reg.isLocal() && m_localsForcedMachineInt.get(reg.toLocal()))
     70        if (reg.isLocal() && m_localsForcedAnyInt.get(reg.toLocal()))
    7171            out.print(", forced machine int");
    7272        out.print(")");
     
    214214            continue;
    215215        }
    216         if (entry->m_localsForcedMachineInt.get(local)) {
    217             if (!exec->registers()[localOffset].asanUnsafeJSValue().isMachineInt()) {
     216        if (entry->m_localsForcedAnyInt.get(local)) {
     217            if (!exec->registers()[localOffset].asanUnsafeJSValue().isAnyInt()) {
    218218                if (Options::verboseOSR()) {
    219219                    dataLog(
     
    286286            }
    287287           
    288             if (entry->m_localsForcedMachineInt.get(reg.toLocal())) {
    289                 *bitwise_cast<int64_t*>(pivot + index) = exec->registers()[reg.offset()].asanUnsafeJSValue().asMachineInt() << JSValue::int52ShiftAmount;
     288            if (entry->m_localsForcedAnyInt.get(reg.toLocal())) {
     289                *bitwise_cast<int64_t*>(pivot + index) = exec->registers()[reg.offset()].asanUnsafeJSValue().asAnyInt() << JSValue::int52ShiftAmount;
    290290                continue;
    291291            }
  • trunk/Source/JavaScriptCore/dfg/DFGOSREntry.h

    r186691 r200034  
    5858    // Use bitvectors here because they tend to only require one word.
    5959    BitVector m_localsForcedDouble;
    60     BitVector m_localsForcedMachineInt;
     60    BitVector m_localsForcedAnyInt;
    6161    Vector<OSREntryReshuffling> m_reshufflings;
    6262    BitVector m_machineStackUsed;
  • trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp

    r199967 r200034  
    156156            VariableAccessData* variable = node->variableAccessData();
    157157            SpeculatedType prediction = variable->prediction();
    158             if (!variable->couldRepresentInt52() && (prediction & SpecInt52))
    159                 prediction = (prediction | SpecInt52AsDouble) & ~SpecInt52;
     158            if (!variable->couldRepresentInt52() && (prediction & SpecInt52Only))
     159                prediction = (prediction | SpecAnyIntAsDouble) & ~SpecInt52Only;
    160160            if (prediction)
    161161                changed |= mergePrediction(prediction);
     
    171171        case UInt32ToNumber: {
    172172            if (node->canSpeculateInt32(m_pass))
    173                 changed |= mergePrediction(SpecInt32);
     173                changed |= mergePrediction(SpecInt32Only);
    174174            else if (enableInt52())
    175                 changed |= mergePrediction(SpecMachineInt);
     175                changed |= mergePrediction(SpecAnyInt);
    176176            else
    177177                changed |= mergePrediction(SpecBytecodeNumber);
     
    187187                    && isFullNumberOrBooleanSpeculationExpectingDefined(right)) {
    188188                    if (m_graph.addSpeculationMode(node, m_pass) != DontSpeculateInt32)
    189                         changed |= mergePrediction(SpecInt32);
    190                     else if (m_graph.addShouldSpeculateMachineInt(node))
    191                         changed |= mergePrediction(SpecInt52);
     189                        changed |= mergePrediction(SpecInt32Only);
     190                    else if (m_graph.addShouldSpeculateAnyInt(node))
     191                        changed |= mergePrediction(SpecInt52Only);
    192192                    else
    193193                        changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right));
     
    198198                    changed |= mergePrediction(SpecString);
    199199                } else
    200                     changed |= mergePrediction(SpecString | SpecInt32 | SpecBytecodeDouble);
     200                    changed |= mergePrediction(SpecString | SpecInt32Only | SpecBytecodeDouble);
    201201            }
    202202            break;
     
    209209            if (left && right) {
    210210                if (m_graph.addSpeculationMode(node, m_pass) != DontSpeculateInt32)
    211                     changed |= mergePrediction(SpecInt32);
    212                 else if (m_graph.addShouldSpeculateMachineInt(node))
    213                     changed |= mergePrediction(SpecInt52);
     211                    changed |= mergePrediction(SpecInt32Only);
     212                else if (m_graph.addShouldSpeculateAnyInt(node))
     213                    changed |= mergePrediction(SpecInt52Only);
    214214                else
    215215                    changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right));
     
    226226                    && isFullNumberOrBooleanSpeculationExpectingDefined(right)) {
    227227                    if (m_graph.addSpeculationMode(node, m_pass) != DontSpeculateInt32)
    228                         changed |= mergePrediction(SpecInt32);
    229                     else if (m_graph.addShouldSpeculateMachineInt(node))
    230                         changed |= mergePrediction(SpecInt52);
     228                        changed |= mergePrediction(SpecInt32Only);
     229                    else if (m_graph.addShouldSpeculateAnyInt(node))
     230                        changed |= mergePrediction(SpecInt52Only);
    231231                    else
    232232                        changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right));
    233233                } else
    234                     changed |= mergePrediction(SpecInt32 | SpecBytecodeDouble);
     234                    changed |= mergePrediction(SpecInt32Only | SpecBytecodeDouble);
    235235            }
    236236            break;
     
    240240            if (node->child1()->prediction()) {
    241241                if (m_graph.unaryArithShouldSpeculateInt32(node, m_pass))
    242                     changed |= mergePrediction(SpecInt32);
    243                 else if (m_graph.unaryArithShouldSpeculateMachineInt(node, m_pass))
    244                     changed |= mergePrediction(SpecInt52);
     242                    changed |= mergePrediction(SpecInt32Only);
     243                else if (m_graph.unaryArithShouldSpeculateAnyInt(node, m_pass))
     244                    changed |= mergePrediction(SpecInt52Only);
    245245                else
    246246                    changed |= mergePrediction(speculatedDoubleTypeForPrediction(node->child1()->prediction()));
     
    256256                if (Node::shouldSpeculateInt32OrBooleanForArithmetic(node->child1().node(), node->child2().node())
    257257                    && node->canSpeculateInt32(m_pass))
    258                     changed |= mergePrediction(SpecInt32);
     258                    changed |= mergePrediction(SpecInt32Only);
    259259                else
    260260                    changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right));
     
    271271                    && isFullNumberOrBooleanSpeculationExpectingDefined(right)) {
    272272                    if (m_graph.binaryArithShouldSpeculateInt32(node, m_pass))
    273                         changed |= mergePrediction(SpecInt32);
    274                     else if (m_graph.binaryArithShouldSpeculateMachineInt(node, m_pass))
    275                         changed |= mergePrediction(SpecInt52);
     273                        changed |= mergePrediction(SpecInt32Only);
     274                    else if (m_graph.binaryArithShouldSpeculateAnyInt(node, m_pass))
     275                        changed |= mergePrediction(SpecInt52Only);
    276276                    else
    277277                        changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right));
    278278                } else {
    279279                    if (node->mayHaveNonIntResult())
    280                         changed |= mergePrediction(SpecInt32 | SpecBytecodeDouble);
     280                        changed |= mergePrediction(SpecInt32Only | SpecBytecodeDouble);
    281281                    else
    282                         changed |= mergePrediction(SpecInt32);
     282                        changed |= mergePrediction(SpecInt32Only);
    283283                }
    284284            }
     
    295295                    && isFullNumberOrBooleanSpeculationExpectingDefined(right)) {
    296296                    if (m_graph.binaryArithShouldSpeculateInt32(node, m_pass))
    297                         changed |= mergePrediction(SpecInt32);
     297                        changed |= mergePrediction(SpecInt32Only);
    298298                    else
    299299                        changed |= mergePrediction(SpecBytecodeDouble);
    300300                } else
    301                     changed |= mergePrediction(SpecInt32 | SpecBytecodeDouble);
     301                    changed |= mergePrediction(SpecInt32Only | SpecBytecodeDouble);
    302302            }
    303303            break;
     
    309309        case ArithTrunc: {
    310310            if (isInt32OrBooleanSpeculation(node->getHeapPrediction()) && m_graph.roundShouldSpeculateInt32(node, m_pass))
    311                 changed |= setPrediction(SpecInt32);
     311                changed |= setPrediction(SpecInt32Only);
    312312            else
    313313                changed |= setPrediction(SpecBytecodeDouble);
     
    319319            if (isInt32OrBooleanSpeculationForArithmetic(child)
    320320                && node->canSpeculateInt32(m_pass))
    321                 changed |= mergePrediction(SpecInt32);
     321                changed |= mergePrediction(SpecInt32Only);
    322322            else
    323323                changed |= mergePrediction(speculatedDoubleTypeForPrediction(child));
     
    338338            case Array::Int32:
    339339                if (arrayMode.isOutOfBounds())
    340                     changed |= mergePrediction(node->getHeapPrediction() | SpecInt32);
     340                    changed |= mergePrediction(node->getHeapPrediction() | SpecInt32Only);
    341341                else
    342                     changed |= mergePrediction(SpecInt32);
     342                    changed |= mergePrediction(SpecInt32Only);
    343343                break;
    344344            case Array::Double:
     
    354354            case Array::Uint32Array:
    355355                if (isInt32SpeculationForArithmetic(node->getHeapPrediction()))
    356                     changed |= mergePrediction(SpecInt32);
     356                    changed |= mergePrediction(SpecInt32Only);
    357357                else if (enableInt52())
    358                     changed |= mergePrediction(SpecMachineInt);
     358                    changed |= mergePrediction(SpecAnyInt);
    359359                else
    360                     changed |= mergePrediction(SpecInt32 | SpecInt52AsDouble);
     360                    changed |= mergePrediction(SpecInt32Only | SpecAnyIntAsDouble);
    361361                break;
    362362            case Array::Int8Array:
     
    365365            case Array::Uint16Array:
    366366            case Array::Int32Array:
    367                 changed |= mergePrediction(SpecInt32);
     367                changed |= mergePrediction(SpecInt32Only);
    368368                break;
    369369            default:
     
    384384
    385385                if (node->child1()->shouldSpeculateInt32()) {
    386                     changed |= mergePrediction(SpecInt32);
     386                    changed |= mergePrediction(SpecInt32Only);
    387387                    break;
    388388                }
    389389
    390                 if (enableInt52() && node->child1()->shouldSpeculateMachineInt()) {
    391                     changed |= mergePrediction(SpecMachineInt);
     390                if (enableInt52() && node->child1()->shouldSpeculateAnyInt()) {
     391                    changed |= mergePrediction(SpecAnyInt);
    392392                    break;
    393393                }
    394394
    395395                if (node->child1()->shouldSpeculateNumber()) {
    396                     changed |= mergePrediction(SpecMachineInt);
     396                    changed |= mergePrediction(SpecAnyInt);
    397397                    break;
    398398                }
     
    483483                && isFullNumberSpeculation(right)
    484484                && !m_graph.addShouldSpeculateInt32(node, m_pass)
    485                 && !m_graph.addShouldSpeculateMachineInt(node))
     485                && !m_graph.addShouldSpeculateAnyInt(node))
    486486                ballot = VoteDouble;
    487487            else
     
    502502                && isFullNumberSpeculation(right)
    503503                && !m_graph.binaryArithShouldSpeculateInt32(node, m_pass)
    504                 && !m_graph.binaryArithShouldSpeculateMachineInt(node, m_pass))
     504                && !m_graph.binaryArithShouldSpeculateAnyInt(node, m_pass))
    505505                ballot = VoteDouble;
    506506            else
     
    559559                node->variableAccessData()->vote(VoteDouble, weight);
    560560            else if (!isFullNumberSpeculation(prediction)
    561                 || isInt32Speculation(prediction) || isMachineIntSpeculation(prediction))
     561                || isInt32Speculation(prediction) || isAnyIntSpeculation(prediction))
    562562                node->variableAccessData()->vote(VoteValue, weight);
    563563            break;
     
    644644        case JSConstant: {
    645645            SpeculatedType type = speculationFromValue(m_currentNode->asJSValue());
    646             if (type == SpecInt52AsDouble && enableInt52())
    647                 type = SpecInt52;
     646            if (type == SpecAnyIntAsDouble && enableInt52())
     647                type = SpecInt52Only;
    648648            setPrediction(type);
    649649            break;
     
    662662        case ArithIMul:
    663663        case ArithClz32: {
    664             setPrediction(SpecInt32);
     664            setPrediction(SpecInt32Only);
    665665            break;
    666666        }
     
    718718           
    719719        case GetArgumentCount: {
    720             setPrediction(SpecInt32);
     720            setPrediction(SpecInt32Only);
    721721            break;
    722722        }
    723723
    724724        case GetRestLength: {
    725             setPrediction(SpecInt32);
     725            setPrediction(SpecInt32Only);
    726726            break;
    727727        }
     
    729729        case GetTypedArrayByteOffset:
    730730        case GetArrayLength: {
    731             setPrediction(SpecInt32);
     731            setPrediction(SpecInt32Only);
    732732            break;
    733733        }
    734734
    735735        case StringCharCodeAt: {
    736             setPrediction(SpecInt32);
     736            setPrediction(SpecInt32Only);
    737737            break;
    738738        }
     
    867867        case FiatInt52: {
    868868            RELEASE_ASSERT(enableInt52());
    869             setPrediction(SpecMachineInt);
     869            setPrediction(SpecAnyInt);
    870870            break;
    871871        }
     
    880880
    881881        case GetEnumerableLength: {
    882             setPrediction(SpecInt32);
     882            setPrediction(SpecInt32Only);
    883883            break;
    884884        }
  • trunk/Source/JavaScriptCore/dfg/DFGSSALoweringPhase.cpp

    r198364 r200034  
    8484            if (m_node->arrayMode().typedArrayType() != NotTypedArray && m_node->arrayMode().isOutOfBounds()) {
    8585                Node* length = m_insertionSet.insertNode(
    86                     m_nodeIndex, SpecInt32, GetArrayLength, m_node->origin,
     86                    m_nodeIndex, SpecInt32Only, GetArrayLength, m_node->origin,
    8787                    OpInfo(m_node->arrayMode().asWord()), base, storage);
    8888               
     
    107107       
    108108        Node* length = m_insertionSet.insertNode(
    109             m_nodeIndex, SpecInt32, GetArrayLength, m_node->origin,
     109            m_nodeIndex, SpecInt32Only, GetArrayLength, m_node->origin,
    110110            OpInfo(m_node->arrayMode().asWord()), base, storage);
    111111        m_insertionSet.insertNode(
    112             m_nodeIndex, SpecInt32, CheckInBounds, m_node->origin,
     112            m_nodeIndex, SpecInt32Only, CheckInBounds, m_node->origin,
    113113            index, Edge(length, KnownInt32Use));
    114114        return true;
  • trunk/Source/JavaScriptCore/dfg/DFGSafeToExecute.h

    r199967 r200034  
    7070        case OtherUse:
    7171        case MiscUse:
    72         case MachineIntUse:
    73         case DoubleRepMachineIntUse:
     72        case AnyIntUse:
     73        case DoubleRepAnyIntUse:
    7474            return;
    7575           
    7676        case KnownInt32Use:
    77             if (m_state.forNode(edge).m_type & ~SpecInt32)
     77            if (m_state.forNode(edge).m_type & ~SpecInt32Only)
    7878                m_result = false;
    7979            return;
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r199967 r200034  
    610610#if USE(JSVALUE64)
    611611    case SetInt52Constant:
    612         m_jit.move(Imm64(plan.node()->asMachineInt() << JSValue::int52ShiftAmount), plan.gpr());
     612        m_jit.move(Imm64(plan.node()->asAnyInt() << JSValue::int52ShiftAmount), plan.gpr());
    613613        break;
    614614    case SetStrictInt52Constant:
    615         m_jit.move(Imm64(plan.node()->asMachineInt()), plan.gpr());
     615        m_jit.move(Imm64(plan.node()->asAnyInt()), plan.gpr());
    616616        break;
    617617#endif // USE(JSVALUE64)
     
    26372637   
    26382638#if USE(JSVALUE64)
    2639     if (node->shouldSpeculateMachineInt()) {
     2639    if (node->shouldSpeculateAnyInt()) {
    26402640        m_jit.zeroExtend32ToPtr(resultReg, resultReg);
    26412641        strictInt52Result(resultReg, node);
     
    35623562        // Will we need an overflow check? If we can prove that neither input can be
    35633563        // Int52 then the overflow check will not be necessary.
    3564         if (!m_state.forNode(node->child1()).couldBeType(SpecInt52)
    3565             && !m_state.forNode(node->child2()).couldBeType(SpecInt52)) {
     3564        if (!m_state.forNode(node->child1()).couldBeType(SpecInt52Only)
     3565            && !m_state.forNode(node->child2()).couldBeType(SpecInt52Only)) {
    35663566            SpeculateWhicheverInt52Operand op1(this, node->child1());
    35673567            SpeculateWhicheverInt52Operand op2(this, node->child2(), op1);
     
    37543754        // Will we need an overflow check? If we can prove that neither input can be
    37553755        // Int52 then the overflow check will not be necessary.
    3756         if (!m_state.forNode(node->child1()).couldBeType(SpecInt52)
    3757             && !m_state.forNode(node->child2()).couldBeType(SpecInt52)) {
     3756        if (!m_state.forNode(node->child1()).couldBeType(SpecInt52Only)
     3757            && !m_state.forNode(node->child2()).couldBeType(SpecInt52Only)) {
    37583758            SpeculateWhicheverInt52Operand op1(this, node->child1());
    37593759            SpeculateWhicheverInt52Operand op2(this, node->child2(), op1);
     
    38763876        ASSERT(shouldCheckOverflow(node->arithMode()));
    38773877       
    3878         if (!m_state.forNode(node->child1()).couldBeType(SpecInt52)) {
     3878        if (!m_state.forNode(node->child1()).couldBeType(SpecInt52Only)) {
    38793879            SpeculateWhicheverInt52Operand op1(this, node->child1());
    38803880            GPRTemporary result(this);
     
    69016901void SpeculativeJIT::speculateInt32(Edge edge)
    69026902{
    6903     if (!needsTypeCheck(edge, SpecInt32))
     6903    if (!needsTypeCheck(edge, SpecInt32Only))
    69046904        return;
    69056905   
     
    69216921    GPRReg tagGPR = value.tagGPR();
    69226922    DFG_TYPE_CHECK(
    6923         value.jsValueRegs(), edge, ~SpecInt32,
     6923        value.jsValueRegs(), edge, ~SpecInt32Only,
    69246924        m_jit.branch32(MacroAssembler::Equal, tagGPR, TrustedImm32(JSValue::Int32Tag)));
    69256925    DFG_TYPE_CHECK(
     
    72497249#else
    72507250    DFG_TYPE_CHECK(
    7251         regs, edge, ~SpecInt32,
     7251        regs, edge, ~SpecInt32Only,
    72527252        m_jit.branch32(MacroAssembler::Equal, regs.tagGPR(), MacroAssembler::TrustedImm32(JSValue::Int32Tag)));
    72537253    DFG_TYPE_CHECK(
     
    72727272        break;
    72737273    case KnownInt32Use:
    7274         ASSERT(!needsTypeCheck(edge, SpecInt32));
     7274        ASSERT(!needsTypeCheck(edge, SpecInt32Only));
    72757275        break;
    72767276    case DoubleRepUse:
     
    72787278        break;
    72797279    case Int52RepUse:
    7280         ASSERT(!needsTypeCheck(edge, SpecMachineInt));
     7280        ASSERT(!needsTypeCheck(edge, SpecAnyInt));
    72817281        break;
    72827282    case KnownCellUse:
     
    73027302        break;
    73037303#if USE(JSVALUE64)
    7304     case MachineIntUse:
    7305         speculateMachineInt(edge);
    7306         break;
    7307     case DoubleRepMachineIntUse:
    7308         speculateDoubleRepMachineInt(edge);
     7304    case AnyIntUse:
     7305        speculateAnyInt(edge);
     7306        break;
     7307    case DoubleRepAnyIntUse:
     7308        speculateDoubleRepAnyInt(edge);
    73097309        break;
    73107310#endif
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h

    r199867 r200034  
    565565    }
    566566   
    567     bool isKnownInteger(Node* node) { return m_state.forNode(node).isType(SpecInt32); }
     567    bool isKnownInteger(Node* node) { return m_state.forNode(node).isType(SpecInt32Only); }
    568568    bool isKnownCell(Node* node) { return m_state.forNode(node).isType(SpecCell); }
    569569   
    570     bool isKnownNotInteger(Node* node) { return !(m_state.forNode(node).m_type & SpecInt32); }
     570    bool isKnownNotInteger(Node* node) { return !(m_state.forNode(node).m_type & SpecInt32Only); }
    571571    bool isKnownNotNumber(Node* node) { return !(m_state.forNode(node).m_type & SpecFullNumber); }
    572572    bool isKnownNotCell(Node* node) { return !(m_state.forNode(node).m_type & SpecCell); }
     
    26752675    void speculateInt32(Edge);
    26762676#if USE(JSVALUE64)
    2677     void convertMachineInt(Edge, GPRReg resultGPR);
    2678     void speculateMachineInt(Edge);
    2679     void speculateDoubleRepMachineInt(Edge);
     2677    void convertAnyInt(Edge, GPRReg resultGPR);
     2678    void speculateAnyInt(Edge);
     2679    void speculateDoubleRepAnyInt(Edge);
    26802680#endif // USE(JSVALUE64)
    26812681    void speculateNumber(Edge);
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp

    r199967 r200034  
    944944    AbstractValue& value = m_state.forNode(edge);
    945945    SpeculatedType type = value.m_type;
    946     ASSERT(edge.useKind() != KnownInt32Use || !(value.m_type & ~SpecInt32));
    947 
    948     m_interpreter.filter(value, SpecInt32);
     946    ASSERT(edge.useKind() != KnownInt32Use || !(value.m_type & ~SpecInt32Only));
     947
     948    m_interpreter.filter(value, SpecInt32Only);
    949949    if (value.isClear()) {
    950950        terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
     
    973973
    974974        // If we know this was spilled as an integer we can fill without checking.
    975         if (type & ~SpecInt32)
     975        if (type & ~SpecInt32Only)
    976976            speculationCheck(BadType, JSValueSource(JITCompiler::addressFor(virtualRegister)), edge, m_jit.branch32(MacroAssembler::NotEqual, JITCompiler::tagFor(virtualRegister), TrustedImm32(JSValue::Int32Tag)));
    977977
     
    991991        m_gprs.lock(tagGPR);
    992992        m_gprs.lock(payloadGPR);
    993         if (type & ~SpecInt32)
     993        if (type & ~SpecInt32Only)
    994994            speculationCheck(BadType, JSValueRegs(tagGPR, payloadGPR), edge, m_jit.branch32(MacroAssembler::NotEqual, tagGPR, TrustedImm32(JSValue::Int32Tag)));
    995995        m_gprs.unlock(tagGPR);
     
    19001900        }
    19011901        case Int52RepUse:
    1902         case MachineIntUse:
    1903         case DoubleRepMachineIntUse: {
     1902        case AnyIntUse:
     1903        case DoubleRepAnyIntUse: {
    19041904            RELEASE_ASSERT_NOT_REACHED();   
    19051905            break;
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp

    r199967 r200034  
    902902    AbstractValue& value = m_state.forNode(edge);
    903903    SpeculatedType type = value.m_type;
    904     ASSERT(edge.useKind() != KnownInt32Use || !(value.m_type & ~SpecInt32));
    905 
    906     m_interpreter.filter(value, SpecInt32);
     904    ASSERT(edge.useKind() != KnownInt32Use || !(value.m_type & ~SpecInt32Only));
     905
     906    m_interpreter.filter(value, SpecInt32Only);
    907907    if (value.isClear()) {
    908908        terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
     
    959959
    960960    case DataFormatJS: {
    961         DFG_ASSERT(m_jit.graph(), m_currentNode, !(type & SpecInt52));
     961        DFG_ASSERT(m_jit.graph(), m_currentNode, !(type & SpecInt52Only));
    962962        // Check the value is an integer.
    963963        GPRReg gpr = info.gpr();
    964964        m_gprs.lock(gpr);
    965         if (type & ~SpecInt32)
     965        if (type & ~SpecInt32Only)
    966966            speculationCheck(BadType, JSValueRegs(gpr), edge, m_jit.branch64(MacroAssembler::Below, gpr, GPRInfo::tagTypeNumberRegister));
    967967        info.fillJSValue(*m_stream, gpr, DataFormatJSInt32);
     
    10461046    AbstractValue& value = m_state.forNode(edge);
    10471047
    1048     m_interpreter.filter(value, SpecMachineInt);
     1048    m_interpreter.filter(value, SpecAnyInt);
    10491049    if (value.isClear()) {
    10501050        terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
     
    10611061        if (edge->hasConstant()) {
    10621062            JSValue jsValue = edge->asJSValue();
    1063             ASSERT(jsValue.isMachineInt());
     1063            ASSERT(jsValue.isAnyInt());
    10641064            m_gprs.retain(gpr, virtualRegister, SpillOrderConstant);
    1065             int64_t value = jsValue.asMachineInt();
     1065            int64_t value = jsValue.asAnyInt();
    10661066            if (desiredFormat == DataFormatInt52)
    10671067                value = value << JSValue::int52ShiftAmount;
     
    11321132FPRReg SpeculativeJIT::fillSpeculateDouble(Edge edge)
    11331133{
    1134     ASSERT(edge.useKind() == DoubleRepUse || edge.useKind() == DoubleRepRealUse || edge.useKind() == DoubleRepMachineIntUse);
     1134    ASSERT(edge.useKind() == DoubleRepUse || edge.useKind() == DoubleRepRealUse || edge.useKind() == DoubleRepAnyIntUse);
    11351135    ASSERT(edge->hasDoubleResult());
    11361136    VirtualRegister virtualRegister = edge->virtualRegister();
     
    19331933            GPRReg resultGPR = result.gpr();
    19341934           
    1935             if (node->child1()->prediction() & SpecInt32) {
     1935            if (node->child1()->prediction() & SpecInt32Only) {
    19361936                branch64(MacroAssembler::Equal, valueGPR, MacroAssembler::TrustedImm64(JSValue::encode(jsNumber(0))), notTaken);
    19371937                branch64(MacroAssembler::AboveOrEqual, valueGPR, GPRInfo::tagTypeNumberRegister, taken);
     
    19881988        case DoubleRepUse:
    19891989        case DoubleRepRealUse:
    1990         case DoubleRepMachineIntUse: {
     1990        case DoubleRepAnyIntUse: {
    19911991            SpeculateDoubleOperand op(this, node->child1());
    19921992            FPRTemporary scratch(this, op);
     
    22232223        }
    22242224           
    2225         case MachineIntUse: {
     2225        case AnyIntUse: {
    22262226            GPRTemporary result(this);
    22272227            GPRReg resultGPR = result.gpr();
    22282228           
    2229             convertMachineInt(node->child1(), resultGPR);
     2229            convertAnyInt(node->child1(), resultGPR);
    22302230           
    22312231            strictInt52Result(resultGPR, node);
     
    22332233        }
    22342234           
    2235         case DoubleRepMachineIntUse: {
     2235        case DoubleRepAnyIntUse: {
    22362236            SpeculateDoubleOperand value(this, node->child1());
    22372237            FPRReg valueFPR = value.fpr();
     
    22452245           
    22462246            DFG_TYPE_CHECK_WITH_EXIT_KIND(Int52Overflow,
    2247                 JSValueRegs(), node->child1(), SpecInt52AsDouble,
     2247                JSValueRegs(), node->child1(), SpecAnyIntAsDouble,
    22482248                m_jit.branch64(
    22492249                    JITCompiler::Equal, resultGPR,
     
    28282828            if (arrayMode.type() == Array::Int32) {
    28292829                DFG_TYPE_CHECK(
    2830                     JSValueRegs(valueReg), child3, SpecInt32,
     2830                    JSValueRegs(valueReg), child3, SpecInt32Only,
    28312831                    m_jit.branch64(
    28322832                        MacroAssembler::Below, valueReg, GPRInfo::tagTypeNumberRegister));
     
    32203220            if (node->arrayMode().type() == Array::Int32) {
    32213221                DFG_TYPE_CHECK(
    3222                     JSValueRegs(valueGPR), node->child2(), SpecInt32,
     3222                    JSValueRegs(valueGPR), node->child2(), SpecInt32Only,
    32233223                    m_jit.branch64(
    32243224                        MacroAssembler::Below, valueGPR, GPRInfo::tagTypeNumberRegister));
     
    36003600                    if (hasInt32(node->indexingType())) {
    36013601                        DFG_TYPE_CHECK(
    3602                             JSValueRegs(opGPR), use, SpecInt32,
     3602                            JSValueRegs(opGPR), use, SpecInt32Only,
    36033603                            m_jit.branch64(
    36043604                                MacroAssembler::Below, opGPR, GPRInfo::tagTypeNumberRegister));
     
    36663666                if (hasInt32(node->indexingType())) {
    36673667                    DFG_TYPE_CHECK(
    3668                         JSValueRegs(opGPR), use, SpecInt32,
     3668                        JSValueRegs(opGPR), use, SpecInt32Only,
    36693669                        m_jit.branch64(
    36703670                            MacroAssembler::Below, opGPR, GPRInfo::tagTypeNumberRegister));
     
    49994999            m_jit.and64(TrustedImm32(~1), scratch2GPR);
    50005000            jumpToEnd.append(m_jit.branch64(MacroAssembler::Equal, scratch2GPR, MacroAssembler::TrustedImm64(ValueFalse)));
    5001         } else if (cachedTypeLocation->m_lastSeenType == TypeMachineInt)
     5001        } else if (cachedTypeLocation->m_lastSeenType == TypeAnyInt)
    50025002            jumpToEnd.append(m_jit.branch64(MacroAssembler::AboveOrEqual, valueGPR, GPRInfo::tagTypeNumberRegister));
    50035003        else if (cachedTypeLocation->m_lastSeenType == TypeNumber)
     
    52085208}
    52095209
    5210 void SpeculativeJIT::convertMachineInt(Edge valueEdge, GPRReg resultGPR)
     5210void SpeculativeJIT::convertAnyInt(Edge valueEdge, GPRReg resultGPR)
    52115211{
    52125212    JSValueOperand value(this, valueEdge, ManualOperandSpeculation);
     
    52255225
    52265226    DFG_TYPE_CHECK(
    5227         JSValueRegs(valueGPR), valueEdge, SpecInt32 | SpecInt52AsDouble,
     5227        JSValueRegs(valueGPR), valueEdge, SpecInt32Only | SpecAnyIntAsDouble,
    52285228        m_jit.branch64(
    52295229            JITCompiler::Equal, resultGPR,
     
    52325232}
    52335233
    5234 void SpeculativeJIT::speculateMachineInt(Edge edge)
     5234void SpeculativeJIT::speculateAnyInt(Edge edge)
    52355235{
    5236     if (!needsTypeCheck(edge, SpecInt32 | SpecInt52AsDouble))
     5236    if (!needsTypeCheck(edge, SpecInt32Only | SpecAnyIntAsDouble))
    52375237        return;
    52385238   
    52395239    GPRTemporary temp(this);
    5240     convertMachineInt(edge, temp.gpr());
     5240    convertAnyInt(edge, temp.gpr());
    52415241}
    52425242
    5243 void SpeculativeJIT::speculateDoubleRepMachineInt(Edge edge)
     5243void SpeculativeJIT::speculateDoubleRepAnyInt(Edge edge)
    52445244{
    5245     if (!needsTypeCheck(edge, SpecInt52AsDouble))
     5245    if (!needsTypeCheck(edge, SpecAnyIntAsDouble))
    52465246        return;
    52475247   
     
    52575257   
    52585258    DFG_TYPE_CHECK(
    5259         JSValueRegs(), edge, SpecInt52AsDouble,
     5259        JSValueRegs(), edge, SpecAnyIntAsDouble,
    52605260        m_jit.branch64(
    52615261            JITCompiler::Equal, resultGPR,
  • trunk/Source/JavaScriptCore/dfg/DFGUseKind.cpp

    r197649 r200034  
    5050        out.print("Int52Rep");
    5151        return;
    52     case MachineIntUse:
    53         out.print("MachineInt");
     52    case AnyIntUse:
     53        out.print("AnyInt");
    5454        return;
    5555    case NumberUse:
     
    6565        out.print("DoubleRepReal");
    6666        return;
    67     case DoubleRepMachineIntUse:
    68         out.print("DoubleRepMachineInt");
     67    case DoubleRepAnyIntUse:
     68        out.print("DoubleRepAnyInt");
    6969        return;
    7070    case BooleanUse:
  • trunk/Source/JavaScriptCore/dfg/DFGUseKind.h

    r197649 r200034  
    4545    Int32Use,
    4646    KnownInt32Use,
    47     MachineIntUse,
     47    AnyIntUse,
    4848    NumberUse,
    4949    RealNumberUse,
     
    7575    DoubleRepUse,
    7676    DoubleRepRealUse,
    77     DoubleRepMachineIntUse,
     77    DoubleRepAnyIntUse,
    7878
    7979    // 3. The Int52 representation for an unboxed integer value that must be stored
     
    9191    case Int32Use:
    9292    case KnownInt32Use:
    93         return SpecInt32;
     93        return SpecInt32Only;
    9494    case Int52RepUse:
    95         return SpecMachineInt;
    96     case MachineIntUse:
    97         return SpecInt32 | SpecInt52AsDouble;
     95        return SpecAnyInt;
     96    case AnyIntUse:
     97        return SpecInt32Only | SpecAnyIntAsDouble;
    9898    case NumberUse:
    9999        return SpecBytecodeNumber;
     
    104104    case DoubleRepRealUse:
    105105        return SpecDoubleReal;
    106     case DoubleRepMachineIntUse:
    107         return SpecInt52AsDouble;
     106    case DoubleRepAnyIntUse:
     107        return SpecAnyIntAsDouble;
    108108    case BooleanUse:
    109109    case KnownBooleanUse:
     
    185185    case DoubleRepUse:
    186186    case DoubleRepRealUse:
    187     case MachineIntUse:
    188     case DoubleRepMachineIntUse:
     187    case AnyIntUse:
     188    case DoubleRepAnyIntUse:
    189189        return true;
    190190    default:
     
    198198    case DoubleRepUse:
    199199    case DoubleRepRealUse:
    200     case DoubleRepMachineIntUse:
     200    case DoubleRepAnyIntUse:
    201201        return true;
    202202    default:
  • trunk/Source/JavaScriptCore/dfg/DFGValidate.cpp

    r199967 r200034  
    695695            return;
    696696       
    697         VALIDATE((node, edge), edge.useKind() == DoubleRepUse || edge.useKind() == DoubleRepRealUse || edge.useKind() == DoubleRepMachineIntUse);
     697        VALIDATE((node, edge), edge.useKind() == DoubleRepUse || edge.useKind() == DoubleRepRealUse || edge.useKind() == DoubleRepAnyIntUse);
    698698    }
    699699
  • trunk/Source/JavaScriptCore/dfg/DFGVariableAccessData.cpp

    r181993 r200034  
    157157    if (type & ~SpecBytecodeNumber)
    158158        type |= SpecDoublePureNaN;
    159     if (type & SpecMachineInt)
    160         type |= SpecInt52AsDouble;
     159    if (type & SpecAnyInt)
     160        type |= SpecAnyIntAsDouble;
    161161    return checkAndSet(m_prediction, type);
    162162}
     
    181181   
    182182    // The argument-aware prediction -- which merges all of an (inlined or machine)
    183     // argument's variable access datas' predictions -- must possibly be MachineInt.
    184     return !(argumentAwarePrediction() & ~SpecMachineInt);
     183    // argument's variable access datas' predictions -- must possibly be AnyInt.
     184    return !(argumentAwarePrediction() & ~SpecAnyInt);
    185185}
    186186
  • trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp

    r199967 r200034  
    501501                case StringIdentUse:
    502502                case NotStringVarUse:
    503                 case MachineIntUse:
    504                 case DoubleRepMachineIntUse:
     503                case AnyIntUse:
     504                case DoubleRepAnyIntUse:
    505505                    // These are OK.
    506506                    break;
  • trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

    r199967 r200034  
    10831083    void compileInt52Constant()
    10841084    {
    1085         int64_t value = m_node->asMachineInt();
     1085        int64_t value = m_node->asAnyInt();
    10861086       
    10871087        setInt52(m_out.constInt64(value << JSValue::int52ShiftAmount));
     
    12621262            return;
    12631263           
    1264         case MachineIntUse:
     1264        case AnyIntUse:
    12651265            setStrictInt52(
    12661266                jsValueToStrictInt52(
     
    12681268            return;
    12691269           
    1270         case DoubleRepMachineIntUse:
     1270        case DoubleRepAnyIntUse:
    12711271            setStrictInt52(
    12721272                doubleToStrictInt52(
     
    15391539           
    15401540        case Int52RepUse: {
    1541             if (!abstractValue(m_node->child1()).couldBeType(SpecInt52)
    1542                 && !abstractValue(m_node->child2()).couldBeType(SpecInt52)) {
     1541            if (!abstractValue(m_node->child1()).couldBeType(SpecInt52Only)
     1542                && !abstractValue(m_node->child2()).couldBeType(SpecInt52Only)) {
    15431543                Int52Kind kind;
    15441544                LValue left = lowWhicheverInt52(m_node->child1(), kind);
     
    20862086           
    20872087        case Int52RepUse: {
    2088             if (!abstractValue(m_node->child1()).couldBeType(SpecInt52)) {
     2088            if (!abstractValue(m_node->child1()).couldBeType(SpecInt52Only)) {
    20892089                Int52Kind kind;
    20902090                LValue value = lowWhicheverInt52(m_node->child1(), kind);
     
    28592859                    }
    28602860                   
    2861                     if (m_node->shouldSpeculateMachineInt()) {
     2861                    if (m_node->shouldSpeculateAnyInt()) {
    28622862                        setStrictInt52(m_out.zeroExt(result, m_out.int64));
    28632863                        return;
     
    30003000               
    30013001                if (m_node->arrayMode().type() == Array::Int32)
    3002                     FTL_TYPE_CHECK(jsValueValue(value), child3, SpecInt32, isNotInt32(value));
     3002                    FTL_TYPE_CHECK(jsValueValue(value), child3, SpecInt32Only, isNotInt32(value));
    30033003               
    30043004                TypedPointer elementPointer = m_out.baseIndex(
     
    32503250                if (m_node->arrayMode().type() == Array::Int32) {
    32513251                    FTL_TYPE_CHECK(
    3252                         jsValueValue(value), m_node->child2(), SpecInt32, isNotInt32(value));
     3252                        jsValueValue(value), m_node->child2(), SpecInt32Only, isNotInt32(value));
    32533253                }
    32543254                storeType = Output::Store64;
     
    93149314            LValue boxedResult = value.value();
    93159315            FTL_TYPE_CHECK(
    9316                 jsValueValue(boxedResult), edge, SpecInt32, isNotInt32(boxedResult));
     9316                jsValueValue(boxedResult), edge, SpecInt32Only, isNotInt32(boxedResult));
    93179317            LValue result = unboxInt32(boxedResult);
    93189318            setInt32(edge.node(), result);
     
    93209320        }
    93219321
    9322         DFG_ASSERT(m_graph, m_node, !(provenType(edge) & SpecInt32));
     9322        DFG_ASSERT(m_graph, m_node, !(provenType(edge) & SpecInt32Only));
    93239323        terminate(Uncountable);
    93249324        return m_out.int32Zero;
     
    95699569        LValue result = m_out.castToInt32(value);
    95709570        FTL_TYPE_CHECK(
    9571             noValue(), edge, SpecInt32,
     9571            noValue(), edge, SpecInt32Only,
    95729572            m_out.notEqual(m_out.signExt32To64(result), value));
    95739573        setInt32(edge.node(), result);
     
    96199619    LValue isInt32(LValue jsValue, SpeculatedType type = SpecFullTop)
    96209620    {
    9621         if (LValue proven = isProvenValue(type, SpecInt32))
     9621        if (LValue proven = isProvenValue(type, SpecInt32Only))
    96229622            return proven;
    96239623        return m_out.aboveOrEqual(jsValue, m_tagTypeNumber);
     
    96259625    LValue isNotInt32(LValue jsValue, SpeculatedType type = SpecFullTop)
    96269626    {
    9627         if (LValue proven = isProvenValue(type, ~SpecInt32))
     9627        if (LValue proven = isProvenValue(type, ~SpecInt32Only))
    96289628            return proven;
    96299629        return m_out.below(jsValue, m_tagTypeNumber);
     
    96679667           
    96689668        LValue isNotInt32;
    9669         if (!m_interpreter.needsTypeCheck(edge, SpecInt32))
     9669        if (!m_interpreter.needsTypeCheck(edge, SpecInt32Only))
    96709670            isNotInt32 = m_out.booleanFalse;
    9671         else if (!m_interpreter.needsTypeCheck(edge, ~SpecInt32))
     9671        else if (!m_interpreter.needsTypeCheck(edge, ~SpecInt32Only))
    96729672            isNotInt32 = m_out.booleanTrue;
    96739673        else
     
    96869686            m_out.int64, m_out.operation(operationConvertBoxedDoubleToInt52), boxedValue);
    96879687        FTL_TYPE_CHECK(
    9688             jsValueValue(boxedValue), edge, SpecInt32 | SpecInt52AsDouble,
     9688            jsValueValue(boxedValue), edge, SpecInt32Only | SpecAnyIntAsDouble,
    96899689            m_out.equal(possibleResult, m_out.constInt64(JSValue::notInt52)));
    96909690           
     
    97029702            m_out.int64, m_out.operation(operationConvertDoubleToInt52), value);
    97039703        FTL_TYPE_CHECK_WITH_EXIT_KIND(Int52Overflow,
    9704             doubleValue(value), edge, SpecInt52AsDouble,
     9704            doubleValue(value), edge, SpecAnyIntAsDouble,
    97059705            m_out.equal(possibleResult, m_out.constInt64(JSValue::notInt52)));
    97069706       
     
    98499849            ASSERT(!m_interpreter.needsTypeCheck(edge));
    98509850            break;
    9851         case MachineIntUse:
    9852             speculateMachineInt(edge);
     9851        case AnyIntUse:
     9852            speculateAnyInt(edge);
    98539853            break;
    98549854        case ObjectUse:
     
    98949894            speculateDoubleRepReal(edge);
    98959895            break;
    9896         case DoubleRepMachineIntUse:
    9897             speculateDoubleRepMachineInt(edge);
     9896        case DoubleRepAnyIntUse:
     9897            speculateDoubleRepAnyInt(edge);
    98989898            break;
    98999899        case BooleanUse:
     
    99489948    }
    99499949   
    9950     void speculateMachineInt(Edge edge)
     9950    void speculateAnyInt(Edge edge)
    99519951    {
    99529952        if (!m_interpreter.needsTypeCheck(edge))
     
    1034610346    }
    1034710347   
    10348     void speculateDoubleRepMachineInt(Edge edge)
     10348    void speculateDoubleRepAnyInt(Edge edge)
    1034910349    {
    1035010350        if (!m_interpreter.needsTypeCheck(edge))
  • trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp

    r199724 r200034  
    12981298        and64(TrustedImm32(~1), regT1);
    12991299        jumpToEnd.append(branch64(Equal, regT1, TrustedImm64(ValueFalse)));
    1300     } else if (cachedTypeLocation->m_lastSeenType == TypeMachineInt)
     1300    } else if (cachedTypeLocation->m_lastSeenType == TypeAnyInt)
    13011301        jumpToEnd.append(emitJumpIfInt(regT0));
    13021302    else if (cachedTypeLocation->m_lastSeenType == TypeNumber)
  • trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp

    r199724 r200034  
    12991299    else if (cachedTypeLocation->m_lastSeenType == TypeBoolean)
    13001300        jumpToEnd.append(branch32(Equal, regT3, TrustedImm32(JSValue::BooleanTag)));
    1301     else if (cachedTypeLocation->m_lastSeenType == TypeMachineInt)
     1301    else if (cachedTypeLocation->m_lastSeenType == TypeAnyInt)
    13021302        jumpToEnd.append(branch32(Equal, regT3, TrustedImm32(JSValue::Int32Tag)));
    13031303    else if (cachedTypeLocation->m_lastSeenType == TypeNumber) {
  • trunk/Source/JavaScriptCore/runtime/JSCJSValue.h

    r199382 r200034  
    215215    int32_t asInt32() const;
    216216    uint32_t asUInt32() const;
    217     int64_t asMachineInt() const;
     217    int64_t asAnyInt() const;
    218218    double asDouble() const;
    219219    bool asBoolean() const;
     
    233233    bool isUndefinedOrNull() const;
    234234    bool isBoolean() const;
    235     bool isMachineInt() const;
     235    bool isAnyInt() const;
    236236    bool isNumber() const;
    237237    bool isString() const;
  • trunk/Source/JavaScriptCore/runtime/JSCJSValueInlines.h

    r199382 r200034  
    531531}
    532532
    533 inline bool JSValue::isMachineInt() const
     533inline bool JSValue::isAnyInt() const
    534534{
    535535    if (isInt32())
     
    540540}
    541541
    542 inline int64_t JSValue::asMachineInt() const
    543 {
    544     ASSERT(isMachineInt());
     542inline int64_t JSValue::asAnyInt() const
     543{
     544    ASSERT(isAnyInt());
    545545    if (isInt32())
    546546        return asInt32();
  • trunk/Source/JavaScriptCore/runtime/RuntimeType.cpp

    r196300 r200034  
    4343    if (value.isNull())
    4444        return TypeNull;
    45     if (value.isMachineInt())
    46         return TypeMachineInt;
     45    if (value.isAnyInt())
     46        return TypeAnyInt;
    4747    if (value.isNumber())
    4848        return TypeNumber;
     
    6767    if (type == TypeNull)
    6868        return ASCIILiteral("Null");
    69     if (type == TypeMachineInt)
     69    if (type == TypeAnyInt)
    7070        return ASCIILiteral("Integer");
    7171    if (type == TypeNumber)
  • trunk/Source/JavaScriptCore/runtime/RuntimeType.h

    r197614 r200034  
    3838    TypeNull               = 0x4,
    3939    TypeBoolean            = 0x8,
    40     TypeMachineInt         = 0x10,
     40    TypeAnyInt             = 0x10,
    4141    TypeNumber             = 0x20,
    4242    TypeString             = 0x40,
     
    4747typedef uint16_t RuntimeTypeMask;
    4848
    49 static const RuntimeTypeMask RuntimeTypeMaskAllTypes = TypeFunction | TypeUndefined | TypeNull | TypeBoolean | TypeMachineInt | TypeNumber | TypeString | TypeObject | TypeSymbol;
     49static const RuntimeTypeMask RuntimeTypeMaskAllTypes = TypeFunction | TypeUndefined | TypeNull | TypeBoolean | TypeAnyInt | TypeNumber | TypeString | TypeObject | TypeSymbol;
    5050
    5151class JSValue;
  • trunk/Source/JavaScriptCore/runtime/TypeSet.cpp

    r194496 r200034  
    101101    if (m_seenTypes & TypeBoolean)
    102102        seen.appendLiteral("Boolean ");
    103     if (m_seenTypes & TypeMachineInt)
    104         seen.appendLiteral("MachineInt ");
     103    if (m_seenTypes & TypeAnyInt)
     104        seen.appendLiteral("AnyInt ");
    105105    if (m_seenTypes & TypeNumber)
    106106        seen.appendLiteral("Number ");
     
    180180    if (doesTypeConformTo(TypeBoolean))
    181181        return ASCIILiteral("Boolean");
    182     if (doesTypeConformTo(TypeMachineInt))
     182    if (doesTypeConformTo(TypeAnyInt))
    183183        return ASCIILiteral("Integer");
    184     if (doesTypeConformTo(TypeNumber | TypeMachineInt))
     184    if (doesTypeConformTo(TypeNumber | TypeAnyInt))
    185185        return ASCIILiteral("Number");
    186186    if (doesTypeConformTo(TypeString))
     
    196196    if (doesTypeConformTo(TypeBoolean | TypeNull | TypeUndefined))
    197197        return ASCIILiteral("Boolean?");
    198     if (doesTypeConformTo(TypeMachineInt | TypeNull | TypeUndefined))
     198    if (doesTypeConformTo(TypeAnyInt | TypeNull | TypeUndefined))
    199199        return ASCIILiteral("Integer?");
    200     if (doesTypeConformTo(TypeNumber | TypeMachineInt | TypeNull | TypeUndefined))
     200    if (doesTypeConformTo(TypeNumber | TypeAnyInt | TypeNull | TypeUndefined))
    201201        return ASCIILiteral("Number?");
    202202    if (doesTypeConformTo(TypeString | TypeNull | TypeUndefined))
     
    235235        .setIsNull((m_seenTypes & TypeNull) != TypeNothing)
    236236        .setIsBoolean((m_seenTypes & TypeBoolean) != TypeNothing)
    237         .setIsInteger((m_seenTypes & TypeMachineInt) != TypeNothing)
     237        .setIsInteger((m_seenTypes & TypeAnyInt) != TypeNothing)
    238238        .setIsNumber((m_seenTypes & TypeNumber) != TypeNothing)
    239239        .setIsString((m_seenTypes & TypeString) != TypeNothing)
     
    278278        json.appendLiteral("\"Boolean\"");
    279279    }
    280     if (m_seenTypes & TypeMachineInt) {
     280    if (m_seenTypes & TypeAnyInt) {
    281281        if (hasAnItem)
    282282            json.append(',');
Note: See TracChangeset for help on using the changeset viewer.