mfbt/double-conversion/add-mfbt-api-markers.patch
author James Graham <james@hoppipolla.co.uk>
Thu, 24 Sep 2015 14:51:19 +0100
changeset 264851 84c62ba95e198b4ff851b07499209e9a57687273
parent 111825 b511cc69f71774e42589f1fd843006d230e3cd13
child 331778 89b895c219f2b97fc0ded8877b30c337e697bdaa
permissions -rw-r--r--
Bug 1209297 - Update web-platform-tests expected data to revision 2869a58fd81da41f9f904441ff39f9398fba53bc, a=testonly

diff --git a/mfbt/double-conversion/double-conversion.h b/mfbt/double-conversion/double-conversion.h
index f98edae..c62b16b 100644
--- a/mfbt/double-conversion/double-conversion.h
+++ b/mfbt/double-conversion/double-conversion.h
@@ -28,6 +28,7 @@
 #ifndef DOUBLE_CONVERSION_DOUBLE_CONVERSION_H_
 #define DOUBLE_CONVERSION_DOUBLE_CONVERSION_H_
 
+#include "mozilla/Types.h"
 #include "utils.h"
 
 namespace double_conversion {
@@ -129,7 +130,7 @@ class DoubleToStringConverter {
   }
 
   // Returns a converter following the EcmaScript specification.
-  static const DoubleToStringConverter& EcmaScriptConverter();
+  static MFBT_API const DoubleToStringConverter& EcmaScriptConverter();
 
   // Computes the shortest string of digits that correctly represent the input
   // number. Depending on decimal_in_shortest_low and decimal_in_shortest_high
@@ -197,7 +198,7 @@ class DoubleToStringConverter {
   // The last two conditions imply that the result will never contain more than
   // 1 + kMaxFixedDigitsBeforePoint + 1 + kMaxFixedDigitsAfterPoint characters
   // (one additional character for the sign, and one for the decimal point).
-  bool ToFixed(double value,
+  MFBT_API bool ToFixed(double value,
                int requested_digits,
                StringBuilder* result_builder) const;
 
@@ -229,7 +230,7 @@ class DoubleToStringConverter {
   // kMaxExponentialDigits + 8 characters (the sign, the digit before the
   // decimal point, the decimal point, the exponent character, the
   // exponent's sign, and at most 3 exponent digits).
-  bool ToExponential(double value,
+  MFBT_API bool ToExponential(double value,
                      int requested_digits,
                      StringBuilder* result_builder) const;
 
@@ -267,7 +268,7 @@ class DoubleToStringConverter {
   // The last condition implies that the result will never contain more than
   // kMaxPrecisionDigits + 7 characters (the sign, the decimal point, the
   // exponent character, the exponent's sign, and at most 3 exponent digits).
-  bool ToPrecision(double value,
+  MFBT_API bool ToPrecision(double value,
                    int precision,
                    StringBuilder* result_builder) const;
 
@@ -292,7 +293,7 @@ class DoubleToStringConverter {
   // kBase10MaximalLength.
   // Note that DoubleToAscii null-terminates its input. So the given buffer
   // should be at least kBase10MaximalLength + 1 characters long.
-  static const int kBase10MaximalLength = 17;
+  static const MFBT_DATA int kBase10MaximalLength = 17;
 
   // Converts the given double 'v' to ascii. 'v' must not be NaN, +Infinity, or
   // -Infinity. In SHORTEST_SINGLE-mode this restriction also applies to 'v'
@@ -332,7 +333,7 @@ class DoubleToStringConverter {
   // terminating null-character when computing the maximal output size.
   // The given length is only used in debug mode to ensure the buffer is big
   // enough.
-  static void DoubleToAscii(double v,
+  static MFBT_API void DoubleToAscii(double v,
                             DtoaMode mode,
                             int requested_digits,
                             char* buffer,
@@ -343,7 +344,7 @@ class DoubleToStringConverter {
 
  private:
   // Implementation for ToShortest and ToShortestSingle.
-  bool ToShortestIeeeNumber(double value,
+  MFBT_API bool ToShortestIeeeNumber(double value,
                             StringBuilder* result_builder,
                             DtoaMode mode) const;
 
@@ -351,15 +352,15 @@ class DoubleToStringConverter {
   // corresponding string using the configured infinity/nan-symbol.
   // If either of them is NULL or the value is not special then the
   // function returns false.
-  bool HandleSpecialValues(double value, StringBuilder* result_builder) const;
+  MFBT_API bool HandleSpecialValues(double value, StringBuilder* result_builder) const;
   // Constructs an exponential representation (i.e. 1.234e56).
   // The given exponent assumes a decimal point after the first decimal digit.
-  void CreateExponentialRepresentation(const char* decimal_digits,
+  MFBT_API void CreateExponentialRepresentation(const char* decimal_digits,
                                        int length,
                                        int exponent,
                                        StringBuilder* result_builder) const;
   // Creates a decimal representation (i.e 1234.5678).
-  void CreateDecimalRepresentation(const char* decimal_digits,
+  MFBT_API void CreateDecimalRepresentation(const char* decimal_digits,
                                    int length,
                                    int decimal_point,
                                    int digits_after_point,