1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:17:45 +00:00

LibJS+LibWeb: Rename number_to_string to number_to_deprecated_string

This commit is contained in:
Timothy Flynn 2023-01-13 11:43:01 -05:00 committed by Linus Groh
parent c79d20be58
commit 8a88d4434f
5 changed files with 8 additions and 8 deletions

View file

@ -72,7 +72,7 @@ ALWAYS_INLINE bool both_bigint(Value const& lhs, Value const& rhs)
// 6.1.6.1.20 Number::toString ( x ), https://tc39.es/ecma262/#sec-numeric-types-number-tostring
// Implementation for radix = 10
DeprecatedString number_to_string(double d, NumberToStringMode mode)
DeprecatedString number_to_deprecated_string(double d, NumberToStringMode mode)
{
auto convert_to_decimal_digits_array = [](auto x, auto& digits, auto& length) {
for (; x; x /= 10)
@ -339,7 +339,7 @@ DeprecatedString Value::typeof() const
DeprecatedString Value::to_string_without_side_effects() const
{
if (is_double())
return number_to_string(m_value.as_double);
return number_to_deprecated_string(m_value.as_double);
switch (m_value.tag) {
case UNDEFINED_TAG:
@ -377,7 +377,7 @@ ThrowCompletionOr<PrimitiveString*> Value::to_primitive_string(VM& vm)
ThrowCompletionOr<DeprecatedString> Value::to_string(VM& vm) const
{
if (is_double())
return number_to_string(m_value.as_double);
return number_to_deprecated_string(m_value.as_double);
switch (m_value.tag) {
// 1. If argument is a String, return argument.