OLD | NEW |
1 // Copyright 2012 Google Inc. All Rights Reserved. | 1 // Copyright 2012 Google Inc. All Rights Reserved. |
2 | 2 |
3 #ifndef VM_BIGINT_OPERATIONS_H_ | 3 #ifndef VM_BIGINT_OPERATIONS_H_ |
4 #define VM_BIGINT_OPERATIONS_H_ | 4 #define VM_BIGINT_OPERATIONS_H_ |
5 | 5 |
6 #include "platform/utils.h" | 6 #include "platform/utils.h" |
7 | 7 |
8 #include "vm/object.h" | 8 #include "vm/object.h" |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
(...skipping 25 matching lines...) Expand all Loading... |
36 // Converts the bigint to a HEX string. The returned string is prepended by | 36 // Converts the bigint to a HEX string. The returned string is prepended by |
37 // a "0x" (after the optional minus-sign). | 37 // a "0x" (after the optional minus-sign). |
38 static const char* ToHexCString(intptr_t length, | 38 static const char* ToHexCString(intptr_t length, |
39 bool is_negative, | 39 bool is_negative, |
40 void* data, | 40 void* data, |
41 uword (*allocator)(intptr_t size)); | 41 uword (*allocator)(intptr_t size)); |
42 | 42 |
43 static const char* ToHexCString(const Bigint& bigint, | 43 static const char* ToHexCString(const Bigint& bigint, |
44 uword (*allocator)(intptr_t size)); | 44 uword (*allocator)(intptr_t size)); |
45 | 45 |
| 46 static const char* ToDecimalCString(const Bigint& bigint, |
| 47 uword (*allocator)(intptr_t size)); |
| 48 |
46 static bool FitsIntoSmi(const Bigint& bigint); | 49 static bool FitsIntoSmi(const Bigint& bigint); |
47 static RawSmi* ToSmi(const Bigint& bigint); | 50 static RawSmi* ToSmi(const Bigint& bigint); |
48 | 51 |
49 static bool FitsIntoMint(const Bigint& bigint); | 52 static bool FitsIntoMint(const Bigint& bigint); |
50 static int64_t ToMint(const Bigint& bigint); | 53 static int64_t ToMint(const Bigint& bigint); |
51 | 54 |
52 static bool FitsIntoUint64(const Bigint& bigint); | 55 static bool FitsIntoUint64(const Bigint& bigint); |
53 static uint64_t ToUint64(const Bigint& bigint); | 56 static uint64_t ToUint64(const Bigint& bigint); |
54 static uint64_t AbsToUint64(const Bigint& bigint); | 57 static uint64_t AbsToUint64(const Bigint& bigint); |
55 | 58 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 static RawBigint* Copy(const Bigint& bigint); | 131 static RawBigint* Copy(const Bigint& bigint); |
129 | 132 |
130 static int CountBits(Chunk digit); | 133 static int CountBits(Chunk digit); |
131 | 134 |
132 DISALLOW_IMPLICIT_CONSTRUCTORS(BigintOperations); | 135 DISALLOW_IMPLICIT_CONSTRUCTORS(BigintOperations); |
133 }; | 136 }; |
134 | 137 |
135 } // namespace dart | 138 } // namespace dart |
136 | 139 |
137 #endif // VM_BIGINT_OPERATIONS_H_ | 140 #endif // VM_BIGINT_OPERATIONS_H_ |
OLD | NEW |