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

Unified Diff: runtime/lib/integers.cc

Issue 2977143002: Revert "Option to truncate integers to 64 bits, part 2" (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | runtime/lib/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/integers.cc
diff --git a/runtime/lib/integers.cc b/runtime/lib/integers.cc
index 544319780193ff9c80d32dbd57e2cf95b3a49dbc..a8d093956acedc415b2194f1b7f04293fca611e1 100644
--- a/runtime/lib/integers.cc
+++ b/runtime/lib/integers.cc
@@ -27,7 +27,7 @@ DEFINE_FLAG(bool,
// when it could have been a Smi.
static bool CheckInteger(const Integer& i) {
if (i.IsBigint()) {
- ASSERT(!Bigint::IsDisabled());
+ ASSERT(!FLAG_limit_ints_to_64_bits);
const Bigint& bigint = Bigint::Cast(i);
return !bigint.FitsIntoSmi() && !bigint.FitsIntoInt64();
}
@@ -272,7 +272,7 @@ static RawInteger* ShiftOperationHelper(Token::Kind kind,
} else {
ASSERT(value.IsBigint());
}
- ASSERT(!Bigint::IsDisabled());
+ ASSERT(!FLAG_limit_ints_to_64_bits);
return Integer::null();
}
@@ -387,7 +387,9 @@ DEFINE_NATIVE_ENTRY(Bigint_getDigits, 1) {
}
DEFINE_NATIVE_ENTRY(Bigint_allocate, 4) {
- ASSERT(!Bigint::IsDisabled());
+ // TODO(alexmarkov): Revise this assertion if this native method can be used
+ // to explicitly allocate Bigint objects in --limit-ints-to-64-bits mode.
+ ASSERT(!FLAG_limit_ints_to_64_bits);
// First arg is null type arguments, since class Bigint is not parameterized.
const Bool& neg = Bool::CheckedHandle(arguments->NativeArgAt(1));
const Smi& used = Smi::CheckedHandle(arguments->NativeArgAt(2));
« no previous file with comments | « no previous file | runtime/lib/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698