Skip to content

Commit

Permalink
Bug 1332797 - Move mfbt/double-conversion source files into a new sou…
Browse files Browse the repository at this point in the history
…rce/ subdirectory, to segregate upstream files from update.sh and our local patches. r=froydnj
  • Loading branch information
jswalden committed Jan 23, 2017
1 parent 2d1ff09 commit ec15fbf
Show file tree
Hide file tree
Showing 33 changed files with 50 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .clang-format-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
^media/webrtc/trunk/.*
^memory/jemalloc/src/.*
^mfbt/decimal/.*
^mfbt/double-conversion/.*
^mfbt/double-conversion/source/.*
^mfbt/lz4.*
^mobile/android/thirdparty/.*
^modules/brotli/.*
Expand Down
4 changes: 2 additions & 2 deletions mfbt/STYLE
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ MFBT uses standard Mozilla style, with the following exceptions.
codebase. However, new files should follow standard Mozilla style and use an
upper-case letter at the start of function names.

- Imported third-party code (such as decimal/*, double-conversion/*, and lz4*)
remains in its original style.
- Imported third-party code (such as decimal/*, double-conversion/source/*, and
lz4*) remains in its original style.
2 changes: 1 addition & 1 deletion mfbt/decimal/moz-decimal-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// of Decimal.cpp under the Mozilla source without blink core dependencies. Do
// not include it into any file other than Decimal.cpp.

#include "../double-conversion/double-conversion.h"
#include "../double-conversion/source/double-conversion.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/Casting.h"
#include "mozilla/FloatingPoint.h"
Expand Down
12 changes: 6 additions & 6 deletions mfbt/double-conversion/ToPrecision-exponential.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
1e7bf0c636b8cca54dd83456a0f8fa219343e2a1 Bug 608195 - part 2 - extend ToPrecision to tell use whether exponential notation was used
diff --git a/mfbt/double-conversion/double-conversion.cc b/mfbt/double-conversion/double-conversion.cc
diff --git a/mfbt/double-conversion/source/double-conversion.cc b/mfbt/double-conversion/source/double-conversion.cc
index febba6c..394b6a0 100644
--- a/mfbt/double-conversion/double-conversion.cc
+++ b/mfbt/double-conversion/double-conversion.cc
--- a/mfbt/double-conversion/source/double-conversion.cc
+++ b/mfbt/double-conversion/source/double-conversion.cc
@@ -283,7 +283,9 @@ bool DoubleToStringConverter::ToExponential(

bool DoubleToStringConverter::ToPrecision(double value,
Expand All @@ -21,10 +21,10 @@ index febba6c..394b6a0 100644
CreateExponentialRepresentation(decimal_rep,
precision,
exponent,
diff --git a/mfbt/double-conversion/double-conversion.h b/mfbt/double-conversion/double-conversion.h
diff --git a/mfbt/double-conversion/source/double-conversion.h b/mfbt/double-conversion/source/double-conversion.h
index 0900ba0..957575c 100644
--- a/mfbt/double-conversion/double-conversion.h
+++ b/mfbt/double-conversion/double-conversion.h
--- a/mfbt/double-conversion/source/double-conversion.h
+++ b/mfbt/double-conversion/source/double-conversion.h
@@ -270,6 +270,7 @@ class DoubleToStringConverter {
// exponent character, the exponent's sign, and at most 3 exponent digits).
MFBT_API bool ToPrecision(double value,
Expand Down
6 changes: 3 additions & 3 deletions mfbt/double-conversion/add-mfbt-api-markers.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/mfbt/double-conversion/double-conversion.h b/mfbt/double-conversion/double-conversion.h
diff --git a/mfbt/double-conversion/source/double-conversion.h b/mfbt/double-conversion/source/double-conversion.h
index f98edae..c62b16b 100644
--- a/mfbt/double-conversion/double-conversion.h
+++ b/mfbt/double-conversion/double-conversion.h
--- a/mfbt/double-conversion/source/double-conversion.h
+++ b/mfbt/double-conversion/source/double-conversion.h
@@ -28,6 +28,7 @@
#ifndef DOUBLE_CONVERSION_DOUBLE_CONVERSION_H_
#define DOUBLE_CONVERSION_DOUBLE_CONVERSION_H_
Expand Down
12 changes: 6 additions & 6 deletions mfbt/double-conversion/fix-Wshadow-issues.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff --git a/mfbt/double-conversion/strtod.cc b/mfbt/double-conversion/strtod.cc
--- a/mfbt/double-conversion/strtod.cc
+++ b/mfbt/double-conversion/strtod.cc
diff --git a/mfbt/double-conversion/source/strtod.cc b/mfbt/double-conversion/source/strtod.cc
--- a/mfbt/double-conversion/source/strtod.cc
+++ b/mfbt/double-conversion/source/strtod.cc
@@ -510,16 +510,17 @@ float Strtof(Vector<const char> buffer,
float f3 = static_cast<float>(double_next);
float f4;
Expand All @@ -19,9 +19,9 @@ diff --git a/mfbt/double-conversion/strtod.cc b/mfbt/double-conversion/strtod.cc
return float_guess;
}

diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
--- a/mfbt/double-conversion/utils.h
+++ b/mfbt/double-conversion/utils.h
diff --git a/mfbt/double-conversion/source/utils.h b/mfbt/double-conversion/source/utils.h
--- a/mfbt/double-conversion/source/utils.h
+++ b/mfbt/double-conversion/source/utils.h
@@ -55,17 +55,17 @@
#if defined(_M_X64) || defined(__x86_64__) || \
defined(__ARMEL__) || defined(__avr32__) || \
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 11 additions & 10 deletions mfbt/double-conversion/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,28 @@ if [ "$1" != "" ]; then
fi

# First clear out everything already present.
rm -rf ./*

# Restore non-upstream files
hg revert update.sh
hg revert $LOCAL_PATCHES
DEST=./source
rm -rf "$DEST"
mkdir "$DEST"

# Copy over critical files.
cp "$LOCAL_CLONE/LICENSE" ./
cp "$LOCAL_CLONE/README" ./
cp "$LOCAL_CLONE/LICENSE" "$DEST/"
cp "$LOCAL_CLONE/README" "$DEST/"

# Includes
for header in "$LOCAL_CLONE/src/"*.h; do
cp "$header" ./
cp "$header" "$DEST/"
done

# Source
for ccfile in "$LOCAL_CLONE/src/"*.cc; do
cp "$ccfile" ./
cp "$ccfile" "$DEST/"
done

# Now apply our local patches.
for patch in $LOCAL_PATCHES; do
patch -p3 < "$patch"
patch --directory "$DEST" --strip 4 < "$patch"
done

# Update Mercurial file status.
hg addremove "$DEST"
6 changes: 3 additions & 3 deletions mfbt/double-conversion/use-StandardInteger.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
diff --git a/mfbt/double-conversion/source/utils.h b/mfbt/double-conversion/source/utils.h
index cd3e330..bdc7d4b 100644
--- a/mfbt/double-conversion/utils.h
+++ b/mfbt/double-conversion/utils.h
--- a/mfbt/double-conversion/source/utils.h
+++ b/mfbt/double-conversion/source/utils.h
@@ -74,23 +74,7 @@
#endif

Expand Down
6 changes: 3 additions & 3 deletions mfbt/double-conversion/use-mozilla-assertions.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
--- a/mfbt/double-conversion/utils.h
+++ b/mfbt/double-conversion/utils.h
diff --git a/mfbt/double-conversion/source/utils.h b/mfbt/double-conversion/source/utils.h
--- a/mfbt/double-conversion/source/utils.h
+++ b/mfbt/double-conversion/source/utils.h
@@ -31,15 +31,15 @@
#include <stdlib.h>
#include <string.h>
Expand Down
6 changes: 3 additions & 3 deletions mfbt/double-conversion/use-static_assert.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
--- a/mfbt/double-conversion/utils.h
+++ b/mfbt/double-conversion/utils.h
diff --git a/mfbt/double-conversion/source/utils.h b/mfbt/double-conversion/source/utils.h
--- a/mfbt/double-conversion/source/utils.h
+++ b/mfbt/double-conversion/source/utils.h
@@ -275,19 +275,18 @@ class StringBuilder {
// There is an additional use for BitCast.
// Recent gccs will warn when they see casts that may result in breakage due to
Expand Down
4 changes: 2 additions & 2 deletions mfbt/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ EXPORTS.mozilla = [
'Compression.h',
'DebugOnly.h',
'decimal/Decimal.h',
'double-conversion/double-conversion.h',
'double-conversion/utils.h',
'double-conversion/source/double-conversion.h',
'double-conversion/source/utils.h',
'EndianUtils.h',
'EnumeratedArray.h',
'EnumeratedRange.h',
Expand Down
16 changes: 8 additions & 8 deletions mfbt/objs.mozbuild
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
mfbt_src_lcppsrcs = [
'Assertions.cpp',
'ChaosMode.cpp',
'double-conversion/bignum-dtoa.cc',
'double-conversion/bignum.cc',
'double-conversion/cached-powers.cc',
'double-conversion/diy-fp.cc',
'double-conversion/double-conversion.cc',
'double-conversion/fast-dtoa.cc',
'double-conversion/fixed-dtoa.cc',
'double-conversion/strtod.cc',
'double-conversion/source/bignum-dtoa.cc',
'double-conversion/source/bignum.cc',
'double-conversion/source/cached-powers.cc',
'double-conversion/source/diy-fp.cc',
'double-conversion/source/double-conversion.cc',
'double-conversion/source/fast-dtoa.cc',
'double-conversion/source/fixed-dtoa.cc',
'double-conversion/source/strtod.cc',
'FloatingPoint.cpp',
'HashFunctions.cpp',
'JSONWriter.cpp',
Expand Down
2 changes: 1 addition & 1 deletion tools/rewriting/ThirdPartyPaths.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ media/sphinxbase/
media/webrtc/trunk/
memory/jemalloc/src/
mfbt/decimal/
mfbt/double-conversion/
mfbt/double-conversion/source/
mfbt/lz4
mobile/android/thirdparty/
modules/brotli/
Expand Down

0 comments on commit ec15fbf

Please sign in to comment.