| Differences between
and this patch
- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp -1 / +1 lines
Lines 1106-1112 RegisterID* BytecodeGenerator::emitLoad(RegisterID* dst, double number) a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp_sec1
1106
    // FIXME: Our hash tables won't hold infinity, so we make a new JSValue each time.
1106
    // FIXME: Our hash tables won't hold infinity, so we make a new JSValue each time.
1107
    // Later we can do the extra work to handle that like the other cases.  They also don't
1107
    // Later we can do the extra work to handle that like the other cases.  They also don't
1108
    // work correctly with NaN as a key.
1108
    // work correctly with NaN as a key.
1109
    if (isnan(number) || number == HashTraits<double>::emptyValue() || HashTraits<double>::isDeletedValue(number))
1109
    if (std::isnan(number) || number == HashTraits<double>::emptyValue() || HashTraits<double>::isDeletedValue(number))
1110
        return emitLoad(dst, jsNumber(number));
1110
        return emitLoad(dst, jsNumber(number));
1111
    JSValue& valueInMap = m_numberMap.add(number, JSValue()).first->second;
1111
    JSValue& valueInMap = m_numberMap.add(number, JSValue()).first->second;
1112
    if (!valueInMap)
1112
    if (!valueInMap)
- a/Source/JavaScriptCore/wtf/MathExtras.h +4 lines
Lines 137-144 inline double trunc(double num) { return num > 0 ? floor(num) : ceil(num); } a/Source/JavaScriptCore/wtf/MathExtras.h_sec1
137
inline long long abs(long long num) { return _abs64(num); }
137
inline long long abs(long long num) { return _abs64(num); }
138
#endif
138
#endif
139
139
140
#ifndef __GXX_EXPERIMENTAL_CXX0X__
140
inline bool isinf(double num) { return !_finite(num) && !_isnan(num); }
141
inline bool isinf(double num) { return !_finite(num) && !_isnan(num); }
141
inline bool isnan(double num) { return !!_isnan(num); }
142
inline bool isnan(double num) { return !!_isnan(num); }
143
#endif
142
inline bool signbit(double num) { return _copysign(1.0, num) < 0; }
144
inline bool signbit(double num) { return _copysign(1.0, num) < 0; }
143
145
144
inline double nextafter(double x, double y) { return _nextafter(x, y); }
146
inline double nextafter(double x, double y) { return _nextafter(x, y); }
Lines 240-247 inline int clampToInteger(unsigned value) a/Source/JavaScriptCore/wtf/MathExtras.h_sec2
240
242
241
#if !COMPILER(MSVC) && !(COMPILER(RVCT) && PLATFORM(BREWMP)) && !OS(SOLARIS) && !OS(SYMBIAN)
243
#if !COMPILER(MSVC) && !(COMPILER(RVCT) && PLATFORM(BREWMP)) && !OS(SOLARIS) && !OS(SYMBIAN)
242
using std::isfinite;
244
using std::isfinite;
245
#ifndef __GXX_EXPERIMENTAL_CXX0X__
243
using std::isinf;
246
using std::isinf;
244
using std::isnan;
247
using std::isnan;
248
#endif
245
using std::signbit;
249
using std::signbit;
246
#endif
250
#endif
247
251
- a/Source/WebCore/bindings/js/JSGeolocationCustom.cpp -2 / +2 lines
Lines 80-86 static PassRefPtr<PositionOptions> createPositionOptions(ExecState* exec, JSValu a/Source/WebCore/bindings/js/JSGeolocationCustom.cpp_sec1
80
        if (exec->hadException())
80
        if (exec->hadException())
81
            return 0;
81
            return 0;
82
        // If the value is positive infinity, there's nothing to do.
82
        // If the value is positive infinity, there's nothing to do.
83
        if (!(isinf(timeoutNumber) && (timeoutNumber > 0))) {
83
        if (!(std::isinf(timeoutNumber) && (timeoutNumber > 0))) {
84
            // Wrap to int32 and force non-negative to match behavior of window.setTimeout.
84
            // Wrap to int32 and force non-negative to match behavior of window.setTimeout.
85
            options->setTimeout(max(0, timeoutValue.toInt32(exec)));
85
            options->setTimeout(max(0, timeoutValue.toInt32(exec)));
86
            if (exec->hadException())
86
            if (exec->hadException())
Lines 95-101 static PassRefPtr<PositionOptions> createPositionOptions(ExecState* exec, JSValu a/Source/WebCore/bindings/js/JSGeolocationCustom.cpp_sec2
95
        double maximumAgeNumber = maximumAgeValue.toNumber(exec);
95
        double maximumAgeNumber = maximumAgeValue.toNumber(exec);
96
        if (exec->hadException())
96
        if (exec->hadException())
97
            return 0;
97
            return 0;
98
        if (isinf(maximumAgeNumber) && (maximumAgeNumber > 0)) {
98
        if (std::isinf(maximumAgeNumber) && (maximumAgeNumber > 0)) {
99
            // If the value is positive infinity, clear maximumAge.
99
            // If the value is positive infinity, clear maximumAge.
100
            options->clearMaximumAge();
100
            options->clearMaximumAge();
101
        } else {
101
        } else {
- a/Source/WebCore/html/HTMLInputElement.cpp -1 / +1 lines
Lines 332-338 void HTMLInputElement::applyStep(double count, ExceptionCode& ec) a/Source/WebCore/html/HTMLInputElement.cpp_sec1
332
        return;
332
        return;
333
    }
333
    }
334
    double newValue = current + step * count;
334
    double newValue = current + step * count;
335
    if (isinf(newValue)) {
335
    if (std::isinf(newValue)) {
336
        ec = INVALID_STATE_ERR;
336
        ec = INVALID_STATE_ERR;
337
        return;
337
        return;
338
    }
338
    }
- a/Source/WebCore/html/NumberInputType.cpp -1 / +1 lines
Lines 132-138 bool NumberInputType::stepMismatch(const String& value, double step) const a/Source/WebCore/html/NumberInputType.cpp_sec1
132
    if (!parseToDoubleForNumberType(value, &doubleValue))
132
    if (!parseToDoubleForNumberType(value, &doubleValue))
133
        return false;
133
        return false;
134
    doubleValue = fabs(doubleValue - stepBase());
134
    doubleValue = fabs(doubleValue - stepBase());
135
    if (isinf(doubleValue))
135
    if (std::isinf(doubleValue))
136
        return false;
136
        return false;
137
    // double's fractional part size is DBL_MAN_DIG-bit. If the current value
137
    // double's fractional part size is DBL_MAN_DIG-bit. If the current value
138
    // is greater than step*2^DBL_MANT_DIG, the following computation for
138
    // is greater than step*2^DBL_MANT_DIG, the following computation for

Return to Bug 59249