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

Unified Diff: runtime/vm/bigint_operations.cc

Issue 14962008: Fix issue 5275: The VM must always generate the most compact form of an integer (Smi, Mint or Bigin… (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/bigint_operations.cc
===================================================================
--- runtime/vm/bigint_operations.cc (revision 22813)
+++ runtime/vm/bigint_operations.cc (working copy)
@@ -664,6 +664,9 @@
int64_t BigintOperations::ToMint(const Bigint& bigint) {
+ if (bigint.IsZero()) {
+ return 0;
+ }
ASSERT(FitsIntoMint(bigint));
int64_t value = AbsToUint64(bigint);
if (bigint.IsNegative()) {

Powered by Google App Engine
This is Rietveld 408576698