diff --git a/mfbt/double-conversion/bignum.cc b/mfbt/double-conversion/bignum.cc index 747491a0897..dc8a2a63e77 100644 --- a/mfbt/double-conversion/bignum.cc +++ b/mfbt/double-conversion/bignum.cc @@ -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(); } diff --git a/mfbt/double-conversion/double-conversion.cc b/mfbt/double-conversion/double-conversion.cc index a79fe92d225..febba6cd782 100644 --- a/mfbt/double-conversion/double-conversion.cc +++ b/mfbt/double-conversion/double-conversion.cc @@ -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; diff --git a/mfbt/double-conversion/double-conversion.h b/mfbt/double-conversion/double-conversion.h index c62b16b6758..0900ba0060b 100644 --- a/mfbt/double-conversion/double-conversion.h +++ b/mfbt/double-conversion/double-conversion.h @@ -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(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); }; diff --git a/mfbt/double-conversion/update.sh b/mfbt/double-conversion/update.sh index 43091e31253..7bb417c3364 100755 --- a/mfbt/double-conversion/update.sh +++ b/mfbt/double-conversion/update.sh @@ -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 diff --git a/mfbt/double-conversion/use-StandardInteger.patch b/mfbt/double-conversion/use-StandardInteger.patch index 6cd49b3bcec..755dd1b9e3f 100644 --- a/mfbt/double-conversion/use-StandardInteger.patch +++ b/mfbt/double-conversion/use-StandardInteger.patch @@ -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 diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h index 0eec2d91775..6d67729b23f 100644 --- a/mfbt/double-conversion/utils.h +++ b/mfbt/double-conversion/utils.h @@ -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)