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

Unified Diff: runtime/vm/object.h

Issue 2982823002: Option to truncate integers to 64 bits, part 2 (Closed)
Patch Set: Fixes for review comments Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index cf0910416c0d5e6aeb71c9b577b336f6eb21663a..719af78f7a40113544473225756f22213f1bfee9 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -6359,6 +6359,7 @@ class Integer : public Number {
Heap::Space space = Heap::kNew);
// Returns a canonical Integer object allocated in the old gen space.
+ // Returns null if integer is out of range (in --limit-ints-to-64-bits mode).
static RawInteger* NewCanonical(const String& str);
static RawInteger* New(int64_t value, Heap::Space space = Heap::kNew);
@@ -6604,6 +6605,9 @@ class Bigint : public Integer {
// Returns a canonical Bigint object allocated in the old gen space.
static RawBigint* NewCanonical(const String& str);
+ // Returns true if Bigint can't be instantiated.
+ static bool IsDisabled() { return FLAG_limit_ints_to_64_bits; }
+
private:
void SetNeg(bool value) const;
void SetUsed(intptr_t value) const;

Powered by Google App Engine
This is Rietveld 408576698