Consolidate multiple OSRExit calls into one.

https://bugs.webkit.org/show_bug.cgi?id=122168

Patch by Nadav Rotem <nrotem@apple.com> on 2013-10-01
Reviewed by Filip Pizlo.

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileArithMul):
(JSC::FTL::LowerDFGToLLVM::compileArithDiv):
(JSC::FTL::LowerDFGToLLVM::compileArithMod):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156734 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ceaabaee
2013-10-01 Nadav Rotem <nrotem@apple.com>
Consolidate multiple OSRExit calls into one.
https://bugs.webkit.org/show_bug.cgi?id=122168
Reviewed by Filip Pizlo.
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileArithMul):
(JSC::FTL::LowerDFGToLLVM::compileArithDiv):
(JSC::FTL::LowerDFGToLLVM::compileArithMod):
2013-09-30 Filip Pizlo <fpizlo@apple.com>
SpeculativeJIT::m_arguments/m_variables are vestiges of a time long gone
......@@ -730,8 +730,8 @@ private:
m_out.branch(m_out.notZero32(result), continuation, slowCase);
LBasicBlock lastNext = m_out.appendTo(slowCase, continuation);
speculate(NegativeZero, noValue(), 0, m_out.lessThan(left, m_out.int32Zero));
speculate(NegativeZero, noValue(), 0, m_out.lessThan(right, m_out.int32Zero));
LValue cond = m_out.bitOr(m_out.lessThan(left, m_out.int32Zero), m_out.lessThan(right, m_out.int32Zero));
speculate(NegativeZero, noValue(), 0, cond);
m_out.jump(continuation);
m_out.appendTo(continuation, lastNext);
}
......@@ -756,8 +756,8 @@ private:
m_out.branch(m_out.notZero64(result), continuation, slowCase);
LBasicBlock lastNext = m_out.appendTo(slowCase, continuation);
speculate(NegativeZero, noValue(), 0, m_out.lessThan(left, m_out.int64Zero));
speculate(NegativeZero, noValue(), 0, m_out.lessThan(right, m_out.int64Zero));
LValue cond = m_out.bitOr(m_out.lessThan(left, m_out.int64Zero), m_out.lessThan(right, m_out.int64Zero));
speculate(NegativeZero, noValue(), 0, cond);
m_out.jump(continuation);
m_out.appendTo(continuation, lastNext);
}
......@@ -800,8 +800,8 @@ private:
LValue neg2ToThe31 = m_out.constInt32(-2147483647-1);
if (bytecodeUsesAsNumber(m_node->arithNodeFlags())) {
speculate(Overflow, noValue(), 0, m_out.isZero32(denominator));
speculate(Overflow, noValue(), 0, m_out.equal(numerator, neg2ToThe31));
LValue cond = m_out.bitOr(m_out.isZero32(denominator), m_out.equal(numerator, neg2ToThe31));
speculate(Overflow, noValue(), 0, cond);
m_out.jump(continuation);
} else {
// This is the case where we convert the result to an int after we're done. So,
......@@ -898,8 +898,8 @@ private:
// FIXME: -2^31 / -1 will actually yield negative zero, so we could have a
// separate case for that. But it probably doesn't matter so much.
if (bytecodeUsesAsNumber(m_node->arithNodeFlags())) {
speculate(Overflow, noValue(), 0, m_out.isZero32(denominator));
speculate(Overflow, noValue(), 0, m_out.equal(numerator, neg2ToThe31));
LValue cond = m_out.bitOr(m_out.isZero32(denominator), m_out.equal(numerator, neg2ToThe31));
speculate(Overflow, noValue(), 0, cond);
m_out.jump(continuation);
} else {
// This is the case where we convert the result to an int after we're done. So,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment