OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 Bignum(); | 42 Bignum(); |
43 void AssignUInt16(uint16_t value); | 43 void AssignUInt16(uint16_t value); |
44 void AssignUInt64(uint64_t value); | 44 void AssignUInt64(uint64_t value); |
45 void AssignBignum(const Bignum& other); | 45 void AssignBignum(const Bignum& other); |
46 | 46 |
47 void AssignDecimalString(Vector<const char> value); | 47 void AssignDecimalString(Vector<const char> value); |
48 void AssignHexString(Vector<const char> value); | 48 void AssignHexString(Vector<const char> value); |
49 | 49 |
50 void AssignPowerUInt16(uint16_t base, int exponent); | 50 void AssignPowerUInt16(uint16_t base, int exponent); |
51 | 51 |
52 void AddUInt16(uint16_t operand); | |
53 void AddUInt64(uint64_t operand); | 52 void AddUInt64(uint64_t operand); |
54 void AddBignum(const Bignum& other); | 53 void AddBignum(const Bignum& other); |
55 // Precondition: this >= other. | 54 // Precondition: this >= other. |
56 void SubtractBignum(const Bignum& other); | 55 void SubtractBignum(const Bignum& other); |
57 | 56 |
58 void Square(); | 57 void Square(); |
59 void ShiftLeft(int shift_amount); | 58 void ShiftLeft(int shift_amount); |
60 void MultiplyByUInt32(uint32_t factor); | 59 void MultiplyByUInt32(uint32_t factor); |
61 void MultiplyByUInt64(uint64_t factor); | 60 void MultiplyByUInt64(uint64_t factor); |
62 void MultiplyByPowerOfTen(int exponent); | 61 void MultiplyByPowerOfTen(int exponent); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 int used_digits_; | 135 int used_digits_; |
137 // The Bignum's value equals value(bigits_) * 2^(exponent_ * kBigitSize). | 136 // The Bignum's value equals value(bigits_) * 2^(exponent_ * kBigitSize). |
138 int exponent_; | 137 int exponent_; |
139 | 138 |
140 DISALLOW_COPY_AND_ASSIGN(Bignum); | 139 DISALLOW_COPY_AND_ASSIGN(Bignum); |
141 }; | 140 }; |
142 | 141 |
143 } // namespace double_conversion | 142 } // namespace double_conversion |
144 | 143 |
145 #endif // DOUBLE_CONVERSION_BIGNUM_H_ | 144 #endif // DOUBLE_CONVERSION_BIGNUM_H_ |
OLD | NEW |