Reviewed by Sam Weinig.
* wtf/DateMath.cpp: Remove some unused constants.
* wtf/FastMalloc.cpp: #if some constants and functions that are unused in some configurations.
Remove a function that's unused on all platforms.
* wtf/TCSystemAlloc.cpp: Remove some unused constants.
(TCMalloc_SystemRelease): Remove an if whose body is never executed.
* wtf/dtoa.cpp: #if things such that storeInc is only defined when USE_LONG_LONG is undefined.
Remove an unused constant.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156596
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-09-28 Mark Rowe <mrowe@apple.com>
+
+ <rdar://problem/15079224> WTF fails to build with newer versions of clang.
+
+ Reviewed by Sam Weinig.
+
+ * wtf/DateMath.cpp: Remove some unused constants.
+ * wtf/FastMalloc.cpp: #if some constants and functions that are unused in some configurations.
+ Remove a function that's unused on all platforms.
+ * wtf/TCSystemAlloc.cpp: Remove some unused constants.
+ (TCMalloc_SystemRelease): Remove an if whose body is never executed.
+ * wtf/dtoa.cpp: #if things such that storeInc is only defined when USE_LONG_LONG is undefined.
+ Remove an unused constant.
+
2013-09-27 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[Nix] Updating Nix trunk files
/* Constants */
-static const double minutesPerDay = 24.0 * 60.0;
-static const double secondsPerYear = 24.0 * 60.0 * 60.0 * 365.0;
-
-static const double usecPerSec = 1000000.0;
-
static const double maxUnixTime = 2145859200.0; // 12/31/2037
// ECMAScript asks not to support for a date of which total
// millisecond value is larger than the following value.
#define MESSAGE LOG_ERROR
#define CHECK_CONDITION ASSERT
+#if !OS(DARWIN)
static const char kLLHardeningMask = 0;
+#endif
+
template <unsigned> struct EntropySource;
template <> struct EntropySource<4> {
static uint32_t value()
*head = start;
}
-static ALWAYS_INLINE size_t SLL_Size(HardenedSLL head, uintptr_t entropy) {
- int count = 0;
- while (head) {
- count++;
- head = SLL_Next(head, entropy);
- }
- return count;
-}
-
// Setup helper functions.
static ALWAYS_INLINE size_t SizeClass(size_t size) {
}
#endif
+#if !ASSERT_DISABLED
static inline bool CheckCachedSizeClass(void *ptr) {
PageID p = reinterpret_cast<uintptr_t>(ptr) >> kPageShift;
size_t cached_value = pageheap->GetSizeClassIfCached(p);
return cached_value == 0 ||
cached_value == pageheap->GetDescriptor(p)->sizeclass;
}
+#endif
static inline void* CheckedMallocResult(void *result)
{
static inline void do_malloc_stats() {
PrintStats(1);
}
-#endif
static inline int do_mallopt(int, int) {
return 1; // Indicates error
}
+#endif
#ifdef HAVE_STRUCT_MALLINFO // mallinfo isn't defined on freebsd, for instance
static inline struct mallinfo do_mallinfo() {
DEFINE_int32(malloc_devmem_limit, 0,
"Physical memory limit location in MB for /dev/mem allocation."
" Setting this to 0 means no limit.");
-#else
-static const int32_t FLAGS_malloc_devmem_start = 0;
-static const int32_t FLAGS_malloc_devmem_limit = 0;
#endif
#ifndef WTF_CHANGES
#else
const int advice = MADV_DONTNEED;
#endif
- if (FLAGS_malloc_devmem_start) {
- // It's not safe to use MADV_DONTNEED if we've been mapping
- // /dev/mem for heap memory
- return;
- }
if (pagesize == 0) pagesize = getpagesize();
const size_t pagemask = pagesize - 1;
#pragma warning(disable: 4554)
#endif
+#if CPU(PPC64) || CPU(X86_64)
+// FIXME: should we enable this on all 64-bit CPUs?
+// 64-bit emulation provided by the compiler is likely to be slower than dtoa own code on 32-bit hardware.
+#define USE_LONG_LONG
+#endif
+
namespace WTF {
Mutex* s_dtoaP5Mutex;
#endif
#define dval(x) (x)->d
+#ifndef USE_LONG_LONG
/* The following definition of Storeinc is appropriate for MIPS processors.
* An alternative that might be better on some machines is
* *p++ = high << 16 | low & 0xffff;
return p + 1;
}
+#endif // USE_LONG_LONG
+
#define Exp_shift 20
#define Exp_shift1 20
#define Exp_msk1 0x100000
#define Big0 (Frac_mask1 | Exp_msk1 * (DBL_MAX_EXP + Bias - 1))
#define Big1 0xffffffff
-#if CPU(PPC64) || CPU(X86_64)
-// FIXME: should we enable this on all 64-bit CPUs?
-// 64-bit emulation provided by the compiler is likely to be slower than dtoa own code on 32-bit hardware.
-#define USE_LONG_LONG
-#endif
-
struct BigInt {
BigInt() : sign(0) { }
int sign;
};
static const double bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 };
-static const double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128,
- 9007199254740992. * 9007199254740992.e-256
- /* = 2^106 * 1e-256 */
-};
-/* The factor of 2^53 in tinytens[4] helps us avoid setting the underflow */
-/* flag unnecessarily. It leads to a song and dance at the end of strtod. */
#define Scale_Bit 0x10
#define n_bigtens 5