| Index: runtime/lib/integers.cc
|
| diff --git a/runtime/lib/integers.cc b/runtime/lib/integers.cc
|
| index 36241789153360801feaaf5db8a11c36d2238eb9..a3fdc274f2b0f6eeb6a88bd0f180dc3f90ac81ea 100644
|
| --- a/runtime/lib/integers.cc
|
| +++ b/runtime/lib/integers.cc
|
| @@ -409,6 +409,12 @@ DEFINE_NATIVE_ENTRY(Bigint_getDigits, 1) {
|
|
|
|
|
| DEFINE_NATIVE_ENTRY(Bigint_allocate, 4) {
|
| + if (FLAG_limit_ints_to_64_bits) {
|
| + // The allocated Bigint value is not necessarily out of range, but it may
|
| + // be used as an operand in an operation resulting in a Bigint.
|
| + Exceptions::ThrowRangeErrorMsg(
|
| + "Integer operand requires conversion to Bigint");
|
| + }
|
| // 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));
|
|
|