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):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@200034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h b/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
index 45da2c2..7abe5b8 100644
--- a/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
+++ b/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
@@ -237,7 +237,7 @@
// https://bugs.webkit.org/show_bug.cgi?id=143071
clobberWorld(node->origin.semantic, clobberLimit);
LoadVarargsData* data = node->loadVarargsData();
- m_state.variables().operand(data->count).setType(SpecInt32);
+ m_state.variables().operand(data->count).setType(SpecInt32Only);
for (unsigned i = data->limit - 1; i--;)
m_state.variables().operand(data->start.offset() + i).makeHeapTop();
break;
@@ -251,7 +251,7 @@
case BitURShift: {
if (node->child1().useKind() == UntypedUse || node->child2().useKind() == UntypedUse) {
clobberWorld(node->origin.semantic, clobberLimit);
- forNode(node).setType(m_graph, SpecInt32);
+ forNode(node).setType(m_graph, SpecInt32Only);
break;
}
@@ -293,7 +293,7 @@
break;
}
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
}
@@ -301,11 +301,11 @@
JSValue child = forNode(node->child1()).value();
if (doesOverflow(node->arithMode())) {
if (enableInt52()) {
- if (child && child.isMachineInt()) {
- setConstant(node, jsNumber(child.asMachineInt()));
+ if (child && child.isAnyInt()) {
+ setConstant(node, jsNumber(child.asAnyInt()));
break;
}
- forNode(node).setType(SpecMachineInt);
+ forNode(node).setType(SpecAnyInt);
break;
}
if (child && child.isInt32()) {
@@ -313,7 +313,7 @@
setConstant(node, jsNumber(value));
break;
}
- forNode(node).setType(SpecInt52AsDouble);
+ forNode(node).setType(SpecAnyIntAsDouble);
break;
}
if (child && child.isInt32()) {
@@ -323,7 +323,7 @@
break;
}
}
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
}
@@ -357,7 +357,7 @@
break;
}
}
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
}
@@ -386,7 +386,7 @@
break;
}
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
}
@@ -441,12 +441,12 @@
case Int52Rep: {
JSValue child = forNode(node->child1()).value();
- if (child && child.isMachineInt()) {
+ if (child && child.isAnyInt()) {
setConstant(node, child);
break;
}
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
}
@@ -490,17 +490,17 @@
break;
}
}
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case Int52RepUse:
- if (left && right && left.isMachineInt() && right.isMachineInt()) {
- JSValue result = jsNumber(left.asMachineInt() + right.asMachineInt());
- if (result.isMachineInt()) {
+ if (left && right && left.isAnyInt() && right.isAnyInt()) {
+ JSValue result = jsNumber(left.asAnyInt() + right.asAnyInt());
+ if (result.isAnyInt()) {
setConstant(node, result);
break;
}
}
- forNode(node).setType(SpecMachineInt);
+ forNode(node).setType(SpecAnyInt);
break;
case DoubleRepUse:
if (left && right && left.isNumber() && right.isNumber()) {
@@ -525,7 +525,7 @@
setConstant(node, jsNumber(clz32(value)));
break;
}
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
}
@@ -550,17 +550,17 @@
break;
}
}
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case Int52RepUse:
- if (left && right && left.isMachineInt() && right.isMachineInt()) {
- JSValue result = jsNumber(left.asMachineInt() - right.asMachineInt());
- if (result.isMachineInt() || !shouldCheckOverflow(node->arithMode())) {
+ if (left && right && left.isAnyInt() && right.isAnyInt()) {
+ JSValue result = jsNumber(left.asAnyInt() - right.asAnyInt());
+ if (result.isAnyInt() || !shouldCheckOverflow(node->arithMode())) {
setConstant(node, result);
break;
}
}
- forNode(node).setType(SpecMachineInt);
+ forNode(node).setType(SpecAnyInt);
break;
case DoubleRepUse:
if (left && right && left.isNumber() && right.isNumber()) {
@@ -602,22 +602,22 @@
break;
}
}
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case Int52RepUse:
- if (child && child.isMachineInt()) {
+ if (child && child.isAnyInt()) {
double doubleResult;
if (shouldCheckNegativeZero(node->arithMode()))
doubleResult = -child.asNumber();
else
doubleResult = 0 - child.asNumber();
JSValue valueResult = jsNumber(doubleResult);
- if (valueResult.isMachineInt()) {
+ if (valueResult.isAnyInt()) {
setConstant(node, valueResult);
break;
}
}
- forNode(node).setType(SpecMachineInt);
+ forNode(node).setType(SpecAnyInt);
break;
case DoubleRepUse:
if (child && child.isNumber()) {
@@ -654,20 +654,20 @@
break;
}
}
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case Int52RepUse:
- if (left && right && left.isMachineInt() && right.isMachineInt()) {
+ if (left && right && left.isAnyInt() && right.isAnyInt()) {
double doubleResult = left.asNumber() * right.asNumber();
if (!shouldCheckNegativeZero(node->arithMode()))
doubleResult += 0;
JSValue valueResult = jsNumber(doubleResult);
- if (valueResult.isMachineInt()) {
+ if (valueResult.isAnyInt()) {
setConstant(node, valueResult);
break;
}
}
- forNode(node).setType(SpecMachineInt);
+ forNode(node).setType(SpecAnyInt);
break;
case DoubleRepUse:
if (left && right && left.isNumber() && right.isNumber()) {
@@ -706,7 +706,7 @@
break;
}
}
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case DoubleRepUse:
if (left && right && left.isNumber() && right.isNumber()) {
@@ -745,7 +745,7 @@
break;
}
}
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case DoubleRepUse:
if (left && right && left.isNumber() && right.isNumber()) {
@@ -772,7 +772,7 @@
setConstant(node, jsNumber(std::min(left.asInt32(), right.asInt32())));
break;
}
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case DoubleRepUse:
if (left && right && left.isNumber() && right.isNumber()) {
@@ -801,7 +801,7 @@
setConstant(node, jsNumber(std::max(left.asInt32(), right.asInt32())));
break;
}
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case DoubleRepUse:
if (left && right && left.isNumber() && right.isNumber()) {
@@ -832,7 +832,7 @@
break;
}
}
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case DoubleRepUse:
if (child && child.isNumber()) {
@@ -908,7 +908,7 @@
}
}
if (producesInteger(node->arithRoundingMode()))
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
else
forNode(node).setType(typeOfDoubleRounding(forNode(node->child1()).m_type));
break;
@@ -1462,7 +1462,7 @@
}
case StringCharCodeAt:
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case StringFromCharCode:
@@ -1522,7 +1522,7 @@
clobberWorld(node->origin.semantic, clobberLimit);
forNode(node).makeHeapTop();
} else
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case Array::Double:
if (node->arrayMode().isOutOfBounds()) {
@@ -1541,30 +1541,30 @@
forNode(node).makeHeapTop();
break;
case Array::Int8Array:
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case Array::Int16Array:
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case Array::Int32Array:
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case Array::Uint8Array:
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case Array::Uint8ClampedArray:
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case Array::Uint16Array:
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case Array::Uint32Array:
if (node->shouldSpeculateInt32())
- forNode(node).setType(SpecInt32);
- else if (enableInt52() && node->shouldSpeculateMachineInt())
- forNode(node).setType(SpecMachineInt);
+ forNode(node).setType(SpecInt32Only);
+ else if (enableInt52() && node->shouldSpeculateAnyInt())
+ forNode(node).setType(SpecAnyInt);
else
- forNode(node).setType(SpecInt52AsDouble);
+ forNode(node).setType(SpecAnyIntAsDouble);
break;
case Array::Float32Array:
forNode(node).setType(SpecFullDouble);
@@ -1967,11 +1967,11 @@
break;
case GetArgumentCount:
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case GetRestLength:
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
case GetGetter: {
@@ -2124,7 +2124,7 @@
setConstant(node, jsNumber(view->length()));
break;
}
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
}
@@ -2350,7 +2350,7 @@
setConstant(node, jsNumber(view->byteOffset()));
break;
}
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
}
@@ -2632,7 +2632,7 @@
}
case GetEnumerableLength: {
- forNode(node).setType(SpecInt32);
+ forNode(node).setType(SpecInt32Only);
break;
}
case HasGenericProperty: {
diff --git a/Source/JavaScriptCore/dfg/DFGAbstractValue.cpp b/Source/JavaScriptCore/dfg/DFGAbstractValue.cpp
index dced7c5..b95dfa5 100644
--- a/Source/JavaScriptCore/dfg/DFGAbstractValue.cpp
+++ b/Source/JavaScriptCore/dfg/DFGAbstractValue.cpp
@@ -130,7 +130,7 @@
setType(SpecOther);
return;
case InferredType::Int32:
- setType(SpecInt32);
+ setType(SpecInt32Only);
return;
case InferredType::Number:
setType(SpecBytecodeNumber);
@@ -178,23 +178,23 @@
if (m_value.isInt32())
m_value = jsDoubleNumber(m_value.asNumber());
}
- if (m_type & SpecMachineInt) {
- m_type &= ~SpecMachineInt;
- m_type |= SpecInt52AsDouble;
+ if (m_type & SpecAnyInt) {
+ m_type &= ~SpecAnyInt;
+ m_type |= SpecAnyIntAsDouble;
}
if (m_type & ~SpecFullDouble)
DFG_CRASH(graph, node, toCString("Abstract value ", *this, " for double node has type outside SpecFullDouble.\n").data());
} else if (representation == NodeResultInt52) {
- if (m_type & SpecInt52AsDouble) {
- m_type &= ~SpecInt52AsDouble;
- m_type |= SpecInt52;
+ if (m_type & SpecAnyIntAsDouble) {
+ m_type &= ~SpecAnyIntAsDouble;
+ m_type |= SpecInt52Only;
}
- if (m_type & ~SpecMachineInt)
- DFG_CRASH(graph, node, toCString("Abstract value ", *this, " for int52 node has type outside SpecMachineInt.\n").data());
+ if (m_type & ~SpecAnyInt)
+ DFG_CRASH(graph, node, toCString("Abstract value ", *this, " for int52 node has type outside SpecAnyInt.\n").data());
} else {
- if (m_type & SpecInt52) {
- m_type &= ~SpecInt52;
- m_type |= SpecInt52AsDouble;
+ if (m_type & SpecInt52Only) {
+ m_type &= ~SpecInt52Only;
+ m_type |= SpecAnyIntAsDouble;
}
if (m_type & ~SpecBytecodeTop)
DFG_CRASH(graph, node, toCString("Abstract value ", *this, " for value node has type outside SpecBytecodeTop.\n").data());
@@ -480,8 +480,8 @@
SpeculatedType type = m_type;
// This relaxes the assertion below a bit, since we don't know the representation of the
// node.
- if (type & SpecInt52)
- type |= SpecInt52AsDouble;
+ if (type & SpecInt52Only)
+ type |= SpecAnyIntAsDouble;
ASSERT(mergeSpeculations(type, speculationFromValue(m_value)) == type);
}
@@ -502,7 +502,7 @@
ASSERT(isType(SpecBytecodeTop));
if (isType(SpecBoolean))
return ResultType::booleanType();
- if (isType(SpecInt32))
+ if (isType(SpecInt32Only))
return ResultType::numberTypeIsInt32();
if (isType(SpecBytecodeNumber))
return ResultType::numberType();
diff --git a/Source/JavaScriptCore/dfg/DFGAbstractValue.h b/Source/JavaScriptCore/dfg/DFGAbstractValue.h
index 4808428..d514300 100644
--- a/Source/JavaScriptCore/dfg/DFGAbstractValue.h
+++ b/Source/JavaScriptCore/dfg/DFGAbstractValue.h
@@ -376,7 +376,7 @@
// abstract value that consists of the union of the set of all non-cell values
// and the set of cell values that have the given structure. This abstract
// value is then the intersection of the m_structure and the set of values
- // whose type is m_type. So, for example if m_type is SpecFinal|SpecInt32 and
+ // whose type is m_type. So, for example if m_type is SpecFinal|SpecInt32Only and
// m_structure is [0x12345] then this abstract value corresponds to the set of
// all integers unified with the set of all objects with structure 0x12345.
SpeculatedType m_type;
@@ -419,12 +419,12 @@
if (isHeapTop())
return true;
- // Constant folding always represents Int52's in a double (i.e. Int52AsDouble).
- // So speculationFromValue(value) for an Int52 value will return Int52AsDouble,
+ // Constant folding always represents Int52's in a double (i.e. AnyIntAsDouble).
+ // So speculationFromValue(value) for an Int52 value will return AnyIntAsDouble,
// and that's fine - the type validates just fine.
SpeculatedType type = m_type;
- if (type & SpecInt52)
- type |= SpecInt52AsDouble;
+ if (type & SpecInt52Only)
+ type |= SpecAnyIntAsDouble;
if (mergeSpeculations(type, speculationFromValue(value)) != type)
return false;
diff --git a/Source/JavaScriptCore/dfg/DFGArgumentsUtilities.cpp b/Source/JavaScriptCore/dfg/DFGArgumentsUtilities.cpp
index 5d512b1b..75c21b3 100644
--- a/Source/JavaScriptCore/dfg/DFGArgumentsUtilities.cpp
+++ b/Source/JavaScriptCore/dfg/DFGArgumentsUtilities.cpp
@@ -76,17 +76,17 @@
Node* argumentCount;
if (!inlineCallFrame)
- argumentCount = insertionSet.insertNode(nodeIndex, SpecInt32, GetArgumentCount, origin);
+ argumentCount = insertionSet.insertNode(nodeIndex, SpecInt32Only, GetArgumentCount, origin);
else {
VirtualRegister argumentCountRegister(inlineCallFrame->stackOffset + JSStack::ArgumentCount);
argumentCount = insertionSet.insertNode(
- nodeIndex, SpecInt32, GetStack, origin,
+ nodeIndex, SpecInt32Only, GetStack, origin,
OpInfo(graph.m_stackAccessData.add(argumentCountRegister, FlushedInt32)));
}
return insertionSet.insertNode(
- nodeIndex, SpecInt32, ArithSub, origin, OpInfo(Arith::Unchecked),
+ nodeIndex, SpecInt32Only, ArithSub, origin, OpInfo(Arith::Unchecked),
Edge(argumentCount, Int32Use),
insertionSet.insertConstantForUse(
nodeIndex, origin, jsNumber(1), Int32Use));
diff --git a/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp b/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
index 311257a..c8c4059 100644
--- a/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
+++ b/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
@@ -1744,7 +1744,7 @@
// This is pretty lame, but it will force the count to be flushed as an int. This doesn't
// matter very much, since our use of a SetArgument and Flushes for this local slot is
// mostly just a formality.
- countVariable->predict(SpecInt32);
+ countVariable->predict(SpecInt32Only);
countVariable->mergeIsProfitableToUnbox(true);
Node* setArgumentCount = addToGraph(SetArgument, OpInfo(countVariable));
m_currentBlock->variablesAtTail.setOperand(countVariable->local(), setArgumentCount);
@@ -2346,7 +2346,7 @@
for (int i = 1; i < argumentCountIncludingThis; ++i) {
Node* node = get(virtualRegisterForArgument(i, registerOffset));
if (node->hasHeapPrediction())
- node->setHeapPrediction(SpecInt32);
+ node->setHeapPrediction(SpecInt32Only);
}
set(VirtualRegister(resultOperand), addToGraph(JSConstant, OpInfo(m_constantUndefined)));
return true;
diff --git a/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp b/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
index 344827e..63fc60c 100644
--- a/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
+++ b/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
@@ -219,7 +219,7 @@
node->setArithMode(Arith::CheckOverflowAndNegativeZero);
break;
}
- if (m_graph.unaryArithShouldSpeculateMachineInt(node, FixupPass)) {
+ if (m_graph.unaryArithShouldSpeculateAnyInt(node, FixupPass)) {
fixEdge<Int52RepUse>(node->child1());
if (bytecodeCanIgnoreNegativeZero(node->arithNodeFlags()))
node->setArithMode(Arith::CheckOverflow);
@@ -255,7 +255,7 @@
node->setArithMode(Arith::CheckOverflowAndNegativeZero);
break;
}
- if (m_graph.binaryArithShouldSpeculateMachineInt(node, FixupPass)) {
+ if (m_graph.binaryArithShouldSpeculateAnyInt(node, FixupPass)) {
fixEdge<Int52RepUse>(leftChild);
fixEdge<Int52RepUse>(rightChild);
if (bytecodeCanIgnoreNegativeZero(node->arithNodeFlags())
@@ -446,7 +446,7 @@
break;
}
if (enableInt52()
- && Node::shouldSpeculateMachineInt(node->child1().node(), node->child2().node())) {
+ && Node::shouldSpeculateAnyInt(node->child1().node(), node->child2().node())) {
fixEdge<Int52RepUse>(node->child1());
fixEdge<Int52RepUse>(node->child2());
node->clearFlags(NodeMustGenerate);
@@ -551,7 +551,7 @@
break;
}
if (enableInt52()
- && Node::shouldSpeculateMachineInt(node->child1().node(), node->child2().node())) {
+ && Node::shouldSpeculateAnyInt(node->child1().node(), node->child2().node())) {
fixEdge<Int52RepUse>(node->child1());
fixEdge<Int52RepUse>(node->child2());
break;
@@ -763,7 +763,7 @@
case Array::Uint32Array:
if (node->shouldSpeculateInt32())
break;
- if (node->shouldSpeculateMachineInt() && enableInt52())
+ if (node->shouldSpeculateAnyInt() && enableInt52())
node->setResult(NodeResultInt52);
else
node->setResult(NodeResultDouble);
@@ -829,7 +829,7 @@
fixEdge<Int32Use>(child2);
if (child3->shouldSpeculateInt32())
fixIntOrBooleanEdge(child3);
- else if (child3->shouldSpeculateMachineInt())
+ else if (child3->shouldSpeculateAnyInt())
fixEdge<Int52RepUse>(child3);
else
fixDoubleOrBooleanEdge(child3);
@@ -869,7 +869,7 @@
node->arrayMode().refine(
m_graph, node,
node->child1()->prediction() & SpecCell,
- SpecInt32,
+ SpecInt32Only,
node->child2()->prediction()));
blessArrayOperation(node->child1(), Edge(), node->child3());
fixEdge<KnownCellUse>(node->child1());
@@ -1433,13 +1433,13 @@
RefPtr<TypeSet> typeSet = node->typeLocation()->m_instructionTypeSet;
RuntimeTypeMask seenTypes = typeSet->seenTypes();
- if (typeSet->doesTypeConformTo(TypeMachineInt)) {
+ if (typeSet->doesTypeConformTo(TypeAnyInt)) {
if (node->child1()->shouldSpeculateInt32())
fixEdge<Int32Use>(node->child1());
else
- fixEdge<MachineIntUse>(node->child1());
+ fixEdge<AnyIntUse>(node->child1());
node->remove();
- } else if (typeSet->doesTypeConformTo(TypeNumber | TypeMachineInt)) {
+ } else if (typeSet->doesTypeConformTo(TypeNumber | TypeAnyInt)) {
fixEdge<NumberUse>(node->child1());
node->remove();
} else if (typeSet->doesTypeConformTo(TypeString)) {
@@ -1678,7 +1678,7 @@
return;
}
- if (enableInt52() && node->child1()->shouldSpeculateMachineInt()) {
+ if (enableInt52() && node->child1()->shouldSpeculateAnyInt()) {
fixEdge<Int52RepUse>(node->child1());
node->convertToIdentity();
node->setResult(NodeResultInt52);
@@ -2032,7 +2032,7 @@
m_profitabilityChanged |= variable->mergeIsProfitableToUnbox(true);
break;
case Int52RepUse:
- if (isMachineIntSpeculation(variable->prediction()))
+ if (isAnyIntSpeculation(variable->prediction()))
m_profitabilityChanged |= variable->mergeIsProfitableToUnbox(true);
break;
case CellUse:
@@ -2109,14 +2109,14 @@
}
UseKind useKind;
- if (node->shouldSpeculateMachineInt())
+ if (node->shouldSpeculateAnyInt())
useKind = Int52RepUse;
else if (node->shouldSpeculateNumber())
useKind = DoubleRepUse;
else
useKind = NotCellUse;
Node* newNode = m_insertionSet.insertNode(
- m_indexInBlock, SpecInt32, ValueToInt32, m_currentNode->origin,
+ m_indexInBlock, SpecInt32Only, ValueToInt32, m_currentNode->origin,
Edge(node, useKind));
observeUseKindOnNode(node, useKind);
@@ -2137,7 +2137,7 @@
else
useKind = UntypedUse;
Node* newNode = m_insertionSet.insertNode(
- m_indexInBlock, SpecInt32, BooleanToNumber, m_currentNode->origin,
+ m_indexInBlock, SpecInt32Only, BooleanToNumber, m_currentNode->origin,
Edge(node, useKind));
observeUseKindOnNode(node, useKind);
@@ -2158,7 +2158,7 @@
else
useKind = UntypedUse;
Node* newNode = m_insertionSet.insertNode(
- m_indexInBlock, SpecInt32, BooleanToNumber, m_currentNode->origin,
+ m_indexInBlock, SpecInt32Only, BooleanToNumber, m_currentNode->origin,
Edge(node, useKind));
observeUseKindOnNode(node, useKind);
@@ -2176,7 +2176,7 @@
value = jsNumber(JSC::toInt32(value.asNumber()));
ASSERT(value.isInt32());
edge.setNode(m_insertionSet.insertNode(
- m_indexInBlock, SpecInt32, JSConstant, m_currentNode->origin,
+ m_indexInBlock, SpecInt32Only, JSConstant, m_currentNode->origin,
OpInfo(m_graph.freeze(value))));
}
@@ -2206,7 +2206,7 @@
return true;
}
- if (m_graph.addShouldSpeculateMachineInt(node)) {
+ if (m_graph.addShouldSpeculateAnyInt(node)) {
fixEdge<Int52RepUse>(node->child1());
fixEdge<Int52RepUse>(node->child2());
node->setArithMode(Arith::CheckOverflow);
@@ -2279,7 +2279,7 @@
{
Node* storage = checkArray(arrayMode, origin, child, 0, lengthNeedsStorage);
return m_insertionSet.insertNode(
- m_indexInBlock, SpecInt32, GetArrayLength, origin,
+ m_indexInBlock, SpecInt32Only, GetArrayLength, origin,
OpInfo(arrayMode.asWord()), Edge(child, KnownCellUse), Edge(storage));
}
@@ -2369,7 +2369,7 @@
switch (edge.useKind()) {
case DoubleRepUse:
case DoubleRepRealUse:
- case DoubleRepMachineIntUse: {
+ case DoubleRepAnyIntUse: {
if (edge->hasDoubleResult())
break;
@@ -2379,7 +2379,7 @@
OpInfo(m_graph.freeze(jsDoubleNumber(edge->asNumber()))));
} else if (edge->hasInt52Result()) {
result = m_insertionSet.insertNode(
- indexForChecks, SpecInt52AsDouble, DoubleRep, originForChecks,
+ indexForChecks, SpecAnyIntAsDouble, DoubleRep, originForChecks,
Edge(edge.node(), Int52RepUse));
} else {
UseKind useKind;
@@ -2403,22 +2403,22 @@
if (edge->hasInt52Result())
break;
- if (edge->isMachineIntConstant()) {
+ if (edge->isAnyIntConstant()) {
result = m_insertionSet.insertNode(
- indexForChecks, SpecMachineInt, Int52Constant, originForChecks,
+ indexForChecks, SpecAnyInt, Int52Constant, originForChecks,
OpInfo(edge->constant()));
} else if (edge->hasDoubleResult()) {
result = m_insertionSet.insertNode(
- indexForChecks, SpecMachineInt, Int52Rep, originForChecks,
- Edge(edge.node(), DoubleRepMachineIntUse));
+ indexForChecks, SpecAnyInt, Int52Rep, originForChecks,
+ Edge(edge.node(), DoubleRepAnyIntUse));
} else if (edge->shouldSpeculateInt32ForArithmetic()) {
result = m_insertionSet.insertNode(
- indexForChecks, SpecInt32, Int52Rep, originForChecks,
+ indexForChecks, SpecInt32Only, Int52Rep, originForChecks,
Edge(edge.node(), Int32Use));
} else {
result = m_insertionSet.insertNode(
- indexForChecks, SpecMachineInt, Int52Rep, originForChecks,
- Edge(edge.node(), MachineIntUse));
+ indexForChecks, SpecAnyInt, Int52Rep, originForChecks,
+ Edge(edge.node(), AnyIntUse));
}
edge.setNode(result);
@@ -2435,7 +2435,7 @@
Edge(edge.node(), DoubleRepUse));
} else {
result = m_insertionSet.insertNode(
- indexForChecks, SpecInt32 | SpecInt52AsDouble, ValueRep,
+ indexForChecks, SpecInt32Only | SpecAnyIntAsDouble, ValueRep,
originForChecks, Edge(edge.node(), Int52RepUse));
}
diff --git a/Source/JavaScriptCore/dfg/DFGGraph.h b/Source/JavaScriptCore/dfg/DFGGraph.h
index 467db0e..1fa83bf 100644
--- a/Source/JavaScriptCore/dfg/DFGGraph.h
+++ b/Source/JavaScriptCore/dfg/DFGGraph.h
@@ -263,7 +263,7 @@
return addSpeculationMode(add, pass) != DontSpeculateInt32;
}
- bool addShouldSpeculateMachineInt(Node* add)
+ bool addShouldSpeculateAnyInt(Node* add)
{
if (!enableInt52())
return false;
@@ -271,7 +271,7 @@
Node* left = add->child1().node();
Node* right = add->child2().node();
- bool speculation = Node::shouldSpeculateMachineInt(left, right);
+ bool speculation = Node::shouldSpeculateAnyInt(left, right);
return speculation && !hasExitSite(add, Int52Overflow);
}
@@ -284,7 +284,7 @@
&& node->canSpeculateInt32(node->sourceFor(pass));
}
- bool binaryArithShouldSpeculateMachineInt(Node* node, PredictionPass pass)
+ bool binaryArithShouldSpeculateAnyInt(Node* node, PredictionPass pass)
{
if (!enableInt52())
return false;
@@ -292,7 +292,7 @@
Node* left = node->child1().node();
Node* right = node->child2().node();
- return Node::shouldSpeculateMachineInt(left, right)
+ return Node::shouldSpeculateAnyInt(left, right)
&& node->canSpeculateInt52(pass)
&& !hasExitSite(node, Int52Overflow);
}
@@ -303,11 +303,11 @@
&& node->canSpeculateInt32(pass);
}
- bool unaryArithShouldSpeculateMachineInt(Node* node, PredictionPass pass)
+ bool unaryArithShouldSpeculateAnyInt(Node* node, PredictionPass pass)
{
if (!enableInt52())
return false;
- return node->child1()->shouldSpeculateMachineInt()
+ return node->child1()->shouldSpeculateAnyInt()
&& node->canSpeculateInt52(pass)
&& !hasExitSite(node, Int52Overflow);
}
diff --git a/Source/JavaScriptCore/dfg/DFGInPlaceAbstractState.cpp b/Source/JavaScriptCore/dfg/DFGInPlaceAbstractState.cpp
index c445e35..e7cebb8 100644
--- a/Source/JavaScriptCore/dfg/DFGInPlaceAbstractState.cpp
+++ b/Source/JavaScriptCore/dfg/DFGInPlaceAbstractState.cpp
@@ -118,7 +118,7 @@
switch (format) {
case FlushedInt32:
- root->valuesAtHead.argument(i).setType(SpecInt32);
+ root->valuesAtHead.argument(i).setType(SpecInt32Only);
break;
case FlushedBoolean:
root->valuesAtHead.argument(i).setType(SpecBoolean);
diff --git a/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp b/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp
index 013276b..a9566ea 100644
--- a/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp
+++ b/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp
@@ -542,7 +542,7 @@
entry->m_localsForcedDouble.set(local);
break;
case FlushedInt52:
- entry->m_localsForcedMachineInt.set(local);
+ entry->m_localsForcedAnyInt.set(local);
break;
default:
break;
diff --git a/Source/JavaScriptCore/dfg/DFGNode.cpp b/Source/JavaScriptCore/dfg/DFGNode.cpp
index 381cbe0..48f1d55 100644
--- a/Source/JavaScriptCore/dfg/DFGNode.cpp
+++ b/Source/JavaScriptCore/dfg/DFGNode.cpp
@@ -132,10 +132,10 @@
setOpAndDefaultFlags(Int52Rep);
switch (input) {
case NodeResultDouble:
- child1().setUseKind(DoubleRepMachineIntUse);
+ child1().setUseKind(DoubleRepAnyIntUse);
return;
case NodeResultJS:
- child1().setUseKind(MachineIntUse);
+ child1().setUseKind(AnyIntUse);
return;
default:
RELEASE_ASSERT_NOT_REACHED();
diff --git a/Source/JavaScriptCore/dfg/DFGNode.h b/Source/JavaScriptCore/dfg/DFGNode.h
index bab1c35..80dbd9b 100644
--- a/Source/JavaScriptCore/dfg/DFGNode.h
+++ b/Source/JavaScriptCore/dfg/DFGNode.h
@@ -681,14 +681,14 @@
return asJSValue().asNumber();
}
- bool isMachineIntConstant()
+ bool isAnyIntConstant()
{
- return isConstant() && constant()->value().isMachineInt();
+ return isConstant() && constant()->value().isAnyInt();
}
- int64_t asMachineInt()
+ int64_t asAnyInt()
{
- return asJSValue().asMachineInt();
+ return asJSValue().asAnyInt();
}
bool isBooleanConstant()
@@ -1920,9 +1920,9 @@
return isInt32OrBooleanSpeculationExpectingDefined(prediction());
}
- bool shouldSpeculateMachineInt()
+ bool shouldSpeculateAnyInt()
{
- return isMachineIntSpeculation(prediction());
+ return isAnyIntSpeculation(prediction());
}
bool shouldSpeculateDouble()
@@ -2153,9 +2153,9 @@
&& op2->shouldSpeculateInt32OrBooleanExpectingDefined();
}
- static bool shouldSpeculateMachineInt(Node* op1, Node* op2)
+ static bool shouldSpeculateAnyInt(Node* op1, Node* op2)
{
- return op1->shouldSpeculateMachineInt() && op2->shouldSpeculateMachineInt();
+ return op1->shouldSpeculateAnyInt() && op2->shouldSpeculateAnyInt();
}
static bool shouldSpeculateNumber(Node* op1, Node* op2)
diff --git a/Source/JavaScriptCore/dfg/DFGOSREntry.cpp b/Source/JavaScriptCore/dfg/DFGOSREntry.cpp
index 80e6880..b5cf7cc 100644
--- a/Source/JavaScriptCore/dfg/DFGOSREntry.cpp
+++ b/Source/JavaScriptCore/dfg/DFGOSREntry.cpp
@@ -67,7 +67,7 @@
out.print("overwritten");
if (reg.isLocal() && m_localsForcedDouble.get(reg.toLocal()))
out.print(", forced double");
- if (reg.isLocal() && m_localsForcedMachineInt.get(reg.toLocal()))
+ if (reg.isLocal() && m_localsForcedAnyInt.get(reg.toLocal()))
out.print(", forced machine int");
out.print(")");
};
@@ -213,8 +213,8 @@
}
continue;
}
- if (entry->m_localsForcedMachineInt.get(local)) {
- if (!exec->registers()[localOffset].asanUnsafeJSValue().isMachineInt()) {
+ if (entry->m_localsForcedAnyInt.get(local)) {
+ if (!exec->registers()[localOffset].asanUnsafeJSValue().isAnyInt()) {
if (Options::verboseOSR()) {
dataLog(
" OSR failed because variable ", localOffset, " is ",
@@ -285,8 +285,8 @@
continue;
}
- if (entry->m_localsForcedMachineInt.get(reg.toLocal())) {
- *bitwise_cast<int64_t*>(pivot + index) = exec->registers()[reg.offset()].asanUnsafeJSValue().asMachineInt() << JSValue::int52ShiftAmount;
+ if (entry->m_localsForcedAnyInt.get(reg.toLocal())) {
+ *bitwise_cast<int64_t*>(pivot + index) = exec->registers()[reg.offset()].asanUnsafeJSValue().asAnyInt() << JSValue::int52ShiftAmount;
continue;
}
}
diff --git a/Source/JavaScriptCore/dfg/DFGOSREntry.h b/Source/JavaScriptCore/dfg/DFGOSREntry.h
index 04aaabf..df5d11d 100644
--- a/Source/JavaScriptCore/dfg/DFGOSREntry.h
+++ b/Source/JavaScriptCore/dfg/DFGOSREntry.h
@@ -57,7 +57,7 @@
Operands<AbstractValue> m_expectedValues;
// Use bitvectors here because they tend to only require one word.
BitVector m_localsForcedDouble;
- BitVector m_localsForcedMachineInt;
+ BitVector m_localsForcedAnyInt;
Vector<OSREntryReshuffling> m_reshufflings;
BitVector m_machineStackUsed;
diff --git a/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp b/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp
index f09dc54..0972f2a 100644
--- a/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp
+++ b/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp
@@ -155,8 +155,8 @@
case GetLocal: {
VariableAccessData* variable = node->variableAccessData();
SpeculatedType prediction = variable->prediction();
- if (!variable->couldRepresentInt52() && (prediction & SpecInt52))
- prediction = (prediction | SpecInt52AsDouble) & ~SpecInt52;
+ if (!variable->couldRepresentInt52() && (prediction & SpecInt52Only))
+ prediction = (prediction | SpecAnyIntAsDouble) & ~SpecInt52Only;
if (prediction)
changed |= mergePrediction(prediction);
break;
@@ -170,9 +170,9 @@
case UInt32ToNumber: {
if (node->canSpeculateInt32(m_pass))
- changed |= mergePrediction(SpecInt32);
+ changed |= mergePrediction(SpecInt32Only);
else if (enableInt52())
- changed |= mergePrediction(SpecMachineInt);
+ changed |= mergePrediction(SpecAnyInt);
else
changed |= mergePrediction(SpecBytecodeNumber);
break;
@@ -186,9 +186,9 @@
if (isFullNumberOrBooleanSpeculationExpectingDefined(left)
&& isFullNumberOrBooleanSpeculationExpectingDefined(right)) {
if (m_graph.addSpeculationMode(node, m_pass) != DontSpeculateInt32)
- changed |= mergePrediction(SpecInt32);
- else if (m_graph.addShouldSpeculateMachineInt(node))
- changed |= mergePrediction(SpecInt52);
+ changed |= mergePrediction(SpecInt32Only);
+ else if (m_graph.addShouldSpeculateAnyInt(node))
+ changed |= mergePrediction(SpecInt52Only);
else
changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right));
} else if (
@@ -197,7 +197,7 @@
// left or right is definitely something other than a number.
changed |= mergePrediction(SpecString);
} else
- changed |= mergePrediction(SpecString | SpecInt32 | SpecBytecodeDouble);
+ changed |= mergePrediction(SpecString | SpecInt32Only | SpecBytecodeDouble);
}
break;
}
@@ -208,9 +208,9 @@
if (left && right) {
if (m_graph.addSpeculationMode(node, m_pass) != DontSpeculateInt32)
- changed |= mergePrediction(SpecInt32);
- else if (m_graph.addShouldSpeculateMachineInt(node))
- changed |= mergePrediction(SpecInt52);
+ changed |= mergePrediction(SpecInt32Only);
+ else if (m_graph.addShouldSpeculateAnyInt(node))
+ changed |= mergePrediction(SpecInt52Only);
else
changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right));
}
@@ -225,13 +225,13 @@
if (isFullNumberOrBooleanSpeculationExpectingDefined(left)
&& isFullNumberOrBooleanSpeculationExpectingDefined(right)) {
if (m_graph.addSpeculationMode(node, m_pass) != DontSpeculateInt32)
- changed |= mergePrediction(SpecInt32);
- else if (m_graph.addShouldSpeculateMachineInt(node))
- changed |= mergePrediction(SpecInt52);
+ changed |= mergePrediction(SpecInt32Only);
+ else if (m_graph.addShouldSpeculateAnyInt(node))
+ changed |= mergePrediction(SpecInt52Only);
else
changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right));
} else
- changed |= mergePrediction(SpecInt32 | SpecBytecodeDouble);
+ changed |= mergePrediction(SpecInt32Only | SpecBytecodeDouble);
}
break;
}
@@ -239,9 +239,9 @@
case ArithNegate:
if (node->child1()->prediction()) {
if (m_graph.unaryArithShouldSpeculateInt32(node, m_pass))
- changed |= mergePrediction(SpecInt32);
- else if (m_graph.unaryArithShouldSpeculateMachineInt(node, m_pass))
- changed |= mergePrediction(SpecInt52);
+ changed |= mergePrediction(SpecInt32Only);
+ else if (m_graph.unaryArithShouldSpeculateAnyInt(node, m_pass))
+ changed |= mergePrediction(SpecInt52Only);
else
changed |= mergePrediction(speculatedDoubleTypeForPrediction(node->child1()->prediction()));
}
@@ -255,7 +255,7 @@
if (left && right) {
if (Node::shouldSpeculateInt32OrBooleanForArithmetic(node->child1().node(), node->child2().node())
&& node->canSpeculateInt32(m_pass))
- changed |= mergePrediction(SpecInt32);
+ changed |= mergePrediction(SpecInt32Only);
else
changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right));
}
@@ -270,16 +270,16 @@
if (isFullNumberOrBooleanSpeculationExpectingDefined(left)
&& isFullNumberOrBooleanSpeculationExpectingDefined(right)) {
if (m_graph.binaryArithShouldSpeculateInt32(node, m_pass))
- changed |= mergePrediction(SpecInt32);
- else if (m_graph.binaryArithShouldSpeculateMachineInt(node, m_pass))
- changed |= mergePrediction(SpecInt52);
+ changed |= mergePrediction(SpecInt32Only);
+ else if (m_graph.binaryArithShouldSpeculateAnyInt(node, m_pass))
+ changed |= mergePrediction(SpecInt52Only);
else
changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right));
} else {
if (node->mayHaveNonIntResult())
- changed |= mergePrediction(SpecInt32 | SpecBytecodeDouble);
+ changed |= mergePrediction(SpecInt32Only | SpecBytecodeDouble);
else
- changed |= mergePrediction(SpecInt32);
+ changed |= mergePrediction(SpecInt32Only);
}
}
break;
@@ -294,11 +294,11 @@
if (isFullNumberOrBooleanSpeculationExpectingDefined(left)
&& isFullNumberOrBooleanSpeculationExpectingDefined(right)) {
if (m_graph.binaryArithShouldSpeculateInt32(node, m_pass))
- changed |= mergePrediction(SpecInt32);
+ changed |= mergePrediction(SpecInt32Only);
else
changed |= mergePrediction(SpecBytecodeDouble);
} else
- changed |= mergePrediction(SpecInt32 | SpecBytecodeDouble);
+ changed |= mergePrediction(SpecInt32Only | SpecBytecodeDouble);
}
break;
}
@@ -308,7 +308,7 @@
case ArithCeil:
case ArithTrunc: {
if (isInt32OrBooleanSpeculation(node->getHeapPrediction()) && m_graph.roundShouldSpeculateInt32(node, m_pass))
- changed |= setPrediction(SpecInt32);
+ changed |= setPrediction(SpecInt32Only);
else
changed |= setPrediction(SpecBytecodeDouble);
break;
@@ -318,7 +318,7 @@
SpeculatedType child = node->child1()->prediction();
if (isInt32OrBooleanSpeculationForArithmetic(child)
&& node->canSpeculateInt32(m_pass))
- changed |= mergePrediction(SpecInt32);
+ changed |= mergePrediction(SpecInt32Only);
else
changed |= mergePrediction(speculatedDoubleTypeForPrediction(child));
break;
@@ -337,9 +337,9 @@
switch (arrayMode.type()) {
case Array::Int32:
if (arrayMode.isOutOfBounds())
- changed |= mergePrediction(node->getHeapPrediction() | SpecInt32);
+ changed |= mergePrediction(node->getHeapPrediction() | SpecInt32Only);
else
- changed |= mergePrediction(SpecInt32);
+ changed |= mergePrediction(SpecInt32Only);
break;
case Array::Double:
if (arrayMode.isOutOfBounds())
@@ -353,18 +353,18 @@
break;
case Array::Uint32Array:
if (isInt32SpeculationForArithmetic(node->getHeapPrediction()))
- changed |= mergePrediction(SpecInt32);
+ changed |= mergePrediction(SpecInt32Only);
else if (enableInt52())
- changed |= mergePrediction(SpecMachineInt);
+ changed |= mergePrediction(SpecAnyInt);
else
- changed |= mergePrediction(SpecInt32 | SpecInt52AsDouble);
+ changed |= mergePrediction(SpecInt32Only | SpecAnyIntAsDouble);
break;
case Array::Int8Array:
case Array::Uint8Array:
case Array::Int16Array:
case Array::Uint16Array:
case Array::Int32Array:
- changed |= mergePrediction(SpecInt32);
+ changed |= mergePrediction(SpecInt32Only);
break;
default:
changed |= mergePrediction(node->getHeapPrediction());
@@ -383,17 +383,17 @@
}
if (node->child1()->shouldSpeculateInt32()) {
- changed |= mergePrediction(SpecInt32);
+ changed |= mergePrediction(SpecInt32Only);
break;
}
- if (enableInt52() && node->child1()->shouldSpeculateMachineInt()) {
- changed |= mergePrediction(SpecMachineInt);
+ if (enableInt52() && node->child1()->shouldSpeculateAnyInt()) {
+ changed |= mergePrediction(SpecAnyInt);
break;
}
if (node->child1()->shouldSpeculateNumber()) {
- changed |= mergePrediction(SpecMachineInt);
+ changed |= mergePrediction(SpecAnyInt);
break;
}
@@ -482,7 +482,7 @@
if (isFullNumberSpeculation(left)
&& isFullNumberSpeculation(right)
&& !m_graph.addShouldSpeculateInt32(node, m_pass)
- && !m_graph.addShouldSpeculateMachineInt(node))
+ && !m_graph.addShouldSpeculateAnyInt(node))
ballot = VoteDouble;
else
ballot = VoteValue;
@@ -501,7 +501,7 @@
if (isFullNumberSpeculation(left)
&& isFullNumberSpeculation(right)
&& !m_graph.binaryArithShouldSpeculateInt32(node, m_pass)
- && !m_graph.binaryArithShouldSpeculateMachineInt(node, m_pass))
+ && !m_graph.binaryArithShouldSpeculateAnyInt(node, m_pass))
ballot = VoteDouble;
else
ballot = VoteValue;
@@ -558,7 +558,7 @@
if (isDoubleSpeculation(prediction))
node->variableAccessData()->vote(VoteDouble, weight);
else if (!isFullNumberSpeculation(prediction)
- || isInt32Speculation(prediction) || isMachineIntSpeculation(prediction))
+ || isInt32Speculation(prediction) || isAnyIntSpeculation(prediction))
node->variableAccessData()->vote(VoteValue, weight);
break;
}
@@ -643,8 +643,8 @@
switch (m_currentNode->op()) {
case JSConstant: {
SpeculatedType type = speculationFromValue(m_currentNode->asJSValue());
- if (type == SpecInt52AsDouble && enableInt52())
- type = SpecInt52;
+ if (type == SpecAnyIntAsDouble && enableInt52())
+ type = SpecInt52Only;
setPrediction(type);
break;
}
@@ -661,7 +661,7 @@
case BitURShift:
case ArithIMul:
case ArithClz32: {
- setPrediction(SpecInt32);
+ setPrediction(SpecInt32Only);
break;
}
@@ -717,23 +717,23 @@
}
case GetArgumentCount: {
- setPrediction(SpecInt32);
+ setPrediction(SpecInt32Only);
break;
}
case GetRestLength: {
- setPrediction(SpecInt32);
+ setPrediction(SpecInt32Only);
break;
}
case GetTypedArrayByteOffset:
case GetArrayLength: {
- setPrediction(SpecInt32);
+ setPrediction(SpecInt32Only);
break;
}
case StringCharCodeAt: {
- setPrediction(SpecInt32);
+ setPrediction(SpecInt32Only);
break;
}
case ArithPow:
@@ -866,7 +866,7 @@
case FiatInt52: {
RELEASE_ASSERT(enableInt52());
- setPrediction(SpecMachineInt);
+ setPrediction(SpecAnyInt);
break;
}
@@ -879,7 +879,7 @@
break;
case GetEnumerableLength: {
- setPrediction(SpecInt32);
+ setPrediction(SpecInt32Only);
break;
}
case HasGenericProperty:
diff --git a/Source/JavaScriptCore/dfg/DFGSSALoweringPhase.cpp b/Source/JavaScriptCore/dfg/DFGSSALoweringPhase.cpp
index b53c16f..3214cff 100644
--- a/Source/JavaScriptCore/dfg/DFGSSALoweringPhase.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSSALoweringPhase.cpp
@@ -83,7 +83,7 @@
if (m_node->arrayMode().typedArrayType() != NotTypedArray && m_node->arrayMode().isOutOfBounds()) {
Node* length = m_insertionSet.insertNode(
- m_nodeIndex, SpecInt32, GetArrayLength, m_node->origin,
+ m_nodeIndex, SpecInt32Only, GetArrayLength, m_node->origin,
OpInfo(m_node->arrayMode().asWord()), base, storage);
m_graph.varArgChild(m_node, 4) = Edge(length, KnownInt32Use);
@@ -106,10 +106,10 @@
storage = Edge();
Node* length = m_insertionSet.insertNode(
- m_nodeIndex, SpecInt32, GetArrayLength, m_node->origin,
+ m_nodeIndex, SpecInt32Only, GetArrayLength, m_node->origin,
OpInfo(m_node->arrayMode().asWord()), base, storage);
m_insertionSet.insertNode(
- m_nodeIndex, SpecInt32, CheckInBounds, m_node->origin,
+ m_nodeIndex, SpecInt32Only, CheckInBounds, m_node->origin,
index, Edge(length, KnownInt32Use));
return true;
}
diff --git a/Source/JavaScriptCore/dfg/DFGSafeToExecute.h b/Source/JavaScriptCore/dfg/DFGSafeToExecute.h
index a88ca5d..030e541 100644
--- a/Source/JavaScriptCore/dfg/DFGSafeToExecute.h
+++ b/Source/JavaScriptCore/dfg/DFGSafeToExecute.h
@@ -69,12 +69,12 @@
case NotCellUse:
case OtherUse:
case MiscUse:
- case MachineIntUse:
- case DoubleRepMachineIntUse:
+ case AnyIntUse:
+ case DoubleRepAnyIntUse:
return;
case KnownInt32Use:
- if (m_state.forNode(edge).m_type & ~SpecInt32)
+ if (m_state.forNode(edge).m_type & ~SpecInt32Only)
m_result = false;
return;
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
index a3d0e56..935ba8a 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
@@ -609,10 +609,10 @@
break;
#if USE(JSVALUE64)
case SetInt52Constant:
- m_jit.move(Imm64(plan.node()->asMachineInt() << JSValue::int52ShiftAmount), plan.gpr());
+ m_jit.move(Imm64(plan.node()->asAnyInt() << JSValue::int52ShiftAmount), plan.gpr());
break;
case SetStrictInt52Constant:
- m_jit.move(Imm64(plan.node()->asMachineInt()), plan.gpr());
+ m_jit.move(Imm64(plan.node()->asAnyInt()), plan.gpr());
break;
#endif // USE(JSVALUE64)
case SetBooleanConstant:
@@ -2636,7 +2636,7 @@
}
#if USE(JSVALUE64)
- if (node->shouldSpeculateMachineInt()) {
+ if (node->shouldSpeculateAnyInt()) {
m_jit.zeroExtend32ToPtr(resultReg, resultReg);
strictInt52Result(resultReg, node);
return;
@@ -3561,8 +3561,8 @@
// Will we need an overflow check? If we can prove that neither input can be
// Int52 then the overflow check will not be necessary.
- if (!m_state.forNode(node->child1()).couldBeType(SpecInt52)
- && !m_state.forNode(node->child2()).couldBeType(SpecInt52)) {
+ if (!m_state.forNode(node->child1()).couldBeType(SpecInt52Only)
+ && !m_state.forNode(node->child2()).couldBeType(SpecInt52Only)) {
SpeculateWhicheverInt52Operand op1(this, node->child1());
SpeculateWhicheverInt52Operand op2(this, node->child2(), op1);
GPRTemporary result(this, Reuse, op1);
@@ -3753,8 +3753,8 @@
// Will we need an overflow check? If we can prove that neither input can be
// Int52 then the overflow check will not be necessary.
- if (!m_state.forNode(node->child1()).couldBeType(SpecInt52)
- && !m_state.forNode(node->child2()).couldBeType(SpecInt52)) {
+ if (!m_state.forNode(node->child1()).couldBeType(SpecInt52Only)
+ && !m_state.forNode(node->child2()).couldBeType(SpecInt52Only)) {
SpeculateWhicheverInt52Operand op1(this, node->child1());
SpeculateWhicheverInt52Operand op2(this, node->child2(), op1);
GPRTemporary result(this, Reuse, op1);
@@ -3875,7 +3875,7 @@
case Int52RepUse: {
ASSERT(shouldCheckOverflow(node->arithMode()));
- if (!m_state.forNode(node->child1()).couldBeType(SpecInt52)) {
+ if (!m_state.forNode(node->child1()).couldBeType(SpecInt52Only)) {
SpeculateWhicheverInt52Operand op1(this, node->child1());
GPRTemporary result(this);
GPRReg op1GPR = op1.gpr();
@@ -6900,7 +6900,7 @@
void SpeculativeJIT::speculateInt32(Edge edge)
{
- if (!needsTypeCheck(edge, SpecInt32))
+ if (!needsTypeCheck(edge, SpecInt32Only))
return;
(SpeculateInt32Operand(this, edge)).gpr();
@@ -6920,7 +6920,7 @@
#else
GPRReg tagGPR = value.tagGPR();
DFG_TYPE_CHECK(
- value.jsValueRegs(), edge, ~SpecInt32,
+ value.jsValueRegs(), edge, ~SpecInt32Only,
m_jit.branch32(MacroAssembler::Equal, tagGPR, TrustedImm32(JSValue::Int32Tag)));
DFG_TYPE_CHECK(
value.jsValueRegs(), edge, SpecBytecodeNumber,
@@ -7248,7 +7248,7 @@
m_jit.branch64(MacroAssembler::Above, regs.gpr(), MacroAssembler::TrustedImm64(TagBitTypeOther | TagBitBool | TagBitUndefined)));
#else
DFG_TYPE_CHECK(
- regs, edge, ~SpecInt32,
+ regs, edge, ~SpecInt32Only,
m_jit.branch32(MacroAssembler::Equal, regs.tagGPR(), MacroAssembler::TrustedImm32(JSValue::Int32Tag)));
DFG_TYPE_CHECK(
regs, edge, SpecMisc,
@@ -7271,13 +7271,13 @@
case UntypedUse:
break;
case KnownInt32Use:
- ASSERT(!needsTypeCheck(edge, SpecInt32));
+ ASSERT(!needsTypeCheck(edge, SpecInt32Only));
break;
case DoubleRepUse:
ASSERT(!needsTypeCheck(edge, SpecFullDouble));
break;
case Int52RepUse:
- ASSERT(!needsTypeCheck(edge, SpecMachineInt));
+ ASSERT(!needsTypeCheck(edge, SpecAnyInt));
break;
case KnownCellUse:
ASSERT(!needsTypeCheck(edge, SpecCell));
@@ -7301,11 +7301,11 @@
speculateDoubleRepReal(edge);
break;
#if USE(JSVALUE64)
- case MachineIntUse:
- speculateMachineInt(edge);
+ case AnyIntUse:
+ speculateAnyInt(edge);
break;
- case DoubleRepMachineIntUse:
- speculateDoubleRepMachineInt(edge);
+ case DoubleRepAnyIntUse:
+ speculateDoubleRepAnyInt(edge);
break;
#endif
case BooleanUse:
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
index 57c23f6..485563a 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
@@ -564,10 +564,10 @@
}
}
- bool isKnownInteger(Node* node) { return m_state.forNode(node).isType(SpecInt32); }
+ bool isKnownInteger(Node* node) { return m_state.forNode(node).isType(SpecInt32Only); }
bool isKnownCell(Node* node) { return m_state.forNode(node).isType(SpecCell); }
- bool isKnownNotInteger(Node* node) { return !(m_state.forNode(node).m_type & SpecInt32); }
+ bool isKnownNotInteger(Node* node) { return !(m_state.forNode(node).m_type & SpecInt32Only); }
bool isKnownNotNumber(Node* node) { return !(m_state.forNode(node).m_type & SpecFullNumber); }
bool isKnownNotCell(Node* node) { return !(m_state.forNode(node).m_type & SpecCell); }
bool isKnownNotOther(Node* node) { return !(m_state.forNode(node).m_type & SpecOther); }
@@ -2674,9 +2674,9 @@
void speculateInt32(Edge);
#if USE(JSVALUE64)
- void convertMachineInt(Edge, GPRReg resultGPR);
- void speculateMachineInt(Edge);
- void speculateDoubleRepMachineInt(Edge);
+ void convertAnyInt(Edge, GPRReg resultGPR);
+ void speculateAnyInt(Edge);
+ void speculateDoubleRepAnyInt(Edge);
#endif // USE(JSVALUE64)
void speculateNumber(Edge);
void speculateRealNumber(Edge);
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
index 21f4207..fe8801b 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
@@ -943,9 +943,9 @@
{
AbstractValue& value = m_state.forNode(edge);
SpeculatedType type = value.m_type;
- ASSERT(edge.useKind() != KnownInt32Use || !(value.m_type & ~SpecInt32));
+ ASSERT(edge.useKind() != KnownInt32Use || !(value.m_type & ~SpecInt32Only));
- m_interpreter.filter(value, SpecInt32);
+ m_interpreter.filter(value, SpecInt32Only);
if (value.isClear()) {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
returnFormat = DataFormatInt32;
@@ -972,7 +972,7 @@
ASSERT_UNUSED(spillFormat, (spillFormat & DataFormatJS) || spillFormat == DataFormatInt32);
// If we know this was spilled as an integer we can fill without checking.
- if (type & ~SpecInt32)
+ if (type & ~SpecInt32Only)
speculationCheck(BadType, JSValueSource(JITCompiler::addressFor(virtualRegister)), edge, m_jit.branch32(MacroAssembler::NotEqual, JITCompiler::tagFor(virtualRegister), TrustedImm32(JSValue::Int32Tag)));
GPRReg gpr = allocate();
@@ -990,7 +990,7 @@
GPRReg payloadGPR = info.payloadGPR();
m_gprs.lock(tagGPR);
m_gprs.lock(payloadGPR);
- if (type & ~SpecInt32)
+ if (type & ~SpecInt32Only)
speculationCheck(BadType, JSValueRegs(tagGPR, payloadGPR), edge, m_jit.branch32(MacroAssembler::NotEqual, tagGPR, TrustedImm32(JSValue::Int32Tag)));
m_gprs.unlock(tagGPR);
m_gprs.release(tagGPR);
@@ -1899,8 +1899,8 @@
break;
}
case Int52RepUse:
- case MachineIntUse:
- case DoubleRepMachineIntUse: {
+ case AnyIntUse:
+ case DoubleRepAnyIntUse: {
RELEASE_ASSERT_NOT_REACHED();
break;
}
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
index b52d47d..a75c75f 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
@@ -901,9 +901,9 @@
{
AbstractValue& value = m_state.forNode(edge);
SpeculatedType type = value.m_type;
- ASSERT(edge.useKind() != KnownInt32Use || !(value.m_type & ~SpecInt32));
+ ASSERT(edge.useKind() != KnownInt32Use || !(value.m_type & ~SpecInt32Only));
- m_interpreter.filter(value, SpecInt32);
+ m_interpreter.filter(value, SpecInt32Only);
if (value.isClear()) {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
returnFormat = DataFormatInt32;
@@ -958,11 +958,11 @@
}
case DataFormatJS: {
- DFG_ASSERT(m_jit.graph(), m_currentNode, !(type & SpecInt52));
+ DFG_ASSERT(m_jit.graph(), m_currentNode, !(type & SpecInt52Only));
// Check the value is an integer.
GPRReg gpr = info.gpr();
m_gprs.lock(gpr);
- if (type & ~SpecInt32)
+ if (type & ~SpecInt32Only)
speculationCheck(BadType, JSValueRegs(gpr), edge, m_jit.branch64(MacroAssembler::Below, gpr, GPRInfo::tagTypeNumberRegister));
info.fillJSValue(*m_stream, gpr, DataFormatJSInt32);
// If !strict we're done, return.
@@ -1045,7 +1045,7 @@
ASSERT(desiredFormat == DataFormatInt52 || desiredFormat == DataFormatStrictInt52);
AbstractValue& value = m_state.forNode(edge);
- m_interpreter.filter(value, SpecMachineInt);
+ m_interpreter.filter(value, SpecAnyInt);
if (value.isClear()) {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
return allocate();
@@ -1060,9 +1060,9 @@
if (edge->hasConstant()) {
JSValue jsValue = edge->asJSValue();
- ASSERT(jsValue.isMachineInt());
+ ASSERT(jsValue.isAnyInt());
m_gprs.retain(gpr, virtualRegister, SpillOrderConstant);
- int64_t value = jsValue.asMachineInt();
+ int64_t value = jsValue.asAnyInt();
if (desiredFormat == DataFormatInt52)
value = value << JSValue::int52ShiftAmount;
m_jit.move(MacroAssembler::Imm64(value), gpr);
@@ -1131,7 +1131,7 @@
FPRReg SpeculativeJIT::fillSpeculateDouble(Edge edge)
{
- ASSERT(edge.useKind() == DoubleRepUse || edge.useKind() == DoubleRepRealUse || edge.useKind() == DoubleRepMachineIntUse);
+ ASSERT(edge.useKind() == DoubleRepUse || edge.useKind() == DoubleRepRealUse || edge.useKind() == DoubleRepAnyIntUse);
ASSERT(edge->hasDoubleResult());
VirtualRegister virtualRegister = edge->virtualRegister();
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
@@ -1932,7 +1932,7 @@
GPRTemporary result(this);
GPRReg resultGPR = result.gpr();
- if (node->child1()->prediction() & SpecInt32) {
+ if (node->child1()->prediction() & SpecInt32Only) {
branch64(MacroAssembler::Equal, valueGPR, MacroAssembler::TrustedImm64(JSValue::encode(jsNumber(0))), notTaken);
branch64(MacroAssembler::AboveOrEqual, valueGPR, GPRInfo::tagTypeNumberRegister, taken);
}
@@ -1987,7 +1987,7 @@
switch (node->child1().useKind()) {
case DoubleRepUse:
case DoubleRepRealUse:
- case DoubleRepMachineIntUse: {
+ case DoubleRepAnyIntUse: {
SpeculateDoubleOperand op(this, node->child1());
FPRTemporary scratch(this, op);
m_jit.moveDouble(op.fpr(), scratch.fpr());
@@ -2222,17 +2222,17 @@
break;
}
- case MachineIntUse: {
+ case AnyIntUse: {
GPRTemporary result(this);
GPRReg resultGPR = result.gpr();
- convertMachineInt(node->child1(), resultGPR);
+ convertAnyInt(node->child1(), resultGPR);
strictInt52Result(resultGPR, node);
break;
}
- case DoubleRepMachineIntUse: {
+ case DoubleRepAnyIntUse: {
SpeculateDoubleOperand value(this, node->child1());
FPRReg valueFPR = value.fpr();
@@ -2244,7 +2244,7 @@
callOperation(operationConvertDoubleToInt52, resultGPR, valueFPR);
DFG_TYPE_CHECK_WITH_EXIT_KIND(Int52Overflow,
- JSValueRegs(), node->child1(), SpecInt52AsDouble,
+ JSValueRegs(), node->child1(), SpecAnyIntAsDouble,
m_jit.branch64(
JITCompiler::Equal, resultGPR,
JITCompiler::TrustedImm64(JSValue::notInt52)));
@@ -2827,7 +2827,7 @@
if (arrayMode.type() == Array::Int32) {
DFG_TYPE_CHECK(
- JSValueRegs(valueReg), child3, SpecInt32,
+ JSValueRegs(valueReg), child3, SpecInt32Only,
m_jit.branch64(
MacroAssembler::Below, valueReg, GPRInfo::tagTypeNumberRegister));
}
@@ -3219,7 +3219,7 @@
if (node->arrayMode().type() == Array::Int32) {
DFG_TYPE_CHECK(
- JSValueRegs(valueGPR), node->child2(), SpecInt32,
+ JSValueRegs(valueGPR), node->child2(), SpecInt32Only,
m_jit.branch64(
MacroAssembler::Below, valueGPR, GPRInfo::tagTypeNumberRegister));
}
@@ -3599,7 +3599,7 @@
GPRReg opGPR = operand.gpr();
if (hasInt32(node->indexingType())) {
DFG_TYPE_CHECK(
- JSValueRegs(opGPR), use, SpecInt32,
+ JSValueRegs(opGPR), use, SpecInt32Only,
m_jit.branch64(
MacroAssembler::Below, opGPR, GPRInfo::tagTypeNumberRegister));
}
@@ -3665,7 +3665,7 @@
GPRReg opGPR = operand.gpr();
if (hasInt32(node->indexingType())) {
DFG_TYPE_CHECK(
- JSValueRegs(opGPR), use, SpecInt32,
+ JSValueRegs(opGPR), use, SpecInt32Only,
m_jit.branch64(
MacroAssembler::Below, opGPR, GPRInfo::tagTypeNumberRegister));
}
@@ -4998,7 +4998,7 @@
m_jit.move(valueGPR, scratch2GPR);
m_jit.and64(TrustedImm32(~1), scratch2GPR);
jumpToEnd.append(m_jit.branch64(MacroAssembler::Equal, scratch2GPR, MacroAssembler::TrustedImm64(ValueFalse)));
- } else if (cachedTypeLocation->m_lastSeenType == TypeMachineInt)
+ } else if (cachedTypeLocation->m_lastSeenType == TypeAnyInt)
jumpToEnd.append(m_jit.branch64(MacroAssembler::AboveOrEqual, valueGPR, GPRInfo::tagTypeNumberRegister));
else if (cachedTypeLocation->m_lastSeenType == TypeNumber)
jumpToEnd.append(m_jit.branchTest64(MacroAssembler::NonZero, valueGPR, GPRInfo::tagTypeNumberRegister));
@@ -5207,7 +5207,7 @@
m_jit.or32(TrustedImm32(ValueFalse), gpr);
}
-void SpeculativeJIT::convertMachineInt(Edge valueEdge, GPRReg resultGPR)
+void SpeculativeJIT::convertAnyInt(Edge valueEdge, GPRReg resultGPR)
{
JSValueOperand value(this, valueEdge, ManualOperandSpeculation);
GPRReg valueGPR = value.gpr();
@@ -5224,25 +5224,25 @@
silentFillAllRegisters(resultGPR);
DFG_TYPE_CHECK(
- JSValueRegs(valueGPR), valueEdge, SpecInt32 | SpecInt52AsDouble,
+ JSValueRegs(valueGPR), valueEdge, SpecInt32Only | SpecAnyIntAsDouble,
m_jit.branch64(
JITCompiler::Equal, resultGPR,
JITCompiler::TrustedImm64(JSValue::notInt52)));
done.link(&m_jit);
}
-void SpeculativeJIT::speculateMachineInt(Edge edge)
+void SpeculativeJIT::speculateAnyInt(Edge edge)
{
- if (!needsTypeCheck(edge, SpecInt32 | SpecInt52AsDouble))
+ if (!needsTypeCheck(edge, SpecInt32Only | SpecAnyIntAsDouble))
return;
GPRTemporary temp(this);
- convertMachineInt(edge, temp.gpr());
+ convertAnyInt(edge, temp.gpr());
}
-void SpeculativeJIT::speculateDoubleRepMachineInt(Edge edge)
+void SpeculativeJIT::speculateDoubleRepAnyInt(Edge edge)
{
- if (!needsTypeCheck(edge, SpecInt52AsDouble))
+ if (!needsTypeCheck(edge, SpecAnyIntAsDouble))
return;
SpeculateDoubleOperand value(this, edge);
@@ -5256,7 +5256,7 @@
callOperation(operationConvertDoubleToInt52, resultGPR, valueFPR);
DFG_TYPE_CHECK(
- JSValueRegs(), edge, SpecInt52AsDouble,
+ JSValueRegs(), edge, SpecAnyIntAsDouble,
m_jit.branch64(
JITCompiler::Equal, resultGPR,
JITCompiler::TrustedImm64(JSValue::notInt52)));
diff --git a/Source/JavaScriptCore/dfg/DFGUseKind.cpp b/Source/JavaScriptCore/dfg/DFGUseKind.cpp
index 502a147..e7f9934 100644
--- a/Source/JavaScriptCore/dfg/DFGUseKind.cpp
+++ b/Source/JavaScriptCore/dfg/DFGUseKind.cpp
@@ -49,8 +49,8 @@
case Int52RepUse:
out.print("Int52Rep");
return;
- case MachineIntUse:
- out.print("MachineInt");
+ case AnyIntUse:
+ out.print("AnyInt");
return;
case NumberUse:
out.print("Number");
@@ -64,8 +64,8 @@
case DoubleRepRealUse:
out.print("DoubleRepReal");
return;
- case DoubleRepMachineIntUse:
- out.print("DoubleRepMachineInt");
+ case DoubleRepAnyIntUse:
+ out.print("DoubleRepAnyInt");
return;
case BooleanUse:
out.print("Boolean");
diff --git a/Source/JavaScriptCore/dfg/DFGUseKind.h b/Source/JavaScriptCore/dfg/DFGUseKind.h
index 41527f6..b2c62c5 100644
--- a/Source/JavaScriptCore/dfg/DFGUseKind.h
+++ b/Source/JavaScriptCore/dfg/DFGUseKind.h
@@ -44,7 +44,7 @@
UntypedUse, // UntypedUse must come first (value 0).
Int32Use,
KnownInt32Use,
- MachineIntUse,
+ AnyIntUse,
NumberUse,
RealNumberUse,
BooleanUse,
@@ -74,7 +74,7 @@
// in an FP register.
DoubleRepUse,
DoubleRepRealUse,
- DoubleRepMachineIntUse,
+ DoubleRepAnyIntUse,
// 3. The Int52 representation for an unboxed integer value that must be stored
// in a GP register.
@@ -90,11 +90,11 @@
return SpecFullTop;
case Int32Use:
case KnownInt32Use:
- return SpecInt32;
+ return SpecInt32Only;
case Int52RepUse:
- return SpecMachineInt;
- case MachineIntUse:
- return SpecInt32 | SpecInt52AsDouble;
+ return SpecAnyInt;
+ case AnyIntUse:
+ return SpecInt32Only | SpecAnyIntAsDouble;
case NumberUse:
return SpecBytecodeNumber;
case RealNumberUse:
@@ -103,8 +103,8 @@
return SpecFullDouble;
case DoubleRepRealUse:
return SpecDoubleReal;
- case DoubleRepMachineIntUse:
- return SpecInt52AsDouble;
+ case DoubleRepAnyIntUse:
+ return SpecAnyIntAsDouble;
case BooleanUse:
case KnownBooleanUse:
return SpecBoolean;
@@ -184,8 +184,8 @@
case Int52RepUse:
case DoubleRepUse:
case DoubleRepRealUse:
- case MachineIntUse:
- case DoubleRepMachineIntUse:
+ case AnyIntUse:
+ case DoubleRepAnyIntUse:
return true;
default:
return false;
@@ -197,7 +197,7 @@
switch (kind) {
case DoubleRepUse:
case DoubleRepRealUse:
- case DoubleRepMachineIntUse:
+ case DoubleRepAnyIntUse:
return true;
default:
return false;
diff --git a/Source/JavaScriptCore/dfg/DFGValidate.cpp b/Source/JavaScriptCore/dfg/DFGValidate.cpp
index 2b398eb..553ce0d 100644
--- a/Source/JavaScriptCore/dfg/DFGValidate.cpp
+++ b/Source/JavaScriptCore/dfg/DFGValidate.cpp
@@ -694,7 +694,7 @@
if (m_graph.m_planStage < PlanStage::AfterFixup)
return;
- VALIDATE((node, edge), edge.useKind() == DoubleRepUse || edge.useKind() == DoubleRepRealUse || edge.useKind() == DoubleRepMachineIntUse);
+ VALIDATE((node, edge), edge.useKind() == DoubleRepUse || edge.useKind() == DoubleRepRealUse || edge.useKind() == DoubleRepAnyIntUse);
}
void checkOperand(
diff --git a/Source/JavaScriptCore/dfg/DFGVariableAccessData.cpp b/Source/JavaScriptCore/dfg/DFGVariableAccessData.cpp
index bd1ba87e..8fc4267 100644
--- a/Source/JavaScriptCore/dfg/DFGVariableAccessData.cpp
+++ b/Source/JavaScriptCore/dfg/DFGVariableAccessData.cpp
@@ -156,8 +156,8 @@
SpeculatedType type = m_prediction;
if (type & ~SpecBytecodeNumber)
type |= SpecDoublePureNaN;
- if (type & SpecMachineInt)
- type |= SpecInt52AsDouble;
+ if (type & SpecAnyInt)
+ type |= SpecAnyIntAsDouble;
return checkAndSet(m_prediction, type);
}
@@ -180,8 +180,8 @@
return false;
// The argument-aware prediction -- which merges all of an (inlined or machine)
- // argument's variable access datas' predictions -- must possibly be MachineInt.
- return !(argumentAwarePrediction() & ~SpecMachineInt);
+ // argument's variable access datas' predictions -- must possibly be AnyInt.
+ return !(argumentAwarePrediction() & ~SpecAnyInt);
}
FlushFormat VariableAccessData::flushFormat()