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

Unified Diff: runtime/lib/integers.cc

Issue 2982823002: Option to truncate integers to 64 bits, part 2 (Closed)
Patch Set: Fixes for review comments 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 a8d093956acedc415b2194f1b7f04293fca611e1..544319780193ff9c80d32dbd57e2cf95b3a49dbc 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(!FLAG_limit_ints_to_64_bits);
+ ASSERT(!Bigint::IsDisabled());
const Bigint& bigint = Bigint::Cast(i);
return !bigint.FitsIntoSmi() && !bigint.FitsIntoInt64();
}
siva 2017/07/14 20:53:29 When --limit-ints-to-64-bits mode is specified i.I
@@ -272,7 +272,7 @@ static RawInteger* ShiftOperationHelper(Token::Kind kind,
} else {
ASSERT(value.IsBigint());
}
- ASSERT(!FLAG_limit_ints_to_64_bits);
+ ASSERT(!Bigint::IsDisabled());
return Integer::null();
}
@@ -387,9 +387,7 @@ DEFINE_NATIVE_ENTRY(Bigint_getDigits, 1) {
}
DEFINE_NATIVE_ENTRY(Bigint_allocate, 4) {
- // 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);
+ ASSERT(!Bigint::IsDisabled());
// 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