The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Feb 2013 23:01:21 +0000 (23:01 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Feb 2013 23:01:21 +0000 (23:01 +0000)
commit488cc66b08b73915ff4233c10a977df49847e6c7
tree849e5780aa72413904eebbfce10ae2ad4e7ca290
parent78b34741eb5b2b283f47ead2deab3d38c5bc08dc
The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
https://bugs.webkit.org/show_bug.cgi?id=109325

Reviewed by Anders Carlsson.

Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
two methods as they're provided by the C++ standard library being used.

Source/JavaScriptCore:

* API/JSValueRef.cpp:
(JSValueMakeNumber):
* JSCTypedArrayStubs.h:
(JSC):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitLoad):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::constantNaN):
* offlineasm/cloop.rb:
* runtime/DateConstructor.cpp:
(JSC::dateUTC): Also include an opportunistic style fix.
* runtime/DateInstance.cpp:
(JSC::DateInstance::calculateGregorianDateTime):
(JSC::DateInstance::calculateGregorianDateTimeUTC):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncGetMilliSeconds):
(JSC::dateProtoFuncGetUTCMilliseconds):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
* runtime/JSCJSValue.cpp:
(JSC::JSValue::toInteger):
* runtime/JSDateMath.cpp:
(JSC::getUTCOffset):
(JSC::parseDateFromNullTerminatedCharacters):
(JSC::parseDate):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncIsNaN):
* runtime/MathObject.cpp:
(JSC::mathProtoFuncMax):
(JSC::mathProtoFuncMin):
(JSC::mathProtoFuncPow):
* runtime/PropertyDescriptor.cpp:
(JSC::sameValue):

Source/WebCore:

No new tests as there's no change in functionality.

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::setDuration):
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::totalPitchRate):
* Modules/webaudio/AudioParam.cpp:
(WebCore::AudioParam::setValue):
* Modules/webaudio/AudioParamTimeline.cpp:
(WebCore::isValidNumber):
* Modules/webaudio/PannerNode.cpp:
(WebCore::fixNANs):
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::createIDBKeyFromValue):
* bindings/js/JSDataViewCustom.cpp:
(WebCore::getDataViewMember):
* bindings/js/JSGeolocationCustom.cpp:
(WebCore::setTimeout):
(WebCore::setMaximumAge):
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::JSHTMLOptionsCollection::setLength):
* bindings/js/JSWebKitPointCustom.cpp:
(WebCore::JSWebKitPointConstructor::constructJSWebKitPoint):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateParametersCheck):
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::JSFloat64Array::getByIndex):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::classMethodWithClampCallback):
* bindings/v8/IDBBindingUtilities.cpp:
(WebCore::createIDBKeyFromValue):
* bindings/v8/V8Binding.cpp:
(WebCore::toInt32):
(WebCore::toUInt32):
* bindings/v8/custom/V8GeolocationCustom.cpp:
(WebCore::createPositionOptions):
* bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
(WebCore::V8HTMLOptionsCollection::lengthAccessorSetter):
* bindings/v8/custom/V8WebKitPointCustom.cpp:
(WebCore::V8WebKitPoint::constructorCallbackCustom):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::convertValueToQVariant):
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::translate):
(WebCore::WebKitCSSMatrix::scale):
(WebCore::WebKitCSSMatrix::rotate):
(WebCore::WebKitCSSMatrix::rotateAxisAngle):
(WebCore::WebKitCSSMatrix::skewX):
(WebCore::WebKitCSSMatrix::skewY):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::percentLoaded):
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
(WebCore::HTMLMediaElement::endedPlayback):
* html/MediaController.cpp:
(MediaController::duration):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::clearColor):
* html/track/TextTrack.cpp:
(WebCore::TextTrack::addCue):
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::setStartTime):
(WebCore::TextTrackCue::setEndTime):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::adjustWindowRect):
* page/WindowFeatures.cpp:
(WebCore::WindowFeatures::floatFeature): Also include an opportunistic style fix.
* platform/CalculationValue.cpp:
(WebCore::CalculationValue::evaluate):
* platform/Decimal.cpp:
(WebCore::Decimal::fromDouble):
* platform/Length.cpp:
(WebCore::Length::nonNanCalculatedValue):
* platform/audio/AudioResampler.cpp:
(WebCore::AudioResampler::setRate):
* platform/audio/DynamicsCompressorKernel.cpp:
(WebCore::DynamicsCompressorKernel::process):
* platform/audio/Reverb.cpp:
(WebCore::calculateNormalizationScale):
* platform/graphics/Font.cpp:
(WebCore::Font::width):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::isLiveStream):
* platform/graphics/gpu/LoopBlinnMathUtils.cpp:
(LoopBlinnMathUtils):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::buffered):
(WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable):
* platform/graphics/opentype/OpenTypeVerticalData.cpp:
(WebCore::OpenTypeVerticalData::getVerticalTranslationsForGlyphs):
* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::clampEdgeValue):
(WebCore::TransformationMatrix::clampedBoundsOfProjectedQuad):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::parseCacheControlDirectives):
* rendering/RenderMediaControlsChromium.cpp:
(WebCore::paintMediaSlider):
(WebCore::paintMediaVolumeSlider):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMediaSliderTrack):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::beginElementAt):
(WebCore::SVGAnimationElement::endElementAt):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::setCurrentTime):
* svg/animation/SMILTime.h:
(WebCore::SMILTime::SMILTime):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::addBeginTime):
(WebCore::SVGSMILElement::addEndTime):
* xml/XPathFunctions.cpp:
(WebCore::XPath::FunSubstring::evaluate):
(WebCore::XPath::FunRound::round):
* xml/XPathValue.cpp:
(WebCore::XPath::Value::toBoolean): Also include an opportunistic style fix.
(WebCore::XPath::Value::toString):

Source/WebKit/chromium:

* tests/DecimalTest.cpp:
(TEST_F):

Source/WebKit/mac:

* tests/DecimalTest.cpp:
(TEST_F):

Source/WTF:

* wtf/Compiler.h: Remove the global isinf/isnan compiler quirk definitions. They're not required anymore.
* wtf/DateMath.cpp: Move the workaround for isinf on Solaris into the std namespace. Ditto for isinf and isnan
when using MSVC. Stop bringing the isinf and isnan methods into the global scope when using other configurations.
(WTF::parseDateFromNullTerminatedCharacters):
* wtf/IntegralTypedArrayBase.h:
(WTF::IntegralTypedArrayBase::set):
* wtf/MathExtras.h:
(std):
(std::isinf):
(wtf_fmod):
(wtf_pow):
(doubleToInteger):
* wtf/MediaTime.cpp:
(WTF::MediaTime::createWithFloat):
(WTF::MediaTime::createWithDouble):
* wtf/Uint8ClampedArray.h:
(WTF::Uint8ClampedArray::set):

Tools:

* DumpRenderTree/TestRunner.cpp:
(setAppCacheMaximumSizeCallback):
(setApplicationCacheOriginQuotaCallback):
(setDatabaseQuotaCallback):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
79 files changed:
Source/JavaScriptCore/API/JSValueRef.cpp
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JSCTypedArrayStubs.h
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
Source/JavaScriptCore/offlineasm/cloop.rb
Source/JavaScriptCore/runtime/DateConstructor.cpp
Source/JavaScriptCore/runtime/DateInstance.cpp
Source/JavaScriptCore/runtime/DatePrototype.cpp
Source/JavaScriptCore/runtime/JSCJSValue.cpp
Source/JavaScriptCore/runtime/JSDateMath.cpp
Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
Source/JavaScriptCore/runtime/MathObject.cpp
Source/JavaScriptCore/runtime/PropertyDescriptor.cpp
Source/WTF/ChangeLog
Source/WTF/wtf/Compiler.h
Source/WTF/wtf/DateMath.cpp
Source/WTF/wtf/IntegralTypedArrayBase.h
Source/WTF/wtf/MathExtras.h
Source/WTF/wtf/MediaTime.cpp
Source/WTF/wtf/Uint8ClampedArray.h
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediasource/MediaSource.cpp
Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
Source/WebCore/Modules/webaudio/AudioParam.cpp
Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp
Source/WebCore/Modules/webaudio/PannerNode.cpp
Source/WebCore/bindings/js/IDBBindingUtilities.cpp
Source/WebCore/bindings/js/JSDataViewCustom.cpp
Source/WebCore/bindings/js/JSGeolocationCustom.cpp
Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp
Source/WebCore/bindings/js/JSWebKitPointCustom.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
Source/WebCore/bindings/scripts/test/JS/JSFloat64Array.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
Source/WebCore/bindings/v8/IDBBindingUtilities.cpp
Source/WebCore/bindings/v8/V8Binding.cpp
Source/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
Source/WebCore/bindings/v8/custom/V8WebKitPointCustom.cpp
Source/WebCore/bridge/qt/qt_runtime.cpp
Source/WebCore/css/WebKitCSSMatrix.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/MediaController.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.cpp
Source/WebCore/html/track/TextTrack.cpp
Source/WebCore/html/track/TextTrackCue.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/WindowFeatures.cpp
Source/WebCore/platform/CalculationValue.cpp
Source/WebCore/platform/Decimal.cpp
Source/WebCore/platform/Length.cpp
Source/WebCore/platform/audio/AudioResampler.cpp
Source/WebCore/platform/audio/DynamicsCompressorKernel.cpp
Source/WebCore/platform/audio/Reverb.cpp
Source/WebCore/platform/graphics/Font.cpp
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
Source/WebCore/platform/graphics/gpu/LoopBlinnMathUtils.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
Source/WebCore/platform/graphics/opentype/OpenTypeVerticalData.cpp
Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
Source/WebCore/platform/network/ResourceResponseBase.cpp
Source/WebCore/rendering/RenderMediaControlsChromium.cpp
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebCore/svg/SVGAnimationElement.cpp
Source/WebCore/svg/SVGSVGElement.cpp
Source/WebCore/svg/animation/SMILTime.h
Source/WebCore/svg/animation/SVGSMILElement.cpp
Source/WebCore/xml/XPathFunctions.cpp
Source/WebCore/xml/XPathValue.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/DecimalTest.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm
Tools/ChangeLog
Tools/DumpRenderTree/TestRunner.cpp