Changeset 34943 in webkit for trunk/JavaScriptCore/kjs/JSImmediate.h
- Timestamp:
- Jul 1, 2008, 9:21:43 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/JSImmediate.h
r34821 r34943 70 70 { 71 71 return (getTag(v) == NumberType); 72 } 73 74 static ALWAYS_INLINE bool isPositiveNumber(const JSValue* v) 75 { 76 // A single mask to check for the sign bit and the number tag all at once. 77 return (reinterpret_cast<uintptr_t>(v) & (0x80000000 | NumberType)) == NumberType; 72 78 } 73 79 … … 329 335 ALWAYS_INLINE bool JSImmediate::getUInt32(const JSValue* v, uint32_t& i) 330 336 { 331 const int32_t si = static_cast<int32_t>(unTag(v)) >> 2; 332 i = si; 333 return isNumber(v) & (si >= 0); 337 i = static_cast<uintptr_t>(unTag(v)) >> 2; 338 return isPositiveNumber(v); 334 339 } 335 340
Note:
See TracChangeset
for help on using the changeset viewer.