Modified: trunk/Source/_javascript_Core/ChangeLog (198056 => 198057)
--- trunk/Source/_javascript_Core/ChangeLog 2016-03-12 03:11:04 UTC (rev 198056)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-03-12 03:28:32 UTC (rev 198057)
@@ -1,3 +1,19 @@
+2016-03-11 Benjamin Poulain <[email protected]>
+
+ [JSC] Remove a few jumps from DFG
+ https://bugs.webkit.org/show_bug.cgi?id=155347
+
+ Reviewed by Mark Lam.
+
+ Usually, setting ValueTrue or ValueFalse is set
+ by Compare+Or. There are 3 places in DFG with branches instead.
+
+ This patch changes them to the usual pattern.
+
+ * dfg/DFGSpeculativeJIT64.cpp:
+ (JSC::DFG::SpeculativeJIT::compileObjectEquality):
+ (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
+
2016-03-11 Saam barati <[email protected]>
[ES6] Make Object.assign spec compliant
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp (198056 => 198057)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2016-03-12 03:11:04 UTC (rev 198056)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2016-03-12 03:28:32 UTC (rev 198057)
@@ -1369,14 +1369,9 @@
MacroAssembler::Address(op2GPR, JSCell::typeInfoFlagsOffset()),
MacroAssembler::TrustedImm32(MasqueradesAsUndefined)));
}
-
- MacroAssembler::Jump falseCase = m_jit.branch64(MacroAssembler::NotEqual, op1GPR, op2GPR);
- m_jit.move(TrustedImm32(ValueTrue), resultGPR);
- MacroAssembler::Jump done = m_jit.jump();
- falseCase.link(&m_jit);
- m_jit.move(TrustedImm32(ValueFalse), resultGPR);
- done.link(&m_jit);
+ m_jit.compare64(MacroAssembler::Equal, op1GPR, op2GPR, resultGPR);
+ m_jit.or32(TrustedImm32(ValueFalse), resultGPR);
jsValueResult(resultGPR, m_currentNode, DataFormatJSBoolean);
}
@@ -1468,8 +1463,8 @@
// At this point we know that we can perform a straight-forward equality comparison on pointer
// values because both left and right are pointers to objects that have no special equality
// protocols.
- MacroAssembler::Jump falseCase = m_jit.branch64(MacroAssembler::NotEqual, op1GPR, op2GPR);
- MacroAssembler::Jump trueCase = m_jit.jump();
+ m_jit.compare64(MacroAssembler::Equal, op1GPR, op2GPR, resultGPR);
+ MacroAssembler::Jump done = m_jit.jump();
rightNotCell.link(&m_jit);
@@ -1485,14 +1480,10 @@
MacroAssembler::NotEqual, resultGPR,
MacroAssembler::TrustedImm64(ValueNull)));
}
-
- falseCase.link(&m_jit);
- m_jit.move(TrustedImm32(ValueFalse), resultGPR);
- MacroAssembler::Jump done = m_jit.jump();
- trueCase.link(&m_jit);
- m_jit.move(TrustedImm32(ValueTrue), resultGPR);
+ m_jit.move(TrustedImm32(0), result.gpr());
+
done.link(&m_jit);
-
+ m_jit.or32(TrustedImm32(ValueFalse), resultGPR);
jsValueResult(resultGPR, m_currentNode, DataFormatJSBoolean);
}