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

Unified Diff: runtime/vm/object.cc

Issue 16398008: Implements checks for 53-bit overflow for x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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.cc
===================================================================
--- runtime/vm/object.cc (revision 23717)
+++ runtime/vm/object.cc (working copy)
@@ -10496,10 +10496,11 @@
static void CheckFiftyThreeBitOverflow(const Integer &i) {
- if (i.IsSmi()) return;
// Always overflow if the value doesn't fit into an int64_t.
int64_t value = 1ULL << 63;
- if (i.IsMint()) {
+ if (i.IsSmi()) {
+ value = i.AsInt64Value();
+ } else if (i.IsMint()) {
Mint& mint = Mint::Handle();
mint ^= i.raw();
value = mint.value();

Powered by Google App Engine
This is Rietveld 408576698