[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
barraclough at apple.com
barraclough at apple.com
Wed Dec 22 12:31:22 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 3f640ba9c109b614115e52280c6a9e9b818d3c9e
Author: barraclough at apple.com <barraclough at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Aug 25 01:21:16 2010 +0000
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/DecimalNumber.h:
(WTF::DecimalNumber::intPow10):
* wtf/dtoa.cpp:
* wtf/dtoa.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index cb5bd43..9f3689a 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,13 @@
+2010-08-24 Gavin Barraclough <barraclough at apple.com>
+
+ Windows build fix.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+ * wtf/DecimalNumber.h:
+ (WTF::DecimalNumber::intPow10):
+ * wtf/dtoa.cpp:
+ * wtf/dtoa.h:
+
2010-08-23 Gavin Barraclough <barraclough at apple.com>
Reviewed by Oliver Hunt.
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
index 934688f..4291651 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
+++ b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
@@ -126,7 +126,6 @@ EXPORTS
?detach at Debugger@JSC@@UAEXPAVJSGlobalObject at 2@@Z
?detachThread at WTF@@YAXI at Z
?didTimeOut at TimeoutChecker@JSC@@QAE_NPAVExecState at 2@@Z
- ?doubleToStringInJavaScriptFormat at WTF@@YAXNQADPAI at Z
?dumpSampleData at JSGlobalData@JSC@@QAEXPAVExecState at 2@@Z
?empty at StringImpl@WTF@@SAPAV12 at XZ
?enumerable at PropertyDescriptor@JSC@@QBE_NXZ
@@ -149,6 +148,7 @@ EXPORTS
?number at UString@JSC@@SA?AV12 at H@Z
?number at UString@JSC@@SA?AV12 at I@Z
?number at UString@JSC@@SA?AV12 at N@Z
+ ?numberToString at WTF@@YAINAAY0GA at _W@Z
?functionGetter at PropertySlot@JSC@@ABE?AVJSValue at 2@PAVExecState at 2@@Z
?functionName at DebuggerCallFrame@JSC@@QBEPBVUString at 2@XZ
?get at Structure@JSC@@QAEIPBVStringImpl at WTF@@AAIAAPAVJSCell at 2@@Z
diff --git a/JavaScriptCore/wtf/DecimalNumber.h b/JavaScriptCore/wtf/DecimalNumber.h
index f60e853..118c492 100644
--- a/JavaScriptCore/wtf/DecimalNumber.h
+++ b/JavaScriptCore/wtf/DecimalNumber.h
@@ -28,6 +28,7 @@
#include <math.h>
#include <wtf/dtoa.h>
+#include <wtf/MathExtras.h>
#include <wtf/text/WTFString.h>
namespace WTF {
@@ -281,6 +282,37 @@ private:
m_precision = significantFigures;
}
+ double intPow10(int e)
+ {
+ // This function uses the "exponentiation by squaring" algorithm and
+ // long double to quickly and precisely calculate integer powers of 10.0.
+
+ // This is a handy workaround for <rdar://problem/4494756>
+
+ if (!e)
+ return 1.0;
+
+ bool negative = e < 0;
+ unsigned exp = negative ? -e : e;
+
+ long double result = 10.0;
+ bool foundOne = false;
+ for (int bit = 31; bit >= 0; bit--) {
+ if (!foundOne) {
+ if ((exp >> bit) & 1)
+ foundOne = true;
+ } else {
+ result = result * result;
+ if ((exp >> bit) & 1)
+ result = result * 10.0;
+ }
+ }
+
+ if (negative)
+ return static_cast<double>(1.0 / result);
+ return static_cast<double>(result);
+ }
+
bool m_sign;
int m_exponent;
DtoaBuffer m_significand;
diff --git a/JavaScriptCore/wtf/dtoa.cpp b/JavaScriptCore/wtf/dtoa.cpp
index 31ef51b..88e5692 100644
--- a/JavaScriptCore/wtf/dtoa.cpp
+++ b/JavaScriptCore/wtf/dtoa.cpp
@@ -2285,35 +2285,4 @@ ret:
*rve = s;
}
-double intPow10(int e)
-{
- // This function uses the "exponentiation by squaring" algorithm and
- // long double to quickly and precisely calculate integer powers of 10.0.
-
- // This is a handy workaround for <rdar://problem/4494756>
-
- if (!e)
- return 1.0;
-
- bool negative = e < 0;
- unsigned exp = negative ? -e : e;
-
- long double result = 10.0;
- bool foundOne = false;
- for (int bit = 31; bit >= 0; bit--) {
- if (!foundOne) {
- if ((exp >> bit) & 1)
- foundOne = true;
- } else {
- result = result * result;
- if ((exp >> bit) & 1)
- result = result * 10.0;
- }
- }
-
- if (negative)
- return static_cast<double>(1.0 / result);
- return static_cast<double>(result);
-}
-
} // namespace WTF
diff --git a/JavaScriptCore/wtf/dtoa.h b/JavaScriptCore/wtf/dtoa.h
index 43c343b..bf00ccc 100644
--- a/JavaScriptCore/wtf/dtoa.h
+++ b/JavaScriptCore/wtf/dtoa.h
@@ -35,7 +35,6 @@ double strtod(const char* s00, char** se);
typedef char DtoaBuffer[80];
void dtoa(DtoaBuffer result, double d, int ndigits, int* decpt, int* sign, char** rve);
-double intPow10(int);
} // namespace WTF
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list