OLD | NEW |
1 /**************************************************************** | 1 /**************************************************************** |
2 * | 2 * |
3 * The author of this software is David M. Gay. | 3 * The author of this software is David M. Gay. |
4 * | 4 * |
5 * Copyright (c) 1991, 2000, 2001 by Lucent Technologies. | 5 * Copyright (c) 1991, 2000, 2001 by Lucent Technologies. |
6 * Copyright (C) 2002, 2005, 2006, 2007, 2008, 2010, 2012 Apple Inc. All rights
reserved. | 6 * Copyright (C) 2002, 2005, 2006, 2007, 2008, 2010, 2012 Apple Inc. All rights
reserved. |
7 * | 7 * |
8 * Permission to use, copy, modify, and distribute this software for any | 8 * Permission to use, copy, modify, and distribute this software for any |
9 * purpose without fee is hereby granted, provided that this entire notice | 9 * purpose without fee is hereby granted, provided that this entire notice |
10 * is included in all copies of any software which is or includes a copy | 10 * is included in all copies of any software which is or includes a copy |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 #define Tiny1 1 | 106 #define Tiny1 1 |
107 #define Quick_max 14 | 107 #define Quick_max 14 |
108 #define Int_max 14 | 108 #define Int_max 14 |
109 | 109 |
110 #define rounded_product(a, b) a *= b | 110 #define rounded_product(a, b) a *= b |
111 #define rounded_quotient(a, b) a /= b | 111 #define rounded_quotient(a, b) a /= b |
112 | 112 |
113 #define Big0 (Frac_mask1 | Exp_msk1 * (DBL_MAX_EXP + Bias - 1)) | 113 #define Big0 (Frac_mask1 | Exp_msk1 * (DBL_MAX_EXP + Bias - 1)) |
114 #define Big1 0xffffffff | 114 #define Big1 0xffffffff |
115 | 115 |
116 #if CPU(PPC64) || CPU(X86_64) | 116 #if CPU(X86_64) |
117 // FIXME: should we enable this on all 64-bit CPUs? | 117 // FIXME: should we enable this on all 64-bit CPUs? |
118 // 64-bit emulation provided by the compiler is likely to be slower than dtoa ow
n code on 32-bit hardware. | 118 // 64-bit emulation provided by the compiler is likely to be slower than dtoa ow
n code on 32-bit hardware. |
119 #define USE_LONG_LONG | 119 #define USE_LONG_LONG |
120 #endif | 120 #endif |
121 | 121 |
122 struct BigInt { | 122 struct BigInt { |
123 BigInt() : sign(0) { } | 123 BigInt() : sign(0) { } |
124 int sign; | 124 int sign; |
125 | 125 |
126 void clear() | 126 void clear() |
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1305 { | 1305 { |
1306 Vector<LChar> conversionBuffer(length); | 1306 Vector<LChar> conversionBuffer(length); |
1307 for (size_t i = 0; i < length; ++i) | 1307 for (size_t i = 0; i < length; ++i) |
1308 conversionBuffer[i] = isASCII(string[i]) ? string[i] : 0; | 1308 conversionBuffer[i] = isASCII(string[i]) ? string[i] : 0; |
1309 return parseDouble(conversionBuffer.data(), length, parsedLength); | 1309 return parseDouble(conversionBuffer.data(), length, parsedLength); |
1310 } | 1310 } |
1311 | 1311 |
1312 } // namespace Internal | 1312 } // namespace Internal |
1313 | 1313 |
1314 } // namespace WTF | 1314 } // namespace WTF |
OLD | NEW |