mfbt/decimal/mfbt-abi-markers.patch

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/mfbt/decimal/mfbt-abi-markers.patch	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,150 @@
     1.4 +diff --git a/mfbt/decimal/Decimal.h b/mfbt/decimal/Decimal.h
     1.5 +--- a/mfbt/decimal/Decimal.h
     1.6 ++++ b/mfbt/decimal/Decimal.h
     1.7 +@@ -26,16 +26,18 @@
     1.8 +  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     1.9 +  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    1.10 +  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    1.11 +  */
    1.12 + 
    1.13 + #ifndef Decimal_h
    1.14 + #define Decimal_h
    1.15 + 
    1.16 ++#include "mozilla/Types.h"
    1.17 ++
    1.18 + #include <stdint.h>
    1.19 + #include <wtf/Assertions.h>
    1.20 + #include <wtf/text/WTFString.h>
    1.21 + 
    1.22 + namespace WebCore {
    1.23 + 
    1.24 + namespace DecimalPrivate {
    1.25 + class SpecialValueHandler;
    1.26 +@@ -88,92 +90,92 @@ public:
    1.27 +         FormatClass formatClass() const { return m_formatClass; }
    1.28 + 
    1.29 +         uint64_t m_coefficient;
    1.30 +         int16_t m_exponent;
    1.31 +         FormatClass m_formatClass;
    1.32 +         Sign m_sign;
    1.33 +     };
    1.34 + 
    1.35 +-    Decimal(int32_t = 0);
    1.36 +-    Decimal(Sign, int exponent, uint64_t coefficient);
    1.37 +-    Decimal(const Decimal&);
    1.38 ++    MFBT_API Decimal(int32_t = 0);
    1.39 ++    MFBT_API Decimal(Sign, int exponent, uint64_t coefficient);
    1.40 ++    MFBT_API Decimal(const Decimal&);
    1.41 + 
    1.42 +-    Decimal& operator=(const Decimal&);
    1.43 +-    Decimal& operator+=(const Decimal&);
    1.44 +-    Decimal& operator-=(const Decimal&);
    1.45 +-    Decimal& operator*=(const Decimal&);
    1.46 +-    Decimal& operator/=(const Decimal&);
    1.47 ++    MFBT_API Decimal& operator=(const Decimal&);
    1.48 ++    MFBT_API Decimal& operator+=(const Decimal&);
    1.49 ++    MFBT_API Decimal& operator-=(const Decimal&);
    1.50 ++    MFBT_API Decimal& operator*=(const Decimal&);
    1.51 ++    MFBT_API Decimal& operator/=(const Decimal&);
    1.52 + 
    1.53 +-    Decimal operator-() const;
    1.54 ++    MFBT_API Decimal operator-() const;
    1.55 + 
    1.56 +-    bool operator==(const Decimal&) const;
    1.57 +-    bool operator!=(const Decimal&) const;
    1.58 +-    bool operator<(const Decimal&) const;
    1.59 +-    bool operator<=(const Decimal&) const;
    1.60 +-    bool operator>(const Decimal&) const;
    1.61 +-    bool operator>=(const Decimal&) const;
    1.62 ++    MFBT_API bool operator==(const Decimal&) const;
    1.63 ++    MFBT_API bool operator!=(const Decimal&) const;
    1.64 ++    MFBT_API bool operator<(const Decimal&) const;
    1.65 ++    MFBT_API bool operator<=(const Decimal&) const;
    1.66 ++    MFBT_API bool operator>(const Decimal&) const;
    1.67 ++    MFBT_API bool operator>=(const Decimal&) const;
    1.68 + 
    1.69 +-    Decimal operator+(const Decimal&) const;
    1.70 +-    Decimal operator-(const Decimal&) const;
    1.71 +-    Decimal operator*(const Decimal&) const;
    1.72 +-    Decimal operator/(const Decimal&) const;
    1.73 ++    MFBT_API Decimal operator+(const Decimal&) const;
    1.74 ++    MFBT_API Decimal operator-(const Decimal&) const;
    1.75 ++    MFBT_API Decimal operator*(const Decimal&) const;
    1.76 ++    MFBT_API Decimal operator/(const Decimal&) const;
    1.77 + 
    1.78 +     int exponent() const
    1.79 +     {
    1.80 +         ASSERT(isFinite());
    1.81 +         return m_data.exponent();
    1.82 +     }
    1.83 + 
    1.84 +     bool isFinite() const { return m_data.isFinite(); }
    1.85 +     bool isInfinity() const { return m_data.isInfinity(); }
    1.86 +     bool isNaN() const { return m_data.isNaN(); }
    1.87 +     bool isNegative() const { return sign() == Negative; }
    1.88 +     bool isPositive() const { return sign() == Positive; }
    1.89 +     bool isSpecial() const { return m_data.isSpecial(); }
    1.90 +     bool isZero() const { return m_data.isZero(); }
    1.91 + 
    1.92 +-    Decimal abs() const;
    1.93 +-    Decimal ceiling() const;
    1.94 +-    Decimal floor() const;
    1.95 +-    Decimal remainder(const Decimal&) const;
    1.96 +-    Decimal round() const;
    1.97 ++    MFBT_API Decimal abs() const;
    1.98 ++    MFBT_API Decimal ceiling() const;
    1.99 ++    MFBT_API Decimal floor() const;
   1.100 ++    MFBT_API Decimal remainder(const Decimal&) const;
   1.101 ++    MFBT_API Decimal round() const;
   1.102 + 
   1.103 +-    double toDouble() const;
   1.104 ++    MFBT_API double toDouble() const;
   1.105 +     // Note: toString method supports infinity and nan but fromString not.
   1.106 +-    String toString() const;
   1.107 ++    MFBT_API String toString() const;
   1.108 + 
   1.109 +-    static Decimal fromDouble(double);
   1.110 ++    static MFBT_API Decimal fromDouble(double);
   1.111 +     // fromString supports following syntax EBNF:
   1.112 +     //  number ::= sign? digit+ ('.' digit*) (exponent-marker sign? digit+)?
   1.113 +     //          | sign? '.' digit+ (exponent-marker sign? digit+)?
   1.114 +     //  sign ::= '+' | '-'
   1.115 +     //  exponent-marker ::= 'e' | 'E'
   1.116 +     //  digit ::= '0' | '1' | ... | '9'
   1.117 +     // Note: fromString doesn't support "infinity" and "nan".
   1.118 +-    static Decimal fromString(const String&);
   1.119 +-    static Decimal infinity(Sign);
   1.120 +-    static Decimal nan();
   1.121 +-    static Decimal zero(Sign);
   1.122 ++    static MFBT_API Decimal fromString(const String&);
   1.123 ++    static MFBT_API Decimal infinity(Sign);
   1.124 ++    static MFBT_API Decimal nan();
   1.125 ++    static MFBT_API Decimal zero(Sign);
   1.126 + 
   1.127 +     // You should not use below methods. We expose them for unit testing.
   1.128 +-    explicit Decimal(const EncodedData&);
   1.129 ++    MFBT_API explicit Decimal(const EncodedData&);
   1.130 +     const EncodedData& value() const { return m_data; }
   1.131 + 
   1.132 + private:
   1.133 +     struct AlignedOperands {
   1.134 +         uint64_t lhsCoefficient;
   1.135 +         uint64_t rhsCoefficient;
   1.136 +         int exponent;
   1.137 +     };
   1.138 + 
   1.139 +-    Decimal(double);
   1.140 +-    Decimal compareTo(const Decimal&) const;
   1.141 ++    MFBT_API Decimal(double);
   1.142 ++    MFBT_API Decimal compareTo(const Decimal&) const;
   1.143 + 
   1.144 +-    static AlignedOperands alignOperands(const Decimal& lhs, const Decimal& rhs);
   1.145 ++    static MFBT_API AlignedOperands alignOperands(const Decimal& lhs, const Decimal& rhs);
   1.146 +     static inline Sign invertSign(Sign sign) { return sign == Negative ? Positive : Negative; }
   1.147 + 
   1.148 +     Sign sign() const { return m_data.sign(); }
   1.149 + 
   1.150 +     EncodedData m_data;
   1.151 + };
   1.152 + 
   1.153 + } // namespace WebCore

mercurial