WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-105925-20130102171402.patch (text/plain), 3.51 KB, created by
Simon Hausmann
on 2013-01-02 08:16:20 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Hausmann
Created:
2013-01-02 08:16:20 PST
Size:
3.51 KB
patch
obsolete
>Subversion Revision: 138612 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index bdfab8b4db98f22c9b1408bd49c77d3086635acc..e97890fac3373ee1205f28e98c72fb57eb526602 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,16 @@ >+2013-01-02 Simon Hausmann <simon.hausmann@digia.com> >+ >+ [MinGW-w64] Centralize workaround for pow() implementation >+ https://bugs.webkit.org/show_bug.cgi?id=105925 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ As suggested by Sam, move the MinGW-w64 workaround into MathExtras.h >+ away from the JSC usage. >+ >+ * runtime/MathObject.cpp: >+ (JSC::mathPow): >+ > 2013-01-02 Csaba Osztrogonác <ossy@webkit.org> > > One more unreviewed buildfix after r138609. >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 85abdbde9928f2edf22af78a9ba3596b151be61d..043e5444fd04990c72f16caca499de7082a6dcc3 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,16 @@ >+2013-01-02 Simon Hausmann <simon.hausmann@digia.com> >+ >+ [MinGW-w64] Centralize workaround for pow() implementation >+ https://bugs.webkit.org/show_bug.cgi?id=105925 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ As suggested by Sam, move the MinGW-w64 workaround into MathExtras.h >+ away from the JSC usage. >+ >+ * wtf/MathExtras.h: >+ (wtf_pow): >+ > 2012-12-31 Gavin Barraclough <barraclough@apple.com> > > Objective-C API for JavaScriptCore >diff --git a/Source/JavaScriptCore/runtime/MathObject.cpp b/Source/JavaScriptCore/runtime/MathObject.cpp >index f939b8dd42755d4f0beab31529494b9579f78801..7634487adcde16ccf478fc3ab6e0ab0b8f35aa94 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); > } > >diff --git a/Source/WTF/wtf/MathExtras.h b/Source/WTF/wtf/MathExtras.h >index df1b2365868dd8dd8c753dceadd672df336bc404..0a979533826123cb5007fdc117c649fbd81ddbf9 100644 >--- a/Source/WTF/wtf/MathExtras.h >+++ b/Source/WTF/wtf/MathExtras.h >@@ -226,6 +226,27 @@ inline long int lrint(double flt) > > #endif // COMPILER(MSVC) > >+#if COMPILER(MINGW64) >+inline double wtf_pow(double x, double y) >+{ >+ // 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); >+ } >+ return pow(x, y); >+} >+#define pow(x, y) wtf_pow(x, y) >+#endif // COMPILER(MINGW64) >+ > inline double deg2rad(double d) { return d * piDouble / 180.0; } > inline double rad2deg(double r) { return r * 180.0 / piDouble; } > inline double deg2grad(double d) { return d * 400.0 / 360.0; }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
sam
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 105925
: 181031