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

Unified Diff: runtime/vm/object.cc

Issue 564843002: Initial steps towards cleaning up integer arithmetic IR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
« runtime/vm/intermediate_language_x64.cc ('K') | « runtime/vm/object.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index d82136f54b05f7106c689f0ae51124369ace103a..edcdc3e765d4e3224281075b3779f772e75ee456 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -16746,8 +16746,7 @@ bool Bigint::FitsIntoInt64() const {
}
-int64_t Bigint::AsInt64Value() const {
- ASSERT(FitsIntoInt64());
+int64_t Bigint::AsTruncatedInt64Value() const {
const intptr_t used = Used();
if (used == 0) return 0;
const int64_t digit1 = (used > 1) ? DigitAt(1) : 0;
@@ -16756,6 +16755,12 @@ int64_t Bigint::AsInt64Value() const {
}
+int64_t Bigint::AsInt64Value() const {
+ ASSERT(FitsIntoInt64());
+ return AsTruncatedInt64Value();
+}
+
+
bool Bigint::FitsIntoUint64() const {
ASSERT(Bigint::kBitsPerDigit == 32);
return !Neg() && (Used() <= 2);
« runtime/vm/intermediate_language_x64.cc ('K') | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698