2009-01-13 Gavin Barraclough <barraclough@apple.com>
[WebKit-https.git] / JavaScriptCore / runtime / JSImmediate.h
index 8ba027a..05aea6f 100644 (file)
@@ -698,7 +698,7 @@ namespace JSC {
         {
             // Number is non-negative and an operation involving two of these can't overflow.
             // Checking for allowed negative numbers takes more time than it's worth on SunSpider.
-            return ((JSImmediate::rawValue(v1) | JSImmediate::rawValue(v2)) & (JSImmediate::TagTypeInteger + (JSImmediate::signBit | (JSImmediate::signBit >> 1)))) == JSImmediate::TagTypeInteger;
+            return canDoFastAdditiveOperations(v1) && canDoFastAdditiveOperations(v2);
         }
 
         static ALWAYS_INLINE JSValuePtr addImmediateNumbers(JSValuePtr v1, JSValuePtr v2)