v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include <bignum.h>
Public Member Functions | |
Bignum () | |
void | AssignUInt16 (uint16_t value) |
void | AssignUInt64 (uint64_t value) |
void | AssignBignum (const Bignum &other) |
void | AssignDecimalString (Vector< const char > value) |
void | AssignHexString (Vector< const char > value) |
void | AssignPowerUInt16 (uint16_t base, int exponent) |
void | AddUInt16 (uint16_t operand) |
void | AddUInt64 (uint64_t operand) |
void | AddBignum (const Bignum &other) |
void | SubtractBignum (const Bignum &other) |
void | Square () |
void | ShiftLeft (int shift_amount) |
void | MultiplyByUInt32 (uint32_t factor) |
void | MultiplyByUInt64 (uint64_t factor) |
void | MultiplyByPowerOfTen (int exponent) |
void | Times10 () |
uint16_t | DivideModuloIntBignum (const Bignum &other) |
bool | ToHexString (char *buffer, int buffer_size) const |
Static Public Member Functions | |
static int | Compare (const Bignum &a, const Bignum &b) |
static bool | Equal (const Bignum &a, const Bignum &b) |
static bool | LessEqual (const Bignum &a, const Bignum &b) |
static bool | Less (const Bignum &a, const Bignum &b) |
static int | PlusCompare (const Bignum &a, const Bignum &b, const Bignum &c) |
static bool | PlusEqual (const Bignum &a, const Bignum &b, const Bignum &c) |
static bool | PlusLessEqual (const Bignum &a, const Bignum &b, const Bignum &c) |
static bool | PlusLess (const Bignum &a, const Bignum &b, const Bignum &c) |
Static Public Attributes | |
static const int | kMaxSignificantBits = 3584 |
void AddBignum | ( | const Bignum & | other | ) |
Definition at line 172 of file bignum.cc.
References ASSERT, v8::internal::carry, and v8::internal::Max().
Referenced by Bignum::AddUInt64(), and TEST().
void AddUInt16 | ( | uint16_t | operand | ) |
void AddUInt64 | ( | uint64_t | operand | ) |
Definition at line 164 of file bignum.cc.
References Bignum::AddBignum(), and Bignum::AssignUInt64().
Referenced by Bignum::AssignDecimalString(), and TEST().
void AssignBignum | ( | const Bignum & | other | ) |
void AssignDecimalString | ( | Vector< const char > | value | ) |
Definition at line 104 of file bignum.cc.
References Bignum::AddUInt64(), Vector< T >::length(), and Bignum::MultiplyByPowerOfTen().
void AssignHexString | ( | Vector< const char > | value | ) |
Definition at line 134 of file bignum.cc.
References Vector< T >::length().
void AssignPowerUInt16 | ( | uint16_t | base, |
int | exponent | ||
) |
Definition at line 415 of file bignum.cc.
References ASSERT, Bignum::AssignUInt16(), Bignum::AssignUInt64(), Bignum::MultiplyByUInt32(), Bignum::ShiftLeft(), and Bignum::Square().
Referenced by TEST().
void AssignUInt16 | ( | uint16_t | value | ) |
Definition at line 50 of file bignum.cc.
References ASSERT.
Referenced by Bignum::AssignPowerUInt16(), and TEST().
void AssignUInt64 | ( | uint64_t | value | ) |
Definition at line 61 of file bignum.cc.
Referenced by Bignum::AddUInt64(), Bignum::AssignPowerUInt16(), and TEST().
Definition at line 618 of file bignum.cc.
References ASSERT, and v8::internal::Min().
Referenced by Bignum::Equal(), Bignum::Less(), Bignum::LessEqual(), and TEST().
uint16_t DivideModuloIntBignum | ( | const Bignum & | other | ) |
Definition at line 489 of file bignum.cc.
References ASSERT, Bignum::LessEqual(), and Bignum::SubtractBignum().
Referenced by TEST().
Definition at line 75 of file bignum.h.
References Bignum::Compare().
Referenced by Bignum::DivideModuloIntBignum(), Bignum::SubtractBignum(), and TEST().
void MultiplyByPowerOfTen | ( | int | exponent | ) |
Definition at line 303 of file bignum.cc.
References ASSERT, Bignum::MultiplyByUInt32(), Bignum::MultiplyByUInt64(), Bignum::ShiftLeft(), and V8_2PART_UINT64_C.
Referenced by Bignum::AssignDecimalString(), and TEST().
void MultiplyByUInt32 | ( | uint32_t | factor | ) |
Definition at line 250 of file bignum.cc.
References ASSERT, and v8::internal::carry.
Referenced by Bignum::AssignPowerUInt16(), Bignum::MultiplyByPowerOfTen(), TEST(), and Bignum::Times10().
void MultiplyByUInt64 | ( | uint64_t | factor | ) |
Definition at line 276 of file bignum.cc.
References ASSERT, and v8::internal::carry.
Referenced by Bignum::MultiplyByPowerOfTen(), and TEST().
Definition at line 636 of file bignum.cc.
References ASSERT, and v8::internal::Min().
Referenced by Bignum::PlusEqual(), Bignum::PlusLess(), Bignum::PlusLessEqual(), and TEST().
void ShiftLeft | ( | int | shift_amount | ) |
Definition at line 241 of file bignum.cc.
Referenced by Bignum::AssignPowerUInt16(), Bignum::MultiplyByPowerOfTen(), and TEST().
void Square | ( | ) |
Definition at line 343 of file bignum.cc.
References ASSERT, and UNIMPLEMENTED.
Referenced by Bignum::AssignPowerUInt16(), and TEST().
void SubtractBignum | ( | const Bignum & | other | ) |
Definition at line 214 of file bignum.cc.
References ASSERT, and Bignum::LessEqual().
Referenced by Bignum::DivideModuloIntBignum(), and TEST().
|
inline |
Definition at line 62 of file bignum.h.
References Bignum::MultiplyByUInt32().
bool ToHexString | ( | char * | buffer, |
int | buffer_size | ||
) | const |
|
static |
Definition at line 39 of file bignum.h.
Referenced by v8::internal::BignumDtoa().