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

Unified Diff: runtime/vm/object.h

Issue 15743017: Adds a flag to the standalone vm to throw an exception on 53-bit integer overflow. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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
===================================================================
--- runtime/vm/object.h (revision 23032)
+++ runtime/vm/object.h (working copy)
@@ -3930,6 +3930,8 @@
virtual double AsDoubleValue() const;
virtual int64_t AsInt64Value() const;
+ virtual bool FitsIn53Bits() const;
+
// Returns 0, -1 or 1.
virtual int CompareWith(const Integer& other) const;
@@ -3969,6 +3971,8 @@
virtual double AsDoubleValue() const;
virtual int64_t AsInt64Value() const;
+ virtual bool FitsIn53Bits() const { return true; }
+
virtual int CompareWith(const Integer& other) const;
static intptr_t InstanceSize() { return 0; }
@@ -4050,6 +4054,8 @@
virtual double AsDoubleValue() const;
virtual int64_t AsInt64Value() const;
+ virtual bool FitsIn53Bits() const;
+
virtual int CompareWith(const Integer& other) const;
static intptr_t InstanceSize() {
@@ -4087,6 +4093,8 @@
virtual double AsDoubleValue() const;
virtual int64_t AsInt64Value() const;
+ virtual bool FitsIn53Bits() const { return false; }
+
virtual int CompareWith(const Integer& other) const;
static const intptr_t kBytesPerElement = kChunkSize;

Powered by Google App Engine
This is Rietveld 408576698