Issue #1240 - Part 1 - Define a new BigInt primitive type. Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1366287 Part 1.0. However leaving out the --enable-bigint changes.

This commit is contained in:
Brian Smith 2023-07-13 01:59:24 -05:00 committed by roytam1
commit f041afc61d
43 changed files with 411 additions and 20 deletions

View file

@ -3734,6 +3734,10 @@ js::ToStringSlow(ExclusiveContext* cx, typename MaybeRooted<Value, allowGC>::Han
JSMSG_SYMBOL_TO_STRING);
}
return nullptr;
} else if (v.isBigInt()) {
if (!allowGC)
return nullptr;
str = BigInt::toString(cx, v.toBigInt());
} else {
MOZ_ASSERT(v.isUndefined());
str = cx->names().undefined;