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

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

Issue 9536016: Implement BigintOperations::ToDecimalCString. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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 25 matching lines...) Expand all
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
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_
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