Ignore:
Timestamp:
Nov 5, 2012, 10:15:23 AM (13 years ago)
Author:
[email protected]
Message:

Reduce the verbosity of referring to QNaN in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=101174

Reviewed by Geoffrey Garen.

Introduces a #define QNaN in JSValue.h, and replaces all previous uses of
std::numeric_limits<double>::quiet_NaN() with QNaN.

  • API/JSValueRef.cpp:

(JSValueMakeNumber):
(JSValueToNumber):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emitFloatTypedArrayGetByVal):

  • runtime/CachedTranscendentalFunction.h:

(JSC::CachedTranscendentalFunction::initialize):

  • runtime/DateConstructor.cpp:

(JSC::constructDate):

  • runtime/DateInstanceCache.h:

(JSC::DateInstanceData::DateInstanceData):
(JSC::DateInstanceCache::reset):

  • runtime/ExceptionHelpers.cpp:

(JSC::InterruptedExecutionError::defaultValue):
(JSC::TerminatedExecutionError::defaultValue):

  • runtime/JSCell.h:

(JSC::JSValue::getPrimitiveNumber):

  • runtime/JSDateMath.cpp:

(JSC::parseDateFromNullTerminatedCharacters):

  • runtime/JSGlobalData.cpp:

(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::resetDateCache):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::parseInt):
(JSC::jsStrDecimalLiteral):
(JSC::toDouble):
(JSC::jsToNumber):
(JSC::parseFloat):

  • runtime/JSValue.cpp:

(JSC::JSValue::toNumberSlowCase):

  • runtime/JSValue.h:

(JSC):

  • runtime/JSValueInlineMethods.h:

(JSC::jsNaN):

  • runtime/MathObject.cpp:

(JSC::mathProtoFuncMax):
(JSC::mathProtoFuncMin):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp

    r132143 r133493  
    4949    if (hint == PreferString)
    5050        return jsNontrivialString(exec, String(ASCIILiteral("JavaScript execution exceeded timeout.")));
    51     return JSValue(std::numeric_limits<double>::quiet_NaN());
     51    return JSValue(QNaN);
    5252}
    5353
     
    7676    if (hint == PreferString)
    7777        return jsNontrivialString(exec, String(ASCIILiteral("JavaScript execution terminated.")));
    78     return JSValue(std::numeric_limits<double>::quiet_NaN());
     78    return JSValue(QNaN);
    7979}
    8080
Note: See TracChangeset for help on using the changeset viewer.