Bug 878925 - Update double-conversion to latest git revision. r=jwalden

--HG--
extra : rebase_source : 01275cc88cfb119f231ba83cfec0579bc11edfe1
This commit is contained in:
Emanuel Hoogeveen 2013-06-27 16:25:32 -07:00
parent 018da76624
commit 80348e936e
6 changed files with 12 additions and 11 deletions

View File

@ -501,8 +501,8 @@ uint16_t Bignum::DivideModuloIntBignum(const Bignum& other) {
// Start by removing multiples of 'other' until both numbers have the same
// number of digits.
while (BigitLength() > other.BigitLength()) {
// This naive approach is extremely inefficient if the this divided other
// might be big. This function is implemented for doubleToString where
// This naive approach is extremely inefficient if `this` divided by other
// is big. This function is implemented for doubleToString where
// the result should be small (less than 10).
ASSERT(other.bigits_[other.used_digits_ - 1] >= ((1 << kBigitSize) / 16));
// Remove the multiples of the first digit.
@ -755,7 +755,6 @@ void Bignum::SubtractTimes(const Bignum& other, int factor) {
Chunk difference = bigits_[i] - borrow;
bigits_[i] = difference & kBigitMask;
borrow = difference >> (kChunkSize - 1);
++i;
}
Clamp();
}

View File

@ -577,7 +577,7 @@ double StringToDoubleConverter::StringToIeee(
const char* input,
int length,
int* processed_characters_count,
bool read_as_double) {
bool read_as_double) const {
const char* current = input;
const char* end = input + length;

View File

@ -503,7 +503,7 @@ class StringToDoubleConverter {
// in the 'processed_characters_count'. Trailing junk is never included.
double StringToDouble(const char* buffer,
int length,
int* processed_characters_count) {
int* processed_characters_count) const {
return StringToIeee(buffer, length, processed_characters_count, true);
}
@ -512,7 +512,7 @@ class StringToDoubleConverter {
// due to potential double-rounding.
float StringToFloat(const char* buffer,
int length,
int* processed_characters_count) {
int* processed_characters_count) const {
return static_cast<float>(StringToIeee(buffer, length,
processed_characters_count, false));
}
@ -527,7 +527,7 @@ class StringToDoubleConverter {
double StringToIeee(const char* buffer,
int length,
int* processed_characters_count,
bool read_as_double);
bool read_as_double) const;
DISALLOW_IMPLICIT_CONSTRUCTORS(StringToDoubleConverter);
};

View File

@ -3,7 +3,7 @@
# Copies the needed files from a directory containing the original
# double-conversion source that we need.
# This was last updated with git rev e5b34421b763f7bf7e4f9081403db417d5a55a36.
# This was last updated with git rev 04cae7a8d5ef3d62ceffb03cdc3d38f258457a52.
set -e

View File

@ -2,7 +2,7 @@ diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
index cd3e330..bdc7d4b 100644
--- a/mfbt/double-conversion/utils.h
+++ b/mfbt/double-conversion/utils.h
@@ -68,23 +68,7 @@
@@ -74,23 +74,7 @@
#endif

View File

@ -55,10 +55,12 @@
#if defined(_M_X64) || defined(__x86_64__) || \
defined(__ARMEL__) || defined(__avr32__) || \
defined(__hppa__) || defined(__ia64__) || \
defined(__mips__) || defined(__powerpc__) || \
defined(__mips__) || \
defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
defined(__SH4__) || defined(__alpha__) || \
defined(_MIPS_ARCH_MIPS32R2)
defined(_MIPS_ARCH_MIPS32R2) || \
defined(_AARCH64EL_)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
#elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
#if defined(_WIN32)