Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp (282856 => 282857)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2021-09-22 00:34:47 UTC (rev 282856)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2021-09-22 01:14:06 UTC (rev 282857)
@@ -336,13 +336,13 @@
}
}
-void SpeculativeJIT::compileNeitherDoubleNorHeapBigIntToNotDoubleStrictEquality(Node* node, Edge neitherDoubleNorHeapBigIntChild, Edge notDoubleChild)
+void SpeculativeJIT::compileNeitherDoubleNorHeapBigIntToNotDoubleStrictEquality(Node* node, Edge leftNeitherDoubleNorHeapBigIntChild, Edge rightNotDoubleChild)
{
- ASSERT(neitherDoubleNorHeapBigIntChild.useKind() == NeitherDoubleNorHeapBigIntUse);
- ASSERT(notDoubleChild.useKind() == NotDoubleUse);
+ ASSERT(leftNeitherDoubleNorHeapBigIntChild.useKind() == NeitherDoubleNorHeapBigIntUse);
+ ASSERT(rightNotDoubleChild.useKind() == NotDoubleUse);
- JSValueOperand left(this, neitherDoubleNorHeapBigIntChild, ManualOperandSpeculation);
- JSValueOperand right(this, notDoubleChild, ManualOperandSpeculation);
+ JSValueOperand left(this, leftNeitherDoubleNorHeapBigIntChild, ManualOperandSpeculation);
+ JSValueOperand right(this, rightNotDoubleChild, ManualOperandSpeculation);
GPRTemporary temp(this);
GPRTemporary leftTemp(this);
@@ -352,8 +352,6 @@
JSValueRegs leftRegs = left.jsValueRegs();
JSValueRegs rightRegs = right.jsValueRegs();
- GPRReg leftGPR = leftRegs.payloadGPR();
- GPRReg rightGPR = rightRegs.payloadGPR();
GPRReg tempGPR = temp.gpr();
GPRReg leftTempGPR = leftTemp.gpr();
GPRReg rightTempGPR = rightTemp.gpr();
@@ -362,7 +360,7 @@
// We try to avoid repeated and redundant checks here, which leads to the following pseudo-code:
/*
- if (left == true) {
+ if (left == right) {
speculateNeitherDoubleNorHeapBigInt(left);
return true;
}
@@ -385,44 +383,40 @@
JITCompiler::JumpList trueCase;
JITCompiler::JumpList falseCase;
- JITCompiler::Jump notEqual = m_jit.branch64(JITCompiler::NotEqual, leftGPR, rightGPR);
+ JITCompiler::Jump notEqual = m_jit.branch64(JITCompiler::NotEqual, leftRegs.payloadGPR(), rightRegs.payloadGPR());
// We cannot use speculateNeitherDoubleNorHeapBigInt here, because it updates the interpreter state, and we can skip over it.
// So we would always skip the speculateNotDouble that follows.
- if (needsTypeCheck(neitherDoubleNorHeapBigIntChild, ~SpecFullDouble)) {
- if (needsTypeCheck(neitherDoubleNorHeapBigIntChild, ~SpecInt32Only))
+ if (needsTypeCheck(leftNeitherDoubleNorHeapBigIntChild, ~SpecFullDouble)) {
+ if (needsTypeCheck(leftNeitherDoubleNorHeapBigIntChild, ~SpecInt32Only))
trueCase.append(m_jit.branchIfInt32(leftRegs));
- speculationCheck(BadType, leftRegs, neitherDoubleNorHeapBigIntChild.node(), m_jit.branchIfNumber(leftRegs, tempGPR));
+ speculationCheck(BadType, leftRegs, leftNeitherDoubleNorHeapBigIntChild.node(), m_jit.branchIfNumber(leftRegs, tempGPR));
}
- if (needsTypeCheck(neitherDoubleNorHeapBigIntChild, ~SpecHeapBigInt)) {
- if (needsTypeCheck(neitherDoubleNorHeapBigIntChild, SpecCell))
+ if (needsTypeCheck(leftNeitherDoubleNorHeapBigIntChild, ~SpecHeapBigInt)) {
+ if (needsTypeCheck(leftNeitherDoubleNorHeapBigIntChild, SpecCell))
trueCase.append(m_jit.branchIfNotCell(leftRegs));
- speculationCheck(BadType, leftRegs, neitherDoubleNorHeapBigIntChild.node(), m_jit.branchIfHeapBigInt(leftGPR));
+ speculationCheck(BadType, leftRegs, leftNeitherDoubleNorHeapBigIntChild.node(), m_jit.branchIfHeapBigInt(leftRegs.payloadGPR()));
}
trueCase.append(m_jit.jump());
notEqual.link(&m_jit);
- speculateNotDouble(notDoubleChild, rightRegs, tempGPR);
- speculateNotDouble(neitherDoubleNorHeapBigIntChild, leftRegs, tempGPR);
+ speculateNotDouble(rightNotDoubleChild, rightRegs, tempGPR);
+ speculateNotDouble(leftNeitherDoubleNorHeapBigIntChild, leftRegs, tempGPR);
- bool leftMayBeNotCell = needsTypeCheck(neitherDoubleNorHeapBigIntChild, SpecCellCheck);
- if (leftMayBeNotCell)
+ if (needsTypeCheck(leftNeitherDoubleNorHeapBigIntChild, SpecCellCheck))
falseCase.append(m_jit.branchIfNotCell(leftRegs));
- DFG_TYPE_CHECK(leftRegs, neitherDoubleNorHeapBigIntChild, ~SpecHeapBigInt, m_jit.branchIfHeapBigInt(leftGPR));
+ DFG_TYPE_CHECK(leftRegs, leftNeitherDoubleNorHeapBigIntChild, ~SpecHeapBigInt, m_jit.branchIfHeapBigInt(leftRegs.payloadGPR()));
- bool leftMayBeNotStringKnowingCell = needsTypeCheck(neitherDoubleNorHeapBigIntChild, (~SpecString) & SpecCellCheck);
- if (leftMayBeNotStringKnowingCell)
- falseCase.append(m_jit.branchIfNotString(leftGPR));
+ if (needsTypeCheck(leftNeitherDoubleNorHeapBigIntChild, SpecString))
+ falseCase.append(m_jit.branchIfNotString(leftRegs.payloadGPR()));
- bool rightMayBeNotCell = needsTypeCheck(notDoubleChild, SpecCellCheck);
- if (rightMayBeNotCell)
+ if (needsTypeCheck(rightNotDoubleChild, SpecCellCheck))
falseCase.append(m_jit.branchIfNotCell(rightRegs));
- bool rightMayBeNotStringKnowingCell = needsTypeCheck(notDoubleChild, (~SpecString) & SpecCellCheck);
- if (rightMayBeNotStringKnowingCell)
- falseCase.append(m_jit.branchIfNotString(rightGPR));
+ if (needsTypeCheck(rightNotDoubleChild, SpecString))
+ falseCase.append(m_jit.branchIfNotString(rightRegs.payloadGPR()));
- compileStringEquality(node, leftGPR, rightGPR, tempGPR, leftTempGPR, rightTempGPR, leftTemp2GPR, rightTemp2GPR, trueCase, falseCase);
+ compileStringEquality(node, leftRegs.payloadGPR(), rightRegs.payloadGPR(), tempGPR, leftTempGPR, rightTempGPR, leftTemp2GPR, rightTemp2GPR, trueCase, falseCase);
}
void SpeculativeJIT::nonSpeculativePeepholeStrictEq(Node* node, Node* branchNode, bool invert)
Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp (282856 => 282857)
--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp 2021-09-22 00:34:47 UTC (rev 282856)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp 2021-09-22 01:14:06 UTC (rev 282857)
@@ -9878,15 +9878,15 @@
setBoolean(m_out.phi(Int32, fastTrue, fastFalse, slowResult));
}
- void compileNeitherDoubleNorHeapBigIntToNotDoubleStrictEquality(Edge neitherDoubleNorHeapBigIntEdge, Edge notDoubleEdge)
+ void compileNeitherDoubleNorHeapBigIntToNotDoubleStrictEquality(Edge leftNeitherDoubleNorHeapBigIntEdge, Edge rightNotDoubleEdge)
{
- ASSERT(neitherDoubleNorHeapBigIntEdge.useKind() == NeitherDoubleNorHeapBigIntUse);
- ASSERT(notDoubleEdge.useKind() == NotDoubleUse);
+ ASSERT(leftNeitherDoubleNorHeapBigIntEdge.useKind() == NeitherDoubleNorHeapBigIntUse);
+ ASSERT(rightNotDoubleEdge.useKind() == NotDoubleUse);
- LValue leftValue = lowJSValue(neitherDoubleNorHeapBigIntEdge, ManualOperandSpeculation);
- LValue rightValue = lowJSValue(notDoubleEdge, ManualOperandSpeculation);
- SpeculatedType leftValueType = provenType(neitherDoubleNorHeapBigIntEdge);
- SpeculatedType rightValueType = provenType(notDoubleEdge);
+ LValue leftValue = lowJSValue(leftNeitherDoubleNorHeapBigIntEdge, ManualOperandSpeculation);
+ LValue rightValue = lowJSValue(rightNotDoubleEdge, ManualOperandSpeculation);
+ SpeculatedType leftValueType = provenType(leftNeitherDoubleNorHeapBigIntEdge);
+ SpeculatedType rightValueType = provenType(rightNotDoubleEdge);
LBasicBlock triviallyEqualCase = m_out.newBlock();
LBasicBlock leftIsNotInt32EqualCase = m_out.newBlock();
@@ -9928,11 +9928,11 @@
m_out.branch(isInt32(leftValue, leftValueType), unsure(returnTrueBlock), unsure(leftIsNotInt32EqualCase));
m_out.appendTo(leftIsNotInt32EqualCase, leftIsCellEqualCase);
- typeCheckWithoutUpdatingInterpreter(jsValueValue(leftValue), neitherDoubleNorHeapBigIntEdge, ~SpecFullDouble, isNumber(leftValue));
+ typeCheckWithoutUpdatingInterpreter(jsValueValue(leftValue), leftNeitherDoubleNorHeapBigIntEdge, ~SpecFullDouble, isNumber(leftValue));
m_out.branch(isCell(leftValue, leftValueType & ~SpecFullNumber), unsure(leftIsCellEqualCase), unsure(returnTrueBlock));
m_out.appendTo(leftIsCellEqualCase, returnTrueBlock);
- typeCheckWithoutUpdatingInterpreter(jsValueValue(leftValue), neitherDoubleNorHeapBigIntEdge, ~SpecHeapBigInt, isHeapBigInt(leftValue));
+ typeCheckWithoutUpdatingInterpreter(jsValueValue(leftValue), leftNeitherDoubleNorHeapBigIntEdge, ~SpecHeapBigInt, isHeapBigInt(leftValue));
m_out.jump(returnTrueBlock);
m_out.appendTo(returnTrueBlock, notTriviallyEqualCase);
@@ -9940,13 +9940,13 @@
m_out.jump(continuation);
m_out.appendTo(notTriviallyEqualCase, leftIsCell);
- speculateNotDouble(neitherDoubleNorHeapBigIntEdge);
- speculateNotDouble(notDoubleEdge);
+ speculateNotDouble(leftNeitherDoubleNorHeapBigIntEdge);
+ speculateNotDouble(rightNotDoubleEdge);
ValueFromBlock fastFalse = m_out.anchor(m_out.booleanFalse);
m_out.branch(isNotCell(leftValue, leftValueType & ~SpecFullDouble), unsure(continuation), unsure(leftIsCell));
m_out.appendTo(leftIsCell, leftIsString);
- FTL_TYPE_CHECK(jsValueValue(leftValue), neitherDoubleNorHeapBigIntEdge, ~SpecHeapBigInt, isHeapBigInt(leftValue));
+ FTL_TYPE_CHECK(jsValueValue(leftValue), leftNeitherDoubleNorHeapBigIntEdge, ~SpecHeapBigInt, isHeapBigInt(leftValue));
m_out.branch(isNotString(leftValue, leftValueType & SpecCell & ~SpecHeapBigInt), unsure(continuation), unsure(leftIsString));
m_out.appendTo(leftIsString, rightIsCell);
@@ -9956,7 +9956,7 @@
m_out.branch(isNotString(rightValue, rightValueType & SpecCell & ~SpecFullDouble), unsure(continuation), unsure(rightIsString));
m_out.appendTo(rightIsString, continuation);
- ValueFromBlock slowResult = m_out.anchor(stringsEqual(leftValue, rightValue, neitherDoubleNorHeapBigIntEdge, notDoubleEdge));
+ ValueFromBlock slowResult = m_out.anchor(stringsEqual(leftValue, rightValue, leftNeitherDoubleNorHeapBigIntEdge, rightNotDoubleEdge));
m_out.jump(continuation);
m_out.appendTo(continuation, lastNext);