Ignore:
Timestamp:
Apr 16, 2014, 5:40:36 PM (11 years ago)
Author:
Brent Fulgham
Message:

[Win] Unreviewed Windows gardening. Restrict our new 'isinf' check
to 32-bit builds, and revise the comment to explain what we are
doing.

  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::isMachineInt): Provide motivation for the new
'isinf' check for our 32-bit code path.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSCJSValueInlines.h

    r167394 r167405  
    507507    if (number != number)
    508508        return false;
    509 #if OS(WINDOWS)
    510     // Need to check for infinity on Windows to avoid floating point error on following cast, see bug 131182.
     509#if OS(WINDOWS) && CPU(X86)
     510    // The VS Compiler for 32-bit builds generates a floating point error when attempting to cast
     511    // from an infinity to a 64-bit integer. We leave this routine with the floating point error
     512    // left in a register, causing undefined behavior in later floating point operations.
     513    //
     514    // To avoid this issue, we check for infinity here, and return false in that case.
    511515    if (std::isinf(number))
    512516        return false;
Note: See TracChangeset for help on using the changeset viewer.