| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 static const char* ToHexCString(const Bigint& bigint, | 56 static const char* ToHexCString(const Bigint& bigint, |
| 57 uword (*allocator)(intptr_t size)); | 57 uword (*allocator)(intptr_t size)); |
| 58 | 58 |
| 59 static const char* ToDecimalCString(const Bigint& bigint, | 59 static const char* ToDecimalCString(const Bigint& bigint, |
| 60 uword (*allocator)(intptr_t size)); | 60 uword (*allocator)(intptr_t size)); |
| 61 | 61 |
| 62 static bool FitsIntoSmi(const Bigint& bigint); | 62 static bool FitsIntoSmi(const Bigint& bigint); |
| 63 static RawSmi* ToSmi(const Bigint& bigint); | 63 static RawSmi* ToSmi(const Bigint& bigint); |
| 64 | 64 |
| 65 static bool FitsIntoMint(const Bigint& bigint); | 65 static bool FitsIntoInt64(const Bigint& bigint); |
| 66 static int64_t ToMint(const Bigint& bigint); | 66 static int64_t ToInt64(const Bigint& bigint); |
| 67 | 67 |
| 68 static bool FitsIntoUint64(const Bigint& bigint); | 68 static bool FitsIntoUint64(const Bigint& bigint); |
| 69 static bool AbsFitsIntoUint64(const Bigint& bigint); | 69 static bool AbsFitsIntoUint64(const Bigint& bigint); |
| 70 static uint64_t ToUint64(const Bigint& bigint); | 70 static uint64_t ToUint64(const Bigint& bigint); |
| 71 static uint64_t AbsToUint64(const Bigint& bigint); | 71 static uint64_t AbsToUint64(const Bigint& bigint); |
| 72 | 72 |
| 73 static RawDouble* ToDouble(const Bigint& bigint); | 73 static RawDouble* ToDouble(const Bigint& bigint); |
| 74 | 74 |
| 75 static RawBigint* Add(const Bigint& a, const Bigint& b) { | 75 static RawBigint* Add(const Bigint& a, const Bigint& b) { |
| 76 bool negate_b = false; | 76 bool negate_b = false; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 static RawBigint* Copy(const Bigint& bigint); | 146 static RawBigint* Copy(const Bigint& bigint); |
| 147 | 147 |
| 148 static int CountBits(Chunk digit); | 148 static int CountBits(Chunk digit); |
| 149 | 149 |
| 150 DISALLOW_IMPLICIT_CONSTRUCTORS(BigintOperations); | 150 DISALLOW_IMPLICIT_CONSTRUCTORS(BigintOperations); |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 } // namespace dart | 153 } // namespace dart |
| 154 | 154 |
| 155 #endif // VM_BIGINT_OPERATIONS_H_ | 155 #endif // VM_BIGINT_OPERATIONS_H_ |
| OLD | NEW |