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

Unified Diff: runtime/vm/bigint_operations.h

Issue 8539034: Add methods for creating Bigint objects from unsigned 64-bit integers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Common subroutine for integer conversion Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/bigint_operations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/bigint_operations.h
diff --git a/runtime/vm/bigint_operations.h b/runtime/vm/bigint_operations.h
index 52d8946f0dffccba40b1d07e5fe118d7b9962d12..ce2916c02d387f73fb871e92a838c8ea50e764ee 100644
--- a/runtime/vm/bigint_operations.h
+++ b/runtime/vm/bigint_operations.h
@@ -20,6 +20,8 @@ class BigintOperations : public AllStatic {
public:
static RawBigint* NewFromSmi(const Smi& smi, Heap::Space space = Heap::kNew);
static RawBigint* NewFromInt64(int64_t value, Heap::Space space = Heap::kNew);
+ static RawBigint* NewFromUInt64(uint64_t value,
+ Heap::Space space = Heap::kNew);
// The given string must be a valid integer representation. It may be
// prefixed by a minus and/or "0x".
// Returns Bigint::null() if the string cannot be parsed.
@@ -55,6 +57,10 @@ class BigintOperations : public AllStatic {
static bool FitsIntoInt64(const Bigint& bigint);
static int64_t ToInt64(const Bigint& bigint);
+ static bool FitsIntoUInt64(const Bigint& bigint);
+ static uint64_t ToUInt64(const Bigint& bigint);
+ static uint64_t AbsToUInt64(const Bigint& bigint);
+
static RawDouble* ToDouble(const Bigint& bigint);
static RawBigint* Add(const Bigint& a, const Bigint& b);
« no previous file with comments | « no previous file | runtime/vm/bigint_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698