add-mfbt-api-markers.patch 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. diff --git a/mfbt/double-conversion/double-conversion.h b/mfbt/double-conversion/double-conversion.h
  2. index f98edae..c62b16b 100644
  3. --- a/mfbt/double-conversion/double-conversion.h
  4. +++ b/mfbt/double-conversion/double-conversion.h
  5. @@ -28,6 +28,7 @@
  6. #ifndef DOUBLE_CONVERSION_DOUBLE_CONVERSION_H_
  7. #define DOUBLE_CONVERSION_DOUBLE_CONVERSION_H_
  8. +#include "mozilla/Types.h"
  9. #include "utils.h"
  10. namespace double_conversion {
  11. @@ -129,7 +130,7 @@ class DoubleToStringConverter {
  12. }
  13. // Returns a converter following the EcmaScript specification.
  14. - static const DoubleToStringConverter& EcmaScriptConverter();
  15. + static MFBT_API const DoubleToStringConverter& EcmaScriptConverter();
  16. // Computes the shortest string of digits that correctly represent the input
  17. // number. Depending on decimal_in_shortest_low and decimal_in_shortest_high
  18. @@ -197,7 +198,7 @@ class DoubleToStringConverter {
  19. // The last two conditions imply that the result will never contain more than
  20. // 1 + kMaxFixedDigitsBeforePoint + 1 + kMaxFixedDigitsAfterPoint characters
  21. // (one additional character for the sign, and one for the decimal point).
  22. - bool ToFixed(double value,
  23. + MFBT_API bool ToFixed(double value,
  24. int requested_digits,
  25. StringBuilder* result_builder) const;
  26. @@ -229,7 +230,7 @@ class DoubleToStringConverter {
  27. // kMaxExponentialDigits + 8 characters (the sign, the digit before the
  28. // decimal point, the decimal point, the exponent character, the
  29. // exponent's sign, and at most 3 exponent digits).
  30. - bool ToExponential(double value,
  31. + MFBT_API bool ToExponential(double value,
  32. int requested_digits,
  33. StringBuilder* result_builder) const;
  34. @@ -267,7 +268,7 @@ class DoubleToStringConverter {
  35. // The last condition implies that the result will never contain more than
  36. // kMaxPrecisionDigits + 7 characters (the sign, the decimal point, the
  37. // exponent character, the exponent's sign, and at most 3 exponent digits).
  38. - bool ToPrecision(double value,
  39. + MFBT_API bool ToPrecision(double value,
  40. int precision,
  41. StringBuilder* result_builder) const;
  42. @@ -292,7 +293,7 @@ class DoubleToStringConverter {
  43. // kBase10MaximalLength.
  44. // Note that DoubleToAscii null-terminates its input. So the given buffer
  45. // should be at least kBase10MaximalLength + 1 characters long.
  46. - static const int kBase10MaximalLength = 17;
  47. + static const MFBT_DATA int kBase10MaximalLength = 17;
  48. // Converts the given double 'v' to ascii. 'v' must not be NaN, +Infinity, or
  49. // -Infinity. In SHORTEST_SINGLE-mode this restriction also applies to 'v'
  50. @@ -332,7 +333,7 @@ class DoubleToStringConverter {
  51. // terminating null-character when computing the maximal output size.
  52. // The given length is only used in debug mode to ensure the buffer is big
  53. // enough.
  54. - static void DoubleToAscii(double v,
  55. + static MFBT_API void DoubleToAscii(double v,
  56. DtoaMode mode,
  57. int requested_digits,
  58. char* buffer,
  59. @@ -343,7 +344,7 @@ class DoubleToStringConverter {
  60. private:
  61. // Implementation for ToShortest and ToShortestSingle.
  62. - bool ToShortestIeeeNumber(double value,
  63. + MFBT_API bool ToShortestIeeeNumber(double value,
  64. StringBuilder* result_builder,
  65. DtoaMode mode) const;
  66. @@ -351,15 +352,15 @@ class DoubleToStringConverter {
  67. // corresponding string using the configured infinity/nan-symbol.
  68. // If either of them is NULL or the value is not special then the
  69. // function returns false.
  70. - bool HandleSpecialValues(double value, StringBuilder* result_builder) const;
  71. + MFBT_API bool HandleSpecialValues(double value, StringBuilder* result_builder) const;
  72. // Constructs an exponential representation (i.e. 1.234e56).
  73. // The given exponent assumes a decimal point after the first decimal digit.
  74. - void CreateExponentialRepresentation(const char* decimal_digits,
  75. + MFBT_API void CreateExponentialRepresentation(const char* decimal_digits,
  76. int length,
  77. int exponent,
  78. StringBuilder* result_builder) const;
  79. // Creates a decimal representation (i.e 1234.5678).
  80. - void CreateDecimalRepresentation(const char* decimal_digits,
  81. + MFBT_API void CreateDecimalRepresentation(const char* decimal_digits,
  82. int length,
  83. int decimal_point,
  84. int digits_after_point,