1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 03:08:13 +00:00

Everywhere: Rename to_{string => deprecated_string}() where applicable

This will make it easier to support both string types at the same time
while we convert code, and tracking down remaining uses.

One big exception is Value::to_string() in LibJS, where the name is
dictated by the ToString AO.
This commit is contained in:
Linus Groh 2022-12-06 01:12:49 +00:00 committed by Andreas Kling
parent 6e19ab2bbc
commit 57dc179b1f
597 changed files with 1973 additions and 1972 deletions

View file

@ -194,7 +194,7 @@ ThrowCompletionOr<bool> Reference::delete_(VM& vm)
return m_base_environment->delete_binding(vm, m_name.as_string());
}
DeprecatedString Reference::to_string() const
DeprecatedString Reference::to_deprecated_string() const
{
StringBuilder builder;
builder.append("Reference { Base="sv);
@ -216,7 +216,7 @@ DeprecatedString Reference::to_string() const
if (!m_name.is_valid())
builder.append("<invalid>"sv);
else if (m_name.is_symbol())
builder.appendff("{}", m_name.as_symbol()->to_string());
builder.appendff("{}", m_name.as_symbol()->to_deprecated_string());
else
builder.appendff("{}", m_name.to_string());
builder.appendff(", Strict={}", m_strict);
@ -227,7 +227,7 @@ DeprecatedString Reference::to_string() const
builder.appendff("{}", m_this_value.to_string_without_side_effects());
builder.append(" }"sv);
return builder.to_string();
return builder.to_deprecated_string();
}
// 6.2.4.8 InitializeReferencedBinding ( V, W ), https://tc39.es/ecma262/#sec-object.prototype.hasownproperty