Changeset 201993 in webkit
- Timestamp:
- Jun 13, 2016 9:52:37 AM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r201990 r201993 1 2016-06-13 Yusuke Suzuki <utatane.tea@gmail.com> 2 3 Unreviewed, follow up patch for r201964 4 https://bugs.webkit.org/show_bug.cgi?id=158619 5 6 Fix typo in the comment. 7 8 * runtime/MathCommon.h: 9 (JSC::toInt32): 10 1 11 2016-06-13 Mark Lam <mark.lam@apple.com> 2 12 -
trunk/Source/JavaScriptCore/runtime/MathCommon.h
r201964 r201993 63 63 // This in the ToInt32 operation is defined in section 9.5 of the ECMA-262 spec. 64 64 // Note that this operation is identical to ToUInt32 other than to interpretation 65 // of the resulting bit-pattern (as such this met od is also called to implement65 // of the resulting bit-pattern (as such this method is also called to implement 66 66 // ToUInt32). 67 67 // 68 // The operation can be desc ibed as round towards zero, then select the 32 least68 // The operation can be described as round towards zero, then select the 32 least 69 69 // bits of the resulting value in 2s-complement representation. 70 70 ALWAYS_INLINE int32_t toInt32(double number) … … 77 77 // left in the low 32-bit range of the result (IEEE-754 doubles have 52 bits 78 78 // of fractional precision). 79 // Note this case handles 0, -0, and all infin te, NaN, & denormal value.79 // Note this case handles 0, -0, and all infinite, NaN, & denormal value. 80 80 if (exp < 0 || exp > 83) 81 81 return 0; … … 83 83 // Select the appropriate 32-bits from the floating point mantissa. If the 84 84 // exponent is 52 then the bits we need to select are already aligned to the 85 // lowest bits of the 64-bit integer representation of t ghe number, no need85 // lowest bits of the 64-bit integer representation of the number, no need 86 86 // to shift. If the exponent is greater than 52 we need to shift the value 87 87 // left by (exp - 52), if the value is less than 52 we need to shift right
Note: See TracChangeset
for help on using the changeset viewer.