diff options
author | hausmann@webkit.org <hausmann@webkit.org> | 2013-01-03 09:54:36 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-10 14:16:44 +0100 |
commit | d942482a69f6a72605cee42ff7724b23e62204bf (patch) | |
tree | 710cdc33088dfc2fb6ddea65d43dbe109cb3376b /Source/JavaScriptCore/runtime/MathObject.cpp | |
parent | 9b144019dd99d696f1a9eb9cde6afa0f04d7dc05 (diff) | |
download | qtwebkit-d942482a69f6a72605cee42ff7724b23e62204bf.tar.gz |
[MinGW-w64] Centralize workaround for pow() implementation
https://bugs.webkit.org/show_bug.cgi?id=105925
Reviewed by Sam Weinig.
As suggested by Sam, move the MinGW-w64 workaround into MathExtras.h
away from the JSC usage.
Source/JavaScriptCore:
* runtime/MathObject.cpp:
(JSC::mathPow):
Source/WTF:
* wtf/MathExtras.h:
(wtf_pow):
Change-Id: I49b2365baae6fdd9700667d1ef53c78bd70f6de3
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/JavaScriptCore/runtime/MathObject.cpp')
-rw-r--r-- | Source/JavaScriptCore/runtime/MathObject.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/Source/JavaScriptCore/runtime/MathObject.cpp b/Source/JavaScriptCore/runtime/MathObject.cpp index f939b8dd4..7634487ad 100644 --- a/Source/JavaScriptCore/runtime/MathObject.cpp +++ b/Source/JavaScriptCore/runtime/MathObject.cpp @@ -232,22 +232,6 @@ static ALWAYS_INLINE double mathPow(double x, double y) ALWAYS_INLINE double mathPow(double x, double y) { -#if COMPILER(MINGW64) - // MinGW-w64 has a custom implementation for pow. - // This handles certain special cases that are different. - if ((x == 0.0 || isinf(x)) && isfinite(y)) { - double f; - if (modf(y, &f) != 0.0) - return ((x == 0.0) ^ (y > 0.0)) ? std::numeric_limits<double>::infinity() : 0.0; - } - - if (x == 2.0) { - int yInt = static_cast<int>(y); - if (y == yInt) - return ldexp(1.0, yInt); - } -#endif - return pow(x, y); } |