1
diff --git a/mfbt/double-conversion/double-conversion.h b/mfbt/double-conversion/double-conversion.h
2
index f98edae..e536a01 100644
3
--- a/mfbt/double-conversion/double-conversion.h
4
+++ b/mfbt/double-conversion/double-conversion.h
6
#ifndef DOUBLE_CONVERSION_DOUBLE_CONVERSION_H_
7
#define DOUBLE_CONVERSION_DOUBLE_CONVERSION_H_
9
+#include "mozilla/Types.h"
12
namespace double_conversion {
13
@@ -129,7 +130,7 @@ class DoubleToStringConverter {
16
// Returns a converter following the EcmaScript specification.
17
- static const DoubleToStringConverter& EcmaScriptConverter();
18
+ static MFBT_API(const DoubleToStringConverter&) EcmaScriptConverter();
20
// Computes the shortest string of digits that correctly represent the input
21
// number. Depending on decimal_in_shortest_low and decimal_in_shortest_high
22
@@ -154,12 +155,12 @@ class DoubleToStringConverter {
23
// Returns true if the conversion succeeds. The conversion always succeeds
24
// except when the input value is special and no infinity_symbol or
25
// nan_symbol has been given to the constructor.
26
- bool ToShortest(double value, StringBuilder* result_builder) const {
27
+ MFBT_API(bool) ToShortest(double value, StringBuilder* result_builder) const {
28
return ToShortestIeeeNumber(value, result_builder, SHORTEST);
31
// Same as ToShortest, but for single-precision floats.
32
- bool ToShortestSingle(float value, StringBuilder* result_builder) const {
33
+ MFBT_API(bool) ToShortestSingle(float value, StringBuilder* result_builder) const {
34
return ToShortestIeeeNumber(value, result_builder, SHORTEST_SINGLE);
37
@@ -197,7 +198,7 @@ class DoubleToStringConverter {
38
// The last two conditions imply that the result will never contain more than
39
// 1 + kMaxFixedDigitsBeforePoint + 1 + kMaxFixedDigitsAfterPoint characters
40
// (one additional character for the sign, and one for the decimal point).
41
- bool ToFixed(double value,
42
+ MFBT_API(bool) ToFixed(double value,
44
StringBuilder* result_builder) const;
46
@@ -229,7 +230,7 @@ class DoubleToStringConverter {
47
// kMaxExponentialDigits + 8 characters (the sign, the digit before the
48
// decimal point, the decimal point, the exponent character, the
49
// exponent's sign, and at most 3 exponent digits).
50
- bool ToExponential(double value,
51
+ MFBT_API(bool) ToExponential(double value,
53
StringBuilder* result_builder) const;
55
@@ -267,7 +268,7 @@ class DoubleToStringConverter {
56
// The last condition implies that the result will never contain more than
57
// kMaxPrecisionDigits + 7 characters (the sign, the decimal point, the
58
// exponent character, the exponent's sign, and at most 3 exponent digits).
59
- bool ToPrecision(double value,
60
+ MFBT_API(bool) ToPrecision(double value,
62
StringBuilder* result_builder) const;
64
@@ -292,7 +293,7 @@ class DoubleToStringConverter {
65
// kBase10MaximalLength.
66
// Note that DoubleToAscii null-terminates its input. So the given buffer
67
// should be at least kBase10MaximalLength + 1 characters long.
68
- static const int kBase10MaximalLength = 17;
69
+ static const MFBT_DATA(int) kBase10MaximalLength = 17;
71
// Converts the given double 'v' to ascii. 'v' must not be NaN, +Infinity, or
72
// -Infinity. In SHORTEST_SINGLE-mode this restriction also applies to 'v'
73
@@ -332,7 +333,7 @@ class DoubleToStringConverter {
74
// terminating null-character when computing the maximal output size.
75
// The given length is only used in debug mode to ensure the buffer is big
77
- static void DoubleToAscii(double v,
78
+ static MFBT_API(void) DoubleToAscii(double v,
82
@@ -343,7 +344,7 @@ class DoubleToStringConverter {
85
// Implementation for ToShortest and ToShortestSingle.
86
- bool ToShortestIeeeNumber(double value,
87
+ MFBT_API(bool) ToShortestIeeeNumber(double value,
88
StringBuilder* result_builder,
91
@@ -351,15 +352,15 @@ class DoubleToStringConverter {
92
// corresponding string using the configured infinity/nan-symbol.
93
// If either of them is NULL or the value is not special then the
94
// function returns false.
95
- bool HandleSpecialValues(double value, StringBuilder* result_builder) const;
96
+ MFBT_API(bool) HandleSpecialValues(double value, StringBuilder* result_builder) const;
97
// Constructs an exponential representation (i.e. 1.234e56).
98
// The given exponent assumes a decimal point after the first decimal digit.
99
- void CreateExponentialRepresentation(const char* decimal_digits,
100
+ MFBT_API(void) CreateExponentialRepresentation(const char* decimal_digits,
103
StringBuilder* result_builder) const;
104
// Creates a decimal representation (i.e 1234.5678).
105
- void CreateDecimalRepresentation(const char* decimal_digits,
106
+ MFBT_API(void) CreateDecimalRepresentation(const char* decimal_digits,
109
int digits_after_point,