Ignore:
Timestamp:
Oct 22, 2007, 2:26:52 PM (18 years ago)
Author:
mjs
Message:

Reviewed by Oliver.


  • kjs/JSImmediate.h: (KJS::JSImmediate::fromDouble): Avoid moving floats to integer registers since this is very slow.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/JSImmediate.h

    r26892 r26893  
    155155
    156156        // check for data loss from conversion to float
    157         DoubleUnion doubleUnion1, doubleUnion2;
    158         doubleUnion1.asDouble = floatUnion.asFloat;
    159         doubleUnion2.asDouble = d;
    160         if (doubleUnion1.asBits != doubleUnion2.asBits)
     157        // The d == d check is to allow NaN - it does not
     158        // compare equal to itself, but we do want to allow it
     159        if (floatUnion.asFloat != d && d == d)
    161160            return 0;
    162161
Note: See TracChangeset for help on using the changeset viewer.