Changeset 161399 in webkit for trunk/Source/JavaScriptCore/ftl
- Timestamp:
- Jan 6, 2014, 8:52:48 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp
r161240 r161399 825 825 LValue result = isSub ? m_out.sub(left, right) : m_out.add(left, right); 826 826 827 if ( bytecodeCanTruncateInteger(m_node->arithNodeFlags())) {827 if (!shouldCheckOverflow(m_node->arithMode())) { 828 828 setInt32(result); 829 829 break; … … 879 879 LValue result = m_out.mul(left, right); 880 880 881 if ( !bytecodeCanTruncateInteger(m_node->arithNodeFlags())) {881 if (shouldCheckOverflow(m_node->arithMode())) { 882 882 LValue overflowResult = m_out.mulWithOverflow32(left, right); 883 883 speculate(Overflow, noValue(), 0, m_out.extractValue(overflowResult, 1)); 884 884 } 885 885 886 if ( !bytecodeCanIgnoreNegativeZero(m_node->arithNodeFlags())) {886 if (shouldCheckNegativeZero(m_node->arithMode())) { 887 887 LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("ArithMul slow case")); 888 888 LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArithMul continuation")); … … 911 911 speculate(Int52Overflow, noValue(), 0, m_out.extractValue(overflowResult, 1)); 912 912 913 if ( !bytecodeCanIgnoreNegativeZero(m_node->arithNodeFlags())) {913 if (shouldCheckNegativeZero(m_node->arithMode())) { 914 914 LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("ArithMul slow case")); 915 915 LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArithMul continuation")); … … 961 961 LValue neg2ToThe31 = m_out.constInt32(-2147483647-1); 962 962 963 if ( bytecodeUsesAsNumber(m_node->arithNodeFlags())) {963 if (shouldCheckOverflow(m_node->arithMode())) { 964 964 LValue cond = m_out.bitOr(m_out.isZero32(denominator), m_out.equal(numerator, neg2ToThe31)); 965 965 speculate(Overflow, noValue(), 0, cond); … … 991 991 m_out.appendTo(continuation, done); 992 992 993 if ( !bytecodeCanIgnoreNegativeZero(m_node->arithNodeFlags())) {993 if (shouldCheckNegativeZero(m_node->arithMode())) { 994 994 LBasicBlock zeroNumerator = FTL_NEW_BLOCK(m_out, ("ArithDivMod zero numerator")); 995 995 LBasicBlock numeratorContinuation = FTL_NEW_BLOCK(m_out, ("ArithDivMod numerator continuation")); … … 1011 1011 : m_out.rem(numerator, denominator); 1012 1012 1013 if ( bytecodeUsesAsNumber(m_node->arithNodeFlags())) {1013 if (shouldCheckOverflow(m_node->arithMode())) { 1014 1014 speculate( 1015 1015 Overflow, noValue(), 0, … … 1123 1123 1124 1124 LValue result = m_out.neg(value); 1125 if ( !bytecodeCanTruncateInteger(m_node->arithNodeFlags())) {1126 if ( bytecodeCanIgnoreNegativeZero(m_node->arithNodeFlags())) {1125 if (shouldCheckOverflow(m_node->arithMode())) { 1126 if (!shouldCheckNegativeZero(m_node->arithMode())) { 1127 1127 // We don't have a negate-with-overflow intrinsic. Hopefully this 1128 1128 // does the trick, though. … … 1143 1143 LValue value = lowWhicheverInt52(m_node->child1(), kind); 1144 1144 LValue result = m_out.neg(value); 1145 if ( !bytecodeCanIgnoreNegativeZero(m_node->arithNodeFlags()))1145 if (shouldCheckNegativeZero(m_node->arithMode())) 1146 1146 speculate(NegativeZero, noValue(), 0, m_out.isZero64(result)); 1147 1147 setInt52(result, kind); … … 1209 1209 LValue value = lowInt32(m_node->child1()); 1210 1210 1211 if ( !nodeCanSpeculateInt32(m_node->arithNodeFlags())) {1211 if (doesOverflow(m_node->arithMode())) { 1212 1212 setDouble(m_out.unsignedToDouble(value)); 1213 1213 return;
Note:
See TracChangeset
for help on using the changeset viewer.