69 bool ToHexString(
char* buffer,
int buffer_size)
const;
97 typedef uint32_t Chunk;
98 typedef uint64_t DoubleChunk;
100 static const int kChunkSize =
sizeof(Chunk) * 8;
101 static const int kDoubleChunkSize =
sizeof(DoubleChunk) * 8;
104 static const int kBigitSize = 28;
105 static const Chunk kBigitMask = (1 << kBigitSize) - 1;
110 void EnsureCapacity(
int size) {
111 if (size > kBigitCapacity) {
115 void Align(
const Bignum& other);
117 bool IsClamped()
const;
122 void BigitsShiftLeft(
int shift_amount);
124 int BigitLength()
const {
return used_digits_ + exponent_; }
125 Chunk BigitAt(
int index)
const;
126 void SubtractTimes(
const Bignum& other,
int factor);
128 Chunk bigits_buffer_[kBigitCapacity];
131 Vector<Chunk> bigits_;
136 DISALLOW_COPY_AND_ASSIGN(
Bignum);
141 #endif // V8_BIGNUM_H_
void AssignBignum(const Bignum &other)
void MultiplyByUInt64(uint64_t factor)
static bool PlusLessEqual(const Bignum &a, const Bignum &b, const Bignum &c)
void AssignUInt64(uint64_t value)
void AddBignum(const Bignum &other)
void AddUInt64(uint64_t operand)
static bool PlusLess(const Bignum &a, const Bignum &b, const Bignum &c)
static int Compare(const Bignum &a, const Bignum &b)
void AssignHexString(Vector< const char > value)
static int PlusCompare(const Bignum &a, const Bignum &b, const Bignum &c)
static bool Equal(const Bignum &a, const Bignum &b)
void AssignPowerUInt16(uint16_t base, int exponent)
void ShiftLeft(int shift_amount)
uint16_t DivideModuloIntBignum(const Bignum &other)
static bool PlusEqual(const Bignum &a, const Bignum &b, const Bignum &c)
void MultiplyByUInt32(uint32_t factor)
static bool Less(const Bignum &a, const Bignum &b)
void AssignUInt16(uint16_t value)
void SubtractBignum(const Bignum &other)
bool ToHexString(char *buffer, int buffer_size) const
static bool LessEqual(const Bignum &a, const Bignum &b)
void AssignDecimalString(Vector< const char > value)
void AddUInt16(uint16_t operand)
void MultiplyByPowerOfTen(int exponent)
static const int kMaxSignificantBits