Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: runtime/vm/bigint_operations.h

Issue 9540015: Implement correct bigint to double conversion. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/bigint_operations.cc » ('j') | runtime/vm/bigint_operations.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 static const char* ToDecimalCString(const Bigint& bigint, 46 static const char* ToDecimalCString(const Bigint& bigint,
47 uword (*allocator)(intptr_t size)); 47 uword (*allocator)(intptr_t size));
48 48
49 static bool FitsIntoSmi(const Bigint& bigint); 49 static bool FitsIntoSmi(const Bigint& bigint);
50 static RawSmi* ToSmi(const Bigint& bigint); 50 static RawSmi* ToSmi(const Bigint& bigint);
51 51
52 static bool FitsIntoMint(const Bigint& bigint); 52 static bool FitsIntoMint(const Bigint& bigint);
53 static int64_t ToMint(const Bigint& bigint); 53 static int64_t ToMint(const Bigint& bigint);
54 54
55 static bool FitsIntoUint64(const Bigint& bigint); 55 static bool FitsIntoUint64(const Bigint& bigint);
56 static bool AbsFitsIntoUint64(const Bigint& bigint);
56 static uint64_t ToUint64(const Bigint& bigint); 57 static uint64_t ToUint64(const Bigint& bigint);
57 static uint64_t AbsToUint64(const Bigint& bigint); 58 static uint64_t AbsToUint64(const Bigint& bigint);
58 59
59 static RawDouble* ToDouble(const Bigint& bigint); 60 static RawDouble* ToDouble(const Bigint& bigint);
60 61
61 static RawBigint* Add(const Bigint& a, const Bigint& b) { 62 static RawBigint* Add(const Bigint& a, const Bigint& b) {
62 bool negate_b = false; 63 bool negate_b = false;
63 return AddSubtract(a, b, negate_b); 64 return AddSubtract(a, b, negate_b);
64 } 65 }
65 static RawBigint* Subtract(const Bigint& a, const Bigint& b) { 66 static RawBigint* Subtract(const Bigint& a, const Bigint& b) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 static RawBigint* Copy(const Bigint& bigint); 132 static RawBigint* Copy(const Bigint& bigint);
132 133
133 static int CountBits(Chunk digit); 134 static int CountBits(Chunk digit);
134 135
135 DISALLOW_IMPLICIT_CONSTRUCTORS(BigintOperations); 136 DISALLOW_IMPLICIT_CONSTRUCTORS(BigintOperations);
136 }; 137 };
137 138
138 } // namespace dart 139 } // namespace dart
139 140
140 #endif // VM_BIGINT_OPERATIONS_H_ 141 #endif // VM_BIGINT_OPERATIONS_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/bigint_operations.cc » ('j') | runtime/vm/bigint_operations.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698