Changeset 201993 in webkit


Ignore:
Timestamp:
Jun 13, 2016 9:52:37 AM (8 years ago)
Author:
Yusuke Suzuki
Message:

Unreviewed, follow up patch for r201964
https://bugs.webkit.org/show_bug.cgi?id=158619

Fix typo in the comment.

  • runtime/MathCommon.h:

(JSC::toInt32):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r201990 r201993  
     12016-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
    1112016-06-13  Mark Lam  <mark.lam@apple.com>
    212
  • trunk/Source/JavaScriptCore/runtime/MathCommon.h

    r201964 r201993  
    6363// This in the ToInt32 operation is defined in section 9.5 of the ECMA-262 spec.
    6464// Note that this operation is identical to ToUInt32 other than to interpretation
    65 // of the resulting bit-pattern (as such this metod is also called to implement
     65// of the resulting bit-pattern (as such this method is also called to implement
    6666// ToUInt32).
    6767//
    68 // The operation can be descibed as round towards zero, then select the 32 least
     68// The operation can be described as round towards zero, then select the 32 least
    6969// bits of the resulting value in 2s-complement representation.
    7070ALWAYS_INLINE int32_t toInt32(double number)
     
    7777    // left in the low 32-bit range of the result (IEEE-754 doubles have 52 bits
    7878    // of fractional precision).
    79     // Note this case handles 0, -0, and all infinte, NaN, & denormal value.
     79    // Note this case handles 0, -0, and all infinite, NaN, & denormal value.
    8080    if (exp < 0 || exp > 83)
    8181        return 0;
     
    8383    // Select the appropriate 32-bits from the floating point mantissa. If the
    8484    // 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 tghe number, no need
     85    // lowest bits of the 64-bit integer representation of the number, no need
    8686    // to shift. If the exponent is greater than 52 we need to shift the value
    8787    // 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.