Issue #2026 - Part 2a - Support BigInt in NumberFormat and toLocaleString. https://bugzilla.mozilla.org/show_bug.cgi?id=1543677

This commit is contained in:
Brian Smith 2023-07-25 01:41:42 -05:00 committed by roytam1
commit d972016c23
12 changed files with 121 additions and 70 deletions

View file

@ -553,6 +553,10 @@ class MOZ_NON_PARAM alignas(8) Value
return isObject() || isNull();
}
bool isNumeric() const {
return isNumber() || isBigInt();
}
bool isGCThing() const {
#if defined(JS_NUNBOX32)
/* gcc sometimes generates signed < without explicit casts. */
@ -1410,6 +1414,7 @@ class WrappedPtrOperations<JS::Value, Wrapper>
bool isNullOrUndefined() const { return value().isNullOrUndefined(); }
bool isObjectOrNull() const { return value().isObjectOrNull(); }
bool isNumeric() const { return value().isNumeric(); }
bool toBoolean() const { return value().toBoolean(); }
double toNumber() const { return value().toNumber(); }